/*
Theme Name:   Deutsche IPTV — Das Marktportal
Theme URI:    https://deutscheiptv.com
Description:  A dense directory portal with four column boxes, a mega menu header and a link directory footer. Warm orange with teal accents. Built on Flatsome.
Author:       Deutsche IPTV Portal
Author URI:   https://deutscheiptv.com
Template:     flatsome
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  m8-deutsche
Tags:         directory, portal, news, business, magazine
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------------------------------------------------------------------------
   Deutsche IPTV — design tokens
   The core plugin emits these at runtime; the values below are the offline
   fallback so the theme still reads correctly without the plugin.
--------------------------------------------------------------------------- */

:root {
	--m8-primary: #c2410c;
	--m8-primary-dark: #9a3412;
	--m8-secondary: #1c1917;
	--m8-accent: #0d9488;
	--m8-text: #1c1917;
	--m8-text-muted: #78716c;
	--m8-surface: #ffffff;
	--m8-surface-alt: #faf7f5;
	--m8-border: #e7e0da;
	--m8-radius: 8px;
	--m8-radius-lg: 16px;
	--m8-shadow: 0 4px 16px rgba(28, 25, 23, .07);
	--m8-font-heading: 'Noto Sans', 'Segoe UI', sans-serif;
	--m8-font-body: 'Noto Sans', -apple-system, 'Segoe UI', sans-serif;
	--m8-font-scale: 1;
	--m8-line-height: 1.65;
	--m8-heading-weight: 700;
	--m8-body-weight: 400;
	--m8-letter-spacing: -.01em;
	--m8-grid-columns: 4;
	--m8-aspect: 5 / 4;
	--m8-section-gap: 52px;
	--m8-motion: 200ms;
	--m8-motion-ease: ease;
}

/* ---------------------------------------------------------------------------
   Typography — a single utilitarian sans across the whole portal
--------------------------------------------------------------------------- */

body {
	font-family: var(--m8-font-body);
	font-size: 16px;
	line-height: var(--m8-line-height);
	color: var(--m8-text);
	letter-spacing: var(--m8-letter-spacing);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.m8-section-title {
	font-family: var(--m8-font-heading);
	font-weight: var(--m8-heading-weight);
	color: var(--m8-text);
	letter-spacing: -.02em;
	line-height: 1.2;
	text-transform: none;
}

.entry-title {
	font-size: 1.16rem;
}

h2 {
	font-size: 1.7rem;
}

h3 {
	font-size: 1.12rem;
}

/* ---------------------------------------------------------------------------
   Portal grid — four narrow boxes per row
--------------------------------------------------------------------------- */

.m8-site-deutscheiptv .col,
.m8-site-deutscheiptv [class*="col-"] {
	padding-bottom: 0;
}

.m8-layout-deutsche-portal #post-list {
	display: grid;
	grid-template-columns: repeat(var(--m8-grid-columns), minmax(0, 1fr));
	gap: 22px;
}

.m8-layout-deutsche-portal #post-list > article {
	margin-bottom: 0;
}

.m8-layout-deutsche-portal .article-inner {
	background: var(--m8-surface);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius);
	overflow: hidden;
	transition: border-color var(--m8-motion) var(--m8-motion-ease),
	            box-shadow var(--m8-motion) var(--m8-motion-ease);
}

.m8-layout-deutsche-portal .article-inner:hover {
	border-color: var(--m8-primary);
	box-shadow: 0 8px 24px rgba(194, 65, 12, .14);
}

@media (max-width: 1023px) {
	.m8-layout-deutsche-portal #post-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.m8-layout-deutsche-portal #post-list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------------------------
   Box — image, then a body separated by a top rule
--------------------------------------------------------------------------- */

.m8-layout-deutsche-portal .article-inner > a {
	display: block;
	overflow: hidden;
	aspect-ratio: var(--m8-aspect);
	background: var(--m8-surface-alt);
}

.m8-layout-deutsche-portal .article-inner > a img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--m8-motion) var(--m8-motion-ease);
}

.m8-layout-deutsche-portal .article-inner:hover > a img {
	transform: scale(1.03);
}

.m8-layout-deutsche-portal .entry-title {
	margin: 14px 16px 0;
	font-size: 1.12rem;
	line-height: 1.26;
}

