/*
 * Dagensnytt: tekst-først-forside og kategorier
 * Avgrenset til body.dn-text-first og lastet etter SmartMag.
 */

body.dn-text-first {
	--dn-paper: #fbfaf7;
	--dn-ink: #090909;
	--dn-muted: #66625d;
	--dn-rule: #111111;
	--dn-red: #f21b1b;
	background: var(--dn-paper);
	color: var(--dn-ink);
}

/* Den enkle, typografiske toppmenyen i skissen. */
body.dn-text-first .smart-head-main,
body.dn-text-first .smart-head-mobile,
body.dn-text-first #breadcrumb {
	background: var(--dn-paper) !important;
}

body.dn-text-first .smart-head-main .smart-head-mid,
body.dn-text-first .smart-head-mobile .smart-head-mid {
	min-height: 86px;
	border: 0;
	background: var(--dn-paper) !important;
}

body.dn-text-first .smart-head-main .inner.full,
body.dn-text-first .smart-head-mobile .inner.wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 26px;
}

body.dn-text-first .smart-head-main .logo-link,
body.dn-text-first .smart-head-mobile .logo-link {
	width: 268px;
	max-width: 45vw;
}

body.dn-text-first .smart-head-main .logo-image,
body.dn-text-first .smart-head-mobile .logo-image {
	width: 100%;
	height: auto;
}

body.dn-text-first .smart-head-main .smart-head-bot {
	border-top: 2px solid var(--dn-rule);
	border-bottom: 2px solid var(--dn-rule);
	background: var(--dn-paper) !important;
}

body.dn-text-first .smart-head-main .navigation .menu > li > a {
	padding: 15px 17px;
	color: var(--dn-ink) !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.015em;
}

body.dn-text-first .smart-head-main .navigation .menu > li > a:hover,
body.dn-text-first .smart-head-main .navigation .menu > li:hover > a {
	color: var(--dn-red) !important;
}

body.dn-text-first .smart-head-main .ts-button,
body.dn-text-first .smart-head-main .search-icon,
body.dn-text-first .smart-head-mobile .search-icon,
body.dn-text-first .smart-head-mobile .scheme-switcher {
	color: var(--dn-ink) !important;
}

body.dn-text-first .smart-head-main .ts-button {
	border-color: var(--dn-ink);
	border-radius: 0;
	background: transparent;
	font-size: 10px;
	font-weight: 800;
}

body.dn-text-first #breadcrumb {
	border: 0;
}

body.dn-text-first #breadcrumb .inner {
	max-width: 1180px;
	padding: 12px 26px 10px;
	color: #938e87;
	font-size: 11px;
}

/* Det redaksjonelle rutenettet: luftige, flate kort med sorte skillelinjer. */
body.dn-text-first .main.ts-contain {
	max-width: 1180px;
	padding: 0 26px 54px;
}

body.dn-text-first .block-wrap.block-grid {
	max-width: none;
	padding: 0;
}

body.dn-text-first .loop-grid,
body.dn-text-first .loop-grid.grid-2,
body.dn-text-first .loop-grid.md\:grid-2 {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 0 20px !important;
	padding: 0 !important;
	background: transparent !important;
}

body.dn-text-first .loop-grid .l-post,
body.dn-text-first .l-post.grid-post {
	min-width: 0;
	margin: 0 !important;
	padding: 0 0 22px !important;
	border: 0;
	border-bottom: 2px solid var(--dn-rule);
	border-radius: 0;
	box-shadow: none !important;
	background: transparent !important;
	transform: none !important;
	overflow: visible;
}

body.dn-text-first .l-post.grid-post:hover {
	box-shadow: none !important;
	transform: none !important;
}

body.dn-text-first .l-post.grid-post .media {
	width: 100% !important;
	margin: 0 0 14px !important;
	background: transparent !important;
}

body.dn-text-first .l-post.grid-post .image-link,
body.dn-text-first .l-post.grid-post .image-link.ratio-16-9,
body.dn-text-first .l-post.grid-post .image-link.media-ratio {
	display: block !important;
	padding: 0 0 60% !important;
	background: #e7e3dc;
	border-radius: 0;
}

body.dn-text-first .l-post.grid-post .image-link img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transform: none !important;
}

body.dn-text-first .l-post.grid-post:hover .image-link img {
	transform: none !important;
}

body.dn-text-first .l-post.grid-post .content {
	display: block;
	padding: 0 !important;
	background: transparent !important;
}

body.dn-text-first .l-post.grid-post .post-meta {
	margin: 0 !important;
	padding: 0 !important;
}

body.dn-text-first .l-post.grid-post .post-title,
body.dn-text-first .l-post.grid-post .is-title {
	margin: 0 !important;
	padding: 0 !important;
}

body.dn-text-first .l-post.grid-post .post-title a {
	display: block;
	color: var(--dn-ink) !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: clamp(20px, 1.75vw, 28px) !important;
	font-weight: 900 !important;
	letter-spacing: -0.065em;
	line-height: 0.98 !important;
	text-decoration: none !important;
}

body.dn-text-first .l-post.grid-post .post-title a:hover {
	color: var(--dn-red) !important;
}

body.dn-text-first .l-post.grid-post .excerpt,
body.dn-text-first .l-post.grid-post .post-meta-items,
body.dn-text-first .l-post.grid-post .post-author,
body.dn-text-first .l-post.grid-post .post-date,
body.dn-text-first .l-post.grid-post .time-wrap,
body.dn-text-first .l-post.grid-post .cat-labels:not(.dn-text-kicker-wrap) {
	display: none !important;
}

