/**
 * Pinterest First Editorial - Content components.
 *
 * Reusable cards, author metadata, archive/section headers, breadcrumbs and
 * pagination, plus the Phase 5 homepage module composition (hero, grids and
 * the promotion block). Homepage modules are pure compositions of the existing
 * components, so they live with them rather than in a separate stylesheet;
 * archive composition still belongs to the later archive phase.
 *
 * Phase 9 adds the provider-neutral advertisement slot wrapper. Ad slots can
 * appear on any view (header, article, homepage, archive and footer), so the
 * component lives here with the other cross-view components instead of in a
 * conditionally loaded stylesheet.
 *
 * The document footer navigation is a cross-view component for the same
 * reason: every view that renders footer.php can show it, so its small token
 * styling lives here rather than in a conditionally loaded stylesheet.
 *
 * All shared values come from tokens.css. Component-specific values with no
 * token are declared as local custom properties on the component root
 * (Docs/ARCHITECTURE.md, CSS Rules).
 *
 * @package Pinterest_First_Editorial
 */

/* -------------------------------------------------------------------------
 * Shared card frame
 *
 * One component shell drives all six variants so markup stays centralized
 * (Docs/ARCHITECTURE.md, Template Parts; Docs/DESIGN_SYSTEM.md #12).
 * ---------------------------------------------------------------------- */

.pfe-card {
	--pfe-card-media-radius: var(--pfe-radius-md);
	--pfe-card-media-bg: var(--pfe-color-surface-muted);
	--pfe-card-gap: var(--pfe-space-4);
	--pfe-card-hover-lift: 1.03;

	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--pfe-card-gap);
	height: 100%;
	min-width: 0;
}

/* -------------------------------------------------------------------------
 * Media frame + image + placeholder
 * ---------------------------------------------------------------------- */

.pfe-card__media {
	position: relative;
	background-color: var(--pfe-card-media-bg);
	border-radius: var(--pfe-card-media-radius);
}

.pfe-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--pfe-transition-base);
}

.pfe-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--pfe-color-text-secondary);
}

.pfe-card__placeholder-icon {
	width: var(--pfe-space-7);
	height: var(--pfe-space-7);
	opacity: 0.55;
}

/* -------------------------------------------------------------------------
 * Body, category, title, excerpt, meta
 * ---------------------------------------------------------------------- */

.pfe-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--pfe-space-2);
	min-width: 0;
}

.pfe-card__category {
	position: relative;
	z-index: 1; /* independent link above the stretched title overlay */
	align-self: flex-start;
	font-size: var(--pfe-font-size-xs);
	font-weight: var(--pfe-font-weight-semibold);
	letter-spacing: var(--pfe-tracking-wide);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--pfe-color-accent-strong);
}

