/*
Theme Name: Charlys Theme
Author: Michael Whittaker
Author URI: https://michael-whittaker.de
Description: Wiederverwendbares Block-Theme für Politiker:innen-Websites. Plakat-Ästhetik mit diagonalem Leitmotiv, konsequent über Design-Tokens anpassbar — Public Money, Public Code.
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.2.0
License: CC0 1.0 Universal
License URI: https://creativecommons.org/publicdomain/zero/1.0/
Text Domain: charlys-theme
Tags: block-patterns, block-styles, full-site-editing, one-column, custom-colors, custom-menu, editor-style, translation-ready
*/

/* =====================================================================
   "Charlys Theme" — custom effect layer on top of theme.json tokens.
   Consumes ONLY --wp--preset--* and --wp--custom--* variables so that
   Global Styles and style variations re-skin every effect.
   ===================================================================== */

/* ---------------------------------------------------------------------
   ACCESSIBILITY
   --------------------------------------------------------------------- */

/* Global focus ring — token-based so it recolors with style variations.
   Outline is deliberately excluded from every `transition:` below so it
   snaps in instantly instead of fading, which matters for keyboard users. */
:where(a, button, input, textarea, .wp-block-button__link, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* On dark sections the red ring loses contrast against burgundy/near-black
   backgrounds — switch to a white ring there. */
.ds-topics :where(a, button, .wp-block-navigation-item__content):focus-visible,
.ds-footer :where(a, button, .wp-block-navigation-item__content):focus-visible,
.ds-cta :where(a, button, .wp-block-navigation-item__content):focus-visible,
.is-menu-open :where(a, button, .wp-block-navigation-item__content):focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* Links inside actual prose/post content need a non-color affordance —
   nav and buttons are already visually distinct by shape/position, so
   this is scoped to editorial content rather than changed globally. */
.wp-block-post-content a,
.wp-block-term-description a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/* WP core inserts margin-top: var(--wp--style--block-gap) between the
   header/main/footer template parts at the .wp-site-blocks root. Zeroing
   that CSS custom property globally (via theme.json styles.spacing.blockGap)
   would also zero it for every *nested* flow layout that relies on the same
   fallback (e.g. the hero's kicker/heading/separator/paragraph stack), so
   it's scoped here to just the top-level boundary instead — the header
   should sit flush against whatever follows it (the frosted logo is
   designed to overlap into it), while normal in-page block spacing stays
   exactly as WordPress and each pattern's own explicit spacing intend. */
.wp-site-blocks > * + * {
	margin-top: 0;
}

/* ---------------------------------------------------------------------
   HEADER: sticky bar with oversized frosted logo
   --------------------------------------------------------------------- */
/* The template-part wrapper carries the stickiness — a sticky group INSIDE
   the wrapper would only stick within the wrapper's own height */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 500;
}

body.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ds-header {
	height: var(--wp--custom--header--height);
	border-bottom: 1px solid rgba(0, 0, 0, .07);
	overflow: visible;
}

.ds-header .ds-header__row {
	height: var(--wp--custom--header--height);
}

/* Oversized logo: red band in the bar, lower block leaking over content.
   The image is taller than the header bar and vertically centered within
   it by the flex row, which pushes its top edge above the header's own
   top edge — i.e. above the viewport at scroll position 0. Shifting it
   down by exactly half the height difference brings the top flush with
   the header instead (computed, since the logo's height is itself
   responsive via clamp()); the same amount is added to how far it leaks
   into the content below, which only strengthens that effect. */
.wp-block-site-logo.ds-logo-frost {
	position: relative;
	top: calc((clamp(88px, 11vw, 120px) - var(--wp--custom--header--height)) / 2);
	z-index: 160;
	margin: 0;
}

.wp-block-site-logo.ds-logo-frost img {
	height: clamp(88px, 11vw, 120px);
	width: auto;
	max-width: none;
	position: relative;
	z-index: 1;
}

.wp-block-site-logo.ds-logo-frost a {
	display: block;
	position: relative;
}

/* Frosted glass panel behind the logo. Only the overflow below the header
   bar sits on top of scrolled page content (including the purple CTA
   section, same hue as the logo's own lower block) and needs blurring —
   the upper part sits on the header's own plain background and gains
   nothing from being blurred, so the mask fades the effect IN toward the
   bottom rather than covering the whole logo. Rounded bottom-left corner. */