.m8-layout-deutsche-portal .entry-title a {
	color: var(--m8-text);
}

.m8-layout-deutsche-portal .entry-title a:hover {
	color: var(--m8-primary);
}

.m8-layout-deutsche-portal .entry-summary {
	color: var(--m8-text-muted);
	font-size: .88rem;
	margin: 8px 16px 0;
}

.m8-layout-deutsche-portal .entry-meta {
	margin: 12px 16px 16px;
	padding-top: 10px;
	border-top: 1px solid var(--m8-border);
	font-size: .74rem;
	color: var(--m8-text-muted);
}

.m8-layout-deutsche-portal .entry-meta a {
	color: var(--m8-accent);
}

.m8-layout-deutsche-portal .more-link {
	display: none;
}

/* ---------------------------------------------------------------------------
   Section headers — a numbered category bar
--------------------------------------------------------------------------- */

.m8-section-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	padding: 10px 16px;
	background: var(--m8-secondary);
	border-radius: var(--m8-radius);
}

.m8-section-head__title {
	font-family: var(--m8-font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
	color: #fff;
	letter-spacing: .01em;
	line-height: 1.2;
}

.m8-section-head__title::before {
	content: '▸ ';
	color: var(--m8-accent);
}

.m8-section-head__link {
	margin-left: auto;
	font-size: .78rem;
	color: var(--m8-accent);
}

/* ---------------------------------------------------------------------------
   Directory board — a horizontal index of every category
--------------------------------------------------------------------------- */

.m8-directory-board {
	background: var(--m8-surface-alt);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius-lg);
	padding: 22px 24px;
	margin-bottom: 32px;
}

.m8-directory-board__title {
	font-family: var(--m8-font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--m8-primary);
	color: var(--m8-secondary);
}

.m8-directory-board__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 8px 22px;
}

.m8-directory-board__grid a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 5px 0;
	border-bottom: 1px dotted var(--m8-border);
	font-size: .92rem;
	color: var(--m8-text);
}

.m8-directory-board__grid a:hover {
	color: var(--m8-primary);
}

.m8-directory-board__grid span {
	font-size: .76rem;
	color: var(--m8-text-muted);
}

/* ---------------------------------------------------------------------------
   Single post
--------------------------------------------------------------------------- */

.m8-layout-deutsche-portal .single-content .entry-title {
	font-size: 2.4rem;
	line-height: 1.12;
}

.m8-layout-deutsche-portal .single-content .entry-meta {
	font-size: .8rem;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--m8-border);
	margin-bottom: 26px;
}

.m8-layout-deutsche-portal .entry-content {
	max-width: 72ch;
}

.m8-layout-deutsche-portal .entry-content > p {
	font-size: 1.04rem;
	line-height: 1.74;
}

.m8-layout-deutsche-portal .entry-content h2 {
	margin-top: 2em;
	padding-top: .45em;
	border-top: 3px solid var(--m8-primary);
	font-size: 1.5rem;
}

.m8-layout-deutsche-portal .entry-content h3 {
	margin-top: 1.7em;
	color: var(--m8-accent);
}

.m8-layout-deutsche-portal .entry-content a {
	color: var(--m8-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.m8-layout-deutsche-portal .entry-content blockquote {
	padding: 16px 20px;
	background: var(--m8-surface-alt);
	border-radius: var(--m8-radius);
	border-left: 4px solid var(--m8-accent);
	font-style: normal;
}

.m8-layout-deutsche-portal .entry-content ul,
.m8-layout-deutsche-portal .entry-content ol {
	padding-left: 1.2em;
}

.m8-layout-deutsche-portal .entry-content li {
	margin-bottom: .45em;
}

.m8-layout-deutsche-portal .entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: .92rem;
}

.m8-layout-deutsche-portal .entry-content th {
	background: var(--m8-secondary);
	color: #fff;
	text-align: left;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.m8-layout-deutsche-portal .entry-content th,
.m8-layout-deutsche-portal .entry-content td {
	padding: 10px 12px;
	border: 1px solid var(--m8-border);
}

.m8-source-note {
	margin-top: 2.2em;
	padding: 13px 16px;
	background: var(--m8-surface-alt);
	border-radius: var(--m8-radius);
	font-size: .86rem;
	color: var(--m8-text-muted);
}

/* ---------------------------------------------------------------------------
   View counter, timeline and language switcher
--------------------------------------------------------------------------- */

.m8-view-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 26px;
	padding: 5px 13px;
	background: var(--m8-surface-alt);
	border: 1px solid var(--m8-border);
	border-radius: 999px;
	font-size: .8rem;
	color: var(--m8-text-muted);
}

.m8-timeline {
	margin-top: 34px;
	padding: 22px 24px;
	background: var(--m8-surface-alt);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius-lg);
}

