:root {
  --navy: #002554;
  --navy-dark: #001a3a;
  --gold: #f1b434;
  --gray-bg: #f4f5f7;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a6472;
  --border: #e0e3e8;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  background: var(--gray-bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── Header ── */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 1;
}

.logo-full {
  height: 44px;
  width: auto;
  display: block;
}

.logo-sub {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 600;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.header-contact {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-align: right;
}

.header-contact a {
  color: var(--gold);
  text-decoration: none;
}

/* ── Landing page ── */
.landing {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 4rem;
  min-height: calc(100vh - 160px);
}

.landing-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.landing-hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.landing-hero p {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Hero-bilde */
.landing-hero-img {
  position: relative;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  margin-bottom: 3rem;
  border-radius: 12px;
}

.landing-hero-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,37,84,0.35) 0%, rgba(0,37,84,0.72) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2.5rem 2rem;
  text-align: center;
}

.landing-hero-overlay h1 {
  font-size: 3.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.landing-hero-overlay p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin: 0 auto;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--gold);
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}

.card-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

.card-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.phase-chip {
  background: var(--gray-bg);
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.card-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ── Guide page layout ── */
.guide-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 7px 10px;
  margin: 0.75rem 0 0.5rem;
  color: var(--text-muted);
}

.sidebar-search svg {
  flex-shrink: 0;
}

.sidebar-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text);
  width: 100%;
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

#search-results {
  margin: 0 -1.25rem;
}

.search-result-item {
  display: block;
  padding: 10px 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-bg);
  transition: background 0.1s;
}

.search-result-item:hover {
  background: #f0f4ff;
}

.search-result-breadcrumb {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 1px;
}

.search-result-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.search-result-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.search-result-item mark {
  background: #fff3c4;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-empty {
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--navy);
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.sidebar-subtitle {
  display: none;
}

.sidebar-nav {
  padding: 1rem 0;
}

.phase-group {
  margin-bottom: 0.25rem;
}

.phase-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.phase-number {
  width: 20px;
  height: 20px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.phase-group.active .phase-number {
  background: var(--gold);
  color: var(--navy);
}

.section-list {
  list-style: none;
}

.section-item {
  display: block;
  padding: 0.55rem 1.25rem 0.55rem 2.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.section-item:hover {
  background: var(--gray-bg);
  color: var(--text);
}

.section-item.active {
  background: #f0f4ff;
  color: var(--navy);
  border-left-color: var(--gold);
  font-weight: 600;
}

.sidebar-download {
  margin: 1rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.download-btn:hover {
  background: #003070;
}

.download-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  flex-shrink: 0;
}

/* Main content */
.guide-main {
  flex: 1;
  min-width: 0;
  padding: 3rem 5rem;
  max-width: 1400px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb span {
  color: var(--navy);
  font-weight: 500;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.3px;
}

.content-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.content-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid #e0e4ea;
  box-shadow: 0 2px 12px rgba(0,37,84,0.06);
  padding: 3rem;
  margin-bottom: 2rem;
}

/* Intro-siden: skjul den ytre kortet siden intro-box tar over */
.content-card:has(.intro-box) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.intro-supertitle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.intro-box {
  background: var(--navy);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
}
.intro-box-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.intro-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
}
.intro-box p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.intro-box a,
.intro-box p a {
  color: var(--gold) !important;
  text-decoration: underline;
}

.content-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.content-body p {
  margin-bottom: 1rem;
}

.content-body h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}

.content-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-body li {
  margin-bottom: 0.4rem;
}

.content-body a {
  color: var(--navy);
  font-weight: 500;
}

.content-body a:hover {
  color: var(--gold);
}

.content-img {
  width: 70%;
  border-radius: 8px;
  margin-top: 1.25rem;
  display: block;
  object-fit: cover;
}

/* ── Lagring: riktig/feil-sammenligning ── */
.storage-comparison {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 70%;
}

.storage-wrong,
.storage-right {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
}

.storage-wrong {
  border-color: #e53935;
  background: #fff8f8;
}

.storage-right {
  border-color: #2e7d32;
  background: #f6faf6;
}

