/* ==========================================================================
   Dopamino — component styles that theme.json can't express.
   Tokens come from theme.json (--wp--preset--*, --wp--custom--*).
   ========================================================================== */

:root {
	/* Figma: 100px side margins at 1440, 24px at 390 */
	--dpm-gutter: clamp(24px, calc(24px + (100vw - 390px) * 0.0724), 100px);
	--dpm-wide: 1240px;
	/* Left edge that lines up with a centred 1240px column */
	--dpm-column-inset: max(var(--dpm-gutter), calc((100% - var(--dpm-wide)) / 2));
	--dpm-pill: var(--wp--custom--radius--pill);
}

html { scroll-padding-top: 120px; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { overflow-x: clip; }
/* No sideways drift on phones: nothing may widen the page beyond the screen,
   including elements WordPress/Jetpack add outside .wp-site-blocks (admin bar,
   floating Subscribe, overlays). iOS Safari needs it on html and body. */
html { overflow-x: hidden; }
body { overflow-x: hidden; position: relative; }
@supports (overflow: clip) { body { overflow-x: clip; } }
/* The real culprit on iPhone (only when logged in): on phones the WordPress admin
   bar's row of plugin icons is wider than the screen (402 → 440px), and iOS
   widens the whole page to fit it. Clip the bar sideways only, so its
   drop-down menus still open downwards. */
#wpadminbar { max-width: 100%; overflow-x: clip; }

/* --------------------------------------------------------------------------
   Buttons — UI kit "Button / Accent inverse" (Figma 196:592), Nov 2026.
   Primary (default): Safety Orange fill, Matte Black label, pill, 44px.
   Secondary (.is-style-secondary): grey/900 fill, 1px orange border, orange label.
   Text link (.dpm-text-link): label + 16px arrow, no fill.
   #1C1D20 on #FF5F00 = 6.0:1 contrast (WCAG AA).
   -------------------------------------------------------------------------- */
.wp-element-button,
.wp-block-button__link,
.wp-block-jetpack-subscriptions button,
.wp-block-jetpack-subscriptions [type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: var(--wp--custom--button--height);
	padding: 12px 24px !important;
	border: 0 !important;
	border-radius: var(--dpm-pill) !important;
	background: var(--wp--preset--color--orange) !important;
	color: var(--wp--preset--color--matte) !important;
	box-shadow: none;
	font-family: var(--wp--preset--font-family--quicksand) !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	line-height: 20px !important;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 200ms ease-out, transform 200ms ease-out;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.wp-block-jetpack-subscriptions button:hover { background: #FF7A29 !important; }
.wp-element-button:active,
.wp-block-button__link:active,
.wp-block-jetpack-subscriptions button:active { transform: translateY(1px); }

.is-style-secondary .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--orange) !important;
	background: var(--wp--preset--color--action) !important;
	color: var(--wp--preset--color--orange) !important;
}
.is-style-secondary .wp-block-button__link:hover { background: var(--wp--preset--color--matte) !important; }

.dpm-text-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 4px;
	color: var(--wp--preset--color--grey-50);
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	text-decoration: none;
}
.dpm-text-link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
	mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
}
.dpm-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Visible focus everywhere (WCAG 2.4.7) */
:where(a, button, input, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--orange);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Floating menu — dark glass pill (Matte Black 40%, white 48% hairline), robot face home button
   -------------------------------------------------------------------------- */
.dpm-nav-wrap {
	position: fixed;
	z-index: 100;
	top: var(--wp--custom--nav--offset);
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	pointer-events: none;
	transition: transform 300ms ease-out, opacity 300ms ease-out;
}
.admin-bar .dpm-nav-wrap { top: calc(var(--wp--custom--nav--offset) + 32px); }
@media (max-width: 782px) { .admin-bar .dpm-nav-wrap { top: calc(var(--wp--custom--nav--offset) + 46px); } }
.dpm-nav-wrap.is-hidden { transform: translateY(calc(-100% - 48px)); opacity: 0; }

.dpm-nav {
	pointer-events: auto;
	gap: 8px !important;
	padding: 8px;
	border: 1px solid var(--wp--custom--nav--hairline);
	border-radius: var(--dpm-pill);
	background: var(--wp--custom--nav--glass);
	-webkit-backdrop-filter: blur(var(--wp--custom--nav--blur));
	backdrop-filter: blur(var(--wp--custom--nav--blur));
	box-shadow: var(--wp--custom--nav--highlight), 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Home button (Figma 185:450): 44px robot face on grey/900 with a 1px light ring.
   Vector (home-button.svg), so it stays sharp on 1× and Retina screens. */
.dpm-nav__home { margin: 0; flex: none; }
.dpm-nav__home a {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
}
.dpm-nav__home img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	border-radius: 50%;
}