.pfe-card__category:hover {
	color: var(--pfe-color-accent-hover);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

.pfe-card__title {
	margin: 0;
	font-size: var(--pfe-font-size-h3);
	font-weight: var(--pfe-font-weight-bold);
	line-height: var(--pfe-leading-snug);
	letter-spacing: var(--pfe-tracking-tight);
	color: var(--pfe-color-text);
}

.pfe-card__link {
	color: inherit;
	text-decoration: none;
}

/* Stretched link: the whole card becomes the title's hit area. */
.pfe-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.pfe-card__excerpt {
	margin: 0;
	font-size: var(--pfe-font-size-sm);
	line-height: var(--pfe-leading-normal);
	color: var(--pfe-color-text-secondary);
}

.pfe-card__meta {
	margin-block-start: var(--pfe-space-1);
}

/* Title clamping: visual only - the full title stays as link text. */
.pfe-card__title--clamp-2,
.pfe-card__title--clamp-3,
.pfe-card__title--clamp-4 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pfe-card__title--clamp-2 {
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.pfe-card__title--clamp-3 {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.pfe-card__title--clamp-4 {
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

/* -------------------------------------------------------------------------
 * Numbered badge (curated lists) - decorative, hidden from assistive tech.
 * ---------------------------------------------------------------------- */

.pfe-card__number {
	position: absolute;
	inset-block-start: var(--pfe-space-3);
	inset-inline-start: var(--pfe-space-3);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: var(--pfe-space-7);
	height: var(--pfe-space-7);
	padding-inline: var(--pfe-space-2);
	background-color: var(--pfe-color-surface);
	color: var(--pfe-color-text);
	border-radius: var(--pfe-radius-sm);
	box-shadow: var(--pfe-shadow-sm);
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-bold);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* -------------------------------------------------------------------------
 * Variant: feature - larger, more prominent editorial card.
 * ---------------------------------------------------------------------- */

.pfe-card--feature {
	--pfe-card-gap: var(--pfe-space-5);
}

.pfe-card--feature .pfe-card__media {
	border-radius: var(--pfe-radius-lg);
}

.pfe-card--feature .pfe-card__title {
	font-size: var(--pfe-font-size-h2);
	line-height: var(--pfe-leading-tight);
}

@media (min-width: 768px) {

	.pfe-card--feature .pfe-card__title {
		font-size: var(--pfe-font-size-h1);
	}
}

/* -------------------------------------------------------------------------
 * Variant: image-first - image dominates, minimal text.
 * ---------------------------------------------------------------------- */

.pfe-card--image-first {
	--pfe-card-gap: var(--pfe-space-3);
}

/* -------------------------------------------------------------------------
 * Variant: compact - horizontal list-friendly layout.
 * ---------------------------------------------------------------------- */

.pfe-card--compact {
	--pfe-card-compact-media: 38%;

	flex-direction: row;
	align-items: flex-start;
	gap: var(--pfe-space-3);
}

.pfe-card--compact .pfe-card__media {
	flex: 0 0 var(--pfe-card-compact-media);
	width: var(--pfe-card-compact-media);
}

.pfe-card--compact .pfe-card__title {
	font-size: var(--pfe-font-size-h4);
}

/* -------------------------------------------------------------------------
 * Variant: numbered - curated list item.
 * ---------------------------------------------------------------------- */

.pfe-card--numbered .pfe-card__title {
	font-size: var(--pfe-font-size-h4);
}

/* -------------------------------------------------------------------------
 * Variant: related - bare image + title discovery unit.
 * ---------------------------------------------------------------------- */

.pfe-card--related {
	--pfe-card-gap: var(--pfe-space-2);
}

.pfe-card--related .pfe-card__title {
	font-size: var(--pfe-font-size-h5);
	line-height: var(--pfe-leading-snug);
}

/* -------------------------------------------------------------------------
 * Interaction - restrained hover feedback; no layout-heavy motion.
 * ---------------------------------------------------------------------- */

@media (hover: hover) {

	.pfe-card:hover .pfe-card__image {
		transform: scale(var(--pfe-card-hover-lift));
	}

	.pfe-card:hover .pfe-card__link {
		color: var(--pfe-color-accent-strong);
	}
}

/* -------------------------------------------------------------------------
 * Motion - respect reduced-motion preferences. base.css already neutralises
 * transition durations; the hover zoom transform is disabled as well.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.pfe-card:hover .pfe-card__image {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
 * Author metadata
 * ---------------------------------------------------------------------- */

.pfe-author-meta {
	display: flex;
	align-items: center;
	gap: var(--pfe-space-3);
}

.pfe-author-meta__avatar {
	flex: 0 0 auto;
	line-height: 0;
}

.pfe-author-meta__avatar img {
	width: var(--pfe-space-9);
	height: var(--pfe-space-9);
	border-radius: 50%;
	object-fit: cover;
}

.pfe-author-meta__text {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--pfe-space-2);
	min-width: 0;
	font-size: var(--pfe-font-size-sm);
	color: var(--pfe-color-text-secondary);
}

.pfe-author-meta__name {
	position: relative;
	z-index: 1; /* independent link above a stretched card title overlay */
	font-weight: var(--pfe-font-weight-semibold);
	color: var(--pfe-color-text);
	text-decoration: none;
}

.pfe-author-meta__name:hover {
	color: var(--pfe-color-accent-hover);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

.pfe-author-meta__date {
	font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
 * Archive / category header
 * ---------------------------------------------------------------------- */

.pfe-archive-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--pfe-space-4);
	padding-block-end: var(--pfe-space-5);
	margin-block-end: var(--pfe-space-7);
	border-block-end: 1px solid var(--pfe-color-border);
}

.pfe-archive-header__text {
	min-width: 0;
}

.pfe-archive-header__title {
	margin: 0;
	font-size: var(--pfe-font-size-h1);
	font-weight: var(--pfe-font-weight-bold);
	line-height: var(--pfe-leading-tight);
	letter-spacing: var(--pfe-tracking-tight);
	color: var(--pfe-color-text);
}

.pfe-archive-header__description {
	margin-block-start: var(--pfe-space-3);
	max-width: var(--pfe-reading-measure);
	font-size: var(--pfe-font-size-md);
	line-height: var(--pfe-leading-relaxed);
	color: var(--pfe-color-text-secondary);
}

.pfe-archive-header__count {
	margin: 0;
	font-size: var(--pfe-font-size-sm);
	letter-spacing: var(--pfe-tracking-wide);
	text-transform: uppercase;
	color: var(--pfe-color-text-secondary);
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Section header
 * ---------------------------------------------------------------------- */

.pfe-section-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--pfe-space-3) var(--pfe-space-5);
	margin-block-end: var(--pfe-space-6);
}

.pfe-section-header__text {
	min-width: 0;
}

.pfe-section-header__title {
	margin: 0;
	font-size: var(--pfe-font-size-h2);
	font-weight: var(--pfe-font-weight-bold);
	line-height: var(--pfe-leading-tight);
	letter-spacing: var(--pfe-tracking-tight);
	color: var(--pfe-color-text);
}

.pfe-section-header__description {
	margin: var(--pfe-space-2) 0 0;
	max-width: var(--pfe-reading-measure);
	font-size: var(--pfe-font-size-sm);
	line-height: var(--pfe-leading-normal);
	color: var(--pfe-color-text-secondary);
}

.pfe-section-header__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--pfe-tap-target);
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-semibold);
	color: var(--pfe-color-accent-strong);
	text-decoration: none;
	white-space: nowrap;
}