/* Vanlige bildeartikler: liten redaksjonell kategori over overskriften. */
body.dn-text-first .dn-visual-card .dn-visual-kicker {
	display: block;
	margin: 0 0 8px;
	color: var(--dn-muted);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* Artikler med Dagensnytts generiske «Siste»-bilder blir typografiske nyhetskort. */
body.dn-text-first .loop-grid .l-post.dn-text-card {
	grid-column: span 1;
	position: relative;
	padding: 24px 0 28px !important;
	background: var(--dn-paper) !important;
}

body.dn-text-first .loop-grid .l-post.dn-text-card .media {
	display: none !important;
}

body.dn-text-first .loop-grid .l-post.dn-text-card .content {
	position: static !important;
	display: block !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--dn-ink) !important;
}

body.dn-text-first .loop-grid .l-post.dn-text-card .post-title a {
	color: var(--dn-ink) !important;
	font-size: clamp(31px, 3vw, 48px) !important;
	font-weight: 900 !important;
	letter-spacing: -0.08em;
	line-height: 0.91 !important;
	text-shadow: none !important;
}

body.dn-text-first .dn-text-kicker {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 14px;
	color: var(--dn-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.01em;
	line-height: 1;
	text-transform: uppercase;
}

body.dn-text-first .dn-text-kicker.is-breaking {
	color: var(--dn-red);
}

body.dn-text-first .dn-text-kicker.is-breaking::before {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--dn-red);
	content: '';
	flex: 0 0 14px;
}

/* Hovedkortet følger skissens brede, ekstra store typografiske toppsak. */
body.dn-text-first .loop-grid .l-post.dn-text-card.dn-text-lead {
	grid-column: 1 / -1;
	padding: 32px 0 36px !important;
}

body.dn-text-first .loop-grid .l-post.dn-text-card.dn-text-lead .post-title a {
	max-width: 880px;
	font-size: clamp(50px, 6vw, 92px) !important;
	letter-spacing: -0.095em;
	line-height: 0.86 !important;
}

body.dn-text-first .loop-grid .l-post.dn-text-card.dn-text-lead .dn-text-kicker {
	font-size: 15px;
}

/* Nyhetsarkivets overskrift får samme enkle typografiske uttrykk. */
body.dn-text-first .archive-head,
body.dn-text-first .archive-title {
	border: 0;
}

body.dn-text-first .archive-title,
body.dn-text-first .archive-head h1 {
	color: var(--dn-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(38px, 5vw, 64px);
	font-weight: 900;
	letter-spacing: -0.08em;
	line-height: 0.9;
}

@media (max-width: 900px) {
	body.dn-text-first .loop-grid,
	body.dn-text-first .loop-grid.grid-2,
	body.dn-text-first .loop-grid.md\:grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0 16px !important;
	}

	body.dn-text-first .loop-grid .l-post.dn-text-card .post-title a {
		font-size: clamp(28px, 4.4vw, 42px) !important;
	}
}

@media (max-width: 767px) {
	body.dn-text-first .smart-head-main {
		display: none !important;
	}

	body.dn-text-first .smart-head-mobile {
		display: block !important;
		border-bottom: 2px solid var(--dn-rule);
	}

	body.dn-text-first .smart-head-mobile .smart-head-mid {
		min-height: 76px;
	}

	body.dn-text-first .smart-head-mobile .inner.wrap {
		padding: 0 18px;
	}

	body.dn-text-first .smart-head-mobile .logo-link {
		width: 210px;
		max-width: 54vw;
	}

	body.dn-text-first .smart-head-mobile .items-left,
	body.dn-text-first .smart-head-mobile .items-right {
		width: 36px;
	}

	body.dn-text-first .smart-head-mobile .scheme-switcher {
		display: none !important;
	}

	body.dn-text-first #breadcrumb .inner {
		padding: 10px 18px 8px;
	}

	body.dn-text-first .main.ts-contain {
		padding: 0 18px 42px;
	}

	body.dn-text-first .loop-grid,
	body.dn-text-first .loop-grid.grid-2,
	body.dn-text-first .loop-grid.md\:grid-2 {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 0 !important;
	}

	body.dn-text-first .loop-grid .l-post,
	body.dn-text-first .l-post.grid-post {
		padding: 0 0 20px !important;
		border-bottom-width: 2px;
	}

	body.dn-text-first .l-post.grid-post .media {
		margin-bottom: 12px !important;
	}

	body.dn-text-first .l-post.grid-post .post-title a {
		font-size: clamp(28px, 8.1vw, 41px) !important;
		line-height: 0.93 !important;
	}

	body.dn-text-first .loop-grid .l-post.dn-text-card {
		grid-column: auto;
		padding: 24px 0 25px !important;
	}

	body.dn-text-first .loop-grid .l-post.dn-text-card .post-title a {
		font-size: clamp(35px, 10.6vw, 52px) !important;
		line-height: 0.87 !important;
	}

	body.dn-text-first .loop-grid .l-post.dn-text-card.dn-text-lead {
		padding: 27px 0 30px !important;
	}

	body.dn-text-first .loop-grid .l-post.dn-text-card.dn-text-lead .post-title a {
		font-size: clamp(52px, 15vw, 72px) !important;
		line-height: 0.83 !important;
	}

	body.dn-text-first .dn-text-kicker {
		margin-bottom: 12px;
		font-size: 12px;
	}
}