.dpm-nav__links { gap: 0 !important; }
.dpm-nav__links .wp-block-navigation__container { gap: 0; }
.dpm-nav__links .wp-block-navigation-item__content {
	display: block;
	padding: 12px 16px;
	border-radius: var(--dpm-pill);
	color: var(--wp--preset--color--grey-50);
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 200ms ease-out;
}
.dpm-nav__links .wp-block-navigation-item__content:hover { background: rgba(255, 255, 255, 0.08); }
/* You are here: grey/700 pill, bold — not styled as clickable */
.dpm-nav__links .current-menu-item > .wp-block-navigation-item__content,
.dpm-nav__links [aria-current="page"] {
	background: var(--wp--preset--color--selected);
	font-weight: 700;
	cursor: default;
}

/* Mobile: same behaviour as desktop — the pill hugs its content (robot + links),
   never wider than the screen minus 16px each side */
@media (max-width: 599px) {
	.dpm-nav { max-width: calc(100% - 32px); }
}

/* --------------------------------------------------------------------------
   Hero rule
   hero = yes → edge-to-edge media at the top, menu floats over it
   hero = no  → page starts with title + subtitle below the menu
   -------------------------------------------------------------------------- */
.dpm-main { margin-block-start: 0; }
.dpm-hero { margin: 0 !important; }
.dpm-hero img { width: 100%; object-fit: cover; }
@media (max-width: 599px) {
	/* Taller on mobile so the menu doesn't cover the image */
	.dpm-hero, .dpm-hero img { height: 500px !important; }
}
.no-hero .dpm-main > .dpm-page-header:first-child,
.no-hero .dpm-main > .dpm-hero + .dpm-page-header { padding-top: 170px !important; }
@media (max-width: 599px) {
	.no-hero .dpm-main > .dpm-page-header:first-child,
	.no-hero .dpm-main > .dpm-hero + .dpm-page-header { padding-top: 140px !important; }
	.has-hero .dpm-page-header { padding-top: 32px !important; }
}

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.dpm-eyebrow,
.dpm-eyebrow a {
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 600;
	line-height: 18px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--grey-100);
}
.dpm-eyebrow--wide { font-weight: 700; letter-spacing: 0.16em; }
/* Orange text only on Matte Black */
.has-matte-background-color .dpm-eyebrow--orange,
.has-matte-background-color .dpm-eyebrow--orange a { color: var(--wp--preset--color--orange); }

.dpm-subtitle {
	margin-bottom: 0;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.55;
	color: var(--wp--preset--color--grey-100);
}
.dpm-meta {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 20px;
	color: var(--wp--preset--color--grey-100);
}
.dpm-section-title { margin-bottom: 0; line-height: 1.2; }

/* Text links with → : plain, no underline until hover */
.dpm-textlink { margin: 0; }
.dpm-textlink a {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 17px;
	font-weight: 600;
	line-height: 22px;
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.dpm-textlink a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   Post body: same 1240 column as title, cards and newsletter (Figma Post 53:164)
   -------------------------------------------------------------------------- */
.dpm-body {
	padding-left: var(--dpm-column-inset) !important;
	padding-right: var(--dpm-column-inset) !important;
}
.dpm-body > * { margin-left: 0 !important; }
.dpm-body h2 { margin-top: 48px; }
.dpm-body img { border-radius: 16px; }

/* --------------------------------------------------------------------------
   Post cards — Matte Black, image first, equal heights, whole card clickable
   -------------------------------------------------------------------------- */
.dpm-cards .wp-block-post-template { gap: 24px; align-items: stretch; }
.dpm-cards .wp-block-post { display: flex; }
.dpm-card {
	position: relative;
	padding: 0 !important;
	flex: 1;
	gap: 0 !important;
	align-items: stretch !important;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--selected);
	border-radius: var(--wp--custom--radius--card);
	transition: transform 250ms ease-out;
}
.dpm-card__media { margin: 0 !important; overflow: hidden; background: var(--wp--preset--color--selected); }
.dpm-card__media img { transition: transform 250ms ease-out; }
.dpm-card__body { gap: 12px !important; padding: 20px 32px 32px; }
.dpm-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--quote);
	line-height: 1.22;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dpm-card__title a { color: var(--wp--preset--color--white); text-decoration: none; }