.storage-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.storage-wrong .storage-label {
  background: #e53935;
  color: #fff;
}

.storage-right .storage-label {
  background: #2e7d32;
  color: #fff;
}

.storage-label svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.storage-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0.75rem;
}

.storage-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.storage-right .content-img {
  margin: 0.75rem;
  width: calc(100% - 1.5rem);
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
}

.storage-single-img {
  margin: 0.75rem;
  width: calc(100% - 1.5rem);
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

@media (max-width: 500px) {
  .storage-img-grid {
    grid-template-columns: 1fr;
  }
}

.tip-box {
  background: #fffbf0;
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1.2rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.info-box {
  background: #f0f4ff;
  border-left: 4px solid var(--navy);
  padding: 0.9rem 1.2rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Nav footer in content */
.content-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  max-width: 48%;
}

.nav-btn:hover {
  background: var(--gray-bg);
  border-color: var(--navy);
}

.nav-btn.next {
  margin-left: auto;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.nav-btn.next:hover {
  background: #003070;
}

.nav-btn-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
}

.nav-btn.next .nav-btn-label {
  color: rgba(255,255,255,0.6);
}

/* Mobile toggle */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
}

/* ── Flytskjema i innledningsseksjon ── */
.intro-flowchart {
  background: transparent;
  margin-top: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 2rem;
}

.flowchart-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  letter-spacing: 0.2px;
  font-style: italic;
}

/* Intro sidebar item */
.section-item.intro-item {
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.875rem;
  border-left: 3px solid transparent;
}

.section-item.intro-item.active {
  background: #f0f4ff;
  border-left-color: var(--gold);
  color: var(--navy);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 1.25rem 0.75rem;
}

/* Intro content heading */
.content-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

/* ── Flytskjema grid ── */
.flowchart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  min-width: 520px;
  gap: 12px;
  align-items: start;
}

/* Connecting bar */
.flowchart::before {
  content: '';
  position: absolute;
  top: 30px;
  left: calc(12.5% + 4px);
  right: calc(12.5% + 4px);
  height: 3px;
  background: var(--gold);
  z-index: 0;
  border-radius: 2px;
  opacity: 0.35;
}

/* Phase column card */
.flow-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px 1rem;
  background: var(--white);
  border-radius: 10px;
  border: 1.5px solid var(--border);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  padding-top: 0;
}

.flow-phase:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(0,37,84,0.1);
}

.flow-phase.active {
  border-color: var(--gold);
  background: #fffbf0;
}

/* Circle */
.flow-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
  transition: all 0.22s;
  flex-shrink: 0;
  margin-bottom: 0.75rem;
  margin-top: -30px;
  background: var(--navy);
  border: 3px solid var(--white);
  color: var(--gold);
  box-shadow: 0 2px 10px rgba(0,37,84,0.2);
  letter-spacing: -1px;
}

.flow-phase:hover .flow-circle {
  transform: translateY(-3px);
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(241,180,52,0.4);
}

.flow-phase.completed .flow-circle {
  background: var(--navy);
  color: white;
  opacity: 0.6;
}

.flow-phase.active .flow-circle {
  background: var(--gold);
  border-color: var(--white);
  color: var(--navy);
  box-shadow: 0 0 0 4px rgba(241,180,52,0.25), 0 4px 16px rgba(241,180,52,0.35);
}

/* Phase title */
.flow-phase-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--navy);
  text-align: center;
  line-height: 1.3;
  transition: color 0.2s;
  opacity: 0.75;
}

/* Small chevron hint below title */
.flow-phase-title::after {
  content: '›';
  display: block;
  transform: rotate(90deg);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.3rem;
  transition: color 0.2s, transform 0.2s;
  opacity: 0.5;
}

.flow-phase:hover .flow-phase-title {
  color: var(--navy);
  opacity: 1;
}

.flow-phase:hover .flow-phase-title::after {
  color: var(--gold);
  opacity: 1;
  transform: rotate(90deg) scaleX(1.3);
}

.flow-phase.completed .flow-phase-title {
  opacity: 0.55;
}

.flow-phase.active .flow-phase-title {
  color: var(--navy);
  opacity: 1;
}