.m8-timeline__title {
	font-family: var(--m8-font-heading);
	font-size: 1.08rem;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--m8-accent);
}

.m8-timeline__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.m8-timeline__item {
	position: relative;
	padding: 7px 0 7px 22px;
	font-size: .88rem;
}

.m8-timeline__item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 13px;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--m8-primary);
}

.m8-timeline__item time {
	display: block;
	font-size: .74rem;
	color: var(--m8-text-muted);
}

.m8-translations {
	margin-top: 28px;
}

.m8-translations ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.m8-translations a {
	display: inline-block;
	padding: 5px 14px;
	background: var(--m8-secondary);
	color: #fff;
	border-radius: 999px;
	font-size: .82rem;
}

.m8-translations a:hover {
	background: var(--m8-primary);
	color: #fff;
}

/* ---------------------------------------------------------------------------
   Header and footer
--------------------------------------------------------------------------- */

.m8-site-deutscheiptv .header-main {
	border-bottom: 2px solid var(--m8-primary);
}

.m8-site-deutscheiptv .logo a {
	font-family: var(--m8-font-heading);
	font-weight: 700;
	font-size: 1.5rem;
	letter-spacing: -.025em;
}

.m8-site-deutscheiptv .logo a span {
	color: var(--m8-accent);
}

.m8-site-deutscheiptv .nav > li > a {
	font-weight: 700;
	font-size: .88rem;
	color: var(--m8-text);
	text-transform: uppercase;
	letter-spacing: .02em;
}

.m8-site-deutscheiptv .nav > li > a:hover {
	color: var(--m8-primary);
}

.m8-site-deutscheiptv footer {
	background: var(--m8-secondary);
	color: #a8a29e;
	font-size: .9rem;
}

.m8-site-deutscheiptv footer a {
	color: #a8a29e;
}

.m8-site-deutscheiptv footer a:hover {
	color: var(--m8-accent);
}

.m8-site-deutscheiptv footer h3,
.m8-site-deutscheiptv footer h4 {
	color: #fff;
	font-family: var(--m8-font-heading);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* ---------------------------------------------------------------------------
   Sidebar blocks
--------------------------------------------------------------------------- */

.m8-sidebar__inner {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.m8-sidebar .widget {
	background: var(--m8-surface);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius);
	padding: 18px;
}

.m8-sidebar .widget-title {
	font-family: var(--m8-font-heading);
	font-size: .95rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 10px;
	padding-bottom: 7px;
	border-bottom: 2px solid var(--m8-primary);
}

.m8-latest-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.m8-latest-list li {
	padding: 9px 0;
	border-bottom: 1px solid var(--m8-border);
}

.m8-latest-list a {
	font-size: .94rem;
	line-height: 1.32;
}

.m8-latest-list a:hover {
	color: var(--m8-primary);
}

.m8-latest-list__date {
	display: block;
	font-size: .74rem;
	color: var(--m8-text-muted);
	margin-top: 3px;
}

.m8-topic-cloud {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.m8-topic-cloud a {
	display: inline-block;
	padding: 4px 11px;
	background: var(--m8-surface-alt);
	border: 1px solid var(--m8-border);
	border-radius: 999px;
	font-size: .8rem;
	color: var(--m8-text);
}

.m8-topic-cloud a:hover {
	background: var(--m8-accent);
	border-color: var(--m8-accent);
	color: #fff;
}

.m8-topic-cloud span {
	display: none;
}

.m8-author-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.m8-author-list li {
	padding: 8px 0;
	border-bottom: 1px solid var(--m8-border);
}

.m8-author-list__role {
	display: block;
	font-size: .76rem;
	color: var(--m8-text-muted);
}

/* ---------------------------------------------------------------------------
   Pagination
--------------------------------------------------------------------------- */

.m8-layout-deutsche-portal .page-nav {
	margin-top: 46px;
	padding-top: 18px;
	border-top: 2px solid var(--m8-border);
}

.m8-layout-deutsche-portal .page-nav a.page-numbers {
	border: 1px solid var(--m8-border);
	border-radius: 999px;
}

.m8-layout-deutsche-portal .page-nav a.page-numbers.current {
	background: var(--m8-primary);
	border-color: var(--m8-primary);
	color: #fff;
}

/* ---------------------------------------------------------------------------
   Lead — the opening block of the front page
   A large story on the left, a running list of the latest reports on the
   right, separated by the accent rule that carries through the site.
--------------------------------------------------------------------------- */

.m8-lead {
	padding: 44px 0 8px;
	border-bottom: 1px solid var(--m8-border);
}

.m8-lead__story {
	background: var(--m8-surface);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius-lg);
	overflow: hidden;
	box-shadow: var(--m8-shadow);
}

.m8-lead__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--m8-surface-alt);
	overflow: hidden;
}