.pfe-section-header__link:hover {
	color: var(--pfe-color-accent-hover);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

/* -------------------------------------------------------------------------
 * Breadcrumbs
 * ---------------------------------------------------------------------- */

.pfe-breadcrumbs {
	margin-block-end: var(--pfe-space-5);
}

.pfe-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--pfe-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--pfe-font-size-xs);
	color: var(--pfe-color-text-secondary);
}

.pfe-breadcrumbs__item {
	display: inline-flex;
	align-items: center;
	gap: var(--pfe-space-2);
	min-width: 0;
}

.pfe-breadcrumbs__item + .pfe-breadcrumbs__item::before {
	content: "/";
	color: var(--pfe-color-border);
}

.pfe-breadcrumbs__link {
	color: var(--pfe-color-text-secondary);
	text-decoration: none;
}

.pfe-breadcrumbs__link:hover {
	color: var(--pfe-color-accent-hover);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

.pfe-breadcrumbs__current {
	color: var(--pfe-color-text);
	font-weight: var(--pfe-font-weight-medium);
}

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

.pfe-pagination {
	margin-block-start: var(--pfe-space-9);
}

.pfe-pagination__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--pfe-space-2);
}

.pfe-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--pfe-space-2);
	min-width: var(--pfe-tap-target);
	min-height: var(--pfe-tap-target);
	padding-inline: var(--pfe-space-4);
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-semibold);
	color: var(--pfe-color-text);
	text-decoration: none;
	background-color: var(--pfe-color-surface);
	border: 1px solid var(--pfe-color-border);
	border-radius: var(--pfe-radius-sm);
	transition: background-color var(--pfe-transition-fast), border-color var(--pfe-transition-fast), color var(--pfe-transition-fast);
}