/* Nodes — hidden by default, expand on hover */
.flow-nodes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding-top 0.25s;
  padding-top: 0;
}

.flow-phase:hover .flow-nodes {
  max-height: 300px;
  opacity: 1;
  padding-top: 0.65rem;
}

/* Use .flow-nodes prefix to beat .content-body a specificity */
.flow-nodes .flow-node {
  display: block;
  padding: 6px 8px;
  font-size: 0.75rem;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.3;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.flow-nodes .flow-node:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.flow-nodes .flow-node.active {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 700;
}

.flow-phase.completed .flow-nodes .flow-node {
  background: var(--gray-bg);
  border-color: var(--border);
  color: var(--text-muted);
}

.flow-phase.active .flow-nodes .flow-node {
  background: var(--gray-bg);
  border-color: var(--border);
  color: var(--text);
}

/* ── Sjekkliste ── */

/* Sjekkliste-lenke i sidebar */
.checklist-nav-item {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0.75rem 1.25rem !important;
}

.checklist-nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checklist-nav-item span:first-of-type {
  flex: 1;
}

.checklist-nav-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--gray-bg);
  padding: 2px 6px;
  border-radius: 10px;
}

.checklist-nav-item.active .checklist-nav-count {
  background: rgba(0,37,84,0.1);
  color: var(--navy);
}

/* Fremgangsbar øverst på sjekkliste-siden */
.checklist-progress {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.checklist-progress-text {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.checklist-progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Sjekklistegrupper */
.checklist-group {
  margin-bottom: 1.5rem;
}

.checklist-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* Enkelt checklistepunkt */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

.checklist-item:hover {
  background: var(--gray-bg);
}

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

.checklist-item.done span {
  text-decoration: line-through;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--navy);
  margin-top: 1px;
  cursor: pointer;
}

/* Utskriftsknapp */
.checklist-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-bottom: 1.5rem;
}

.checklist-print-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.checklist-print-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Avvik-knapp (ved hvert sjekkpunkt) ── */
.checklist-item-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 2px;
}

.checklist-item-wrapper .checklist-item {
  flex: 1;
  margin-bottom: 0;
}

.avvik-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: transparent;
  border: 1.5px solid var(--navy);
  border-radius: 5px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  margin-top: 0.35rem;
  opacity: 0.55;
}

.avvik-btn:hover {
  background: var(--navy);
  color: var(--white);
  opacity: 1;
}

.avvik-btn svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Avvik-modal ── */
.avvik-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.avvik-modal-overlay.open {
  display: flex;
}

.avvik-modal {
  background: var(--white);
  border-radius: 12px;
  width: min(520px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.avvik-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avvik-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.avvik-modal-close:hover {
  color: var(--white);
}

.avvik-form {
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.avvik-form-gjelder {
  background: var(--gray-bg);
  border-left: 3px solid var(--gold);
  border-radius: 0 5px 5px 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.avvik-form-gjelder::before {
  content: 'Gjelder: ';
  font-weight: 700;
  color: var(--navy);
}

.avvik-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avvik-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.avvik-form-group input,
.avvik-form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
  resize: vertical;
}

.avvik-form-group input:focus,
.avvik-form-group textarea:focus {
  border-color: var(--navy);
}

.avvik-submit-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  align-self: flex-end;
}

.avvik-submit-btn:hover {
  opacity: 0.88;
}

.avvik-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  gap: 0.75rem;
}

.avvik-success.show {
  display: flex;
}

.avvik-success svg {
  width: 52px;
  height: 52px;
  stroke: #2e7d32;
  margin-bottom: 0.25rem;
}

.avvik-success h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0;
}