/* Kritisk kontrastregel: eldre SmartMag-hero-stil må aldri gjøre tekst-først-overskrifter hvite. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content .post-meta .post-title.is-title a,
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .content .post-meta .post-title.is-title a,
html body.dn-text-first .loop-grid .l-post.grid-post.dn-text-card:first-child .content .post-title a {
	color: #090909 !important;
	text-shadow: none !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card:first-child .content,
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .content {
	background: transparent !important;
	color: #090909 !important;
}

/* Kategorisider og forsider: første bildeartikkel skal aldri arve SmartMag-overlayen. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) {
	grid-column: auto !important;
	position: static !important;
	overflow: visible !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .media {
	position: static !important;
	margin-bottom: 12px !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .image-link,
html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .image-link.media-ratio,
html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .image-link.ratio-16-9 {
	display: block !important;
	width: 100% !important;
	padding: 0 0 60% !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .content {
	position: static !important;
	display: block !important;
	padding: 0 !important;
	background: transparent !important;
	color: #090909 !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .post-title a {
	color: #090909 !important;
	font-size: clamp(20px, 1.75vw, 28px) !important;
	line-height: 0.98 !important;
	text-shadow: none !important;
}

@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .post-title a {
		font-size: clamp(28px, 8.1vw, 41px) !important;
		line-height: 0.93 !important;
	}
}

/* På kategoriarkiv er konteksten allerede tydelig i sidetittelen – ikke gjenta den over hvert kort. */
html body.dn-text-first.archive.category .dn-visual-kicker,
html body.dn-text-first.archive.category .dn-text-kicker {
	display: none !important;
}

html body.dn-text-first.archive.category .loop.loop-grid .l-post.grid-post.dn-text-card {
	padding-top: 15px !important;
}

/* Artikkelnivå: «Les også»-innganger bruker samme flate, typografiske språk som forsiden. */
html body.dn-text-first.single-post .related-posts {
	margin-top: 44px;
	padding-top: 0;
}

html body.dn-text-first.single-post .related-posts .block-head {
	margin: 0 0 16px;
	padding: 0 0 10px;
	border-bottom: 2px solid var(--dn-rule);
}