.m8-lead__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--m8-motion-ease);
}

.m8-lead__story:hover .m8-lead__media img {
	transform: scale(1.04);
}

.m8-lead__body {
	padding: 26px 30px 30px;
}

.m8-lead__kicker {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--m8-accent);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.m8-lead__title {
	margin: 0;
	font-size: clamp(1.7rem, 3.2vw, 2.5rem);
	line-height: 1.14;
	letter-spacing: -.025em;
}

.m8-lead__title a {
	color: var(--m8-text);
}

.m8-lead__title a:hover {
	color: var(--m8-primary);
}

.m8-lead__summary {
	margin: 14px 0 0;
	color: var(--m8-text-muted);
	font-size: 1.02rem;
	line-height: 1.62;
}

.m8-lead__meta {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--m8-border);
	color: var(--m8-text-muted);
	font-size: .78rem;
}

.m8-lead__rail {
	background: var(--m8-surface);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius-lg);
	padding: 24px 26px;
	height: 100%;
}

.m8-lead__rail .m8-section-head__title {
	margin-bottom: 12px;
}

.m8-lead__rail .m8-latest-list li:last-child {
	border-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Home sections — the rhythm between the blocks
--------------------------------------------------------------------------- */

.m8-home-section {
	padding: var(--m8-section-gap) 0 0;
}

.m8-home-section--board {
	padding-bottom: var(--m8-section-gap);
}

.m8-home-section .m8-section-head {
	margin-bottom: 22px;
}

/* ---------------------------------------------------------------------------
   Portal grid
   The grid is driven by the site tokens, so the four column directory
   stays a four column directory on every screen that can hold it.
--------------------------------------------------------------------------- */

.m8-portal-grid {
	display: grid;
	grid-template-columns: repeat(var(--m8-grid-columns), minmax(0, 1fr));
	gap: 22px;
}

.m8-portal-grid > .m8-portal-card {
	margin-bottom: 0;
}

.m8-portal-card--wide {
	grid-column: 1 / -1;
}

.m8-portal-card--wide .article-inner {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	align-items: stretch;
}

.m8-portal-card--wide .article-inner > a {
	aspect-ratio: 16 / 10;
	height: 100%;
}

.m8-portal-card--wide .entry-title {
	font-size: 1.5rem;
}

.m8-portal-card--wide .entry-summary {
	font-size: .96rem;
}

@media (max-width: 1023px) {
	.m8-portal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.m8-portal-card--wide .article-inner {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 549px) {
	.m8-portal-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.m8-lead__body {
		padding: 20px 20px 24px;
	}
}

/* ---------------------------------------------------------------------------
   Footer — the link directory
--------------------------------------------------------------------------- */

.m8-footer {
	background: var(--m8-secondary);
	color: #a8a29e;
	padding: 54px 0 30px;
}

.m8-footer__top {
	display: grid;
	grid-template-columns: minmax(220px, 260px) 1fr;
	gap: 42px;
	padding-bottom: 34px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.m8-footer__logo {
	margin: 0 0 8px;
	color: #fff;
	font-family: var(--m8-font-heading);
	font-size: 1.32rem;
	font-weight: 700;
}

.m8-footer__tagline {
	margin: 0;
	font-size: .88rem;
	line-height: 1.55;
}

.m8-footer__directory {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px 26px;
}

.m8-footer__directory ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.m8-footer__directory li a {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	color: #a8a29e;
	font-size: .88rem;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.m8-footer__directory li a:hover {
	color: var(--m8-accent);
}

.m8-footer__directory li span {
	color: #78716c;
	font-size: .74rem;
}

.m8-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding-top: 22px;
}

.m8-footer__authors {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.m8-footer__author {
	color: #d6d3d1;
	font-size: .82rem;
}

.m8-footer__author small {
	color: #78716c;
	font-size: .72rem;
}

.m8-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.m8-footer__legal a {
	color: #a8a29e;
	font-size: .82rem;
}

.m8-footer__legal a:hover {
	color: var(--m8-accent);
}

@media (max-width: 849px) {
	.m8-footer__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}

	.m8-footer__directory {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.m8-footer__directory {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* === media8:shared-front-page === */

/* ---------------------------------------------------------------------------
   Shared front page styles.

   Every site shares the same structure — a hero that carries the lead
   report, a grid of the latest reports and a rail at the end — and differs
   in the way the hero and the grid are shaped. The layout class on the
   body selects the variant.
--------------------------------------------------------------------------- */

.m8-hero {
	position: relative;
	background: var(--m8-secondary);
}

.m8-hero__inner {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(16px, 3vw, 48px);
}

.m8-hero__story {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(360px, 52vh, 620px);
	overflow: hidden;
}

.m8-hero__media {
	position: absolute;
	inset: 0;
	display: block;
}

.m8-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--m8-motion-ease);
}

.m8-hero__story:hover .m8-hero__media img {
	transform: scale(1.03);
}

.m8-hero__scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 14, 0) 22%, rgba(10, 10, 14, .84) 100%),
		linear-gradient(90deg, rgba(10, 10, 14, .74) 0%, rgba(10, 10, 14, .08) 62%);
}

.m8-hero__body {
	position: relative;
	z-index: 1;
	max-width: 760px;
	padding: 0 0 clamp(28px, 4vw, 54px);
	color: #fff;
}

.m8-hero__kicker {
	display: inline-block;
	margin-bottom: 14px;
	padding: 4px 13px;
	border-radius: 999px;
	background: var(--m8-primary);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.m8-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.9rem, 4vw, 3.2rem);
	line-height: 1.1;
	letter-spacing: -.03em;
}