.pfe-pagination a.page-numbers:hover {
	color: var(--pfe-color-accent-strong);
	border-color: var(--pfe-color-accent);
}

.pfe-pagination .page-numbers.current {
	color: var(--pfe-color-on-accent);
	background-color: var(--pfe-color-accent-strong);
	border-color: var(--pfe-color-accent-strong);
}

.pfe-pagination .page-numbers.dots {
	min-width: auto;
	padding-inline: var(--pfe-space-1);
	background-color: transparent;
	border-color: transparent;
}

.pfe-pagination .prev.page-numbers,
.pfe-pagination .next.page-numbers {
	padding-inline: var(--pfe-space-5);
}

.pfe-pagination__arrow {
	font-size: var(--pfe-font-size-md);
	line-height: 1;
}

/* -------------------------------------------------------------------------
 * Homepage modules (Phase 5)
 *
 * Each module is a <section> wrapping a .pfe-container and, where used, a
 * section header plus a grid/list of the existing cards. Modules are separated
 * by generous spacing only (no borders or extra chrome) to keep the
 * composition calm and editorial (Docs/DESIGN_SYSTEM.md #2/#3; #14 Motion).
 * ---------------------------------------------------------------------- */

.pfe-home-section {
	padding-block: var(--pfe-space-8);
}

.pfe-home-section:first-child {
	padding-block-start: var(--pfe-space-6);
}

.pfe-home-section:last-child {
	padding-block-end: var(--pfe-space-9);
}

/* Base card grids (numbered / standard): single column, then 2-up once the
 * cards stay readable (Docs/DESIGN_SYSTEM.md #3 Mobile). */
.pfe-home-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pfe-space-6);
}

/* Image-first visual grid: two columns stay readable down to small phones. */
.pfe-home-grid--visual {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--pfe-space-4);
}

@media (min-width: 480px) {

	.pfe-home-grid--numbered,
	.pfe-home-grid--cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pfe-home-grid--visual {
		gap: var(--pfe-space-5);
	}
}

@media (min-width: 768px) {

	.pfe-home-grid {
		gap: var(--pfe-space-7);
	}

	.pfe-home-grid--numbered,
	.pfe-home-grid--cards,
	.pfe-home-grid--visual {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {

	.pfe-home-grid--numbered,
	.pfe-home-grid--cards,
	.pfe-home-grid--visual {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {

	.pfe-home-grid--numbered,
	.pfe-home-grid--cards,
	.pfe-home-grid--visual {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Latest module - scannable compact list; two columns on wide screens. */
.pfe-home-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pfe-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1024px) {

	.pfe-home-list--latest {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--pfe-space-8);
	}
}

/* Category spotlight - one leading feature card beside a stack of recents. */
.pfe-home-grid--spotlight {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pfe-space-6);
}

.pfe-home-grid__stack {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pfe-space-5);
}

@media (min-width: 768px) {

	.pfe-home-grid--spotlight {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: var(--pfe-space-7) var(--pfe-space-8);
		align-items: start;
	}
}

@media (min-width: 1024px) {

	.pfe-home-grid__stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* -------------------------------------------------------------------------
 * Hero module
 *
 * Single-column on mobile; balanced image/text split on desktop. The hero
 * title owns the page H1 and is never clamped (Docs/DECISIONS.md #24).
 * The stretched title link makes the whole composition one hit area, with the
 * category link raised above it (mirrors the card link pattern).
 * ---------------------------------------------------------------------- */

.pfe-hero {
	padding-block: var(--pfe-space-8) var(--pfe-space-9);
}

.pfe-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--pfe-space-6);
}

.pfe-hero__media-frame {
	--pfe-card-media-radius: var(--pfe-radius-lg);
	--pfe-card-media-bg: var(--pfe-color-surface-muted);
}

.pfe-hero__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--pfe-space-4);
	min-width: 0;
}