html body.dn-text-first.single-post .related-posts .block-head .heading {
	margin: 0;
	color: var(--dn-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: 900;
	letter-spacing: -0.055em;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 0 20px !important;
	background: transparent !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post {
	padding: 0 0 20px !important;
	border: 0;
	border-bottom: 2px solid var(--dn-rule);
	border-radius: 0;
	box-shadow: none !important;
	background: transparent !important;
	overflow: visible !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .media {
	width: 100% !important;
	margin: 0 0 12px !important;
	background: transparent !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .image-link,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .image-link.media-ratio,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .image-link.ratio-16-9 {
	display: block !important;
	padding: 0 0 60% !important;
	background: #e7e3dc;
	border-radius: 0;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .content {
	position: static !important;
	display: block !important;
	padding: 0 !important;
	background: transparent !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .post-title a {
	display: block !important;
	color: var(--dn-ink) !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: clamp(21px, 1.75vw, 27px) !important;
	font-weight: 900 !important;
	letter-spacing: -0.065em;
	line-height: 0.96 !important;
	text-decoration: none !important;
	text-shadow: none !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card {
	padding: 18px 0 22px !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .media {
	display: none !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a {
	font-size: clamp(28px, 2.45vw, 39px) !important;
	letter-spacing: -0.08em;
	line-height: 0.89 !important;
}

html body.dn-text-first.single-post .related-posts .dn-text-kicker,
html body.dn-text-first.single-post .related-posts .dn-visual-kicker {
	display: none !important;
}

@media (max-width: 767px) {
	html body.dn-text-first.single-post .related-posts {
		margin-top: 36px;
	}

	html body.dn-text-first.single-post .related-posts .loop.loop-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 0 !important;
	}

	html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post .post-title a {
		font-size: clamp(28px, 8.1vw, 41px) !important;
		line-height: 0.93 !important;
	}

	html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a {
		font-size: clamp(36px, 10.6vw, 52px) !important;
		line-height: 0.87 !important;
	}
}

/* Tydelig inngangshierarki: bildefrie saker er egne redaksjonelle tekstflater, ikke «manglende bilder». */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card {
	position: relative;
	padding: 28px 20px 30px !important;
	border-top: 2px solid var(--dn-rule) !important;
	border-bottom: 2px solid var(--dn-rule) !important;
	background: #f1eee8 !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card::before,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 8px;
	height: 100%;
	background: var(--dn-red);
	content: '';
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .content {
	padding-left: 2px !important;
}

/* Bildeinnganger får egen luft før fotoet, og beholder den rene, hvite redaksjonelle flaten. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-visual-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-visual-card {
	padding-top: 28px !important;
	background: transparent !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-visual-card .media,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-visual-card .media {
	border-top: 2px solid var(--dn-rule);
	padding-top: 14px;
}

@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card,
	html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card {
		padding: 25px 18px 27px !important;
	}

	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-visual-card,
	html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-visual-card {
		padding-top: 26px !important;
	}
}

/* Siste finpuss for mobil: lange ord skal aldri kuttes, og korttypene skal ikke flyte sammen. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card {
	margin-bottom: 24px !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a {
	overflow-wrap: break-word;
	hyphens: auto;
	word-break: normal;
}

@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .post-title a {
		font-size: clamp(46px, 13.3vw, 60px) !important;
		line-height: 0.88 !important;
	}

	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card:not(.dn-text-lead) .post-title a,
	html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a {
		font-size: clamp(33px, 9.6vw, 46px) !important;
		line-height: 0.9 !important;
	}
}

/* Robust reserve for alle generiske «Siste»-illustrasjoner: fungerer også før/uten JavaScript. */
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]),
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) {
	position: relative !important;
	margin-bottom: 24px !important;
	padding: 28px 20px 30px !important;
	border-top: 2px solid var(--dn-rule) !important;
	border-bottom: 2px solid var(--dn-rule) !important;
	background: #ece9e2 !important;
}

html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"])::before,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"])::before {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 9px;
	background: #f21b1b;
	content: '';
}

html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .media,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .media {
	display: none !important;
}

html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .content,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .content {
	position: static !important;
	display: block !important;
	padding: 0 0 0 2px !important;
	background: transparent !important;
}

html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .post-title a,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .post-title a {
	color: #090909 !important;
	font-weight: 900 !important;
	text-shadow: none !important;
}

/* Kompakt flyt på forside og kategori: ingen tom start og kun én skillelinje per bildeinngang. */
html body.dn-text-first.home #breadcrumb,
html body.dn-text-first.archive.category #breadcrumb {
	margin-bottom: 0 !important;
}

html body.dn-text-first.home .main.ts-contain,
html body.dn-text-first.archive.category .main.ts-contain {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

html body.dn-text-first.home .block-wrap.block-grid,
html body.dn-text-first.archive.category .block-wrap.block-grid {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

html body.dn-text-first.home .loop.loop-grid .l-post.grid-post.dn-visual-card,
html body.dn-text-first.archive.category .loop.loop-grid .l-post.grid-post.dn-visual-card {
	border-bottom: 0 !important;
	padding-bottom: 0 !important;
}

html body.dn-text-first.home .loop.loop-grid .l-post.grid-post.dn-visual-card .content,
html body.dn-text-first.archive.category .loop.loop-grid .l-post.grid-post.dn-visual-card .content {
	padding-bottom: 18px !important;
}

@media (max-width: 767px) {
	html body.dn-text-first.home #breadcrumb .inner,
	html body.dn-text-first.archive.category #breadcrumb .inner {
		padding-bottom: 2px !important;
	}

	html body.dn-text-first.home .block-wrap.block-grid,
	html body.dn-text-first.archive.category .block-wrap.block-grid {
		margin-top: 0 !important;
	}
}

/* Når JavaScript ikke har merket kortet ennå, bygges «Siste»-etiketten direkte med CSS. */
html body.dn-text-first .loop.loop-grid > article.l-post:not(.dn-text-card):has(.media img[src*="/Red-"]) .content::before,
html body.dn-text-first .loop.loop-grid > article.l-post:not(.dn-text-card):has(.media img[data-lazy-src*="/Red-"]) .content::before {
	display: block;
	margin: 0 0 12px;
	color: #f21b1b;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.02em;
	content: '●  SISTE';
}

html body.dn-text-first .related-posts .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .post-title a,
html body.dn-text-first .related-posts .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .post-title a {
	font-size: clamp(30px, 2.45vw, 39px) !important;
	letter-spacing: -0.08em;
	line-height: 0.89 !important;
}

@media (max-width: 767px) {
	html body.dn-text-first .related-posts .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .post-title a,
	html body.dn-text-first .related-posts .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .post-title a {
		font-size: clamp(33px, 9.6vw, 46px) !important;
		line-height: 0.9 !important;
	}
}

/* Absolutt første forsideoverskrift: sort tekst uansett eldre hero-regler eller skriptstatus. */
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child {
	position: static !important;
	background: transparent !important;
}

html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child .content {
	position: static !important;
	display: block !important;
	padding: 0 0 20px !important;
	background: transparent !important;
	color: #090909 !important;
}

html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child .post-title a,
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child .is-title a {
	color: #090909 !important;
	text-shadow: none !important;
}

/* Dynamisk rytme: første og hver tredje bildefrie sak på forside/kategori får stort tekstformat. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature {
	grid-column: 1 / -1;
	padding: 32px 20px 36px !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .post-title a {
	max-width: 880px;
	font-size: clamp(50px, 6vw, 92px) !important;
	letter-spacing: -0.095em;
	line-height: 0.86 !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .dn-text-kicker {
	font-size: 15px;
}

@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature {
		padding: 27px 18px 30px !important;
	}

	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .post-title a {
		font-size: clamp(46px, 13.3vw, 60px) !important;
		line-height: 0.88 !important;
	}
}

/* «Les også»: bildeinnganger bruker kun topplinjen på neste kort, aldri både bunn- og topplinje. */
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-visual-card {
	border-bottom: 0 !important;
	padding-bottom: 0 !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-visual-card .content {
	padding-bottom: 18px !important;
}

/* Desktop: mellomliggende tekstavbrekk fyller to kolonner, slik at neste kort fyller den tredje uten tomrom. */
@media (min-width: 768px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature:not(.dn-text-lead) {
		grid-column: span 2 !important;
	}

	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature:not(.dn-text-lead) .post-title a {
		font-size: clamp(38px, 3.8vw, 58px) !important;
		line-height: 0.91 !important;
		letter-spacing: -0.06em;
	}
}

/* Desktop: tett, redaksjonelt nyhetsrutenett inspirert av kompakte nettavisforsider.
   Høyden på hvert kort bestemmes av innholdet, ikke høyden på andre kort i samme rad. */
@media (min-width: 768px) {
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid {
		grid-auto-rows: 10px !important;
		row-gap: 20px !important;
		align-items: start !important;
	}

	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post {
		align-self: start !important;
		margin-bottom: 0 !important;
	}
}

/* Én skillelinje per overgang: når to tekstkort følger hverandre, beholdes bare bunnlinjen på det første. */
html body.dn-text-first .loop.loop-grid > .l-post.grid-post.dn-text-card + .l-post.grid-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.grid-post.dn-text-card + .l-post.grid-post.dn-text-card {
	border-top: 0 !important;
}

/* Faste redaksjonelle moduler: horoskop og quiz skal ikke arve utseendet til vanlige saker. */
html body.dn-text-first .loop.loop-grid > .dn-fixed-module,
html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
	box-sizing: border-box;
	align-self: start !important;
	min-width: 0;
}

html body.dn-text-first .dn-horoscope-module {
	grid-column: span 1;
	margin: 0 !important;
	border: 2px solid #24104b;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, #1b0637 0%, #4a1673 100%);
	box-shadow: none;
}

html body.dn-text-first .dn-horoscope-link {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 184px;
	padding: 24px;
	color: #fff;
	text-decoration: none;
	background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.2) 1px, transparent 0);
	background-size: 18px 18px;
}

html body.dn-text-first .dn-horoscope-link:hover {
	color: #fff;
	background-color: rgba(255,255,255,.05);
}

html body.dn-text-first .dn-horoscope-link strong {
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(24px, 2vw, 34px);
	line-height: .98;
	letter-spacing: -.045em;
	font-weight: 800;
}

html body.dn-text-first .dn-module-label {
	color: #e9d5ff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .11em;
	text-transform: uppercase;
}

html body.dn-text-first .dn-module-cta {
	margin-top: auto;
	font-size: 14px;
	font-weight: 800;
	color: #fff;
}

/* Quiz får sin egen nøytrale modulkortflate og kan aldri visuelt smelte sammen med saken over. */
html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
	grid-column: span 1 !important;
	margin: 0 !important;
	padding: 16px !important;
	background: #f5f2ed !important;
	border: 2px solid #111 !important;
	border-left: 6px solid #e42128 !important;
}

html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap .dnqb-banner-wrapper,
html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap .dnqb-poll {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap .dnqb-inner {
	padding: 0 !important;
}

@media (max-width: 767px) {
	html body.dn-text-first .dn-horoscope-module,
	html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
		grid-column: 1 / -1 !important;
	}

	html body.dn-text-first .dn-horoscope-link {
		min-height: 0;
		padding: 22px;
	}
}

/* Artikler uten featured image: den tomme mediebeholderen skjules, og overskriften får en bevisst innrammet tekstinngang. */
html body.dn-text-first .loop.loop-grid > .l-post.dn-no-image-card .media {
	display: none !important;
}

html body.dn-text-first .loop.loop-grid > .l-post.dn-no-image-card .content {
	min-height: 0;
	padding-top: 26px !important;
	padding-bottom: 26px !important;
}

html body.dn-text-first .loop.loop-grid > .l-post.dn-no-image-card .excerpt {
	display: none !important;
}

/* Sikker innvendig margin: reservebilderegelen må aldri trekke tekst tilbake over den røde kanten. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content,
html body.dn-text-first .loop.loop-grid > article.l-post.dn-text-card:has(.media img[src*="/Red-"]) .content,
html body.dn-text-first .loop.loop-grid > article.l-post.dn-text-card:has(.media img[data-lazy-src*="/Red-"]) .content {
	box-sizing: border-box !important;
	padding-left: 20px !important;
	padding-right: 12px !important;
}

@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content,
	html body.dn-text-first .loop.loop-grid > article.l-post.dn-text-card:has(.media img[src*="/Red-"]) .content,
	html body.dn-text-first .loop.loop-grid > article.l-post.dn-text-card:has(.media img[data-lazy-src*="/Red-"]) .content {
		padding-left: 16px !important;
		padding-right: 8px !important;
	}
}

/* Ved sen bildeinnlasting skal en visuell sak aldri males under en nabos røde markør. */
@media (min-width: 768px) {
	html body.dn-text-first .loop.loop-grid.dn-dense-grid > .l-post.dn-text-card {
		z-index: 1;
	}

	html body.dn-text-first .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card,
	html body.dn-text-first .loop.loop-grid.dn-dense-grid > .dn-fixed-module,
	html body.dn-text-first .loop.loop-grid.dn-dense-grid > .dnqb-archive-banner-wrap {
		position: relative;
		z-index: 2;
	}

	html body.dn-text-first .loop.loop-grid.dn-dense-grid > .l-post.dn-text-card::before {
		pointer-events: none;
	}
}

/* Første tekstkort må være posisjonsanker for sin egen røde kant.
   Uten dette kan pseudo-kanten arve hele rutenettets høyde og krysse senere saker. */
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-text-card,
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-text-lead {
	position: relative !important;
}

/* Mobil: quiz trenger egen avslutning før en ordinær bildeinngang med tittel under bildet.
   Tekstinnganger som følger etter quizen får ikke denne ekstra avstanden. */
@media (max-width: 767px) {
	html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap:has(+ .l-post.dn-visual-card) {
		margin-bottom: 34px !important;
	}

	html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap:has(+ .l-post.dn-visual-card)::after {
		display: block;
		height: 0;
		margin-top: 20px;
		border-bottom: 2px solid var(--dn-rule);
		content: '';
	}
}

/* Skissetro finpuss: varm papirtone, hvite tekstflater og kun sorte redaksjonelle linjer. */
html body.dn-text-first {
	--dn-paper: #f7f3eb;
	--dn-ink: #070707;
	--dn-rule: #090909;
	background: var(--dn-paper) !important;
}

/* Den enkle sorte wordmarken fra den godkjente skissen. */
html body.dn-text-first .smart-head-main .logo-link,
html body.dn-text-first .smart-head-mobile .logo-link {
	display: flex !important;
	align-items: center;
	width: auto !important;
	max-width: none !important;
	min-height: 62px;
	text-decoration: none !important;
}

html body.dn-text-first .smart-head-main .logo-link .logo-image,
html body.dn-text-first .smart-head-mobile .logo-link .logo-image {
	display: none !important;
}

html body.dn-text-first .smart-head-main .logo-link::after,
html body.dn-text-first .smart-head-mobile .logo-link::after {
	color: #050505;
	font-family: "Arial Black", Arial, Helvetica, sans-serif;
	font-size: 46px;
	font-weight: 900;
	letter-spacing: -0.075em;
	line-height: .82;
	content: 'Dagensnytt';
}

/* Bildefrie saker blir hvite, enkle typografiske flater uten rød venstrekant. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]),
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) {
	background: #fffefd !important;
	border-color: var(--dn-rule) !important;
	border-left: 0 !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card::before,
html body.dn-text-first.single-post .related-posts .loop.loop-grid .l-post.grid-post.dn-text-card::before,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"])::before,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"])::before {
	display: none !important;
}

html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .content,
html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .content {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Horoskop og quiz følger samme rolige svart-hvite flatespråk. */
html body.dn-text-first .dn-horoscope-module {
	border: 2px solid var(--dn-rule) !important;
	border-radius: 0 !important;
	background: #fffefd !important;
}

html body.dn-text-first .dn-horoscope-link {
	color: var(--dn-ink) !important;
	background: #fffefd !important;
	background-image: none !important;
}

html body.dn-text-first .dn-horoscope-link:hover,
html body.dn-text-first .dn-horoscope-link .dn-module-label,
html body.dn-text-first .dn-horoscope-link .dn-module-cta {
	color: var(--dn-ink) !important;
}

html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
	border: 2px solid var(--dn-rule) !important;
	border-left: 2px solid var(--dn-rule) !important;
	background: #fffefd !important;
}