.wp-block-site-logo.ds-logo-frost a::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	backdrop-filter: blur(var(--wp--custom--frost--blur)) saturate(var(--wp--custom--frost--saturate));
	-webkit-backdrop-filter: blur(var(--wp--custom--frost--blur)) saturate(var(--wp--custom--frost--saturate));
	background: var(--wp--custom--frost--tint);
	border-radius: 0 0 0 28px;
	mask-image: linear-gradient(to bottom, transparent 45%, #000 70%);
	-webkit-mask-image: linear-gradient(to bottom, transparent 45%, #000 70%);
}

/* Navigation */
.ds-nav a:hover,
.ds-nav a:focus-visible {
	color: var(--wp--preset--color--primary);
}

/* CTA item in the nav (last menu item gets the class in the menu UI,
   documented in README; graceful without it) */
.ds-nav .ds-nav-cta a {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: .45rem .9rem;
}

.ds-nav .ds-nav-cta a:hover {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

/* Dark full-screen mobile overlay. !important is necessary here: core ships
   `.wp-block-navigation:not(.has-background) …is-menu-open:not(.disable-default-overlay)
   { background-color: rgb(255,255,255); }` as the default overlay fallback,
   at higher specificity than a plain 3-class selector can reach — setting
   backgroundColor on the wp:navigation block itself isn't an option since
   that would also darken the always-visible desktop header bar. */
.ds-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--contrast) !important;
}

.ds-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--base);
	font-size: 1.6rem;
	font-weight: 700;
}

.ds-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center;
	justify-content: center;
	display: flex;
}

.ds-nav .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--base);
}

/* ---------------------------------------------------------------------
   BUTTONS (block styles)
   --------------------------------------------------------------------- */
.wp-block-button.is-style-ds-outline-dark .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 2px solid var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-ds-outline-dark .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-ds-white .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--secondary);
	font-weight: 800;
}

.wp-block-button.is-style-ds-white .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.wp-block-button .wp-block-button__link {
	transition: transform .3s var(--wp--custom--ease), box-shadow .3s var(--wp--custom--ease),
		background-color .3s var(--wp--custom--ease), color .3s var(--wp--custom--ease);
}

.wp-block-button:not(.is-style-ds-outline-dark):not(.is-style-ds-white) .wp-block-button__link:hover {
	transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.ds-hero {
	overflow: hidden;
}

.ds-kicker {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: var(--wp--preset--color--secondary);
}

/* The name never wraps: nowrap keeps each line intact, the cqw cap scales
   the type to the column (no-JS fallback), main.js fits it exactly */
.ds-hero .wp-block-column:has(.ds-hero__name) {
	container-type: inline-size;
}

.ds-hero__name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	/* deliberately steeper than theme.json fluid type: poster look */
	font-size: min(clamp(3.2rem, 11vw, 7.5rem), 15cqw) !important;
	line-height: .92;
	letter-spacing: -.05em;
	color: var(--wp--preset--color--secondary);
	white-space: nowrap;
}

.ds-hero__name-accent {
	color: var(--wp--preset--color--primary);
}

/* Skewed red bar (separator block style) */
.wp-block-separator.is-style-ds-skew-bar {
	width: 72px !important;
	height: 6px;
	border: none;
	background: var(--wp--preset--color--primary);
	transform: skewX(-12deg);
	margin-left: 0;
	opacity: 1;
}

/* Photo with offset frame (image block style). On mobile the columns
   stack, so the image keeps a fixed portrait crop; on desktop the two
   hero columns sit side by side and the image instead stretches to match
   the text column's own height, so it never towers over the copy next
   to it regardless of how long that copy is. */
.wp-block-image.is-style-ds-offset-frame {
	position: relative;
}

.wp-block-image.is-style-ds-offset-frame img {
	position: relative;
	z-index: 1;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center 20%;
	width: 100%;
	height: auto;
}

/* Offset red border, same size as the photo, peeking out to the
   lower-right — a deliberate "poster" touch, not a full frame. Stacked
   explicitly against the img above (z-index 0 vs 1) rather than using a
   negative z-index, which — now that the figure itself is absolutely
   positioned at desktop widths — would escape this stacking context
   entirely and could paint behind the section's own background instead
   of just behind the photo. */
.wp-block-image.is-style-ds-offset-frame::after {
	content: '';
	position: absolute;
	inset: 0;
	right: -14px;
	bottom: -14px;
	z-index: 0;
	border: 4px solid var(--wp--preset--color--primary);
}