.pfe-hero__category {
	position: relative;
	z-index: 1; /* independent link above the stretched title overlay */
	font-size: var(--pfe-font-size-xs);
	font-weight: var(--pfe-font-weight-semibold);
	letter-spacing: var(--pfe-tracking-wide);
	text-transform: uppercase;
	color: var(--pfe-color-accent-strong);
	text-decoration: none;
}

.pfe-hero__category:hover {
	color: var(--pfe-color-accent-hover);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

.pfe-hero__title {
	margin: 0;
	font-size: var(--pfe-font-size-h1);
	font-weight: var(--pfe-font-weight-bold);
	line-height: var(--pfe-leading-tight);
	letter-spacing: var(--pfe-tracking-tight);
	color: var(--pfe-color-text);
	text-wrap: balance;
}

.pfe-hero__link {
	color: inherit;
	text-decoration: none;
}

.pfe-hero__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.pfe-hero__excerpt {
	margin: 0;
	max-width: var(--pfe-reading-measure);
	font-size: var(--pfe-font-size-md);
	line-height: var(--pfe-leading-normal);
	color: var(--pfe-color-text-secondary);
}

.pfe-hero__cta {
	display: inline-flex;
	align-items: center;
	min-height: var(--pfe-tap-target);
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-semibold);
	color: var(--pfe-color-accent-strong);
}

.pfe-hero__cta::after {
	content: "\2192";
	margin-inline-start: var(--pfe-space-2);
}

.pfe-hero__tagline,
.pfe-hero__empty {
	margin: var(--pfe-space-4) 0 0;
	max-width: var(--pfe-reading-measure);
	font-size: var(--pfe-font-size-lg);
	line-height: var(--pfe-leading-normal);
	color: var(--pfe-color-text-secondary);
}

.pfe-hero--empty .pfe-hero__title,
.pfe-hero--title-only .pfe-hero__title {
	font-size: var(--pfe-font-size-display);
}

@media (min-width: 1024px) {

	.pfe-hero__inner {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		gap: var(--pfe-space-8) var(--pfe-space-9);
		align-items: center;
	}

	.pfe-hero__body {
		padding-block: var(--pfe-space-4);
	}
}

/* -------------------------------------------------------------------------
 * Promotion / editorial module
 *
 * A restrained editorial block: quiet surface, single border, real link. It is
 * deliberately not styled as an advertisement or a fake button
 * (Docs/ADS_AND_MONETIZATION.md).
 * ---------------------------------------------------------------------- */

.pfe-promo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pfe-space-5) var(--pfe-space-8);
	padding: var(--pfe-space-7);
	background-color: var(--pfe-color-surface);
	border: 1px solid var(--pfe-color-border);
	border-radius: var(--pfe-radius-lg);
	box-shadow: var(--pfe-shadow-sm);
}

.pfe-promo__body {
	min-width: 0;
	max-width: var(--pfe-reading-measure);
}

.pfe-promo__title {
	margin: 0;
	font-size: var(--pfe-font-size-h2);
	font-weight: var(--pfe-font-weight-bold);
	line-height: var(--pfe-leading-snug);
	letter-spacing: var(--pfe-tracking-tight);
	color: var(--pfe-color-text);
}

.pfe-promo__text {
	margin: var(--pfe-space-3) 0 0;
	font-size: var(--pfe-font-size-md);
	line-height: var(--pfe-leading-normal);
	color: var(--pfe-color-text-secondary);
}

.pfe-promo__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--pfe-tap-target);
	padding-inline: var(--pfe-space-5);
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-semibold);
	color: var(--pfe-color-text);
	text-decoration: none;
	background-color: var(--pfe-color-surface);
	border: 1px solid var(--pfe-color-border);
	border-radius: var(--pfe-radius-sm);
	transition: background-color var(--pfe-transition-fast), border-color var(--pfe-transition-fast), color var(--pfe-transition-fast);
}

