/*
 * Befaringsveileder for ZIP Screens – v4 (2026-09-07). Mobil først.
 * Alt er scopet under .befvei så det ikke kolliderer med Bootstrap 3-gridet i Dstyle.css.
 * Tokens er hentet fra Dstyle.css (se Documents/reference/befaringsveileder-v4-plan.md):
 * Montserrat overalt (Dstyle:1), brun primær #61594a, grønn «send» #2E7D32, kremhvit side #fdf9f1.
 * Feller i temaet som overstyres her: h2 tvinges til 15px under 450px, .container mister padding
 * under 360px, a:focus{outline:0} globalt, ingen prefers-reduced-motion.
 */

.befvei {
	--bv-brand: #61594a;
	--bv-brand-dark: #4a4438;
	--bv-text: #333;
	--bv-text-muted: #766a52;
	--bv-bg-card: #faf8f4;
	--bv-bg-surface: #fff;
	--bv-border: #e5ded2;
	--bv-border-input: #857a68; /* 4,2:1 mot hvit - WCAG 1.4.11 for inputkanter */
	--bv-border-neutral: #e4e4e4;
	--bv-action: #2E7D32;
	--bv-action-hover: #1c8320;
	--bv-success: #3a7d44;
	--bv-success-bg: #eef6ef;
	--bv-success-border: #b9d8bf;
	--bv-warning-bg: #fff7e6;
	--bv-warning-border: #e8c77a;
	--bv-warning-text: #6b5b28;
	--bv-error: #c0392b;
	--bv-error-bg: #fbe9dc;
	--bv-linje: #d9531e; /* mållinjer på foto - grafikk, ikke tekst */
	--bv-linje-tekst: #c2470f; /* samme farge som bakgrunn for hvit tekst: 5.0:1 */
	--bv-linje-passiv: rgba(255, 255, 255, 0.85);
	--bv-radius: 6px;
	--bv-radius-lg: 10px;
	--bv-tap: 44px;
	--bv-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--bv-shadow-sticky: 0 -4px 16px rgba(0, 0, 0, 0.1);

	color-scheme: light; /* R12: hindrer at Samsung Internets mørke modus inverterer veilederen */
	max-width: 720px;
	margin: 0 auto;
	padding: 0 4px;
	font-family: Montserrat, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--bv-text);
	box-sizing: border-box;
}
.befvei *, .befvei *::before, .befvei *::after { box-sizing: border-box; }

/* Temaet fjerner fokusring globalt - sett den tilbake */
.befvei :focus-visible { outline: 3px solid var(--bv-brand-dark); outline-offset: 2px; border-radius: 4px; }
.befvei :focus:not(:focus-visible) { outline: none; }
@supports not selector(:focus-visible) { .befvei :focus { outline: 3px solid var(--bv-brand-dark); outline-offset: 2px; } }

.befvei__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Typografi (overstyrer Dstyle sine mobil-!important-regler scoped) */
.befvei h2.befvei__tittel { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--bv-brand-dark); margin: 0 0 8px; text-wrap: balance; }
.befvei h3.befvei__deltittel { font-size: 16px; font-weight: 700; color: var(--bv-brand-dark); margin: 20px 0 6px; }
@media (max-width: 450px) {
	.befvei h2.befvei__tittel { font-size: 20px !important; }
	.befvei h3.befvei__deltittel { font-size: 15px !important; }
}
.befvei__hint { font-size: 15px; color: var(--bv-text); margin: 0 0 14px; }
.befvei__hint strong { color: var(--bv-brand-dark); }
.befvei__caption { font-size: 13px; color: var(--bv-text-muted); margin: 8px 0 0; }
.befvei__muted { color: var(--bv-text-muted); font-size: 13px; }
.befvei__question { font-weight: 700; font-size: 16px; margin: 14px 0 4px; }

/* Steg-kort */
.befvei__steg {
	background: var(--bv-bg-surface);
	border: 1px solid var(--bv-border-neutral);
	border-radius: var(--bv-radius-lg);
	padding: 20px 16px 16px;
	margin-bottom: 16px;
}
@media (min-width: 768px) { .befvei__steg { padding: 28px 32px 24px; } }

/* Banner «stå utenfor» */
.befvei__banner {
	display: block;
	background: var(--bv-bg-card);
	border-left: 4px solid var(--bv-brand);
	border-radius: 0 var(--bv-radius) var(--bv-radius) 0;
	padding: 8px 12px;
	font-size: 14px;
	margin: 0 0 12px;
}