@media (min-width: 960px) {
	/* Core outputs `.wp-block-columns.are-vertically-aligned-center
	   { align-items: center }` as an inline <style> block late in <head>,
	   which wins over a plain `.ds-hero .wp-block-columns` rule at equal
	   specificity — matching its own class here breaks the tie. Core ALSO
	   sets `align-self: center` on each individual
	   `.wp-block-column.is-vertically-aligned-center`, which overrides
	   whatever align-items says for that item regardless — so the photo's
	   own column needs its align-self overridden directly too. */
	.ds-hero .wp-block-columns.are-vertically-aligned-center {
		align-items: stretch;
	}

	.ds-hero .wp-block-column.is-vertically-aligned-center:has(> .wp-block-image.is-style-ds-offset-frame) {
		align-self: stretch;
	}

	/* Percentage heights through a flex column don't reliably resolve for a
	   block-level grandchild, so the photo is taken out of flow instead:
	   absolutely filling its column means it can never make the column
	   (and therefore the row) any taller than the text column requires. */
	.ds-hero .wp-block-column:has(> .wp-block-image.is-style-ds-offset-frame) {
		position: relative;
	}

	.wp-block-image.is-style-ds-offset-frame {
		position: absolute;
		inset: 0;
	}

	.wp-block-image.is-style-ds-offset-frame img {
		aspect-ratio: auto;
		width: 100%;
		height: 100%;
	}
}

/* ---------------------------------------------------------------------
   TICKER — scrolling belt
   --------------------------------------------------------------------- */
.ds-ticker {
	overflow: hidden;
	padding: .85rem 0;
	position: relative;
}

/* Pause/play control injected by main.js — required for WCAG 2.2.2
   (any auto-moving content running longer than 5s needs a way to stop it) */
.ds-ticker__toggle {
	position: absolute;
	top: 50%;
	right: var(--wp--custom--gutter);
	transform: translateY(-50%);
	z-index: 2;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, .2);
	color: var(--wp--preset--color--base);
	border-radius: 50%;
	line-height: 1;
	font-size: .85rem;
	margin-top: 0;
	margin-right: 24px;
}

.ds-ticker__toggle:hover {
	background: rgba(0, 0, 0, .35);
}

.ds-ticker.is-paused .ds-ticker__track {
	animation-play-state: paused;
}

.ds-ticker__belt {
	display: flex;
	gap: 2.5rem;
	width: max-content;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: clamp(.8rem, 1.4vw, .95rem);
	text-transform: uppercase;
	letter-spacing: .14em;
	word-spacing: .6em;
	color: var(--wp--preset--color--base);
	white-space: nowrap;
	margin: 0;
}

/* main.js wraps .ds-ticker__belt in this track and appends a cloned copy
   (or several, until the track is at least 2x the ticker's width) so the
   translateX(-50%) loop is seamless regardless of content length. It also
   sets an inline animation-duration proportional to the measured width, so
   speed stays constant; the token below is only the no-JS fallback. */
.ds-ticker__track {
	display: flex;
	gap: 2.5rem;
	width: max-content;
	animation: ds-ticker-scroll var(--wp--custom--ticker--duration) linear infinite;
}

.ds-ticker__track > * {
	margin: 0;
}

@keyframes ds-ticker-scroll {
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ds-ticker__track,
	.wp-block-button__link,
	.ds-post,
	.ds-post::after,
	.ds-news__all {
		animation: none !important;
		transition: none !important;
	}

	.wp-block-button__link:hover,
	.ds-post:hover {
		transform: none !important;
	}
}

/* ---------------------------------------------------------------------
   STATEMENT — diagonal red top stripe
   --------------------------------------------------------------------- */
.ds-statement {
	position: relative;
	overflow: hidden;
}

.ds-statement::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: var(--wp--preset--color--primary);
	transform: skewY(var(--wp--custom--diagonal--skew));
	transform-origin: top left;
}

.ds-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: var(--wp--preset--color--primary);
	padding-bottom: .5rem;
	border-bottom: 3px solid var(--wp--preset--color--primary);
}

/* ---------------------------------------------------------------------
   TOPICS — dark editorial list with diagonal top edge
   --------------------------------------------------------------------- */
.ds-topics {
	position: relative;
}

.ds-topics::before {
	content: '';
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: var(--wp--custom--diagonal--height);
	background: var(--wp--preset--color--base);
	clip-path: polygon(0 0, 100% 0, 100% 0%, 0 100%);
	pointer-events: none;
}