.m8-hero__title a {
	color: #fff;
}

.m8-hero__title a:hover {
	color: var(--m8-accent);
}

.m8-hero__summary {
	margin: 15px 0 0;
	max-width: 60ch;
	color: rgba(255, 255, 255, .82);
	font-size: 1.04rem;
	line-height: 1.6;
}

.m8-hero__meta {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, .22);
	color: rgba(255, 255, 255, .68);
	font-size: .78rem;
}

/* ---------------------------------------------------------------------------
   Sections
--------------------------------------------------------------------------- */

.m8-section {
	padding: var(--m8-section-gap) 0 0;
}

.m8-section--alt {
	padding-bottom: var(--m8-section-gap);
	background: var(--m8-surface-alt);
}

.m8-section .m8-section-head {
	margin-bottom: 24px;
}

/* ---------------------------------------------------------------------------
   The grid of reports

   The shape of the grid is set by the layout class. Every variant shares
   the card treatment below, only the columns and the proportions differ.
--------------------------------------------------------------------------- */

.m8-grid {
	display: grid;
	gap: 24px;
}

.m8-grid > .m8-card {
	margin-bottom: 0;
}

.m8-card .article-inner {
	background: var(--m8-surface);
	border: 1px solid var(--m8-border);
	border-radius: var(--m8-radius);
	overflow: hidden;
	transition: border-color var(--m8-motion) var(--m8-motion-ease),
	            box-shadow var(--m8-motion) var(--m8-motion-ease),
	            transform var(--m8-motion) var(--m8-motion-ease);
}

.m8-card .article-inner:hover {
	border-color: var(--m8-primary);
	box-shadow: 0 12px 32px rgba(20, 20, 28, .14);
	transform: translateY(-2px);
}

.m8-card .article-inner > a {
	display: block;
	aspect-ratio: var(--m8-aspect);
	overflow: hidden;
	background: var(--m8-surface-alt);
}

.m8-card .article-inner > a img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms var(--m8-motion-ease);
}