/* Header over vindu-steg + progress */
.befvei__vindu-header { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--bv-brand-dark); }
.befvei__progress { margin: 0 0 12px; }
.befvei__progress-tekst { font-size: 13px; color: var(--bv-text-muted); margin-bottom: 6px; }
.befvei__progress-tekst strong { color: var(--bv-brand-dark); }
.befvei__segmenter { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0; padding: 0; }
.befvei__segment { position: relative; min-height: 28px; }
.befvei__segment::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 3px; background: var(--bv-border); }
.befvei__segment span { position: absolute; left: 0; right: 0; top: 10px; font-size: 11px; color: var(--bv-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); }
.befvei__segment.is-ferdig::before { background: var(--bv-success); }
.befvei__segment.is-aktiv::before { background: var(--bv-brand); }
.befvei__segment button { display: block; width: 100%; min-height: 28px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.befvei__segment button span { width: 1px; height: 1px; clip: rect(0, 0, 0, 0); }
@media (max-width: 599px) {
	/* R03: segmentene er hoppeknapper tilbake til et steg. Selve stripen tegnes av
	   ::before i toppen, så knappen kan vokse nedover uten at stripen flytter seg. */
	.befvei__segment, .befvei__segment button { min-height: 44px; }
	.befvei__progress { margin-bottom: 0; }
}
@media (min-width: 600px) {
	.befvei__segmenter { margin-bottom: 18px; }
	.befvei__segment span, .befvei__segment button span { width: auto; height: auto; clip: auto; }
	.befvei__segment.is-aktiv span { color: var(--bv-brand-dark); font-weight: 700; }
	.befvei__segment button:hover span { text-decoration: underline; }
}

/* Valgkort (store touch-flater) */
.befvei__kort { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.befvei__kort--typer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.befvei__kort--tekst, .befvei__kort--to { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.befvei__kort--apning { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) {
	.befvei__kort--typer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.befvei__kort--tekst { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.befvei__kort--apning { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.befvei__valgkort {
	display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
	min-height: var(--bv-tap);
	background: var(--bv-bg-surface);
	border: 2px solid var(--bv-border);
	border-radius: var(--bv-radius-lg);
	padding: 0 0 10px;
	text-align: center;
	font: inherit; color: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.befvei__valgkort:hover { border-color: var(--bv-brand); box-shadow: var(--bv-shadow); }
.befvei__valgkort.is-valgt { border-color: var(--bv-brand-dark); box-shadow: 0 0 0 2px var(--bv-brand-dark) inset; background: var(--bv-bg-card); }
.befvei__valgkort > img, .befvei__valgkort > .befvei__skisse { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; margin: 0 0 8px; }
.befvei__valgkort-label { display: block; padding: 0 10px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.befvei__valgkort-sub { display: block; padding: 4px 10px 0; font-size: 12px; font-weight: 400; color: var(--bv-text-muted); line-height: 1.35; }
.befvei__kort--tekst .befvei__valgkort, .befvei__kort--kompakt .befvei__valgkort { padding: 12px 8px; justify-content: center; }
.befvei__kort--kompakt .befvei__valgkort-label { font-size: 15px; }
.befvei__valgkort--bilde { padding-bottom: 12px; position: relative; }
.befvei__anbefalt { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--bv-success); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); pointer-events: none; }
.befvei__anbefalt .befvei__ikon { width: 14px; height: 14px; color: #ffd66b; }
.befvei__field--laere { padding: 8px 0; border-bottom: 1px dashed var(--bv-border); }
.befvei__laere-maal { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.befvei__valgkort--bilde .befvei__fig { margin: 0 0 8px; }
.befvei__valgkort--bilde .befvei__zoomknapp { cursor: inherit; }

/* Stort bilde av valgt kort ved siden av kortene (type- og åpningssteget).
   Mobil: bildet over, kortene under. Brede skjermer: bildet til venstre. */
.befvei__velg { display: grid; gap: 14px; margin: 8px 0 12px; }
.befvei__velg-stor {
	background: var(--bv-bg-card);
	border: 1px solid var(--bv-border);
	border-radius: var(--bv-radius-lg);
	overflow: hidden;
}
.befvei__velg-stor img { display: block; width: 100%; height: auto; }
.befvei__velg-tekst { margin: 0; padding: 10px 14px; font-size: 14px; line-height: 1.45; color: var(--bv-text); }
.befvei__velg-tekst strong { color: var(--bv-brand-dark); }
.befvei__velg-tom {
	display: flex; align-items: center; justify-content: center;
	min-height: 160px; padding: 24px 18px;
	font-size: 14px; color: var(--bv-text-muted); text-align: center;
	border: 1px dashed var(--bv-border); border-radius: var(--bv-radius-lg); margin: -1px;
	background: var(--bv-bg-surface);
}
.befvei__velg .befvei__kort { margin: 0; gap: 8px; }

/* Kortene ved siden av det store bildet er miniatyrer - de skal kunne skummes,
   ikke studeres. Det store bildet er der detaljene leses. */
.befvei__velg .befvei__valgkort { padding-bottom: 8px; border-width: 2px; }
.befvei__velg .befvei__valgkort > img,
.befvei__velg .befvei__valgkort > .befvei__skisse { margin-bottom: 6px; }
.befvei__velg .befvei__valgkort-label { padding: 0 8px; font-size: 12.5px; line-height: 1.25; }
/* Miniatyrene viser bare overskriften. Beskrivelsen står i det store bildet, men
   blir liggende for skjermlesere så knappen fortsatt forteller hva den er. */
.befvei__velg .befvei__valgkort-sub {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Strekikoner */
.befvei__ikon { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.befvei__trenger-ikon .befvei__ikon { width: 18px; height: 18px; }
.befvei__btn .befvei__ikon { margin-right: 8px; }
.befvei__ikon--linje { display: inline-block; vertical-align: -5px; margin-right: 6px; color: var(--bv-brand-dark); }
.befvei__valgkort-ikon { display: flex; justify-content: center; margin: 0 auto 6px; color: var(--bv-brand-dark); }
.befvei__valgkort-ikon .befvei__ikon { width: 32px; height: 32px; }
.befvei__lenkeliste { list-style: none; padding-left: 0; }
.befvei__lenkeliste li { display: flex; align-items: center; gap: 10px; }
.befvei__lenkeliste .befvei__ikon { color: var(--bv-brand-dark); }

/* Illustrerte ikoner: ingen sirkel rundt, bildet bærer seg selv */
.befvei__ikonbilde { display: block; width: 100%; height: 100%; object-fit: contain; }
.befvei__trenger-ikon.befvei__trenger-ikon--bilde { width: 40px; height: 40px; background: none; border: 0; border-radius: 0; }
.befvei__valgkort-ikon--bilde { width: 52px; height: 52px; }

/* Startsiden: måle eller bare se. To store tekstkort, beskrivelsen synlig. */
.befvei__kort--modus { grid-template-columns: minmax(0, 1fr); margin: 12px 0 16px; }
@media (min-width: 600px) { .befvei__kort--modus { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.befvei__kort--modus .befvei__valgkort { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; align-content: start; padding: 16px 14px; text-align: left; min-height: 96px; }
.befvei__kort--modus .befvei__valgkort-ikon .befvei__ikon { width: 26px; height: 26px; }
.befvei__kort--modus .befvei__valgkort-ikon { grid-row: 1 / span 2; width: 48px; height: 48px; margin: 0; align-items: center; border-radius: 50%; background: var(--bv-bg-card); border: 1px solid var(--bv-border); }
.befvei__kort--modus .befvei__valgkort.is-valgt .befvei__valgkort-ikon { background: var(--bv-brand-dark); border-color: var(--bv-brand-dark); color: #fff; }
/* Med illustrert ikon: ingen sirkel, heller ikke når kortet er valgt (må stå etter reglene over) */
.befvei__kort--modus .befvei__valgkort { grid-template-columns: 56px minmax(0, 1fr); }
.befvei__kort--modus .befvei__valgkort .befvei__valgkort-ikon.befvei__valgkort-ikon--bilde { width: 56px; height: 56px; background: none; border: 0; border-radius: 0; }
.befvei__kort--modus .befvei__valgkort-label { padding: 0; font-size: 16px; }
.befvei__kort--modus .befvei__valgkort-sub { padding: 6px 0 0; font-size: 13.5px; }
.befvei__lenkeliste { margin: 4px 0 12px; }
.befvei__lenkeliste li { padding: 4px 0; }
.befvei__lenkeliste a { color: var(--bv-brand-dark); font-weight: 600; }

/* Mobil: ikke bruk plass på en tom plassholder før kunden har valgt */
@media (max-width: 699px) { .befvei__velg-stor.is-tom { display: none; } }
@media (min-width: 700px) {
	.befvei__velg { grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.65fr); align-items: start; }
	.befvei__velg-stor { position: sticky; top: 12px; }
	.befvei__velg .befvei__kort--typer,
	.befvei__velg .befvei__kort--apning { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Knapper */
.befvei__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: var(--bv-tap);
	background: var(--bv-brand); color: #fff;
	border: 1px solid var(--bv-brand); border-radius: var(--bv-radius);
	padding: 10px 22px;
	font: inherit; font-size: 15px; font-weight: 700;
	cursor: pointer; text-decoration: none;
	transition: background 0.15s ease;
}
.befvei__btn:hover, .befvei__btn:focus { background: var(--bv-brand-dark); color: #fff; text-decoration: none; }
.befvei__btn--primaer { min-width: 140px; }
.befvei__btn--send { background: var(--bv-action); border-color: var(--bv-action); }
.befvei__btn--send:hover, .befvei__btn--send:focus { background: var(--bv-action-hover); border-color: var(--bv-action-hover); }
.befvei__btn--ghost { background: none; color: var(--bv-brand); border-color: var(--bv-border); font-weight: 700; }
.befvei__btn--ghost:hover, .befvei__btn--ghost:focus { background: var(--bv-bg-card); color: var(--bv-brand-dark); }
.befvei__btn--vetikke { background: none; color: var(--bv-text-muted); border: 1px dashed var(--bv-border); font-weight: 500; gap: 8px; }
/* Spørsmålstegnet er et ikon, ikke en del av teksten - teksten skal lese som en setning. */
.befvei__btn--vetikke::before {
	content: '?';
	display: inline-flex; align-items: center; justify-content: center;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--bv-text-muted); color: #fff;
	font-size: 13px; font-weight: 700; line-height: 1;
	flex-shrink: 0;
}
.befvei__btn--vetikke[aria-expanded="true"]::before { content: '×'; font-size: 15px; }
.befvei__btn--vetikke:hover { background: var(--bv-bg-card); color: var(--bv-brand-dark); }
.befvei__btn--vetikke:hover::before { background: var(--bv-brand-dark); }
.befvei__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.befvei__rad { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.befvei__rad--senter { justify-content: center; }
.befvei__lenke { background: none; border: none; padding: 4px 0; min-height: 32px; font: inherit; font-size: 13px; color: var(--bv-brand); text-decoration: underline; cursor: pointer; }
.befvei__lenke:hover { color: var(--bv-brand-dark); }
.befvei__lenke--farlig { color: var(--bv-error); }

/* Navigasjon: sticky i bunn på mobil (mønster fra .cart-sticky-footer i Dstyle) */
.befvei__nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.befvei__nav-hint { font-size: 13px; color: var(--bv-text-muted); }
@media (max-width: 767px) {
	.befvei__lenke { min-height: 44px; padding: 8px 4px; }
	.befvei--sticky { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
	.befvei--sticky.befvei--synlig .befvei__steg > .befvei__nav {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
		margin: 0;
		background: var(--bv-bg-surface);
		border-top: 1px solid #ddd;
		box-shadow: var(--bv-shadow-sticky);
		padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
	}
	.befvei--sticky.befvei--synlig .befvei__steg > .befvei__nav .befvei__btn--primaer,
	.befvei--sticky.befvei--synlig .befvei__steg > .befvei__nav .befvei__btn--send { flex: 1; }
	.befvei--sticky.befvei--synlig .befvei__steg > .befvei__nav .befvei__nav-hint { flex: 1; text-align: right; }
	body.befvei-zoom-aapen .befvei__nav { display: none; }
	#___ratingbadge_0 { bottom: 84px !important; }
}

/* Felt */
.befvei__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.befvei__field label { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.befvei__field em { font-weight: 400; font-style: normal; color: var(--bv-text-muted); }
.befvei__field input[type="number"], .befvei__field input[type="text"], .befvei__field input[type="email"], .befvei__field input[type="tel"], .befvei__field textarea {
	width: 100%; min-height: var(--bv-tap);
	border: 1px solid var(--bv-border-input); border-radius: var(--bv-radius);
	padding: 10px 12px; font: inherit; font-size: 16px; background: var(--bv-bg-surface); color: var(--bv-text);
}
.befvei__field input:focus, .befvei__field textarea:focus { border-color: var(--bv-brand); }
.befvei__field textarea { resize: vertical; }
.befvei__field--bred { grid-column: 1 / -1; }
.befvei__mm { display: flex; align-items: center; gap: 8px; }
.befvei__mm input { max-width: 180px; font-variant-numeric: tabular-nums; }
.befvei__mm span { color: var(--bv-text-muted); font-size: 14px; }
.befvei__felthint { font-size: 13px; color: var(--bv-text-muted); }
.befvei__nr { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bv-linje-tekst); color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.befvei__tre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.befvei__tre .befvei__field { margin-bottom: 0; }
.befvei__tre .befvei__mm input { max-width: none; }
@media (max-width: 480px) { .befvei__tre { grid-template-columns: 1fr; gap: 8px; } }
.befvei__to { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 12px; }
@media (max-width: 480px) { .befvei__to { grid-template-columns: 1fr; } }
.befvei__to--laere { align-items: start; gap: 16px; }
.befvei__to--laere .befvei__deltittel, .befvei__laere-alt .befvei__deltittel { margin-top: 0; }
.befvei__to-felt { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; margin-top: 12px; }
.befvei__innfelt { background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 12px 14px; margin: 12px 0; }
.befvei__innfelt .befvei__deltittle { margin-top: 0; }
.befvei__sjekk { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 12px; }
.befvei__checkbox { display: flex; align-items: flex-start; gap: 10px; min-height: var(--bv-tap); padding: 6px 0; font-weight: 400; cursor: pointer; margin: 0; }
.befvei__checkbox input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--bv-brand); }
.befvei__error { color: var(--bv-error); background: var(--bv-error-bg); border-radius: var(--bv-radius); padding: 10px 12px; font-size: 14px; font-weight: 700; margin: 12px 0 0; scroll-margin: 90px 0 100px; }
.befvei__error:focus { outline: none; }
.befvei__kontrollsetning { background: var(--bv-success-bg); border: 1px solid var(--bv-success-border); border-radius: var(--bv-radius); padding: 10px 12px; font-size: 14px; margin: 12px 0 0; color: #244d2c; }
.befvei__kontrollsetning.is-obs { background: var(--bv-warning-bg); border-color: var(--bv-warning-border); color: var(--bv-warning-text); }
.befvei__btn--liten { min-height: 36px; padding: 6px 14px; font-size: 14px; margin-left: 8px; }
.befvei__bestill { background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.befvei__bestill ul { margin: 6px 0 0; padding-left: 18px; }
.befvei__bestill li { margin: 3px 0; }
.befvei__modell-linje { font-size: 14px; margin: 8px 0; }
.befvei__kontroll-tall { font-size: 14px; margin: 4px 0 2px; color: var(--bv-text); }
span.befvei__fig { display: block; }
@media (min-width: 1026px) { #befvei-app { scroll-margin-top: 110px; } }

/* Fagord */
.befvei__term { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--bv-brand); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.befvei__termboks { display: block; background: var(--bv-bg-card); border-left: 3px solid var(--bv-brand); padding: 6px 10px; margin: 8px 0; font-size: 14px; }
.befvei__termboks--blokk { border-radius: 0 var(--bv-radius) var(--bv-radius) 0; }

/* Bilder med overlegg */
.befvei__fig { margin: 0 0 12px; position: relative; }
.befvei__zoomknapp { display: block; position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--bv-radius-lg); overflow: hidden; text-align: left; }
.befvei__valgkort--bilde .befvei__zoomknapp { border-radius: 0; }
.befvei__zoomknapp img { display: block; width: 100%; height: auto; }
/* Hovedbildet i et målesteg skal aldri fylle mer enn ~70 % av skjermhøyden (landskap/desktop):
   knappen krymper til bildets bredde så SVG-overlegget fortsatt ligger nøyaktig over fotoet. */
.befvei__maalgrid .befvei__fig { text-align: center; }
.befvei__maalgrid .befvei__zoomknapp { display: inline-block; width: auto; max-width: 100%; text-align: left; }
.befvei__maalgrid .befvei__zoomknapp img { width: auto; max-width: 100%; max-height: 70vh; max-height: 70svh; }
.befvei__maalgrid-felt { min-width: 0; }
@media (min-width: 900px) {
	.befvei { max-width: 960px; }
	.befvei__maalgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
	.befvei__maalgrid .befvei__tre { grid-template-columns: 1fr; gap: 12px; }
	.befvei__maalgrid .befvei__mm input { max-width: 200px; }
	.befvei__maalgrid .befvei__zoomknapp img { max-height: 60vh; max-height: 60svh; }
	.befvei__kort--typer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.befvei__overlegg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.befvei__zoomikon { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(23, 18, 31, 0.7); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.befvei__figcaption { font-size: 13px; color: var(--bv-text-muted); margin-top: 6px; }
.befvei__fig--skisse .befvei__skisse { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto; border-radius: var(--bv-radius-lg); }

/* Mållinjer i SVG: passive = hvite med mørk kant, aktiv = oransje */
.befvei__linje { color: var(--bv-linje-passiv); }
.befvei__linje line { stroke: currentColor; paint-order: stroke; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7)); }
.befvei__linje .befvei__linje-kant { stroke: rgba(0, 0, 0, 0.6); filter: none; stroke-linecap: round; }
.befvei__linje circle { fill: #fff; stroke: rgba(0, 0, 0, 0.55); stroke-width: 2; }
.befvei__linje text { fill: var(--bv-brand-dark); font-family: Montserrat, sans-serif; font-weight: 700; }
.befvei__linje.is-aktiv { color: var(--bv-linje); }
.befvei__linje.is-aktiv circle { fill: var(--bv-linje-tekst); stroke: #fff; stroke-width: 3; }
.befvei__linje.is-aktiv text { fill: #fff; }
.befvei__linje.is-feil { color: var(--bv-error); }
.befvei__endepunkt circle { fill: #fff; stroke: var(--bv-linje); stroke-width: 4; }
.befvei__side rect { fill: rgba(255, 255, 255, 0.9); stroke: var(--bv-brand-dark); stroke-width: 2; }
.befvei__side text { fill: var(--bv-brand-dark); font-family: Montserrat, sans-serif; font-weight: 700; }
.befvei__side.is-aktiv rect { fill: var(--bv-brand-dark); }
.befvei__side.is-aktiv text { fill: #fff; }
.befvei__strom circle { fill: none; stroke: var(--bv-linje); stroke-width: 4; }
.befvei__strom text { fill: #fff; font-family: Montserrat, sans-serif; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, 0.7); stroke-width: 4; }

/* Skisse (parametrisk SVG) */
.befvei__skisse { width: 100%; height: auto; display: block; background: #bcb6ae; border-radius: var(--bv-radius); }
.befvei__skisse .sk-vegg { fill: url(#bv-g-vegg); }
.befvei__skisse .sk-kledning { stroke: rgba(0, 0, 0, 0.16); stroke-width: 1.2; }
.befvei__skisse .sk-kledning-lys { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.befvei__skisse .sk-list { fill: url(#bv-g-hvit); stroke: #d6d2cb; stroke-width: 0.8; }
.befvei__skisse .sk-karm { fill: #f7f6f3; stroke: #cfcac2; stroke-width: 0.8; }
.befvei__skisse .sk-glass { fill: url(#bv-g-glass); }
.befvei__skisse .sk-sprosse { fill: #f7f6f3; }
.befvei__skisse .sk-vannbrett, .befvei__skisse .sk-terskel { fill: url(#bv-g-brett); }
.befvei__skisse .sk-kassett, .befvei__skisse .sk-skinne { fill: url(#bv-g-kassett); }
.befvei__skisse .sk-handtak { fill: #17121f; }
.befvei__skisse .sk-kryss { fill: var(--bv-error); font-weight: 700; opacity: 0.9; }
.befvei__skisse .sk-motor { fill: var(--bv-linje-tekst); }
.befvei__strom rect { fill: rgba(255,255,255,0.85); stroke: var(--bv-linje-tekst); stroke-width: 1; }
.befvei__strom text { fill: var(--bv-linje-tekst); font-weight: 700; stroke: none; }
.befvei__foto-ikon svg { display: block; margin: 0 auto; color: var(--bv-brand); }
.befvei__skisse .sk-ramme-inn { fill: none; stroke: #f7f6f3; stroke-width: 3; stroke-dasharray: 7 5; }
.befvei__skisse .sk-pil-tekst { fill: #fff; letter-spacing: 1px; paint-order: stroke; stroke: rgba(0,0,0,0.55); stroke-width: 3; }
.befvei__skisse .sk-tall { color: #2f2a22; }
.befvei__skisse .sk-tall line { stroke: currentColor; }
.befvei__skisse .sk-tall text { fill: #fff; font-family: Montserrat, sans-serif; paint-order: stroke; stroke: rgba(0,0,0,0.6); stroke-width: 3; }
.befvei__skisse .befvei__linje { color: #fff; }
.befvei__skisse .befvei__linje line { filter: none; stroke: #2f2a22; }
.befvei__skisse .befvei__linje.is-aktiv line { stroke: var(--bv-linje); }
.befvei__skisse .befvei__linje.is-feil line { stroke: var(--bv-error); }
.befvei__skisse--mini { border-radius: var(--bv-radius); }

/* Bokser: Viktig / Vanlig feil / svar */
.befvei__boks { border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); background: var(--bv-bg-card); margin: 12px 0; }
.befvei__boks summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: var(--bv-tap); font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; color: var(--bv-brand-dark); }
.befvei__boks summary::-webkit-details-marker { display: none; }
.befvei__boks summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--bv-text-muted); }
.befvei__boks[open] summary::after { content: '–'; }
.befvei__boks-ikon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bv-brand); color: #fff; font-size: 12px; font-weight: 700; font-style: italic; flex-shrink: 0; }
.befvei__boks-innhold { padding: 0 14px 12px; font-size: 14px; }
.befvei__boks-innhold p { margin: 0 0 8px; }
.befvei__svar { background: var(--bv-bg-surface); border-left: 4px solid var(--bv-brand); border-radius: 0 var(--bv-radius) var(--bv-radius) 0; padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.befvei__boks-ikon--feil { background: var(--bv-error); }
.befvei__feil .befvei__feil-par { padding-top: 2px; }
.befvei__feil-par { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.befvei__feil-kol { border: 2px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 8px; font-size: 13px; }
.befvei__feil-kol .befvei__skisse { max-width: 140px; margin: 0 auto 6px; }
.befvei__feil-kol p { margin: 0; }
.befvei__feil-kol.is-feil { border-color: #e9b8b1; }
.befvei__feil-kol.is-riktig { border-color: var(--bv-success-border); }
.befvei__feil-merke { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; margin-right: 4px; vertical-align: middle; }
.is-feil .befvei__feil-merke { background: var(--bv-error); }
.is-riktig .befvei__feil-merke { background: var(--bv-success); }

/* Hva heter delene (hotspots) */
.befvei__fig--deler { border-radius: var(--bv-radius-lg); overflow: hidden; }
.befvei__fig--deler img { display: block; width: 100%; }
.befvei__hotspot { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--bv-linje-tekst); color: #fff; font: inherit; font-size: 12px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); cursor: pointer; padding: 0; }
.befvei__hotspot::before { content: ''; position: absolute; inset: -9px; }
.befvei__hotspot.is-aktiv { background: var(--bv-brand-dark); transform: translate(-50%, -50%) scale(1.15); }
/* Bildet til venstre, nummerlisten til høyre - også på mobil, bildet er lite nok */
.befvei__deler-grid { display: grid; grid-template-columns: minmax(0, 54%) minmax(0, 1fr); gap: 12px 12px; align-items: start; }
@media (max-width: 699px) { .befvei__hotspot { width: 20px; height: 20px; font-size: 11px; } .befvei__deler-knapp { font-size: 13.5px; gap: 8px; } }
@media (min-width: 700px) { .befvei__deler-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); } }
.befvei__fig--deler { margin: 0; }
.befvei__deler-liste { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.befvei__deler-knapp { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 8px 4px 4px; background: none; border: 1px solid transparent; border-radius: var(--bv-radius); font: inherit; font-size: 14px; font-weight: 600; color: inherit; text-align: left; cursor: pointer; }
.befvei__deler-knapp:hover { background: var(--bv-bg-card); }
.befvei__deler-knapp.is-aktiv { background: var(--bv-bg-card); border-color: var(--bv-border); }
.befvei__deler-nr { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bv-linje-tekst); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.befvei__deler-knapp.is-aktiv .befvei__deler-nr { background: var(--bv-brand-dark); }
.befvei__deler-tekst .befvei__termboks--blokk { margin-top: 4px; }

/* Start */
.befvei__trenger { background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 12px 16px; margin: 12px 0; }
.befvei__trenger h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--bv-brand-dark); }
.befvei__trenger ul { list-style: none; margin: 0; padding: 0; }
.befvei__trenger li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.befvei__trenger-ikon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bv-bg-surface); border: 1px solid var(--bv-border); font-size: 15px; font-weight: 700; color: var(--bv-brand-dark); flex-shrink: 0; }

/* Liste */
.befvei__liste-topp { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.befvei__vinduer { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.befvei__vindu { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 12px; }
.befvei__vindu.is-uferdig { border-style: dashed; }
.befvei__vindu-foto { width: 72px; height: 72px; object-fit: cover; border-radius: var(--bv-radius); display: block; overflow: hidden; background: var(--bv-bg-surface); border: 1px solid var(--bv-border); }
.befvei__vindu-foto--tom img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.befvei__vindu-navn { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.befvei__status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.befvei__status.is-ok { background: var(--bv-success-bg); color: #244d2c; border: 1px solid var(--bv-success-border); }
.befvei__status.is-mangler { background: var(--bv-warning-bg); color: var(--bv-warning-text); border: 1px solid var(--bv-warning-border); }
.befvei__vindu-type { font-size: 13px; color: var(--bv-text-muted); }
.befvei__vindu-maal { font-size: 14px; margin-top: 4px; }
.befvei__vindu-modeller { font-size: 13px; color: #244d2c; margin-top: 2px; }
.befvei__vindu-advarsel { font-size: 13px; color: var(--bv-warning-text); margin-top: 2px; }
.befvei__vindu-actions { grid-column: 1 / -1; display: flex; gap: 16px; }
@media (min-width: 600px) { .befvei__vindu { grid-template-columns: 72px 1fr auto; } .befvei__vindu-actions { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 4px; } }
.befvei__lenkeboks { display: flex; gap: 8px; margin: 8px 0; }
.befvei__lenkeboks input { flex: 1; min-width: 0; min-height: var(--bv-tap); border: 1px solid var(--bv-border); border-radius: var(--bv-radius); padding: 8px 10px; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
@media (max-width: 480px) { .befvei__lenkeboks { flex-direction: column; } }
.befvei__details { margin: 8px 0; font-size: 14px; }
.befvei__details summary { cursor: pointer; color: var(--bv-brand); font-weight: 700; min-height: var(--bv-tap); display: flex; align-items: center; gap: 8px; list-style: none; }
.befvei__details summary::-webkit-details-marker { display: none; }
.befvei__details summary::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin: 0 2px 0 2px; }
.befvei__details[open] > summary::before { transform: rotate(45deg); }
.befvei__punkter { margin: 8px 0 0; padding-left: 18px; }
.befvei__punkter li { margin: 4px 0; }

/* Kontroll */
.befvei__klar { margin: 8px 0 14px; }
.befvei__klar-tekst { font-size: 14px; margin-bottom: 6px; }
.befvei__klar-bar { height: 10px; background: var(--bv-border); border-radius: 5px; overflow: hidden; }
.befvei__klar-bar span { display: block; height: 100%; background: var(--bv-success); border-radius: 5px; transition: width 0.3s ease; }
.befvei__kontroll { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.befvei__kontroll-vindu { background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 10px 14px; }
.befvei__kontroll-navn { font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.befvei__kontroll-liste { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.befvei__kontroll-liste li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.befvei__kontroll-liste li span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px; }
.befvei__kontroll-liste li.is-ok span { background: var(--bv-success); }
.befvei__kontroll-liste li.is-mangler span { background: var(--bv-warning-text); color: #fff; }
.befvei__kontroll-liste li.is-mangler { color: var(--bv-warning-text); font-weight: 700; }
.befvei__kontroll-tekst { flex: 1 1 auto; min-width: 0; }
.befvei__kontroll-raa { font-size: 12px; color: var(--bv-text-muted); margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.befvei__stige { margin: 6px 0 0 18px; padding: 0; }
.befvei__stige li { margin: 4px 0; }
.befvei__hjelp { margin-top: 14px; }
.befvei__les { margin-top: 16px; }
.befvei__les .befvei__lenke { font-size: inherit; font-weight: 700; }
.befvei__hjelp a { color: var(--bv-brand); font-weight: 700; }
/* R03: telefonnummeret er en reell klikkflate på mobil, ikke bare tekst */
/* Telefonnummeret flyter i setningen; trykkflaten er 44 px høy via ::after, uten mellomrom rundt tallet */
.befvei__hjelp a[href^="tel:"] { position: relative; white-space: nowrap; }
.befvei__hjelp a[href^="tel:"]::after { content: ''; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -12px; }
.befvei__kontroll-tekst .befvei__lenke { display: inline-block; min-height: 0; padding: 4px 0; white-space: nowrap; font-weight: 700; }
.befvei__valgkort.is-deaktivert { opacity: 0.55; cursor: not-allowed; }
.befvei__valgkort.is-deaktivert > img { filter: grayscale(0.8); }
.befvei__valgkort.is-deaktivert .befvei__valgkort-sub { color: var(--bv-warning-text); font-weight: 600; }
.befvei__lenke.is-bekreft, .befvei__btn.is-bekreft { color: #fff !important; background: var(--bv-error) !important; border-color: var(--bv-error) !important; text-decoration: none; padding: 4px 12px; border-radius: 6px; }

/* Garanti */

/* Foto */
.befvei__fotoer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
@media (max-width: 480px) { .befvei__fotoer { grid-template-columns: 1fr; } }
.befvei__foto-knapp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 110px; border: 2px dashed var(--bv-border); border-radius: var(--bv-radius-lg); padding: 10px; cursor: pointer; text-align: center; background: var(--bv-bg-card); font-weight: 400; margin: 0; }
.befvei__foto-knapp:hover { border-color: var(--bv-brand); }
.befvei__foto.has-foto .befvei__foto-knapp { border-style: solid; border-color: var(--bv-success-border); background: var(--bv-success-bg); }
.befvei__foto-knapp img { width: 100%; max-height: 90px; object-fit: cover; border-radius: var(--bv-radius); }
.befvei__foto-ikon { font-size: 26px; }
.befvei__foto-label { font-weight: 700; font-size: 14px; }
.befvei__foto-hint { font-size: 12px; color: var(--bv-text-muted); }
.befvei__foto:focus-within .befvei__foto-knapp { outline: 3px solid var(--bv-brand-dark); outline-offset: 2px; }

/* Resultat */
.befvei__resultat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 480px) { .befvei__resultat { grid-template-columns: 1fr; } }
.befvei__maal { background: var(--bv-bg-card); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 14px 16px; }
.befvei__maal-tall { font-size: 34px; font-weight: 700; color: var(--bv-brand-dark); line-height: 1; font-variant-numeric: tabular-nums; }
.befvei__maal-tall small { font-size: 14px; font-weight: 700; margin-left: 4px; color: var(--bv-text-muted); }
.befvei__maal-label { font-weight: 700; font-size: 14px; margin-top: 6px; }
.befvei__maal-regel { font-size: 12px; color: var(--bv-text-muted); margin-top: 2px; }
.befvei__formler { background: var(--bv-bg-surface); border: 1px solid var(--bv-border); border-radius: var(--bv-radius-lg); padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.befvei__formler code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--bv-brand-dark); padding: 4px 0; font-variant-numeric: tabular-nums; background: none; }
.befvei__table-wrap { overflow-x: auto; }
.befvei__table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.befvei__table th, .befvei__table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--bv-border); vertical-align: top; }
.befvei__table th { font-weight: 700; color: var(--bv-brand-dark); }
.befvei__table td { font-variant-numeric: tabular-nums; }
.befvei__table small { color: var(--bv-text-muted); }
.befvei__passer td:last-child { color: var(--bv-success); font-weight: 700; }
.befvei__passer-ikke { color: var(--bv-text-muted); }
.befvei__passer-ikke td:last-child { color: var(--bv-error); font-size: 13px; }
.befvei__advarsler { background: var(--bv-warning-bg); border: 1px solid var(--bv-warning-border); border-radius: var(--bv-radius-lg); padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.befvei__advarsler ul { margin: 6px 0 0; padding-left: 18px; }
.befvei__advarsler li { margin: 4px 0; }
.befvei__review { background: var(--bv-warning-bg); border: 1px dashed #d9a441; border-radius: var(--bv-radius); padding: 6px 10px; font-size: 12px; color: var(--bv-warning-text); margin: 8px 0 0; }

/* Ferdig */
.befvei__done { text-align: center; }
.befvei__done-icon { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--bv-success-bg); color: var(--bv-success); font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.befvei__summary-list { list-style: none; padding: 0; margin: 12px auto 20px; max-width: 520px; text-align: left; }
.befvei__summary-list li { padding: 6px 0; border-bottom: 1px dashed var(--bv-border); }
.befvei__summary-list li:last-child { border-bottom: none; }

/* Zoom */
.befvei__zoom { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1100; background: rgba(23, 18, 31, 0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.befvei__zoom-innhold { position: relative; width: 100%; max-width: 900px; max-height: 84vh; max-height: 84svh; overflow: auto; touch-action: pinch-zoom; }
.befvei__zoom-innhold img { display: block; width: 100%; height: auto; }
.befvei__zoom-lukk { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--bv-brand-dark); font-size: 20px; font-weight: 700; cursor: pointer; z-index: 1; }
.befvei__zoom-hint { color: #fff; font-size: 13px; margin: 10px 0 0; opacity: 0.8; }
body.befvei-zoom-aapen { overflow: hidden; position: fixed; width: 100%; }
.befvei__fig.is-uten-bilde img { display: none; }
.befvei__fig.is-uten-bilde .befvei__overlegg, .befvei__fig.is-uten-bilde .befvei__zoomikon { display: none; }
.befvei__fig.is-uten-bilde .befvei__zoomknapp::before { content: 'Bildet kunne ikke lastes - følg teksten over.'; display: block; padding: 24px 16px; background: var(--bv-bg-card); border: 1px dashed var(--bv-border); border-radius: var(--bv-radius-lg); font-size: 14px; color: var(--bv-text-muted); }
.befvei__sendt { color: #244d2c; }

/* Statisk SEO-seksjon under appen (rendres av Yii) */
.befvei-info { color-scheme: light; max-width: 720px; margin: 32px auto 0; padding: 0 4px; font-family: Montserrat, sans-serif; font-size: 15px; line-height: 1.6; color: #333; }
.befvei-info h2 { font-size: 20px; font-weight: 700; color: #4a4438; margin: 24px 0 8px; }
.befvei-info h3 { font-size: 16px; font-weight: 700; color: #4a4438; margin: 16px 0 6px; }
.befvei-info ol, .befvei-info ul { padding-left: 20px; }
.befvei-info details { border: 1px solid #e5ded2; border-radius: 8px; padding: 0 14px; margin: 8px 0; background: #faf8f4; }
.befvei-info summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; display: flex; align-items: center; color: #4a4438; }
.befvei-info details p { margin: 0 0 12px; }
@media (max-width: 450px) { .befvei-info h2 { font-size: 18px !important; } .befvei-info h3 { font-size: 15px !important; } }

/* Små skjermer: temaet nuller container-padding under 360px */
@media (max-width: 360px) { .befvei, .befvei-info { padding: 0 10px; } }

@media (prefers-reduced-motion: reduce) {
	.befvei *, .befvei *::before, .befvei *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
	.befvei__btn, .befvei__lenke, .befvei__nav, .befvei__zoomikon, .befvei__progress, .befvei__vindu-header, .befvei__details, .befvei__feil { display: none !important; }
	.befvei__steg { border: none; padding: 0; }
	.befvei--sticky { padding-bottom: 0; }
}

/* ── Mobil (Jens 2026-09-13) ─────────────────────────────────────────── */
@media (max-width: 699px) {
	/* Forhåndsbildet av valgt kort: kompakt rad (bilde + tekst), så de andre kortene synes uten å scrolle */
	.befvei__velg-stor:not(.is-tom) { display: grid; grid-template-columns: 40% minmax(0, 1fr); align-items: center; }
	.befvei__velg-stor:not(.is-tom) img { height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
	.befvei__velg-stor:not(.is-tom) .befvei__velg-tekst { padding: 10px 12px; font-size: 13.5px; }
	/* Fagord inne i tekst: større trykkflate uten å endre linjeavstanden */
	.befvei__term { position: relative; }
	.befvei__term::after { content: ''; position: absolute; left: -2px; right: -2px; top: -11px; bottom: -11px; }
	.befvei__hotspot::before { inset: -12px; }
	.befvei__deler-knapp { min-height: 44px; }
	/* Lenker i lister og kontroll: minst 44 px å treffe */
	.befvei__vindu-actions .befvei__lenke { min-width: 44px; }
	.befvei__kontroll-tekst .befvei__lenke { padding: 12px 0; }
	.befvei__kontroll-navn .befvei__lenke { min-height: 44px; }
	/* Under 16 px zoomer iPhone inn når feltet får fokus */
	.befvei__lenkeboks input { font-size: 16px; }
	/* Lenkene i læreoppsummeringen: høy nok trykkflate også når teksten går over én linje */
	.befvei__lenkeliste a { display: inline-block; padding: 10px 0; }
	.befvei__table small { font-size: 12px; }
}
/* ── Mobil, runde 2 (Jens 2026-09-14: «not good enough») ─────────────────
   Hele bredden til innholdet, mindre luft over steget, og bildevalgene som en
   liste: utsnitt av vinduet, navn og kjennetegn synlig, valgt rad med hake.
   Det store forhåndsbildet skjules, raden viser alt det viste. */
@media (max-width: 699px) {
	.befvei__steg { background: none; border: 0; border-radius: 0; padding: 4px 0 0; }
	.befvei__vindu-header { margin: 0; font-size: 14px; }
	/* Stripen er 6 px, knappene 44 px høye for trykkflatens skyld. Tittelen får ligge under den tomme
	   nederste delen; fremdriften legges øverst så knappene fortsatt tar imot trykk der. */
	.befvei__progress { margin: 0 0 -18px; position: relative; z-index: 1; }
	.befvei__progress-tekst { margin-bottom: 2px; }
	.befvei h2.befvei__tittel { font-size: 19px !important; margin-bottom: 6px; }
	.befvei__hint { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }

	.befvei__velg { gap: 0; margin: 4px 0 12px; }
	.befvei__velg-stor, .befvei__velg-stor:not(.is-tom) { display: none; }
	.befvei__velg .befvei__kort,
	.befvei__velg .befvei__kort--typer,
	.befvei__velg .befvei__kort--apning { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.befvei__velg .befvei__valgkort {
		display: grid;
		grid-template-columns: 92px minmax(0, 1fr) 24px;
		grid-template-rows: auto auto;
		column-gap: 12px;
		align-content: center;
		align-items: center;
		min-height: 112px;
		padding: 8px 12px 8px 8px;
		text-align: left;
		background: var(--bv-bg-surface);
	}
	.befvei__velg .befvei__valgkort > img,
	.befvei__velg .befvei__valgkort > .befvei__skisse {
		grid-column: 1; grid-row: 1 / span 2; align-self: center;
		/* Hele bildet er 115 x 127 px, men bare vinduet vises: 10 % bort på sidene, 3 % i toppen
		   (toppbordet må synes) og 12 % i bunnen (under brettet, der logoen står). Negative marger
		   gjør at raden bare regner med den synlige delen, 92 x 108 px. */
		width: 115px; height: 127px; aspect-ratio: auto;
		margin: -3.8px -11.5px -15.2px; object-fit: cover; object-position: 50% 0;
		clip-path: inset(3% 10% 12% 10% round 5px);
	}
	.befvei__velg .befvei__valgkort-label { grid-column: 2; grid-row: 1; align-self: end; padding: 0; font-size: 14.5px; line-height: 1.3; }
	.befvei__velg .befvei__valgkort-sub {
		grid-column: 2; grid-row: 2; align-self: start;
		position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
		padding: 3px 0 0; font-size: 12.5px; line-height: 1.4;
	}
	.befvei__velg .befvei__valgkort::after {
		content: ''; grid-column: 3; grid-row: 1 / span 2; align-self: center;
		width: 22px; height: 22px; border-radius: 50%;
		border: 2px solid var(--bv-border-input); background: var(--bv-bg-surface);
	}
	.befvei__velg .befvei__valgkort.is-valgt { background: var(--bv-bg-card); }
	/* Lenkeknapper midt i en setning skal flyte med teksten, ikke brytes ut på egen linje.
	   Trykkflaten utvides usynlig i stedet (samme grep som for fagordene). */
	.befvei__caption .befvei__lenke, .befvei__hint .befvei__lenke, .befvei__svar .befvei__lenke { display: inline; min-height: 0; padding: 0; position: relative; font-size: inherit; }
	.befvei__caption .befvei__lenke::after, .befvei__hint .befvei__lenke::after, .befvei__svar .befvei__lenke::after { content: ''; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -12px; }
	.befvei__caption { line-height: 1.6; }
	/* Målestegene: bildet til venstre og feltene til høyre, så linjen som lyser
	   fortsatt synes mens kunden skriver (tastaturet dekker ellers alt under). */
	.befvei__maalgrid { display: grid; grid-template-columns: minmax(0, 50%) minmax(0, 1fr); gap: 12px; align-items: start; }
	.befvei__maalgrid .befvei__zoomknapp { display: block; width: 100%; }
	.befvei__maalgrid .befvei__zoomknapp img { width: 100%; }
	.befvei__maalgrid .befvei__fig { margin: 0; position: sticky; top: 8px; }
	.befvei__maalgrid .befvei__zoomknapp img { max-height: none; }
	.befvei__maalgrid .befvei__zoomikon { width: 28px; height: 28px; right: 5px; bottom: 5px; font-size: 14px; }
	.befvei__maalgrid .befvei__figcaption, .befvei__maalgrid .befvei__caption { font-size: 12px; line-height: 1.4; }
	.befvei__maalgrid .befvei__tre { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 0; }
	.befvei__maalgrid .befvei__field { gap: 4px; }
	.befvei__maalgrid .befvei__field label { font-size: 13px; gap: 6px; }
	.befvei__maalgrid .befvei__nr { width: 22px; height: 22px; font-size: 12px; }
	.befvei__maalgrid .befvei__mm { gap: 6px; }
	.befvei__maalgrid .befvei__mm input { max-width: none; min-width: 0; padding: 10px; }
	.befvei__maalgrid .befvei__mm span { font-size: 13px; }
	.befvei__maalgrid .befvei__felthint { font-size: 12px; line-height: 1.4; }
	/* Fotoknappene som lave rader: ikon til venstre, tekst til høyre */
	.befvei__fotoer { gap: 8px; }
	.befvei__foto-knapp { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center; justify-items: start; min-height: 64px; padding: 10px 14px; text-align: left; }
	.befvei__foto-knapp > * { grid-column: 2; }
	.befvei__foto-knapp > .befvei__foto-ikon { grid-column: 1; grid-row: 1 / span 2; justify-self: center; }
	.befvei__foto-knapp > img { grid-column: 1 / -1; }
	/* Læremodus: bred og smal side om side, så man ser forskjellen i ett blikk. Trykk på bildet for å se det stort. */
	.befvei__to--laere { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.befvei__to--laere .befvei__deltittel { font-size: 13.5px !important; line-height: 1.3; margin-bottom: 6px; min-height: 2.6em; }
	.befvei__to--laere .befvei__fig { margin-bottom: 6px; }
	.befvei__to--laere .befvei__zoomikon { width: 28px; height: 28px; right: 5px; bottom: 5px; font-size: 14px; }
	.befvei__to--laere .befvei__figcaption, .befvei__to--laere .befvei__caption, .befvei__to--laere p { font-size: 12.5px; line-height: 1.4; }
	/* Bestillingsmålene side om side: bredde og høyde leses som ett par */
	.befvei__resultat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.befvei__resultat .befvei__maal { padding: 12px; }
	.befvei__maal-tall { font-size: 27px; }
	.befvei__maal-tall small { font-size: 12px; margin-left: 3px; }
	.befvei__maal-label { font-size: 13px; }
	.befvei__maal-regel { font-size: 11.5px; line-height: 1.35; }
	.befvei__fig--skisse .befvei__skisse { max-width: 260px; }
	/* Startkortene: mindre ikon og innrykk, så teksten får plass */
	.befvei__kort--modus .befvei__valgkort { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 14px 12px; }
	.befvei__kort--modus .befvei__valgkort .befvei__valgkort-ikon.befvei__valgkort-ikon--bilde { width: 44px; height: 44px; }
	.befvei__kort--modus .befvei__valgkort-label { font-size: 15.5px; }
	/* Vanlige lenker i småtekst: usynlig trykkflate på 44 px */
	.befvei__caption a { position: relative; }
	.befvei__caption a::after { content: ''; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -12px; }
	/* Spørsmål i en innfelt boks: ingen ekstra luft over spørsmålet */
	.befvei__innfelt > .befvei__question:first-child, .befvei__innfelt > .befvei__deltittel:first-child { margin-top: 0; }
	.befvei__innfelt { padding: 12px; }
	/* Bred/smal: side om side, så forskjellen på skinnene ses i samme blikk */
	.befvei__to:has(> .befvei__valgkort--bilde) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.befvei__to > .befvei__valgkort--bilde { padding-bottom: 10px; }
	.befvei__to > .befvei__valgkort--bilde .befvei__valgkort-label { font-size: 13.5px; padding: 0 6px; }
	.befvei__to > .befvei__valgkort--bilde .befvei__valgkort-sub { font-size: 12px; padding: 3px 6px 0; }
	.befvei__to > .befvei__valgkort--bilde .befvei__anbefalt { top: 6px; left: 6px; padding: 3px 7px 3px 5px; font-size: 11px; }
	.befvei__to > .befvei__valgkort--bilde .befvei__anbefalt .befvei__ikon { width: 12px; height: 12px; }
	.befvei__velg .befvei__valgkort.is-valgt::after {
		border-color: var(--bv-brand-dark);
		background: var(--bv-brand-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
	}
}
/* Seks faser i fremdriftslinjen blir smale på 320 px - mindre mellomrom gir hver knapp 44 px */
@media (max-width: 359px) {
	.befvei__segmenter { gap: 2px; }
	/* 320 px (iPhone med skjermzoom): mindre utsnitt, så teksten i radene ikke brytes etter hvert ord */
	.befvei__velg .befvei__valgkort { grid-template-columns: 72px minmax(0, 1fr) 20px; column-gap: 10px; min-height: 96px; padding: 8px 10px 8px 8px; }
	.befvei__velg .befvei__valgkort > img,
	.befvei__velg .befvei__valgkort > .befvei__skisse { width: 90px; height: 99px; margin: -3px -9px -11.9px; }
	.befvei__velg .befvei__valgkort::after { width: 20px; height: 20px; }
	.befvei__velg .befvei__valgkort-label { font-size: 14px; }
	.befvei__velg .befvei__valgkort-sub { font-size: 12px; }
}