@media (max-width: 767px) {
	html body.dn-text-first .smart-head-mobile .logo-link::after {
		font-size: 36px;
		letter-spacing: -0.075em;
	}

	html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .content,
	html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]) .content,
	html body.dn-text-first .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) .content {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Skissens viktigste flateprinsipp: én sammenhengende hvit redaksjonell strøm.
   Kremfargen ligger bare rundt innholdsområdet, ikke mellom hvert enkelt kort. */
html body.dn-text-first.home .main.ts-contain,
html body.dn-text-first.archive.category .main.ts-contain {
	box-sizing: border-box;
	background: #fffefd !important;
}

html body.dn-text-first.home .loop.loop-grid,
html body.dn-text-first.archive.category .loop.loop-grid {
	background: #fffefd !important;
}

html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post,
html body.dn-text-first.archive.category .loop.loop-grid > .l-post.grid-post,
html body.dn-text-first.home .loop.loop-grid > .dn-fixed-module,
html body.dn-text-first.home .loop.loop-grid > .dnqb-archive-banner-wrap {
	background: transparent !important;
}

/* Bildefrie innganger og toppsaken er nå en del av samme hvite flate,
   og får bare de sorte linjene som skiller sakene fra hverandre. */
html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post.dn-text-card,
html body.dn-text-first.archive.category .loop.loop-grid > .l-post.grid-post.dn-text-card {
	background: transparent !important;
}

html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-text-card,
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child:has(.media img[src*="/Red-"]),
html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child:has(.media img[data-lazy-src*="/Red-"]) {
	background: transparent !important;
}

/* Moduler beholder innholdet sitt, men ikke som løse hvite lapper mot krembakgrunn. */
html body.dn-text-first.home .dn-horoscope-module,
html body.dn-text-first.home .loop.loop-grid > .dnqb-archive-banner-wrap {
	background: transparent !important;
}

@media (min-width: 768px) {
	html body.dn-text-first.home .main.ts-contain,
	html body.dn-text-first.archive.category .main.ts-contain {
		padding-top: 0 !important;
	}
}

@media (max-width: 767px) {
	html body.dn-text-first.home .main.ts-contain,
	html body.dn-text-first.archive.category .main.ts-contain {
		padding-left: 18px !important;
		padding-right: 18px !important;
	}
}

/* Ryddig toppområde: brødsmulen fjernes, og kategoriarkiv får reell redaksjonell kontekst. */
html body.dn-text-first.home #breadcrumb,
html body.dn-text-first.archive.category #breadcrumb {
	display: none !important;
}