.ds-topics__title {
	line-height: .95;
	letter-spacing: -.04em;
	/* WP core forces break-word on headings; keep words intact and size the
	   type so long German words ("Schwerpunkte") fit the column */
	overflow-wrap: normal;
	word-break: keep-all;
	hyphens: manual;
	font-size: clamp(2.2rem, 4.4vw, 4.2rem) !important;
}

@media (min-width: 960px) {
	.ds-topics__title {
		position: sticky;
		top: calc(var(--wp--custom--header--height) + 48px);
	}
}

.ds-topic {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1.5rem;
	align-items: center;
	padding: clamp(1.5rem, 3vw, 2.25rem) 0 !important;
	/* on-dark hairline: derived from `base` so a light-theme style variation
	   (contrast set to a light color) doesn't leave white-on-white rules */
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--base) 12%, transparent);
	position: relative;
}

.ds-topics .ds-topic:first-child {
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--base) 12%, transparent);
}

.ds-topic__num {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: clamp(2.5rem, 5vw, 4rem);
	line-height: 1;
	letter-spacing: -.04em;
	color: var(--wp--preset--color--primary);
	min-width: 70px;
	margin: 0 !important;
}

.ds-topic h3 {
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
	font-weight: 700;
	margin: 0 0 .35rem;
}

.ds-topic p:not(.ds-topic__num) {
	font-size: .92rem;
	color: color-mix(in srgb, var(--wp--preset--color--base) 55%, transparent);
	line-height: 1.6;
	max-width: 540px;
	margin: 0;
}

@media (max-width: 640px) {
	.ds-topic__num {
		min-width: 50px;
		font-size: 2rem;
	}
}

/* ---------------------------------------------------------------------
   NEWS — post cards with animated left border
   --------------------------------------------------------------------- */
.ds-news__all {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .9rem;
	color: var(--wp--preset--color--primary);
	transition: letter-spacing .25s var(--wp--custom--ease);
}

.ds-news__all:hover {
	letter-spacing: .03em;
	color: var(--wp--preset--color--primary);
}

.ds-news__layout {
	display: grid;
	grid-template-columns: minmax(0, 2.1fr) minmax(220px, .9fr);
	gap: 2rem;
	align-items: start;
}

.ds-news__posts {
	min-width: 0;
}

.ds-news__grid {
	display: grid;
	grid-template-columns: 1fr;
	grid-auto-rows: 1fr;
	align-items: stretch;
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.ds-news__grid > li,
.ds-news__grid > .wp-block-post {
	display: flex;
	height: 100%;
	margin: 0;
}

.ds-news__grid > li > .ds-post,
.ds-news__grid > .wp-block-post > .ds-post {
	height: 100%;
	flex: 1 1 auto;
	min-height: 24rem;
	margin: 0;
}

.ds-news__events {
	padding: clamp(1.25rem, 2vw, 1.75rem);
	background: color-mix(in srgb, var(--wp--preset--color--base) 78%, var(--wp--preset--color--paper) 22%);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
	align-self: stretch;
}

.ds-news__events-title {
	margin: 0 0 1rem;
	font-size: clamp(1.2rem, 2vw, 1.6rem);
	line-height: 1.1;
}

.ds-news__events .em-events-list,
.ds-news__events ul,
.ds-news__events ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ds-news__events li,
.ds-news__events .em-event,
.ds-news__events .event {
	padding: .9rem 0;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
}

.ds-news__events li:first-child,
.ds-news__events .em-event:first-child,
.ds-news__events .event:first-child {
	border-top: 0;
	padding-top: 0;
}

.ds-news__events li a,
.ds-news__events .em-event a,
.ds-news__events .event a {
	display: inline-block;
	font-weight: 700;
	text-decoration: none;
	margin-bottom: .25rem;
}

.ds-event-item a {
	font-weight: bold;
}

.ds-event-item a, .em.pixelbones a {
	color: var(--wp--preset--color--contrast) !important;
}

.ds-news__events .ds-event-item__meta,
.ds-news__events .event-date,
.ds-news__events .event-time,
.ds-news__events .event-meta {
	display: block;
	font-size: .78rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-soft);
}

.ds-news__events-link {
	margin: 1rem 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .8rem;
}

@media (min-width: 768px) {
	.ds-news__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}
}