.avvik-success p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.avvik-success-close {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.avvik-success-close:hover {
  background: #003070;
}

/* ── Utskrift ── */
@media print {
  .site-header,
  .sidebar,
  .contact-float,
  .site-footer,
  .content-nav,
  .breadcrumb,
  .phase-badge,
  .sidebar-toggle,
  .checklist-print-btn,
  .avvik-btn,
  .avvik-modal-overlay {
    display: none !important;
  }

  .guide-layout {
    display: block;
  }

  .guide-main {
    padding: 0;
    max-width: 100%;
  }

  .content-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .checklist-progress {
    background: #f5f5f5;
    border: 1px solid #ccc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .checklist-progress-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .checklist-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
    break-inside: avoid;
  }

  .checklist-group {
    break-inside: avoid;
  }
}

/* ── Fremgangsindikator ── */
.guide-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.guide-progress-bar {
  flex: 1;
  height: 5px;
  background: #e0e4ea;
  border-radius: 99px;
  overflow: hidden;
}

.guide-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.guide-progress-label {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Flytende kontaktknapp ── */
.contact-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.contact-trigger {
  height: 42px;
  padding: 0 1.25rem;
  border-radius: 50px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(241,180,52,0.45), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.contact-trigger:hover {
  background: #e5a820;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241,180,52,0.55), 0 4px 12px rgba(0,0,0,0.15);
}

.contact-trigger svg {
  width: 24px;
  height: 24px;
  fill: var(--navy);
  transition: transform 0.2s;
}

.contact-trigger.open svg {
  transform: rotate(135deg);
}

.contact-popup {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  padding: 1rem 1.25rem 0.75rem;
  min-width: 220px;
  border: 1px solid var(--border);
  /* hidden by default */
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  transform-origin: bottom right;
}

.contact-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.contact-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.contact-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.contact-close:hover {
  color: var(--navy);
}

.contact-departments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dept-item {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--gray-bg);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.dept-item:hover {
  background: #e0e8f5;
  border-left-color: var(--gold);
}

/* ── Søk ── */
.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.search-btn:hover {
  color: var(--gold);
  background: rgba(255,255,255,0.08);
}

/* ── Service og garanti ── */
.warranty-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.warranty-card {
  border-radius: 10px;
  border: 2px solid var(--border);
  overflow: hidden;
}

.warranty-extended {
  border-color: var(--gold);
}

.warranty-card-header {
  padding: 1.25rem 1.25rem 1rem;
  background: var(--gray-bg);
}

.warranty-extended .warranty-card-header {
  background: var(--navy);
}

.warranty-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.warranty-badge-gold {
  background: var(--gold);
  color: var(--navy);
}

.warranty-card-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.warranty-extended .warranty-card-header h4 {
  color: var(--white);
}

.warranty-years {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.warranty-years-gold {
  color: var(--gold);
}

.warranty-list {
  list-style: none;
  padding: 1rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.warranty-list li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1.25rem;
  position: relative;
}

.warranty-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.service-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}

.service-feature {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.service-feature-icon {
  width: 36px;
  height: 36px;
  background: #e8eaee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--navy);
}

.service-feature strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.service-feature p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.warranty-cta {
  background: var(--navy);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.warranty-cta p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.warranty-cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.warranty-cta-btn:hover {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .warranty-cards, .service-features { grid-template-columns: 1fr; }
  .warranty-cta { flex-direction: column; }
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  background: var(--white);
  border-radius: 12px;
  width: min(600px, 92vw);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.search-input-row svg {
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
}

#search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 4px;
}

#search-close:hover {
  color: var(--navy);
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-bg);
  transition: background 0.1s;
}

.search-result-item:hover {
  background: #f5f8ff;
}

.search-result-breadcrumb {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.search-result-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.search-result-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.search-result-item mark {
  background: #fff3c4;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.8rem;
  margin-top: 3rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    z-index: 99;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .guide-main {
    padding: 1.5rem 1.25rem;
  }

  .landing-hero h1 {
    font-size: 1.6rem;
  }

  .landing-hero-img img {
    height: 260px;
  }

  .landing-hero-overlay h1 {
    font-size: 1.6rem;
  }

  .landing-hero-overlay p {
    font-size: 0.95rem;
  }

  .header-contact {
    display: none;
  }

  .content-title {
    font-size: 1.4rem;
  }

  .content-nav {
    flex-direction: column;
  }

  .nav-btn {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .guide-cards {
    grid-template-columns: 1fr;
  }

  .landing {
    padding: 2rem 1rem;
  }
}