html body.dn-text-first.home .main.ts-contain {
	margin-top: 0 !important;
}

html body.dn-text-first.archive.category .main.ts-contain {
	padding-top: 0 !important;
}

html body.dn-text-first .dn-category-heading {
	margin: 0;
	padding: 30px 0 24px;
	border-bottom: 2px solid var(--dn-rule);
	background: transparent;
}

html body.dn-text-first .dn-category-heading > span {
	display: block;
	margin: 0 0 8px;
	color: var(--dn-muted);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

html body.dn-text-first .dn-category-heading h1 {
	margin: 0;
	color: var(--dn-ink);
	font-family: "Arial Black", Arial, Helvetica, sans-serif;
	font-size: clamp(42px, 5.1vw, 72px);
	font-weight: 900;
	letter-spacing: -0.075em;
	line-height: .86;
}

@media (max-width: 767px) {
	html body.dn-text-first .dn-category-heading {
		padding: 22px 0 20px;
	}

	html body.dn-text-first .dn-category-heading h1 {
		font-size: clamp(40px, 12.5vw, 56px);
		line-height: .87;
	}
}

/* Overskrifter skal brytes mellom ord, aldri med automatisk bindestrek inne i et ord. */
html body.dn-text-first .post-title,
html body.dn-text-first .post-title a,
html body.dn-text-first .dn-horoscope-link strong {
	-webkit-hyphens: none !important;
	hyphens: none !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	word-wrap: normal !important;
}

/* Artikkelsidene får samme varme, sammenhengende hvite leseflate som forside og kategori. */
html body.dn-text-first.single-post #breadcrumb {
	display: none !important;
}

html body.dn-text-first.single-post .main.ts-contain {
	box-sizing: border-box;
	margin-top: 0 !important;
	padding: 42px 34px 66px !important;
	background: #fffefd !important;
}

html body.dn-text-first.single-post .the-post-header {
	margin: 0 !important;
	padding: 0 0 26px;
	border-bottom: 2px solid var(--dn-rule);
	background: transparent !important;
}

html body.dn-text-first.single-post .the-post-header .post-title {
	color: var(--dn-ink) !important;
	font-family: "Arial Black", Arial, Helvetica, sans-serif !important;
	font-weight: 900 !important;
	letter-spacing: -0.07em;
	line-height: .9 !important;
}

html body.dn-text-first.single-post .ts-row,
html body.dn-text-first.single-post .the-post,
html body.dn-text-first.single-post .post-content-wrap,
html body.dn-text-first.single-post .post-content {
	background: transparent !important;
}

html body.dn-text-first.single-post .ts-row {
	padding-top: 26px;
}

@media (max-width: 767px) {
	html body.dn-text-first.single-post .main.ts-contain {
		padding: 28px 18px 44px !important;
	}

	html body.dn-text-first.single-post .the-post-header {
		padding-bottom: 22px;
	}

	html body.dn-text-first.single-post .ts-row {
		padding-top: 20px;
	}
}