.m8-card .article-inner:hover > a img {
	transform: scale(1.05);
}

.m8-card .entry-title {
	margin: 15px 18px 0;
	font-size: 1.12rem;
	line-height: 1.3;
}

.m8-card .entry-summary {
	margin: 10px 18px 0;
	color: var(--m8-text-muted);
	font-size: .89rem;
	line-height: 1.55;
}

.m8-card .entry-meta {
	margin: 12px 18px 18px;
	padding-top: 11px;
	border-top: 1px solid var(--m8-border);
	font-size: .78rem;
}

/* Four column directory. */
.m8-grid--portal {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.m8-grid--portal .m8-card .entry-title {
	font-size: 1.02rem;
}

/* Three column magazine. */
.m8-grid--magazine {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}

/* Two column list with a wide lead. */
.m8-grid--list {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}

.m8-grid--list .m8-card:first-child {
	grid-column: 1 / -1;
}

.m8-grid--list .m8-card:first-child .article-inner {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	align-items: stretch;
}

.m8-grid--list .m8-card:first-child .article-inner > a {
	aspect-ratio: 16 / 9;
	height: 100%;
}

.m8-grid--list .m8-card:first-child .entry-title {
	font-size: 1.5rem;
}

/* Mixed bento. */
.m8-grid--bento {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 22px;
}

.m8-grid--bento .m8-card {
	grid-column: span 2;
}

.m8-grid--bento .m8-card:nth-child(6n + 1),
.m8-grid--bento .m8-card:nth-child(6n + 4) {
	grid-column: span 3;
}

.m8-grid--bento .m8-card:nth-child(6n + 1) .article-inner > a {
	aspect-ratio: 16 / 9;
}

.m8-grid--bento .m8-card:nth-child(6n + 1) .entry-title {
	font-size: 1.34rem;
}

/* Three column dark grid. */
.m8-grid--dark {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

/* Two column with a featured card. */
.m8-grid--featured {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

.m8-grid--featured .m8-card:first-child {
	grid-column: 1 / -1;
}

.m8-grid--featured .m8-card:first-child .article-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
}

.m8-grid--featured .m8-card:first-child .article-inner > a {
	aspect-ratio: 4 / 3;
	height: 100%;
}

.m8-grid--featured .m8-card:first-child .entry-title {
	font-size: 1.44rem;
}

/* One column feature. */
.m8-grid--feature {
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}

.m8-grid--feature .m8-card .article-inner {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	align-items: stretch;
}

.m8-grid--feature .m8-card .article-inner > a {
	aspect-ratio: 21 / 9;
	height: 100%;
}

.m8-grid--feature .m8-card .entry-title {
	font-size: 1.6rem;
}

/* Two column terminal grid. */
.m8-grid--terminal {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.m8-grid--terminal .m8-card:nth-child(even) {
	transform: translateY(28px);
}

@media (max-width: 1199px) {
	.m8-grid--bento {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.m8-grid--bento .m8-card,
	.m8-grid--bento .m8-card:nth-child(6n + 1),
	.m8-grid--bento .m8-card:nth-child(6n + 4) {
		grid-column: span 2;
	}
}

@media (max-width: 1023px) {
	.m8-grid--portal,
	.m8-grid--magazine,
	.m8-grid--dark {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.m8-grid--feature .m8-card .article-inner,
	.m8-grid--list .m8-card:first-child .article-inner,
	.m8-grid--featured .m8-card:first-child .article-inner {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 749px) {
	.m8-grid--portal,
	.m8-grid--magazine,
	.m8-grid--list,
	.m8-grid--bento,
	.m8-grid--dark,
	.m8-grid--featured,
	.m8-grid--terminal {
		grid-template-columns: minmax(0, 1fr);
	}

	.m8-grid--bento .m8-card,
	.m8-grid--bento .m8-card:nth-child(6n + 1),
	.m8-grid--bento .m8-card:nth-child(6n + 4) {
		grid-column: auto;
	}

	.m8-grid--terminal .m8-card:nth-child(even) {
		transform: none;
	}

	.m8-hero__story {
		min-height: 300px;
	}
}

/* ---------------------------------------------------------------------------
   Rail — the plain list that closes the front page
--------------------------------------------------------------------------- */

.m8-rail {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 40px;
}

.m8-rail li {
	break-inside: avoid;
	padding: 14px 0;
	border-bottom: 1px solid var(--m8-border);
}

.m8-rail a {
	display: block;
	color: var(--m8-text);
	font-family: var(--m8-font-heading);
	font-size: 1.04rem;
	font-weight: 600;
	line-height: 1.32;
}

.m8-rail a:hover {
	color: var(--m8-primary);
}

.m8-rail time {
	display: block;
	margin-top: 6px;
	color: var(--m8-text-muted);
	font-size: .76rem;
}

@media (max-width: 749px) {
	.m8-rail {
		columns: 1;
	}
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */

.m8-footer {
	background: var(--m8-secondary);
	color: #a8a29e;
	padding: 56px 0 30px;
}

.m8-footer__top {
	display: grid;
	grid-template-columns: minmax(220px, 280px) 1fr;
	gap: 44px;
	padding-bottom: 36px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.m8-footer__logo {
	margin: 0 0 8px;
	color: #fff;
	font-family: var(--m8-font-heading);
	font-size: 1.34rem;
	font-weight: 700;
	letter-spacing: -.02em;
}

.m8-footer__tagline {
	margin: 0;
	font-size: .88rem;
	line-height: 1.55;
}

.m8-footer__directory {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px 26px;
}

.m8-footer__directory ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.m8-footer__directory li a {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	color: #a8a29e;
	font-size: .88rem;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.m8-footer__directory li a:hover {
	color: var(--m8-accent);
}

.m8-footer__directory li span {
	color: #78716c;
	font-size: .74rem;
}

.m8-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding-top: 22px;
}

.m8-footer__authors {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.m8-footer__author {
	color: #d6d3d1;
	font-size: .82rem;
}

.m8-footer__author small {
	color: #78716c;
	font-size: .72rem;
}

.m8-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.m8-footer__legal a {
	color: #a8a29e;
	font-size: .82rem;
}

.m8-footer__legal a:hover {
	color: var(--m8-accent);
}

@media (max-width: 849px) {
	.m8-footer__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.m8-footer__directory {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.m8-footer__directory {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* === media8:shared-hero-variants === */

/* ---------------------------------------------------------------------------
   Hero variants.

   The lead report sits in the hero of every front page. The variants differ
   in the way the image and the text are arranged.
--------------------------------------------------------------------------- */

/* Split — the image on the left, the text on the right. */
.m8-hero--split .m8-hero__inner {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	align-items: stretch;
	gap: 0;
	padding: 0;
}

.m8-hero--split .m8-hero__story {
	display: block;
	min-height: 0;
}

.m8-hero--split .m8-hero__media {
	position: relative;
	inset: auto;
	height: 100%;
	min-height: 480px;
}

.m8-hero--split .m8-hero__scrim {
	background: linear-gradient(90deg, rgba(10, 10, 14, .35) 0%, rgba(10, 10, 14, 0) 55%);
}

.m8-hero--split .m8-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(28px, 4vw, 60px);
	background: var(--m8-secondary);
}

.m8-hero--split .m8-hero__title {
	color: #fff;
}

.m8-hero--split .m8-hero__summary {
	color: rgba(255, 255, 255, .78);
}

.m8-hero--split .m8-hero__meta {
	border-top-color: rgba(255, 255, 255, .18);
}

@media (max-width: 899px) {
	.m8-hero--split .m8-hero__inner {
		grid-template-columns: 1fr;
	}

	.m8-hero--split .m8-hero__media {
		min-height: 260px;
	}
}

/* Mosaic — the image sits behind the text, but the block is offset. */
.m8-hero--mosaic {
	overflow: hidden;
}

.m8-hero--mosaic .m8-hero__inner {
	padding: 0;
}

.m8-hero--mosaic .m8-hero__story {
	min-height: clamp(420px, 60vh, 680px);
	align-items: center;
}

.m8-hero--mosaic .m8-hero__body {
	max-width: 640px;
	margin-left: clamp(16px, 5vw, 80px);
	padding: clamp(28px, 4vw, 56px) 0;
}

.m8-hero--mosaic .m8-hero__scrim {
	background:
		linear-gradient(90deg, rgba(10, 10, 14, .9) 0%, rgba(10, 10, 14, .55) 45%, rgba(10, 10, 14, .18) 100%),
		linear-gradient(180deg, rgba(10, 10, 14, .3) 0%, rgba(10, 10, 14, .7) 100%);
}

@media (max-width: 749px) {
	.m8-hero--mosaic .m8-hero__body {
		margin-left: 0;
	}
}

/* Spotlight — a narrow column of text on a dark field. */
.m8-hero--spotlight .m8-hero__inner {
	max-width: 1100px;
}

.m8-hero--spotlight .m8-hero__story {
	min-height: clamp(400px, 58vh, 660px);
}

.m8-hero--spotlight .m8-hero__body {
	max-width: 560px;
	margin-left: auto;
	text-align: right;
	align-items: flex-end;
}

.m8-hero--spotlight .m8-hero__kicker {
	background: var(--m8-accent);
	color: #0b0b12;
}

.m8-hero--spotlight .m8-hero__meta {
	justify-content: flex-end;
}

.m8-hero--spotlight .m8-hero__scrim {
	background:
		radial-gradient(circle at 78% 40%, rgba(0, 255, 157, .16), transparent 55%),
		linear-gradient(200deg, rgba(10, 10, 14, .2) 0%, rgba(10, 10, 14, .88) 78%);
}

/* Stacked — the text sits below a wide image. */
.m8-hero--stacked .m8-hero__inner {
	max-width: 1000px;
	padding-top: clamp(24px, 4vw, 56px);
}

.m8-hero--stacked .m8-hero__story {
	display: block;
	min-height: 0;
}

.m8-hero--stacked .m8-hero__media {
	position: relative;
	inset: auto;
	aspect-ratio: 21 / 9;
	border-radius: var(--m8-radius);
	overflow: hidden;
}

.m8-hero--stacked .m8-hero__scrim {
	background: linear-gradient(180deg, rgba(10, 10, 14, 0) 40%, rgba(10, 10, 14, .7) 100%);
}

.m8-hero--stacked .m8-hero__body {
	max-width: 760px;
	padding: clamp(20px, 3vw, 34px) 0 clamp(24px, 3vw, 40px);
	color: var(--m8-text);
}

.m8-hero--stacked .m8-hero__title {
	color: var(--m8-text);
}

.m8-hero--stacked .m8-hero__title a {
	color: var(--m8-text);
}

.m8-hero--stacked .m8-hero__summary {
	color: var(--m8-text-muted);
}

.m8-hero--stacked .m8-hero__meta {
	border-top-color: var(--m8-border);
	color: var(--m8-text-muted);
}

/* Poster — a tall frame, the shape of a channel poster. */
.m8-hero--poster .m8-hero__inner {
	max-width: 1280px;
}

.m8-hero--poster .m8-hero__story {
	min-height: clamp(440px, 66vh, 720px);
}

.m8-hero--poster .m8-hero__body {
	max-width: 680px;
}

.m8-hero--poster .m8-hero__kicker {
	background: var(--m8-accent);
	color: #0b1120;
}

.m8-hero--poster .m8-hero__scrim {
	background:
		linear-gradient(0deg, rgba(11, 17, 32, .95) 0%, rgba(11, 17, 32, .5) 45%, rgba(11, 17, 32, .2) 100%);
}

/* Signal — a terminal style lead. */
.m8-hero--signal {
	background: var(--m8-secondary);
}

.m8-hero--signal .m8-hero__inner {
	max-width: 1200px;
}

.m8-hero--signal .m8-hero__story {
	min-height: clamp(340px, 48vh, 540px);
	border: 1px solid rgba(163, 230, 53, .28);
	border-radius: var(--m8-radius);
	overflow: hidden;
}

.m8-hero--signal .m8-hero__scrim {
	background:
		linear-gradient(180deg, rgba(2, 6, 23, .3) 0%, rgba(2, 6, 23, .9) 100%),
		repeating-linear-gradient(0deg, rgba(163, 230, 53, .05) 0 1px, transparent 1px 3px);
}

.m8-hero--signal .m8-hero__kicker {
	background: transparent;
	border: 1px solid var(--m8-accent);
	color: var(--m8-accent);
	font-family: var(--m8-font-mono, monospace);
}

.m8-hero--signal .m8-hero__title {
	font-family: var(--m8-font-mono, monospace);
	letter-spacing: -.02em;
}