.pfe-promo__link:hover {
	color: var(--pfe-color-accent-strong);
	border-color: var(--pfe-color-accent);
}

/* -------------------------------------------------------------------------
 * Advertisement slots
 *
 * One provider-neutral wrapper for every canonical slot
 * (Docs/DECISIONS.md #11; Docs/ADS_AND_MONETIZATION.md #2, #4, #7, #8).
 * The wrapper is only ever rendered when a slot is enabled and has provider
 * output, so there is no empty container and no blank gap. A publisher
 * configured reservation height is applied as `min-height`: a slow ad cannot
 * shift the layout, while a taller ad is never clipped.
 *
 * The wrapper stays inside the content width, does not introduce a stacking
 * context and never floats over content, so it cannot obscure navigation,
 * headings or interactive controls.
 * ---------------------------------------------------------------------- */

.pfe-ad-slot {
	--pfe-ad-slot-reserved-height: 0px;

	min-width: 0;
	max-width: 100%;
	padding-block: var(--pfe-space-5);
	min-height: var(--pfe-ad-slot-reserved-height);
	text-align: center;
}

/* Provider markup is capped to the slot width; the theme does not restyle it
 * and does not fake a click affordance (Docs/ADS_AND_MONETIZATION.md #8). */
.pfe-ad-slot > * {
	max-width: 100%;
}

.pfe-ad-slot__label {
	margin: 0 0 var(--pfe-space-2);
	font-size: var(--pfe-font-size-xs);
	font-weight: var(--pfe-font-weight-semibold);
	letter-spacing: var(--pfe-tracking-wide);
	text-transform: uppercase;
	color: var(--pfe-color-text-secondary);
}

/* In-feed slots span the whole card grid row instead of occupying one cell. */
.pfe-home-grid > .pfe-ad-slot {
	grid-column: 1 / -1;
}

/* Optional viewport visibility. The mobile/desktop split matches the header
 * breakpoint (--pfe-breakpoint-md, 768px) so ad visibility follows the
 * documented mobile/desktop behaviour (Docs/DECISIONS.md #20). */
@media (max-width: 767px) {

	.pfe-ad-slot--desktop-only {
		display: none;
	}
}

@media (min-width: 768px) {

	.pfe-ad-slot--mobile-only {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Document footer navigation
 *
 * Rendered from the registered `footer` menu location (inc/setup.php), so the
 * publisher assigns it through the native Menus screen rather than a duplicate
 * setting. It is a flat, wrapping list of full-size links: no dropdown, no
 * script and no horizontal overflow, and every link keeps the documented 44px
 * minimum target (Docs/DECISIONS.md #23; Docs/PROJECT_SPEC.md #10 Footer).
 * The footer appears on every view, hence the component lives here.
 * ---------------------------------------------------------------------- */

.pfe-footer {
	margin-block-start: var(--pfe-space-9);
	border-block-start: 1px solid var(--pfe-color-border);
}

.pfe-footer__nav {
	padding-block: var(--pfe-space-4) var(--pfe-space-2);
}

.pfe-footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--pfe-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--pfe-font-size-sm);
	font-weight: var(--pfe-font-weight-medium);
}

.pfe-footer__menu a {
	display: inline-flex;
	align-items: center;
	min-height: var(--pfe-tap-target);
	color: var(--pfe-color-text);
	text-decoration: none;
}

.pfe-footer__menu a:hover,
.pfe-footer__menu a:focus {
	color: var(--pfe-color-accent-strong);
	text-decoration: underline;
	text-underline-offset: var(--pfe-underline-offset);
}

.pfe-footer__menu .current-menu-item > a,
.pfe-footer__menu .current-menu-ancestor > a {
	color: var(--pfe-color-accent-strong);
}