/* Desktop: tekstkortets bunnlinje er den eneste deleren før neste bildeinngangsrad.
   Dette hindrer to parallelle linjer når tett rutenett legger bildekort under tekstkort. */
@media (min-width: 768px) {
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card .media,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card .media,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card .image-link,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-visual-card .image-link {
		border-top: 0 !important;
	}
}

/* Desktop: rutenettet bruker bare kortets bunnlinje som avgrensning.
   Topplinjer på tekst- og bildekort skapte en ekstra parallell linje i tette rader. */
@media (min-width: 768px) {
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post .media,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post .media,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post .image-link,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post .image-link {
		border-top: 0 !important;
	}
}

/* Endelig desktopregel: også bildefrie tekstkort bruker bare bunnlinjen.
   Dette fjerner den andre parallelle grensen i overgangen mellom rutenettrader. */
@media (min-width: 768px) {
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-text-card,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-text-card {
		border-top: 0 !important;
	}
}

/* «Les også»: samme én-linje-prinsipp som på forside og kategori.
   Relaterte saker bruker kun egen bunnlinje; kort og bildebeholder tegner aldri en ekstra topplinje. */
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post .media,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post .image-link {
	border-top: 0 !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post {
	border-bottom: 2px solid var(--dn-rule) !important;
}

/* «Les også»-overskriften får én ren linje, ikke temamalens parallelle topp- og bunnstreker. */
html body.dn-text-first.single-post .related-posts .block-head,
html body.dn-text-first.single-post .related-posts .block-head::before,
html body.dn-text-first.single-post .related-posts .block-head::after {
	border-top: 0 !important;
	border-bottom: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

html body.dn-text-first.single-post .related-posts .block-head .heading {
	display: block !important;
	margin: 0 !important;
	padding: 0 0 14px !important;
	border-bottom: 2px solid var(--dn-rule) !important;
}

/* Sakstrømmen under «Les også» arver ingen egen topplinje;
   overskriftens bunnlinje er den eneste overgangen inn til første relaterte sak. */
html body.dn-text-first.single-post .related-posts .block-wrap,
html body.dn-text-first.single-post .related-posts .block-wrap::before,
html body.dn-text-first.single-post .related-posts .block-wrap::after {
	border-top: 0 !important;
	box-shadow: none !important;
}

/* Endelig «Les også»-rytme: én fullbredde linje under overskriften,
   ingen kortspesifikk topplinje før den første relaterte saken. */
html body.dn-text-first.single-post .related-posts .block-head {
	margin: 0 !important;
	padding: 0 0 14px !important;
	border-bottom: 2px solid var(--dn-rule) !important;
}

html body.dn-text-first.single-post .related-posts .block-head .heading {
	padding-bottom: 0 !important;
	border-bottom: 0 !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.dn-text-card {
	border-top: 0 !important;
}

/* Absolutt siste linjeoverstyring for «Les også»: én fullbredde seksjonslinje,
   og ingen topplinje på første eller senere relaterte tekstkort. */
html body.dn-text-first.single-post .related-posts .block-head {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	border-bottom: 2px solid var(--dn-rule) !important;
}

html body.dn-text-first.single-post .related-posts .loop.loop-grid > article.l-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > article.l-post.dn-no-image-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > article.l-post:has(.media img[src*="/Red-"]),
html body.dn-text-first.single-post .related-posts .loop.loop-grid > article.l-post:has(.media img[data-lazy-src*="/Red-"]) {
	border-top: 0 !important;
}

/* Samme spesifisitet som tekstkortregelen over: relaterte kort bruker
   seksjonslinjen og foregående korts bunnlinje, aldri egen topplinje. */
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.grid-post.dn-text-card,
html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.grid-post.dn-no-image-card {
	border-top: 0 solid transparent !important;
}

/* Mobilforsiden bruker én overgangslinje: Tekstkortets bunnlinje er
   skillet før et påfølgende bildekort. Temamalens topplinje fjernes. */
@media (max-width: 767px) {
	html body.dn-text-first.home .loop.loop-grid > .l-post,
	html body.dn-text-first.home .loop.loop-grid > .l-post .media,
	html body.dn-text-first.home .loop.loop-grid > .l-post .image-link,
	html body.dn-text-first.home .loop.loop-grid > .l-post .image-link.media-ratio,
	html body.dn-text-first.home .loop.loop-grid > .l-post .image-link.ratio-16-9 {
		border-top: 0 !important;
	}
}

/* Kategorioverskriften trenger bare typografisk luft før første sak.
   Verken overskriften eller sakstrømmen skal tegne streker i mellomrommet. */
@media (max-width: 767px) {
	html body.dn-text-first.archive.category .dn-category-heading,
	html body.dn-text-first.archive.category .block-wrap,
	html body.dn-text-first.archive.category .loop.loop-grid,
	html body.dn-text-first.archive.category .loop.loop-grid > .l-post:first-child,
	html body.dn-text-first.archive.category .loop.loop-grid > .l-post:first-child .media,
	html body.dn-text-first.archive.category .loop.loop-grid > .l-post:first-child .image-link {
		border-top: 0 !important;
		border-bottom: 0 !important;
	}

	html body.dn-text-first.archive.category .dn-category-heading {
		padding-bottom: 28px !important;
	}
}

/* Mobilforsiden skal ha en rask, men fortsatt tydelig sakstrøm.
   Den tidligere avstanden besto av kortmargin, kortpadding og ekstra
   innvendig padding på bildefrie saker. */
@media (max-width: 767px) {
	html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post.dn-text-card {
		margin-bottom: 0 !important;
		padding-top: 20px !important;
		padding-bottom: 22px !important;
	}

	html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post.dn-no-image-card .content {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
}

/* «Les også» avsluttes uten tre løse streker under siste desktoprad. */
@media (min-width: 768px) {
	html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post:nth-last-child(-n + 3),
	html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.grid-post.dn-text-card:nth-last-child(-n + 3) {
		border-bottom: 0 !important;
	}
}

/* Mobiltypografi: mellomliggende overskrifter må ha rolig bokstavavstand.
   Den store toppsaken beholder sin egen, tydelige skala. */
@media (max-width: 767px) {
	html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post.dn-text-card:not(.dn-text-lead):not(.dn-text-feature) .post-title a {
		font-size: clamp(32px, 9.4vw, 42px) !important;
		letter-spacing: -0.035em !important;
		line-height: 0.94 !important;
	}

	html body.dn-text-first.home .loop.loop-grid > .l-post.grid-post.dn-text-card.dn-text-feature:not(.dn-text-lead) .post-title a {
		font-size: clamp(38px, 11vw, 48px) !important;
		letter-spacing: -0.045em !important;
		line-height: 0.92 !important;
	}
}

/* «Les også» følger samme lesbare mobiltypografi, men i en litt mindre skala. */
@media (max-width: 767px) {
	html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post.grid-post.dn-text-card .post-title a {
		font-size: clamp(28px, 8.1vw, 34px) !important;
		letter-spacing: -0.035em !important;
		line-height: 0.95 !important;
	}
}

/* Desktop: rutenettet skal fylle faktiske åpninger, samtidig som lange
   hovedoverskrifter alltid bryter innenfor sin egen redaksjonelle flate. */
@media (min-width: 901px) {
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid {
		grid-auto-flow: row dense !important;
	}

	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post {
		min-width: 0 !important;
		max-width: 100% !important;
	}

	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead),
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) {
		isolation: isolate;
		overflow: hidden !important;
	}

	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .content,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .post-title,
	html body.dn-text-first.home .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .post-title a,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .content,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .post-title,
	html body.dn-text-first.archive.category .loop.loop-grid.dn-dense-grid > .l-post.dn-text-feature:not(.dn-text-lead) .post-title a {
		box-sizing: border-box !important;
		min-width: 0 !important;
		max-width: 100% !important;
		overflow-wrap: break-word !important;
	}
}

/* Forsiden: den første saken er alltid toppsak på desktop, også med redaksjonelt bilde. */
@media (min-width: 768px) {
	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card {
		grid-column: 1 / -1 !important;
		padding-top: 0 !important;
	}

	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card .media {
		margin: 0 0 16px !important;
	}

	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card .image-link,
	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card .image-link.media-ratio,
	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card .image-link.ratio-16-9 {
		padding-bottom: 66.6667% !important; /* 3:2 bevarer motivet i toppsaken. */
	}

	html body.dn-text-first.home .loop.loop-grid > article.l-post:first-child.dn-visual-card .post-title a {
		font-size: clamp(32px, 4vw, 58px) !important;
		line-height: 0.94 !important;
	}
}
/*
 * Forside/kategori: QuizBanner er et eget feedmodul-kort, ikke et gridkort.
 * Denne regelen ligger sist i text-first-stilen og vinner over den tidligere
 * enkolonne-regelen for quizmoduler på desktop, nettbrett og mobil.
 */
html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
    grid-column: 1 / -1 !important;
    grid-column-start: 1 !important;
    grid-column-end: -1 !important;
    width: 100% !important;
    min-width: 0;
    margin: 20px 0 24px !important;
}

@media (max-width: 900px) {
    html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
        margin: 16px 0 20px !important;
    }
}