/* Stretch the title link over the whole card */
.dpm-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dpm-card__title a:focus-visible { outline: none; }
.dpm-card__title a:focus-visible::after { outline: 2px solid var(--wp--preset--color--orange); outline-offset: -2px; }
.dpm-card__excerpt p {
	margin: 0;
	font-size: var(--wp--preset--font-size--excerpt);
	line-height: 26px;
	color: var(--wp--preset--color--grey-100);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dpm-card .dpm-eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }
.dpm-card:hover { transform: translateY(-4px); }
.dpm-card:hover .dpm-card__media img { transform: scale(1.04); }

@media (max-width: 599px) {
	.dpm-card__media, .dpm-card__media img { height: 220px !important; }
	.dpm-card__body { padding: 24px; }
	.dpm-section-head { flex-direction: column; align-items: flex-start !important; }
	/* On mobile the "All writing →" link sits under the cards */
	.dpm-cards-section { display: flex; flex-direction: column; align-items: stretch; }
	.dpm-cards-section > * { width: 100%; max-width: none !important; margin-inline: 0 !important; }
	.dpm-cards-section > .dpm-section-head { display: contents; }
	.dpm-cards-section .dpm-section-head .dpm-section-title { order: 0; }
	.dpm-cards-section > .dpm-cards { order: 1; }
	.dpm-cards-section .dpm-section-head .dpm-textlink { order: 2; margin-top: 8px; }
}

/* --------------------------------------------------------------------------
   Newsletter — no wrapper; Jetpack Subscribe form restyled
   -------------------------------------------------------------------------- */
.dpm-newsletter__lead { margin-bottom: 0; font-size: 18px; line-height: 28px; color: var(--wp--preset--color--grey-100); }
.dpm-newsletter__privacy {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 20px;
	color: var(--wp--preset--color--grey-100);
}
.dpm-newsletter__privacy a { color: inherit; text-decoration: none; }
.dpm-newsletter__privacy a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Figma: "Unsubscribe anytime. Privacy policy" + 16px arrow, text-link anatomy */
.dpm-newsletter__privacy a::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	vertical-align: -3px;
	background: currentColor;
	-webkit-mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
	mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
}
.dpm-newsletter__privacy { padding-block: 12px; }