@media (max-width: 767px) {
	.ds-news__layout {
		grid-template-columns: 1fr;
	}

	.ds-news__posts {
		width: 100%;
	}


	.ds-news__grid {
		grid-auto-rows: auto;
	}

	.ds-news__grid > li,
	.ds-news__grid > .wp-block-post,
	.ds-news__grid > li > .ds-post,
	.ds-news__grid > .wp-block-post > .ds-post {
		height: auto;
		min-height: 0;
	}
}

.ds-post {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	/* baseline shadow so the card reads as a distinct surface even when the
	   page behind it is also `base` (e.g. page.html has no background) */
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	padding: clamp(1.5rem, 3vw, 2.25rem);
	position: relative;
	transition: transform .35s var(--wp--custom--ease), box-shadow .35s var(--wp--custom--ease);
	height: 100%;
	width: 100%;
}

.ds-post .wp-block-post-excerpt {
	margin-top: auto;
}

.ds-post::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 0;
	background: var(--wp--preset--color--primary);
	transition: height .4s var(--wp--custom--ease);
}

.ds-post:hover::after {
	height: 100%;
}

.ds-post:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, .06);
}

.ds-post .wp-block-post-featured-image {
	margin: calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) 1.25rem;
}

.ds-post .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.ds-single-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}

.ds-post .wp-block-post-date {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--wp--preset--color--contrast-soft);
	margin-bottom: .75rem;
}

.ds-post .wp-block-post-title {
	font-size: clamp(1rem, 2vw, 1.15rem);
	line-height: 1.35;
	font-weight: 700;
	margin: 0 0 .5rem;
}

.ds-post .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.ds-post .wp-block-post-excerpt {
	font-size: .9rem;
	color: var(--wp--preset--color--contrast-soft);
	line-height: 1.65;
}

.ds-post .wp-block-post-excerpt__more-text a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* Archive list variant */
.ds-archive-list .ds-post {
	margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------------
   CTA — diagonal top edge, photo with colored shadow
   --------------------------------------------------------------------- */
.ds-cta {
	position: relative;
	overflow: hidden;
}

.ds-cta::before {
	content: '';
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: var(--wp--custom--diagonal--height);
	background: var(--wp--preset--color--paper);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
	pointer-events: none;
}

.wp-block-image.is-style-ds-shadow-offset img {
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center 15%;
	box-shadow: 24px 24px 0 var(--wp--preset--color--primary);
}

@media (max-width: 959px) {
	.ds-cta__photo {
		display: none;
	}
}

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.ds-footer {
	border-top: 4px solid var(--wp--preset--color--primary);
	font-size: .9rem;
}

.ds-footer a {
	color: var(--wp--custom--footer--link);
	transition: color .25s var(--wp--custom--ease);
}

.ds-footer a:hover {
	color: var(--wp--preset--color--base);
}

.ds-footer .ds-footer__heading {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--wp--preset--color--base);
	margin-bottom: .75rem;
}

.ds-footer .wp-block-navigation a {
	color: var(--wp--custom--footer--link);
	font-size: .9rem;
	font-weight: 400;
}

.ds-footer .wp-block-navigation a:hover {
	color: var(--wp--custom--footer--link);
}

/* Muted on-dark text — the bio paragraph and any redakteur hints in the
   footer both need this; not a preset color so it stays independent of
   the party palette. */
.ds-footer__muted {
	color: var(--wp--custom--footer--text);
}

.ds-footer__bottom {
	border-top: 1px solid var(--wp--custom--footer--rule);
	font-size: .78rem;
	color: var(--wp--custom--footer--text);
}

.ds-footer__bottom a {
	color: var(--wp--custom--footer--link);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------
   COMMENTS
   --------------------------------------------------------------------- */
.ds-comments {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 3px solid var(--wp--preset--color--primary);
}

.ds-comments h2,
.ds-comments h3 {
	font-size: var(--wp--preset--font-size--large);
}

.ds-comments textarea,
.ds-comments input[type="text"],
.ds-comments input[type="email"],
.ds-comments input[type="url"] {
	width: 100%;
	padding: .6rem .8rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
	font-family: var(--wp--preset--font-family--body);
}

/* ---------------------------------------------------------------------
   SINGLE / ARCHIVE polish
   --------------------------------------------------------------------- */
.ds-single-meta {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--wp--preset--color--contrast-soft);
}

.ds-single-meta .wp-block-post-terms a {
	color: var(--wp--preset--color--primary);
}