@media (max-width: 480px) {
    html body.dn-text-first .loop.loop-grid > .dnqb-archive-banner-wrap {
        margin: 14px 0 18px !important;
    }
}
/*
 * «Les også» på mobil: hold en jevn, lesbar rytme mellom relaterte saker.
 * Regelen ligger sist i text-first-stilen for å tåle senere temaregler.
 */
@media (max-width: 767px) {
    html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post {
        margin-bottom: 24px !important;
        padding-top: 25px !important;
        padding-bottom: 27px !important;
    }

    html body.dn-text-first.single-post .related-posts .loop.loop-grid > .l-post:last-child {
        margin-bottom: 0 !important;
    }
}

/* Forsidebilder: bevar alltid hele motivet. Den nøytrale bildeflaten fungerer som en rolig ramme ved avvikende formater. */
html body.dn-text-first.home .loop.loop-grid > article.l-post.dn-visual-card .image-link img {
    object-fit: contain !important;
    object-position: center center !important;
}
/* 2026-09-09: Mobil lesbarhet – unngå kolliderende bokstaver i tekst-først-rutenettet. */
body.dn-text-first .l-post.grid-post .post-title a,
body.dn-text-first .archive-title,
body.dn-text-first .archive-head h1 {
	font-family: Roboto, Arial, Helvetica, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: -0.018em !important;
	line-height: 1.02 !important;
}

/* Store bildefrie saker beholder et tydelig uttrykk, men med trygg tegn- og linjeavstand på mobil. */
body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a,
body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .post-title a,
body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .post-title a {
	font-family: Roboto, Arial, Helvetica, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: -0.025em !important;
	line-height: 0.98 !important;
}

@media (max-width: 767px) {
	body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a,
	body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .post-title a,
	body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .post-title a {
		line-height: 0.98 !important;
	}
}
/* 2026-09-09: Prioritert regel for SmartMag- og dynamiske forsideoverskrifter. */
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-visual-card .post-title a,
html body.dn-text-first .loop.loop-grid .l-post.grid-post:first-child:not(.dn-text-card) .post-title a,
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card .post-title a,
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-feature .post-title a,
html body.dn-text-first .loop.loop-grid .l-post.grid-post.dn-text-card.dn-text-lead .post-title a {
	font-family: Roboto, Arial, Helvetica, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: -0.025em !important;
	line-height: 0.98 !important;
}