.dpm-subscribe { margin-inline: auto; width: 100%; }
/* Every Jetpack Subscribe form (newsletter section, old forms inside posts, "Discover more" after posts): Figma field + button, max 466px */
.wp-block-jetpack-subscriptions { max-width: 466px; }
/* Figma (Home 38:144): field 330 × 54, then 12px, then the 44px button, centred on the field */
.wp-block-jetpack-subscriptions form,
.wp-block-jetpack-subscriptions .wp-block-jetpack-subscriptions__form-elements {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 12px;
	align-items: center !important;
	width: 100%;
	margin: 0;
}
.wp-block-jetpack-subscriptions form > p,
.wp-block-jetpack-subscriptions .wp-block-jetpack-subscriptions__form-elements > p { display: flex; margin: 0 !important; }
.wp-block-jetpack-subscriptions p:has(input[type="email"]) { flex: 1; min-width: 0; }
.wp-block-jetpack-subscriptions input[type="email"] { box-sizing: border-box; }
.wp-block-jetpack-subscriptions input[type="email"] {
	width: 100% !important;
	min-height: 54px;
	margin: 0 !important;
	padding: 14px 24px !important;
	border: 1px solid var(--wp--preset--color--grey-500) !important;
	border-radius: var(--dpm-pill) !important;
	background: var(--wp--preset--color--field) !important;
	color: var(--wp--preset--color--white) !important;
	font-family: var(--wp--preset--font-family--figtree) !important;
	font-size: 17px !important;
	line-height: 24px;
}
.wp-block-jetpack-subscriptions input[type="email"]::placeholder { color: var(--wp--preset--color--grey-100); opacity: 1; }
.wp-block-jetpack-subscriptions button { margin: 0 !important; white-space: nowrap; min-width: 124px !important; }
@media (max-width: 599px) {
	.wp-block-jetpack-subscriptions form,
	.wp-block-jetpack-subscriptions .wp-block-jetpack-subscriptions__form-elements { flex-direction: column; align-items: stretch; gap: 16px; width: 100%; }
	/* Figma (Home 42:126): field and button 342px at 390, i.e. 24px side margins, centred */
	.dpm-newsletter .dpm-subscribe {
		--dpm-menu-w: calc(100vw - 48px);
		width: var(--dpm-menu-w) !important;
		max-width: none !important;
		margin-left: calc((100% - var(--dpm-menu-w)) / 2) !important;
		margin-right: calc((100% - var(--dpm-menu-w)) / 2) !important;
	}
	.wp-block-jetpack-subscriptions input[type="email"] { -webkit-appearance: none; appearance: none; min-height: 52px; }
	.wp-block-jetpack-subscriptions form > p,
	.wp-block-jetpack-subscriptions .wp-block-jetpack-subscriptions__form-elements > p { width: 100%; }
	.wp-block-jetpack-subscriptions button { width: 100% !important; flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   Footer — Matte Black; mobile: links first, then ©
   -------------------------------------------------------------------------- */
.dpm-footer {
	margin-top: 0;
	padding: 40px var(--dpm-gutter);
	gap: 12px 32px;
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 15px;
	line-height: 20px;
}
.dpm-footer__copy { margin: 0; font-weight: 500; color: var(--wp--preset--color--grey-400); }
.dpm-footer__links .wp-block-navigation__container { gap: 4px 32px; }
.dpm-footer__links .wp-block-navigation-item__content {
	font-weight: 600;
	color: var(--wp--preset--color--grey-50);
	text-decoration: none;
}
.dpm-footer__links .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 599px) {
	.dpm-footer { flex-direction: column; align-items: flex-start !important; padding: 32px 24px; }
	.dpm-footer__links { order: -1; }
	.dpm-footer__links .wp-block-navigation__container { gap: 4px 0; }
	.dpm-footer__links .wp-block-navigation-item:not(:last-child)::after { content: "·"; padding: 0 8px; color: var(--wp--preset--color--grey-400); }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
	.dpm-card:hover { transform: none; }
	.dpm-card:hover .dpm-card__media img { transform: none; }
}

/* 404 ways back: one per line on mobile; short pages keep the footer at the bottom */
@media (max-width: 599px) {
	.dpm-ways-back .wp-block-group { flex-direction: column; align-items: flex-start; gap: 16px !important; }
}
.dpm-main { min-height: calc(100vh - 100px); }

/* ==========================================================================
   Home
   ========================================================================== */
.dpm-desktop-only { }
@media (max-width: 781px) { .dpm-desktop-only { display: none !important; } }

/* Hero — two souls: copy left, video loop right, cream line at the bottom */
.dpm-home-hero {
	padding-top: 112px;
	border-bottom: 2px solid var(--wp--preset--color--robot);
	overflow: hidden;
}
.dpm-home-hero__grid { margin: 0 auto !important; flex-direction: row-reverse; justify-content: space-between; align-items: stretch !important; gap: 80px; }
.dpm-home-hero__media { flex: 0 1 600px !important; align-self: flex-end !important; }
.dpm-home-hero__copy { flex: 0 1 560px !important; padding-bottom: 56px; }
.dpm-hero-video { margin: 0 !important; }
.dpm-hero-video video,
.dpm-hero-video canvas {
	display: block;
	width: 100%;
	height: 583px;
	object-fit: cover;
	object-position: center bottom;
	background: transparent; /* transparent loop: the page colour shows through */
}
.dpm-home-hero__copy > * + * { margin-top: 24px; }
.dpm-home-hero__eyebrow { font-size: 14px !important; line-height: 20px; letter-spacing: 0.2em; font-weight: 700; }
.dpm-home-hero .dpm-home-hero__title {
	margin-top: 0 !important;
	font-size: 72px;
	line-height: 1.04;
	letter-spacing: -0.02em;
}
.dpm-home-hero__lead { font-size: 20px; line-height: 32px; color: var(--wp--preset--color--grey-100); }

@media (max-width: 1100px) and (min-width: 782px) {
	.dpm-home-hero__grid { gap: 40px; }
	.dpm-home-hero .dpm-home-hero__title { font-size: clamp(48px, 5.2vw, 72px); }
	.dpm-hero-video video, .dpm-hero-video canvas { height: clamp(420px, 44vw, 583px); }
}

/* Mobile: video edge to edge under the menu, copy on Matte Black */
@media (max-width: 781px) {
	.dpm-home-hero { padding: 0 !important; border-bottom: 0; }
	.dpm-home-hero > * { max-width: none !important; }
	.dpm-home-hero__grid { flex-direction: column; gap: 0 !important; }
	.dpm-home-hero__media, .dpm-home-hero__copy { flex-basis: auto !important; width: 100%; box-sizing: border-box; }
	.dpm-hero-video video, .dpm-hero-video canvas { height: 414px; object-fit: cover; object-position: center bottom; }
	.dpm-home-hero__copy {
		padding: 28px 24px 24px;
		background: var(--wp--preset--color--matte);
	}
	.dpm-home-hero__eyebrow { display: none; }
	.dpm-home-hero .dpm-home-hero__title { font-size: 42px; line-height: 46px; color: var(--wp--preset--color--grey-50); }
	.dpm-home-hero__copy > * + * { margin-top: 16px; }
	.dpm-home-hero__lead { font-size: 18px; line-height: 28px; color: #D5D8DB; }
}

/* Latest — wide card */
.dpm-latest .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.dpm-latest-card {
	position: relative;
	gap: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--selected);
	border-radius: 32px;
}
.dpm-latest-card__media { flex: 0 0 520px; margin: 0 !important; overflow: hidden; background: var(--wp--preset--color--selected); }
.dpm-latest-card__media img { height: 100% !important; transition: transform 250ms ease-out; }
.dpm-latest-card:hover .dpm-latest-card__media img { transform: scale(1.04); }
.dpm-latest-card__body { flex: 1; gap: 16px !important; padding: 40px var(--wp--preset--spacing--64); }
.dpm-latest-card__title {
	margin: 0;
	font-size: 44px;
	line-height: 52px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dpm-latest-card__title a { color: var(--wp--preset--color--white); text-decoration: none; }
.dpm-latest-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.dpm-latest-card__title a:focus-visible { outline: none; }
.dpm-latest-card__title a:focus-visible::after { outline: 2px solid var(--wp--preset--color--orange); outline-offset: -2px; border-radius: 32px; }
.dpm-latest-card__excerpt p { margin: 0; font-size: 18px; line-height: 28px; color: var(--wp--preset--color--grey-100); }
.dpm-latest-card .dpm-eyebrow, .dpm-latest-card .wp-block-read-more { position: relative; z-index: 1; }
.dpm-latest-card .wp-block-read-more {
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.dpm-latest-card .wp-block-read-more:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 781px) {
	.dpm-latest-card { flex-direction: column; border-radius: 24px; }
	.dpm-latest-card__media { flex-basis: auto; width: 100% !important; }
	.dpm-latest-card__media, .dpm-latest-card__media img { height: 260px !important; }
	.dpm-latest-card__body { padding: 24px; gap: 10px !important; }
	.dpm-latest-card__title { font-size: 28px; line-height: 34px; }
	.dpm-latest-card__excerpt p { font-size: 16px; line-height: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* From the archive — two topic cards, same height */
.dpm-two-topics { gap: 24px; align-items: stretch; }
.dpm-two-topics > .wp-block-query,
.dpm-two-topics .wp-block-post-template,
.dpm-two-topics .wp-block-post { height: 100%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.dpm-two-topics .dpm-card { flex: 1; }
@media (max-width: 781px) {
	.dpm-two-topics { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   Archive "All writing" + Category
   ========================================================================== */
.no-hero .dpm-main > .dpm-archive-header:first-child { padding-top: 206px !important; padding-bottom: 48px; }
.dpm-archive-title { font-size: clamp(42px, 5vw, 72px) !important; line-height: 1.08 !important; letter-spacing: -0.02em; }
.dpm-archive-lead, .dpm-archive-lead p { margin-bottom: 0; font-size: 20px; line-height: 32px; color: var(--wp--preset--color--grey-100); }
.dpm-archive-lead p { margin: 0; }

/* Filter — the menu's dark-glass pill */
.dpm-filter { margin-top: 32px !important; max-width: 100%; }
.dpm-filter ul {
	display: inline-flex;
	gap: 4px;
	max-width: 100%;
	margin: 0;
	padding: 8px;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	border: 1px solid var(--wp--custom--nav--hairline);
	border-radius: var(--dpm-pill);
	background: var(--wp--preset--color--matte);
	box-sizing: border-box;
}
.dpm-filter ul::-webkit-scrollbar { display: none; }
.dpm-filter li { flex: none; }
.dpm-filter a {
	display: flex;
	gap: 8px;
	padding: 12px 20px;
	border-radius: var(--dpm-pill);
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--wp--preset--color--grey-50);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 200ms ease-out;
}
.dpm-filter a:hover { background: rgba(255, 255, 255, 0.08); }
.dpm-filter__count { color: var(--wp--preset--color--grey-100); }
.dpm-filter .is-current a { background: var(--wp--preset--color--selected); cursor: default; }
.dpm-filter .is-current .dpm-filter__label { font-weight: 700; }

/* Year cards */
.dpm-years { display: flex; flex-direction: column; gap: 24px; }
.dpm-year {
	padding: 40px 48px 24px;
	border-radius: 32px;
	background: var(--wp--preset--color--matte);
}
.dpm-year__title { margin: 0 0 16px; font-size: 28px; line-height: 28px; }
.dpm-year__list { margin: 0; padding: 0; list-style: none; }
.dpm-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 20px 0;
	border-top: 1px solid var(--wp--preset--color--selected);
}
.dpm-row__date { flex: 0 0 120px; align-self: flex-start; padding-top: 2px; font-size: 16px; line-height: 24px; color: var(--wp--preset--color--grey-100); }
.dpm-row__title {
	flex: 1;
	max-width: 560px;
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 22px;
	font-weight: 700;
	line-height: 28px;
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.dpm-row__title::after { content: ""; position: absolute; inset: 0; }
.dpm-row__title:focus-visible { outline: none; }
.dpm-row__title:focus-visible::after { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 2px; border-radius: 8px; }
.dpm-row:hover .dpm-row__title { text-decoration: underline; text-underline-offset: 4px; }
.dpm-row__topic {
	flex: 0 0 400px;
	margin-left: auto;
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 13px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-align: right;
	color: var(--wp--preset--color--orange);
}
.dpm-years.is-category .dpm-row__title { max-width: none; }
.dpm-paging { display: flex; gap: 32px; margin-top: 24px; }
.dpm-paging a { font-family: var(--wp--preset--font-family--quicksand); font-size: 17px; font-weight: 600; color: var(--wp--preset--color--white); text-decoration: none; }
.dpm-paging a:hover { text-decoration: underline; text-underline-offset: 4px; }
.dpm-archive-empty { color: var(--wp--preset--color--grey-100); }

@media (max-width: 1100px) {
	.dpm-row__topic { flex-basis: 220px; }
}
@media (max-width: 781px) {
	.no-hero .dpm-main > .dpm-archive-header:first-child { padding-top: 182px !important; padding-bottom: 32px; }
	.dpm-archive-lead, .dpm-archive-lead p { font-size: 18px; line-height: 32px; }
	/* Figma (Archive mobile 122:334): the dark container stays inside the body margins
	   (342px at 390), fully rounded; the pills scroll sideways inside it */
	.dpm-filter { margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important; }
	.dpm-filter ul { display: flex; width: 100%; }
	/* On a category page the current topic comes first */
	.dpm-filter .is-current { order: -1; }
	.dpm-year { padding: 28px 24px 12px; border-radius: 24px; }
	.dpm-row { flex-direction: column; align-items: flex-start; gap: 6px; }
	.dpm-row__topic { order: -1; flex-basis: auto; margin-left: 0; text-align: left; }
	.dpm-row__title { font-size: 19px; line-height: 28px; }
	.dpm-row__date { order: 1; flex-basis: auto; padding-top: 0; }
}

/* ==========================================================================
   About · Work · Lab
   ========================================================================== */
.dpm-page-sections { padding-top: var(--wp--preset--spacing--64); }
.dpm-page-sections > * + * { margin-top: 24px; }
.dpm-page-sections > .dpm-what-i-do { margin-top: var(--wp--preset--spacing--96); }
.dpm-last-updated { font-family: var(--wp--preset--font-family--figtree); font-size: 16px; line-height: 24px; color: var(--wp--preset--color--grey-100); }
.dpm-work .dpm-archive-header, .dpm-lab .dpm-archive-header { padding-bottom: 48px; }
.dpm-work .dpm-page-sections, .dpm-lab .dpm-page-sections { padding-top: 0; }

/* About hero — robot on grey/700, cream line at the bottom */
.dpm-robot-hero {
	height: 592px;
	margin: 0 !important;
	padding: 112px 0 0 !important;
	overflow: hidden;
	background: var(--wp--preset--color--selected);
	border-bottom: 2px solid var(--wp--preset--color--robot);
	box-sizing: border-box;
}
.dpm-robot-hero__figure { margin: 0 !important; height: 100%; }
.dpm-robot-hero__figure img { display: block; height: 100% !important; width: auto !important; }
@media (max-width: 599px) {
	.dpm-robot-hero { height: 500px; padding-top: 180px !important; }
}

/* Two equal-height panels */
.dpm-two-cards { gap: 24px !important; align-items: stretch; }
.dpm-panel {
	gap: 20px !important;
	align-items: flex-start !important;
	margin: 0 !important;
	padding: 48px !important;
	border-radius: 32px;
}
.dpm-two-cards:not(.dpm-two-cards--auto) .dpm-panel { min-height: 520px; box-sizing: border-box; }
.dpm-panel--outlined { border: 1px solid var(--wp--preset--color--selected); }
.dpm-panel--compact { padding: 40px !important; gap: 16px !important; }
.dpm-panel > * { margin: 0 !important; }
.dpm-panel__title { line-height: 1.2; color: var(--wp--preset--color--grey-50); }
.dpm-panel__item { gap: 4px !important; }
.dpm-panel__item p { margin: 0; font-size: 16px; line-height: 24px; color: var(--wp--preset--color--grey-100); }
.dpm-panel__item-title { margin: 0; font-size: 22px; line-height: 28px; }
.dpm-panel__thread-title { font-size: 28px; line-height: 1.15; }
.dpm-panel__lead { font-size: 18px; line-height: 28px; color: var(--wp--preset--color--grey-100); }
.dpm-panel__foot { margin-top: auto !important; font-family: var(--wp--preset--font-family--quicksand); font-size: 15px; font-weight: 600; line-height: 20px; color: var(--wp--preset--color--grey-100); }
.dpm-panel__foot a, .dpm-project__link a { color: var(--wp--preset--color--white); text-decoration: none; }
.dpm-panel__foot a:hover, .dpm-project__link a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Dash lists: "— item" */
.dpm-dash-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dpm-dash-list li { position: relative; padding-left: 1.6em; font-size: 18px; line-height: 28px; color: var(--wp--preset--color--white); }
.dpm-dash-list li::before { content: "—"; position: absolute; left: 0; }

/* What I do */
.dpm-what-i-do .wp-block-columns { margin: 0; }
.dpm-statement { margin: 0; font-family: var(--wp--preset--font-family--quicksand); font-size: clamp(26px, 2.5vw, 36px); font-weight: 700; line-height: 1.22; }
.dpm-statement-body { margin: 0; font-size: 18px; line-height: 30px; color: var(--wp--preset--color--grey-100); }
.dpm-statement-body a { color: inherit; }

/* Work — project cards */
.dpm-project {
	gap: 48px !important;
	margin-inline: auto;
	padding: 48px !important;
	border-radius: 32px;
}
.dpm-project__text { flex: 1; gap: 16px !important; align-items: flex-start !important; }
.dpm-project__text > * { margin: 0 !important; }
.dpm-project__title { line-height: 1.2; }
.dpm-project__intro { font-size: 18px; line-height: 28px; color: var(--wp--preset--color--grey-100); }
.dpm-project__text .dpm-dash-list { padding: 8px 0; }
.dpm-project__link { font-family: var(--wp--preset--font-family--quicksand); font-size: 15px; font-weight: 600; line-height: 20px; color: var(--wp--preset--color--grey-100); }
.dpm-project__media {
	flex: 0 0 560px;
	height: 400px;
	margin: 0 !important;
	overflow: hidden;
	border-radius: 24px;
	background: var(--wp--preset--color--selected);
}
.dpm-project__media img, .dpm-project__media .wp-block-image { width: 100%; height: 100%; margin: 0; object-fit: cover; }
.dpm-project__placeholder { margin: 0; font-family: var(--wp--preset--font-family--quicksand); font-size: 15px; font-weight: 600; color: var(--wp--preset--color--grey-100); }

/* Lab previous notes reuse the year card */
.dpm-lab-previous { margin-inline: auto; }

/* Contact */
.dpm-contact .wp-block-buttons { margin-top: 8px; }

@media (max-width: 1100px) {
	.dpm-project__media { flex-basis: 45%; }
}
@media (max-width: 781px) {
	.dpm-panel { padding: 32px 24px !important; }
	.dpm-two-cards:not(.dpm-two-cards--auto) .dpm-panel { min-height: 0; }
	.dpm-panel__item p { font-size: 16px; }
	.dpm-panel__foot { margin-top: 16px !important; }
	.dpm-two-cards { grid-template-columns: 1fr !important; gap: 16px !important; }
	.dpm-project { flex-direction: column; align-items: stretch !important; gap: 24px !important; padding: 24px !important; border-radius: 24px; }
	.dpm-project__media { order: -1; flex-basis: auto; height: 220px; }
	.dpm-project__title { font-size: 28px !important; }
	.dpm-page-sections > * + * { margin-top: 16px; }
	.dpm-contact .wp-block-buttons, .dpm-contact .wp-block-button { width: 100%; }
	.dpm-contact .wp-block-button__link { width: 100%; box-sizing: border-box; }
	.dpm-what-i-do .wp-block-columns { gap: 16px; }
}
.dpm-what-i-do .wp-block-columns { margin-top: 24px !important; }
.dpm-contact .wp-block-buttons { margin-top: 24px !important; }

/* ==========================================================================
   Accessibility pass (WCAG 2.1 AA)
   ========================================================================== */
/* Focus ring: white reads at 6.5:1 on Storm Grey and 16:1 on Matte Black
   (orange on Storm Grey is only ~2:1). */
:where(a, button, input, [tabindex]):focus-visible { outline-color: #FFFFFF; }
.dpm-card__title a:focus-visible::after,
.dpm-latest-card__title a:focus-visible::after,
.dpm-row__title:focus-visible::after { outline-color: #FFFFFF; }

/* Links inside a sentence are underlined, so colour is not the only cue (1.4.1) */
.dpm-panel__foot a, .dpm-statement-body a, .dpm-newsletter__privacy a, .dpm-body p a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
.dpm-panel__foot a:hover, .dpm-newsletter__privacy a:hover { text-decoration-thickness: 2px; }

/* Footer links: at least 24px tall touch targets */
.dpm-footer__links .wp-block-navigation-item__content { display: inline-block; padding: 4px 0; }

/* Hero video pause / play button (2.2.2) */
.dpm-hero-video { position: relative; }
.dpm-video-toggle {
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--wp--custom--nav--hairline);
	border-radius: 50%;
	background: var(--wp--custom--nav--glass);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	cursor: pointer;
}
.dpm-video-toggle::before,
.dpm-video-toggle::after { content: ""; position: absolute; top: 50%; transform: translateY(-50%); background: var(--wp--preset--color--grey-50); }
/* playing → pause icon (two bars) */
.dpm-video-toggle[data-state="playing"]::before { left: 15px; width: 4px; height: 14px; border-radius: 1px; }
.dpm-video-toggle[data-state="playing"]::after { left: 23px; width: 4px; height: 14px; border-radius: 1px; }
/* paused → play icon (triangle) */
.dpm-video-toggle[data-state="paused"]::before { left: 17px; width: 0; height: 0; background: none; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--wp--preset--color--grey-50); }
.dpm-video-toggle[data-state="paused"]::after { display: none; }
.dpm-video-toggle:hover { background: var(--wp--preset--color--matte); }

/* Hero loop on canvas (hero-alpha.js): the stacked video plays hidden behind the
   canvas, which shows the picture with a transparent background. Until the first
   frame is drawn, the transparent still shows in its place. */
.dpm-hero-video.is-canvas video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.dpm-hero-video.is-canvas canvas { background: url(../images/hero-still-v07.webp) center bottom / cover no-repeat; }
.dpm-hero-video.is-canvas.is-drawn canvas { background: none; }

/* --------------------------------------------------------------------------
   Text link — UI kit "Button / Accent inverse · Text link" (Figma 196:597),
   used everywhere a link stands on its own with an arrow:
   Quicksand Bold 16/20, grey/50, 16px arrow icon after the label, 8px gap.
   The arrow is an icon, not a "→" character (any "→" left in page content is
   removed by the render_block filter in functions.php). Standalone links are
   identified by the arrow, so no underline until hover.
   -------------------------------------------------------------------------- */
.dpm-textlink a,
.dpm-paging a,
.dpm-panel__foot a,
.dpm-project__link a,
.dpm-latest-card .wp-block-read-more,
a.dpm-text-link,
.wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 4px;
	margin: -12px -4px;
	color: var(--wp--preset--color--grey-50);
	font-family: var(--wp--preset--font-family--quicksand);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	text-decoration: none;
}
.dpm-textlink a::after,
.dpm-paging a::after,
.dpm-panel__foot a::after,
.dpm-project__link a::after,
.dpm-latest-card .wp-block-read-more::after,
.wp-block-query-pagination-next::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
	mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
}
/* "Newer posts" points back: arrow before the label, mirrored */
.dpm-paging a.is-prev::after { display: none; }
.dpm-paging a.is-prev::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
	mask: url(../images/icon-arrow-right.svg) center / contain no-repeat;
	transform: scaleX(-1);
}
.dpm-textlink a:hover,
.dpm-paging a:hover,
.dpm-panel__foot a:hover,
.dpm-project__link a:hover,
.dpm-latest-card .wp-block-read-more:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
/* Privacy line keeps its Figma size (Quicksand Medium 14, grey/100) but follows the same rule: arrow, no underline */
.dpm-newsletter__privacy a { text-decoration: none; }
.dpm-newsletter__privacy a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
