/* ==========================================================================
   Metric-matched fallback fonts (stop the layout shift when Poppins / JetBrains
   Mono swap in). Local system fonts rescaled to the webfont's metrics; they sit
   right after the webfont in the --td-body / --td-mono stacks (theme.json too).
   Formula (capsize / fontaine): size-adjust = webfont avg char width / fallback
   avg char width; ascent|descent|line-gap-override = webfont hhea value / unitsPerEm
   / size-adjust. Avg width = a-z + space weighted by English letter frequency,
   read from advance widths of the theme's woff2 and of Liberation Sans / Mono
   (metric-identical to Arial / Courier New) with fontTools (unitsPerEm in brackets).
     Poppins [1000]      hhea asc 1050, desc -350, lineGap 100; avg 0.5091 (400), 0.5136 (500),
                         0.5177 (600), 0.5224 (700)
     Arial [2048]        avg 0.4460 (regular), 0.4834 (bold)
     JetBrains Mono [1000] hhea asc 1020, desc -300, lineGap 0; avg 0.6000 (400 and 700)
     Courier New [2048]  avg 0.6001 (regular and bold)
   Poppins 400-500: avg(0.5091, 0.5136) / 0.4460 = 114.65%; 600-700: avg(0.5177, 0.5224) / 0.4834 = 107.59%.
   Mono: 0.6000 / 0.6001 = 99.98% (about 100%).
   This is in CSS, not theme.json fontFace: WP_Font_Face wraps every src in url(), so a
   local()-only src cannot be expressed there. This file is also the editor stylesheet. */
@font-face {
	font-family: 'Poppins Fallback';
	font-style: normal;
	font-weight: 400 500;
	src: local('Arial'), local('ArialMT'), local('Helvetica'), local('Liberation Sans');
	size-adjust: 114.65%;
	ascent-override: 91.58%;
	descent-override: 30.53%;
	line-gap-override: 8.72%;
}

@font-face {
	font-family: 'Poppins Fallback';
	font-style: normal;
	font-weight: 600 700;
	src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'), local('Liberation Sans Bold');
	size-adjust: 107.59%;
	ascent-override: 97.59%;
	descent-override: 32.53%;
	line-gap-override: 9.29%;
}

@font-face {
	font-family: 'JetBrains Mono Fallback';
	font-style: normal;
	font-weight: 400;
	src: local('Courier New'), local('CourierNewPSMT'), local('Liberation Mono'), local('Roboto Mono'), local('Menlo');
	size-adjust: 99.98%;
	ascent-override: 102.02%;
	descent-override: 30%;
	line-gap-override: 0%;
}

@font-face {
	font-family: 'JetBrains Mono Fallback';
	font-style: normal;
	font-weight: 700;
	src: local('Courier New Bold'), local('CourierNewPS-BoldMT'), local('Liberation Mono Bold'), local('Roboto Mono Bold'), local('Menlo Bold');
	size-adjust: 99.98%;
	ascent-override: 102.02%;
	descent-override: 30%;
	line-gap-override: 0%;
}

/* ==========================================================================
   MageMinion (Tech Digest theme) — zine design system for Blocksy
   Loaded on the front end and inside the block editor.
   Phone-only app UI lives in techdigest-mobile.css. Fonts are self-hosted
   (assets/fonts, declared in theme.json). Tokens: also see theme.json.
   ========================================================================== */

:root,
body.td-theme,
.editor-styles-wrapper {
	--td-lime: #B5F23D;
	--td-violet: #7B3DF0;
	--td-violet-ink: #5A22C9;
	--td-ground: #EBEBE8;
	--td-ink: #111111;
	--td-paper: #FFFFFF;
	--td-muted: #3A3A3A;
	--td-display: 'Rubik', 'Arial Black', sans-serif;
	--td-body: 'Poppins', 'Poppins Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--td-mono: 'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, SFMono-Regular, Menlo, monospace;
	--td-border: 2px solid var(--td-ink);

	/* Radius scale */
	--td-radius-xs: 6px;
	--td-radius-sm: 20px;
	--td-radius-md: 24px;
	--td-radius-lg: 30px;
	--td-radius-xl: 36px;
	--td-radius-pill: 999px;
	--td-radius-arch: 220px 220px var(--td-radius-lg) var(--td-radius-lg);
	--td-radius: var(--td-radius-md);

	/* Hard "sticker" shadow offsets, and the shadows built from them
	   (valid for box-shadow and text-shadow alike). */
	--td-off-sm: 4px;
	--td-off-md: 6px;
	--td-off-lg: 8px;
	--td-off-xl: 10px;
	--td-shadow-sm: var(--td-off-sm) var(--td-off-sm) 0 var(--td-ink);
	--td-shadow-md: var(--td-off-md) var(--td-off-md) 0 var(--td-ink);
	--td-shadow-lg: var(--td-off-lg) var(--td-off-lg) 0 var(--td-ink);
	--td-shadow-xl: var(--td-off-xl) var(--td-off-xl) 0 var(--td-ink);
	--td-shadow: var(--td-shadow-md);

	/* Text scale (display / zine sizes stay fluid clamp()s below) */
	--td-text-xs: 12px;
	--td-text-sm: 14px;
	--td-text-md: 16px;
	--td-text-lg: 18px;
	--td-text-xl: 21px;

	--td-stack: var(--wp--preset--spacing--td-2, 14px);
}

/* Feed the design into Blocksy's own variables so its header, footer,
   buttons and archive cards follow the same palette and fonts. */
body.td-theme {
	--theme-palette-color-1: var(--td-violet);
	--theme-palette-color-2: var(--td-violet-ink);
	--theme-palette-color-3: #2A2A2A;
	--theme-palette-color-4: var(--td-ink);
	--theme-palette-color-5: #D5D5D0;
	--theme-palette-color-6: #F4F4F1;
	--theme-palette-color-7: var(--td-ground);
	--theme-palette-color-8: var(--td-paper);
	--theme-font-family: var(--td-body);
	--theme-text-color: #2A2A2A;
	--theme-headings-color: var(--td-ink);
	--theme-link-initial-color: var(--td-violet-ink);
	--theme-link-hover-color: var(--td-ink);
	background-color: var(--td-ground);
	color: #2A2A2A;
	font-family: var(--td-body);
}

body.td-theme h1,
body.td-theme h2,
body.td-theme h3,
body.td-theme h4,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3 {
	font-family: var(--td-body);
	font-weight: 700;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

body.td-theme .entry-content p,
.editor-styles-wrapper p {
	text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Shared "sticker" surface: paper card with ink border, radius and hard
   shadow. Radius and shadow are overridable per element via
   --td-card-radius / --td-card-shadow; images are frames only (no fill).
   -------------------------------------------------------------------------- */

.is-style-td-sticker,
.is-style-td-step,
.td-card,
.td-theme .entries .entry-card,
.td-featured .wp-block-post-featured-image,
.td-cv-photo img,
.td-arch img,
.td-cover-hero .wp-block-post-featured-image {
	border: var(--td-border);
	border-radius: var(--td-card-radius, var(--td-radius));
	box-shadow: var(--td-card-shadow, var(--td-shadow));
}

.is-style-td-sticker,
.is-style-td-step,
.td-card,
.td-theme .entries .entry-card {
	background: var(--td-paper);
}

.td-cv-photo img,
.td-arch img,
.td-cover-hero .wp-block-post-featured-image {
	--td-card-radius: var(--td-radius-arch);
	--td-card-shadow: var(--td-shadow-lg);
}

/* --------------------------------------------------------------------------
   Zine headings  (Heading / Post Title → Styles → Zine)
   The body.td-theme / .editor-styles-wrapper prefix outranks the generic
   heading rule above and Blocksy's heading styles without !important.
   -------------------------------------------------------------------------- */

body.td-theme :is(.is-style-td-zine, .is-style-td-zine-violet),
.editor-styles-wrapper :is(.is-style-td-zine, .is-style-td-zine-violet) {
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	text-transform: uppercase;
	line-height: 0.86;
	/* letter-spacing comes from the generic heading rule (-0.01em): the former -0.03em here never applied. */
	color: var(--td-zine-color, var(--td-lime));
	-webkit-text-stroke: 3px var(--td-ink);
	paint-order: stroke fill;
	text-shadow: var(--td-shadow-md);
	transform: rotate(-2deg);
	transform-origin: left bottom;
	padding: 0.08em 0;
	font-size: clamp(44px, 8vw, 120px);
}

.is-style-td-zine-violet {
	--td-zine-color: var(--td-violet);
}

body.td-theme h2:is(.is-style-td-zine, .is-style-td-zine-violet),
.editor-styles-wrapper h2:is(.is-style-td-zine, .is-style-td-zine-violet) {
	font-size: clamp(36px, 5vw, 64px);
	-webkit-text-stroke-width: 2.5px;
	text-shadow: var(--td-shadow-sm);
}

body.td-theme :is(h3, h4):is(.is-style-td-zine, .is-style-td-zine-violet),
.editor-styles-wrapper :is(h3, h4):is(.is-style-td-zine, .is-style-td-zine-violet) {
	font-size: clamp(28px, 3.4vw, 44px);
	-webkit-text-stroke-width: 2px;
	text-shadow: var(--td-shadow-sm);
}

.is-style-td-zine a,
.is-style-td-zine-violet a {
	color: inherit;
	text-decoration: none;
}

.td-kicker {
	font-weight: 700;
	font-size: var(--td-text-sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Cards and panels  (Group → Styles)
   -------------------------------------------------------------------------- */

body.td-theme :is(.is-style-td-sticker, .is-style-td-dashed, .is-style-td-lime:not(.wp-block-button), .is-style-td-violet:not(.wp-block-button), .is-style-td-step),
.editor-styles-wrapper :is(.is-style-td-sticker, .is-style-td-dashed, .is-style-td-lime:not(.wp-block-button), .is-style-td-violet:not(.wp-block-button), .is-style-td-step) {
	padding: clamp(20px, 3.5vw, 36px);
	box-sizing: border-box;
}

.is-style-td-dashed {
	border: 2px dashed var(--td-ink);
	border-radius: var(--td-radius-lg);
}

.is-style-td-lime:not(.wp-block-button) {
	background: var(--td-lime);
	color: var(--td-ink);
	border: var(--td-border);
	box-shadow: var(--td-shadow);
	border-radius: var(--td-radius-lg);
}

.is-style-td-violet:not(.wp-block-button) {
	background: var(--td-violet);
	color: var(--td-paper);
	border: var(--td-border);
	box-shadow: var(--td-shadow-lg);
	border-radius: var(--td-radius-lg);
}

.is-style-td-violet a:not(.wp-block-button__link) {
	color: var(--td-paper);
}

.is-style-td-sticker > * + *,
.is-style-td-dashed > * + *,
.is-style-td-lime:not(.wp-block-button) > * + *,
.is-style-td-violet:not(.wp-block-button) > * + *,
.is-style-td-step > * + * {
	margin-block-start: var(--td-stack);
}

.is-style-td-sticker > :first-child,
.is-style-td-dashed > :first-child,
.is-style-td-lime:not(.wp-block-button) > :first-child,
.is-style-td-violet:not(.wp-block-button) > :first-child,
.is-style-td-step > :first-child {
	margin-block-start: 0;
}

/* Tutorial step: automatic big zine numbers 01, 02, 03… */
.entry-content,
.editor-styles-wrapper {
	counter-reset: tdstep;
}

body.td-theme .is-style-td-step,
.editor-styles-wrapper .is-style-td-step {
	counter-increment: tdstep;
	position: relative;
	margin-block: 32px;
	scroll-margin-top: 120px;
}

.is-style-td-step::before {
	content: counter(tdstep, decimal-leading-zero);
	display: block;
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	font-size: 72px;
	line-height: 0.8;
	color: var(--td-lime);
	-webkit-text-stroke: 2.5px var(--td-ink);
	paint-order: stroke fill;
	text-shadow: var(--td-shadow-sm);
	margin-bottom: 12px;
}

.is-style-td-step:nth-of-type(even)::before {
	color: var(--td-violet);
}

/* --------------------------------------------------------------------------
   Quote, list, buttons, chips, code
   -------------------------------------------------------------------------- */

body.td-theme .wp-block-quote.is-style-td-pull,
.editor-styles-wrapper .wp-block-quote.is-style-td-pull {
	background: var(--td-lime);
	color: var(--td-ink);
	border: var(--td-border);
	border-radius: var(--td-radius-lg);
	box-shadow: var(--td-shadow-lg);
	padding: clamp(24px, 5vw, 44px);
	margin-block: 40px;
	transform: rotate(-1deg);
}

.wp-block-quote.is-style-td-pull p {
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	font-size: clamp(24px, 3.4vw, 40px);
	line-height: 1.15;
	margin: 0;
	text-wrap: balance;
}

.wp-block-quote.is-style-td-pull cite {
	display: block;
	margin-top: 14px;
	font-style: normal;
	font-weight: 600;
	font-size: var(--td-text-sm);
}

body.td-theme ul.is-style-td-checklist,
.editor-styles-wrapper ul.is-style-td-checklist {
	list-style: none;
	padding-left: 0;
}

ul.is-style-td-checklist li {
	position: relative;
	padding-left: 32px;
	margin-block: 10px;
}

ul.is-style-td-checklist li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 18px;
	height: 18px;
	border-radius: var(--td-radius-xs);
	border: var(--td-border);
	background: var(--td-lime);
}

.wp-block-button[class*='is-style-td-'] .wp-block-button__link {
	border-radius: var(--td-radius-pill);
	border: var(--td-border);
	font-weight: 700;
	padding: 13px 22px;
	min-height: 48px;
	box-sizing: border-box;
	text-decoration: none;
}

.wp-block-button.is-style-td-lime .wp-block-button__link {
	background: var(--td-lime);
	color: var(--td-ink);
	box-shadow: var(--td-shadow-sm);
}

.wp-block-button.is-style-td-dark .wp-block-button__link {
	background: var(--td-ink);
	color: var(--td-paper);
}

.wp-block-button.is-style-td-outline .wp-block-button__link {
	background: var(--td-paper);
	color: var(--td-ink);
}

/* Read from the wrapper, which doesn't move: a hover transform on the link itself moves its hit area, and a pointer
   at its edge made it pulse (1.5.15, see brand-motion.css). */
@media (hover: hover) {
	.wp-block-button[class*='is-style-td-']:hover .wp-block-button__link {
		transform: translate(-1px, -1px);
		box-shadow: var(--td-shadow-md);
	}
}

.wp-block-button[class*='is-style-td-'] .wp-block-button__link:focus-visible {
	transform: translate(-1px, -1px);
	box-shadow: var(--td-shadow-md);
}

/* --------------------------------------------------------------------------
   Chips: ONE base, three variants set through custom properties.
     lime  (default)  category links, .td-pill
     paper            .td-topics links, skill chips
     ink              .td-readmore
   -------------------------------------------------------------------------- */

.td-chip a,
.td-theme .entry-meta .meta-categories a,
.td-pill,
.td-topics a,
ul.td-skill-chips li,
.td-readmore {
	display: inline-block;
	background: var(--td-chip-bg, var(--td-lime));
	color: var(--td-chip-fg, var(--td-ink));
	border: var(--td-chip-border, var(--td-border));
	border-radius: var(--td-radius-pill);
	padding: var(--td-chip-pad, 2px 12px);
	font-size: var(--td-chip-size, var(--td-text-sm));
	font-weight: var(--td-chip-weight, 600);
	text-decoration: none;
}

/* lime: compact, tall line box */
.td-chip a,
.td-theme .entry-meta .meta-categories a,
.td-pill {
	line-height: 1.6;
}

/* paper */
.td-topics a,
ul.td-skill-chips li {
	--td-chip-bg: var(--td-paper);
	--td-chip-pad: 4px 12px;
}

.td-topics a {
	--td-chip-pad: 8px 16px;
}

ul.td-skill-chips li {
	--td-chip-weight: 500;
}

.td-topics a:hover {
	--td-chip-bg: var(--td-lime);
}

/* ink */
.td-readmore {
	--td-chip-bg: var(--td-ink);
	--td-chip-fg: var(--td-paper);
	--td-chip-border: 0;
	--td-chip-pad: 12px 20px;
	--td-chip-size: 1em;
	margin-top: 8px;
}

/* Link chips must keep their colour over Blocksy's link colours (same
   specificity trick as the headings: body.td-theme prefix). */
body.td-theme .td-chip a,
body.td-theme .entry-meta .meta-categories a,
body.td-theme a.wp-block-read-more.td-readmore {
	color: var(--td-chip-fg, var(--td-ink));
	text-decoration: none;
}

/* .td-chip itself is only the Post Terms container. */
.td-chip {
	display: inline-block;
	color: var(--td-ink);
	font-size: var(--td-text-sm);
	font-weight: 600;
	line-height: 1.6;
}

.td-chip .wp-block-post-terms__separator {
	display: none;
}

.td-chip a + a {
	margin-left: 6px;
}

/* Blocksy separates category links with a ", " text node; inc/layouts.php strips it server side
   (blocksy:post-meta:items), so the chips are spaced with a gap only. */
.td-theme .entry-meta .meta-categories {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Topic chips (Categories block with class td-topics) */
.td-topics,
.wp-block-categories.td-topics {
	list-style: none;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.td-theme .td-topics,
.editor-styles-wrapper .td-topics {
	padding: 0;
}

.td-topics li {
	margin: 0;
}

body.td-theme .wp-block-code,
.editor-styles-wrapper .wp-block-code {
	background: var(--td-ink);
	color: #EDEDEA;
	border: var(--td-border);
	border-radius: var(--td-radius-sm);
	box-shadow: var(--td-off-md) var(--td-off-md) 0 var(--td-violet);
	padding: 18px 22px;
	font-family: var(--td-mono);
	font-size: var(--td-text-sm);
	line-height: 1.7;
	overflow-x: auto;
}

body.td-theme .wp-block-code code {
	font-family: inherit;
	background: none;
	color: inherit;
	padding: 0;
}

body.td-theme :not(pre) > code {
	font-family: var(--td-mono);
	font-size: 0.88em;
	background: var(--td-paper);
	border: 1px solid #C9C9C4;
	border-radius: var(--td-radius-xs);
	padding: 1px 6px;
}

/* Drop cap → zine initial. The next block clears the float, so after a short paragraph a heading can't wrap beside the letter
   (clear, not flow-root: multi-line paragraphs and their spacing stay exactly as they were). */
.td-theme .has-drop-cap + *,
.editor-styles-wrapper .has-drop-cap + * {
	clear: both;
}

.td-theme .has-drop-cap:not(:focus)::first-letter,
.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter {
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	font-size: 5.4em;
	line-height: 0.8;
	margin: 0.06em 0.12em 0 0;
	color: var(--td-violet);
	-webkit-text-stroke: 2.5px var(--td-ink);
	paint-order: stroke fill;
	text-shadow: var(--td-shadow-sm);
}

/* --------------------------------------------------------------------------
   Post cards (Query Loop with class td-cards)
   -------------------------------------------------------------------------- */

.td-cards .wp-block-post-template {
	gap: 28px;
}

body.td-theme .td-card,
.editor-styles-wrapper .td-card {
	overflow: hidden;
	height: 100%;
	padding: 0 0 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

body.td-theme .td-card > *,
.editor-styles-wrapper .td-card > * {
	margin: 0;
	padding-inline: 22px;
}

body.td-theme .td-card .wp-block-post-featured-image,
.editor-styles-wrapper .td-card .wp-block-post-featured-image {
	padding: 0;
	border-bottom: var(--td-border);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	margin-bottom: 8px;
}

.td-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No featured image: the first item (category chip) must not touch the top border. */
body.td-theme .td-card:not(:has(.wp-block-post-featured-image)),
.editor-styles-wrapper .td-card:not(:has(.wp-block-post-featured-image)) {
	padding-top: 22px;
}

.td-card .wp-block-post-title {
	font-size: var(--td-text-xl);
	line-height: 1.25;
}

.td-card .wp-block-post-title a {
	color: var(--td-ink);
	text-decoration: none;
}

.td-card .wp-block-post-excerpt,
.td-card .wp-block-post-date {
	font-size: var(--td-text-sm);
	color: var(--td-muted);
}

.td-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* Featured (sticky) post row: frame comes from the shared sticker rule */
.td-featured .wp-block-post-featured-image {
	overflow: hidden;
}

.td-featured .wp-block-post-title {
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.15;
}

.td-featured .wp-block-post-title a {
	color: var(--td-ink);
	text-decoration: none;
}

/* Newsletter panel. Since 1.5.16 the form is Contact Form 7's "Newsletter" form (tools/plugins.php):
   sign-ups are stored in Flamingo, nothing is mailed. The plain-form rules below still style the legacy
   static form (td_newsletter_v1()) wherever an owner kept it; the CF7 overrides are scoped under
   .td-newsletter .wpcf7 and prefixed with body.td-theme so they beat the global Contact rules further down. */
.td-newsletter form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-end;
}

.td-newsletter label {
	display: block;
	width: 100%;
	font-weight: 600;
	font-size: var(--td-text-sm);
}

.td-newsletter input[type='email'] {
	flex: 1 1 220px;
	min-width: 0;
	height: 52px;
	padding: 0 18px;
	border-radius: var(--td-radius-pill);
	border: var(--td-border);
	background: var(--td-paper);
	color: var(--td-ink);
	font: inherit;
	font-size: var(--td-text-md);
}

.td-newsletter button,
.td-newsletter .wpcf7-submit {
	height: 52px;
	padding: 0 24px;
	border-radius: var(--td-radius-pill);
	border: var(--td-border);
	background: var(--td-lime);
	color: var(--td-ink);
	font: inherit;
	font-weight: 700;
	box-shadow: var(--td-shadow-sm);
	cursor: pointer;
}

/* CF7 markup: <p> wrappers (autop), a <br> after the label text, a hidden fieldset, the spinner and the
   response box. One column, so nothing is laid out as a flex item. */
body.td-theme .td-newsletter .wpcf7 form {
	display: block;
}

body.td-theme .td-newsletter .wpcf7 form > p {
	margin: 0 0 14px;
}

body.td-theme .td-newsletter .wpcf7 label > br {
	display: none;
}

body.td-theme .td-newsletter .wpcf7 label {
	display: block;
	width: auto;
	color: var(--td-paper);
	font-weight: 600;
	font-size: var(--td-text-sm);
}

body.td-theme .td-newsletter .wpcf7 label > .wpcf7-form-control-wrap {
	display: block;
	margin-top: 8px;
}

body.td-theme .td-newsletter .wpcf7 input[type='email'] {
	width: 100%;
	height: 52px;
	padding: 0 18px;
	border-radius: var(--td-radius-pill);
	border: var(--td-border);
	background: var(--td-paper);
	color: var(--td-ink);
	font: inherit;
	font-size: var(--td-text-md);
}

body.td-theme .td-newsletter .wpcf7 input:focus-visible {
	outline: 3px solid var(--td-lime);
	outline-offset: 2px;
}

/* Consent line: box and text side by side, white on violet; the Privacy link stays underlined. */
body.td-theme .td-newsletter .wpcf7 .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

body.td-theme .td-newsletter .wpcf7 .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: var(--td-text-sm);
	line-height: 1.45;
}

body.td-theme .td-newsletter .wpcf7 .wpcf7-acceptance input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--td-lime);
}

body.td-theme .td-newsletter .wpcf7 .wpcf7-acceptance a {
	color: var(--td-paper);
	text-decoration: underline;
}

body.td-theme .td-newsletter .wpcf7 .wpcf7-spinner {
	background-color: var(--td-ink);
	vertical-align: middle;
}

/* Errors and the response: ink on paper or lime chips, readable on violet (CF7's red and a violet border are not). */
body.td-theme .td-newsletter .wpcf7 input.wpcf7-not-valid {
	border-color: var(--td-ink);
	box-shadow: 0 0 0 3px var(--td-lime);
}

body.td-theme .td-newsletter .wpcf7 .wpcf7-not-valid-tip {
	display: inline-block;
	margin-top: 8px;
	padding: 2px 10px;
	border-radius: var(--td-radius-pill);
	background: var(--td-paper);
	color: var(--td-ink);
	font-style: normal;
	font-weight: 600;
	font-size: var(--td-text-sm);
}

body.td-theme .td-newsletter .wpcf7 form .wpcf7-response-output {
	margin: 4px 0 0;
	padding: 10px 16px;
	border: var(--td-border);
	border-radius: 14px;
	background: var(--td-paper);
	color: var(--td-ink);
	font-size: var(--td-text-sm);
}

body.td-theme .td-newsletter .wpcf7 form.invalid .wpcf7-response-output,
body.td-theme .td-newsletter .wpcf7 form.unaccepted .wpcf7-response-output {
	border-color: var(--td-ink);
}

body.td-theme .td-newsletter .wpcf7 form.sent .wpcf7-response-output {
	background: var(--td-lime);
}

/* Author box. The avatar is an empty group in saved content (pack posts, synced patterns), so the
   photo comes from CSS: decorative, the name is in the text beside it. Since 1.4.23. Since 1.4.26 the image
   is a transparent cut-out (violet circle, head popping out above it), so the box draws no circle, border
   or background of its own and the photo sits straight on the card. */
.td-author .td-avatar,
body.td-theme .td-author-h .td-avatar-h,
.editor-styles-wrapper .td-author-h .td-avatar-h {
	background: url("../brand/author-avatar-pop.webp") center / contain no-repeat;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.td-author .td-avatar {
	width: 88px;
	height: 88px;
	overflow: hidden;
	flex: none;
}

.td-author .td-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   Page roles set by the importer: Home and About me
   -------------------------------------------------------------------------- */

.td-front .entry-content > *,
.td-page-cv .entry-content > * {
	margin-block-end: 0;
}

body.td-theme .td-section,
.editor-styles-wrapper .td-section {
	margin-block: clamp(40px, 6vw, 72px);
}

.td-rule {
	border-top: 2px dashed var(--td-ink);
	padding-top: 32px;
}

/* Portrait / arch frame: border, arch radius and shadow come from the shared sticker rule. */
.td-cv-photo img,
.td-arch img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

.td-timeline {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* --------------------------------------------------------------------------
   Layout: Cover story
   -------------------------------------------------------------------------- */

body.td-theme .td-cover-hero,
.editor-styles-wrapper .td-cover-hero {
	background: var(--td-violet);
	color: var(--td-paper);
	border-block: var(--td-border);
	padding-block: clamp(40px, 6vw, 80px);
	margin-block: 0 48px;
}

.td-cover-hero p,
.td-cover-hero .wp-block-post-date,
.td-cover-hero .wp-block-post-author-name {
	color: var(--td-paper);
}

.td-cover-hero .td-cover-meta {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	background: var(--td-paper);
	color: var(--td-ink);
	border: 2px dashed var(--td-ink);
	border-radius: var(--td-radius-sm);
	padding: 12px 18px;
	font-size: var(--td-text-sm);
	font-weight: 600;
}

.td-cover-hero .td-cover-meta * {
	color: var(--td-ink);
	margin: 0;
}

.td-cover-hero .wp-block-post-featured-image {
	overflow: hidden;
}

.td-cover-hero .wp-block-post-featured-image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.td-layout-cover .entry-content h2 {
	font-size: clamp(24px, 3vw, 30px);
}

/* --------------------------------------------------------------------------
   Home first frame ("Top 1 · One bar"): the violet featured band sits directly
   under the 76px header and fills the rest of the first screen. Phone rules: techdigest-mobile.css.
   -------------------------------------------------------------------------- */

/* The band starts right under the header: drop Blocksy's top content spacing on the front page. */
body.td-front .site-main > [data-vertical-spacing*='top'] {
	padding-top: 0;
}

body.td-theme .td-band {
	--td-gutter: clamp(16px, 5vw, 72px);
	box-sizing: border-box;
	padding: 56px var(--td-gutter);
	margin-block: 0;
	/* One 2px rule under the header: the header's ink bottom border; the band's own top border would double it. */
	border-top: 0;
	/* Fill the fold: viewport minus the sticky header. */
	--td-header-h: 76px;
	min-height: calc(100vh - var(--td-header-h));
	display: flex;
	align-items: center;
}

.td-band .wp-block-query {
	width: 100%;
	max-width: 1296px;
	margin-inline: auto;
}

.td-band .td-band-cols {
	margin: 0;
	gap: 48px;
}

/* No font-size here: the generic h2 zine rule (body.td-theme h2:is(.is-style-td-zine...), clamp(36px, 5vw, 64px))
   wins on specificity, so the title is 64px at 1440 and 36px at 390 (spec said 96/48; the reviewer accepted this). */
.td-band .wp-block-post-title {
	margin: 0 0 20px;
}

.td-band .wp-block-post-excerpt {
	margin: 0 0 24px;
}

.td-band .wp-block-post-excerpt__excerpt {
	font-size: 18px;
	line-height: 1.55;
	max-width: 520px;
	margin: 0;
}

.td-band .wp-block-post-excerpt__more-text {
	display: none;
}

.td-band .td-pill {
	color: var(--td-ink);
	margin-block-end: 20px;
}

body.td-theme .td-band a.wp-block-read-more.td-band-btn {
	--td-chip-bg: var(--td-paper);
	--td-chip-fg: var(--td-ink);
	--td-chip-border: var(--td-border);
	--td-chip-pad: 12px 24px;
	box-shadow: 4px 4px 0 var(--td-ink);
	margin-top: 0;
}

.td-band .wp-block-post-featured-image {
	--td-card-radius: 240px 240px 28px 28px;
	margin: 0;
}

.td-band .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: min(520px, calc(100vh - 260px));
	aspect-ratio: auto;
	object-fit: cover;
}

/* Home first block, option B ("Feature + also new"): violet feature card + "> also new" list.
   Replaces the full-height .td-band (rules above kept until a clean-up). Phones: techdigest-mobile.css. */
body.td-theme .td-home-top {
	margin-block: clamp(20px, 3vw, 40px) 0;
}

/* Same edges as the header and the Latest cards: Blocksy's alignwide runs wider than the container
   from about 1440px up, and these blocks fill their alignwide box edge to edge. */
body.td-theme .td-home-top.alignwide,
body.td-theme .td-newsletter-anchor.alignwide {
	width: var(--theme-container-width, 90vw);
	max-width: var(--theme-normal-container-max-width, 1290px);
	margin-inline: auto;
}

.td-home-top .td-home-top-cols {
	gap: 24px;
	margin: 0;
	align-items: stretch;
}

.td-home-top .td-home-top-cols > .wp-block-column {
	display: flex;
	flex-direction: column;
}

.td-feature,
.td-feature .wp-block-post-template,
.td-feature .wp-block-post {
	height: 100%;
	margin: 0;
}

.td-feature-card {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	height: 100%;
	background: var(--td-violet);
	color: var(--td-paper);
	border: var(--td-border);
	border-radius: var(--td-radius-lg);
	box-shadow: var(--td-shadow);
	overflow: hidden;
}

.td-feature-text {
	padding: clamp(20px, 2.6vw, 36px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
}

.td-feature .td-pill {
	color: var(--td-ink);
	margin: 0 0 14px;
}

/* Beats the generic zine h2 rule (clamp(36px, 5vw, 64px)), which is too big for half a card. */
body.td-theme .td-feature h2.wp-block-post-title.is-style-td-zine {
	font-size: clamp(30px, 3.2vw, 46px);
	margin: 0 0 14px;
}

.td-feature .wp-block-post-excerpt {
	margin: 0 0 20px;
}

.td-feature .wp-block-post-excerpt__excerpt {
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
}

.td-feature .wp-block-post-excerpt__more-text {
	display: none;
}

body.td-theme .td-feature a.wp-block-read-more.td-band-btn {
	--td-chip-bg: var(--td-paper);
	--td-chip-fg: var(--td-ink);
	--td-chip-border: var(--td-border);
	--td-chip-pad: 10px 20px;
	box-shadow: 4px 4px 0 var(--td-ink);
	margin-top: 0;
}

.td-feature-img {
	--td-card-radius: 0;
	margin: 0;
	border-left: var(--td-border);
}

/* Covers put the art on the right (kicker text left); 70% keeps the art in a near-square crop. */
.td-feature-img img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 300px;
	aspect-ratio: auto;
	object-fit: cover;
	object-position: 70% 50%;
	border-radius: 0;
}

/* Blocksy gives every block a bottom margin (--theme-content-spacing); the card and list set their own spacing. */
.td-feature-text,
.td-rail .wp-block-post,
.td-rail .wp-block-query {
	margin: 0;
}

/* Home "also new" as a terminal window (inc/home-terminal.php adds the bar, command and prompt). */
body.td-theme .td-rail.td-term {
	--td-term-fg: #E9E9E4;
	--td-term-dim: #8A8A84;
	--td-term-rule: #2E2E2E;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	padding: 0;
	background: var(--td-ink);
	color: var(--td-term-fg);
	border: var(--td-border);
	border-radius: var(--td-radius-lg);
	box-shadow: 6px 6px 0 var(--td-violet);
	overflow: hidden;
	font-family: var(--td-mono);
}

.td-term__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: #1A1A1A;
	border-bottom: 1px solid var(--td-term-rule);
}

.td-term__mark {
	flex: none;
	width: 30px;
	height: 30px;
}

.td-term__path {
	font-size: 12px;
	color: var(--td-term-dim);
}

.td-term__path b {
	color: var(--td-lime);
	font-weight: 700;
}

/* Blocksy's flow-layout rule gives every block child a bottom margin (--theme-content-spacing); not inside the terminal.
   The end prompt keeps its auto top margin, so don't zero margins on all children. */
.td-term .td-term__bar,
.td-term .td-term__cmd,
.td-term .td-term__who {
	margin-bottom: 0;
}

.td-term__cmd,
.td-term__end {
	padding: 12px 18px 0;
	font-size: 13px;
	color: #fff;
	white-space: nowrap;
}

.td-term__end {
	margin-top: auto;
	padding-bottom: 14px;
}

/* `whoami` line (inc/home-terminal.php): sits at the bottom, just above the closing prompt. */
.td-term__who {
	margin-top: auto;
	padding: 10px 18px 0;
	font-size: 13px;
	line-height: 1.7;
	color: #fff;
	animation: td-term-line 0.35s ease-out 2.2s both;
}

/* The prompt follows the whoami line instead of pushing itself to the bottom. */
.td-term__who + .td-term__end {
	margin-top: 0;
}

.td-term__out {
	color: var(--td-term-fg);
}

body.td-theme .td-term__out a {
	color: var(--td-lime);
	text-decoration: none;
	border-bottom: 1px dashed var(--td-lime);
	white-space: nowrap; /* wraps as a whole, never "about-" / "me.md" */
}

body.td-theme .td-term__out a:hover,
body.td-theme .td-term__out a:focus-visible {
	border-bottom-style: solid;
}

body.td-theme .td-term__out a:focus-visible {
	outline: 2px solid var(--td-lime);
	outline-offset: 2px;
}

.td-term__ps {
	color: var(--td-lime);
}

/* Typed once: ends at its natural width, so without animation it's simply there. */
.td-term__typed {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	width: 26.5ch;
	animation: td-term-type 1.1s steps(26) 0.3s both;
}

.td-term__caret {
	display: inline-block;
	width: 0.6em;
	height: 1.1em;
	vertical-align: -2px;
	background: var(--td-lime);
}

.td-term__caret,
.td-term__cur {
	animation: td-term-blink 1.1s steps(1) infinite;
}

.td-term__spark {
	transform-box: fill-box;
	transform-origin: center;
	animation: td-term-twinkle 5s ease-in-out infinite;
}

/* The visible "> also new" label is replaced by the terminal; the region's aria-label names it. */
.td-term .td-rail-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.td-term .wp-block-query {
	padding: 6px 18px 0;
}

.td-term .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.td-term .wp-block-post {
	margin: 0;
	animation: td-term-line 0.35s ease-out both;
}

.td-term .wp-block-post:nth-child(1) { animation-delay: 1.5s; }
.td-term .wp-block-post:nth-child(2) { animation-delay: 1.62s; }
.td-term .wp-block-post:nth-child(3) { animation-delay: 1.74s; }
.td-term .wp-block-post:nth-child(4) { animation-delay: 1.86s; }

/* Row: date in a narrow left column; title and category path on the right. */
.td-term .td-rail-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas: "date title" ". cat";
	column-gap: 12px;
	padding: 9px 0;
	border-top: 1px dashed var(--td-term-rule);
}

.td-term .wp-block-post:first-child .td-rail-item {
	border-top: 0;
}

.td-term .td-rail-date {
	grid-area: date;
	padding-top: 2px;
	font-size: 11.5px;
	color: var(--td-term-dim);
	white-space: nowrap;
}

body.td-theme .td-term .td-rail-title {
	grid-area: title;
	margin: 0;
	font-family: var(--td-body, Poppins, sans-serif);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

body.td-theme .td-term .td-rail-title a {
	color: inherit;
	text-decoration: none;
}

body.td-theme .td-term .td-rail-title a:hover,
body.td-theme .td-term .td-rail-title a:focus-visible {
	color: var(--td-lime);
	text-decoration: underline;
}

body.td-theme .td-term .td-rail-title a:focus-visible,
body.td-theme .td-term .td-rail-cat a:focus-visible {
	outline: 2px solid var(--td-lime);
	outline-offset: 2px;
}

.td-term .td-rail-cat {
	grid-area: cat;
	margin: 2px 0 0;
	font-size: 11.5px;
}

body.td-theme .td-term .td-rail-cat a {
	color: var(--td-lime);
	text-decoration: none;
}

body.td-theme .td-term .td-rail-cat.is-note a {
	color: var(--td-ink);
	background: var(--td-lime);
	border-radius: 4px;
	padding: 0 5px;
}

@keyframes td-term-type { from { width: 0; } }
@keyframes td-term-line { from { opacity: 0; transform: translateY(4px); } }
@keyframes td-term-blink { 50% { opacity: 0; } }
@keyframes td-term-twinkle {
	0%, 80%, 100% { transform: scale(1) rotate(0); }
	88% { transform: scale(1.35) rotate(25deg); }
}

@media (prefers-reduced-motion: reduce) {
	.td-term__typed,
	.td-term__who,
	.td-term .wp-block-post,
	.td-term__caret,
	.td-term__cur,
	.td-term__spark {
		animation: none;
	}
}

/* No sticky post (e.g. production before the first featured post publishes): no empty card column, the list takes the row. */
.td-home-top-cols:not(:has(.td-feature-card)) > .wp-block-column:first-child {
	display: none;
}

body.td-theme .td-home-top-cols:not(:has(.td-feature-card)) > .wp-block-column:last-child {
	flex-grow: 1;
}

/* Sticky post without a featured image: the text takes the whole card. */
.td-feature-card:not(:has(.td-feature-img)) {
	grid-template-columns: 1fr;
}

/* Bottom sheets (<dialog>, laid out in techdigest-mobile.css): hidden while closed, also where <dialog> is unknown. */
.td-sheet:not([open]) {
	display: none;
}

/* The tutorial "Steps" button needs JS (techdigest.js adds html.td-js). */
html:not(.td-js) .td-step-progress__btn {
	display: none;
}

/* Tablet: the card goes full width and the list sits under it, in two columns. The two !important are
   needed: core sets flex-wrap:nowrap !important on columns from 782px, and flex-basis is an inline style. */
@media (min-width: 769px) and (max-width: 1023px) {
	.td-home-top .td-home-top-cols {
		flex-wrap: wrap !important;
	}

	.td-home-top .td-home-top-cols > .wp-block-column {
		flex-basis: 100% !important;
	}

	.td-term .wp-block-post-template {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 24px;
	}

	.td-term .wp-block-post:nth-child(2) .td-rail-item {
		border-top: 0;
	}
}

/* Home topic row ("Top 1 · One bar"): "> topics" label + category chips above the Latest grid.
   Phones: one line that scrolls sideways (techdigest-mobile.css). */
body.td-theme .td-home-topics {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-block: 20px 32px;
}

body.td-theme .td-home-topics .td-topics-label {
	font-family: var(--td-mono);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--td-muted);
	margin: 0;
	flex: none;
}

body.td-theme .td-home-topics .td-topics {
	gap: 8px;
	margin: 0;
}

body.td-theme .td-home-topics .td-topics a {
	--td-chip-pad: 5px 12px;
	--td-chip-size: 13px;
	--td-chip-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

/* Header "Subscribe" jumps here; keep the panel clear of the sticky header. */
#newsletter {
	scroll-margin-top: 96px;
}

/* --------------------------------------------------------------------------
   Layout: Tutorial
   -------------------------------------------------------------------------- */

.td-step-progress {
	display: none;
}

/* --------------------------------------------------------------------------
   Layout: Quick note (TIL) — the whole post sits in one dashed card
   -------------------------------------------------------------------------- */

body.td-layout-til .entry-content {
	position: relative;
	border: 2px dashed var(--td-ink);
	border-radius: var(--td-radius-xl);
	padding: clamp(56px, 7vw, 72px) clamp(20px, 5vw, 56px) clamp(28px, 5vw, 48px);
	margin-top: 56px;
	max-width: 820px;
	margin-inline: auto;
	box-sizing: border-box;
}

.td-layout-til .entry-content::before {
	content: 'TIL';
	position: absolute;
	top: -0.5em;
	left: clamp(16px, 4vw, 40px);
	padding: 0 12px;
	background: var(--td-ground);
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	font-size: clamp(64px, 9vw, 104px);
	line-height: 0.9;
	color: var(--td-lime);
	-webkit-text-stroke: 3px var(--td-ink);
	paint-order: stroke fill;
	text-shadow: var(--td-shadow-md);
	transform: rotate(-4deg);
}

/* --------------------------------------------------------------------------
   Blocksy archive cards — sticker look comes from the shared rule above
   -------------------------------------------------------------------------- */

.td-theme .entries .entry-card {
	overflow: hidden;
}

.td-theme .entries .entry-card .entry-title a {
	color: var(--td-ink);
}

/* --------------------------------------------------------------------------
   Mobile app chrome: hidden by default, laid out in techdigest-mobile.css
   -------------------------------------------------------------------------- */

.td-tabbar,
.td-actionbar {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button[class*='is-style-td-']:hover .wp-block-button__link,
	.wp-block-button[class*='is-style-td-'] .wp-block-button__link:focus-visible {
		transform: none;
	}
	.td-step-progress__bar span {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Small parts used by the demo pages and patterns
   -------------------------------------------------------------------------- */

/* Inline highlights inside zine headings: no UA <mark> fill; colour comes
   from WordPress's has-td-*-color classes. */
body.td-theme :is(.is-style-td-zine, .is-style-td-zine-violet) mark,
.editor-styles-wrapper :is(.is-style-td-zine, .is-style-td-zine-violet) mark {
	background: none;
	color: inherit;
}

/* Must come after (and match the specificity of) the zine heading rule above.
   "MAGEMINION" is ~6.76em wide in Rubik 900 italic, so 12vw (0.12 x 6.76 = 81% of the viewport)
   always fits inside the page gutters with no mid-word break; the 32px floor only guards
   viewports narrower than ~270px. 153.6px at 1280, capped at 168px. */
body.td-theme .td-masthead,
.editor-styles-wrapper .td-masthead {
	font-size: clamp(32px, 12vw, 168px);
}

.td-lede {
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.55;
	max-width: 620px;
}

.td-role {
	font-size: var(--td-text-xl);
	font-weight: 600;
	color: var(--td-ink);
}

body.td-theme .td-pill,
.editor-styles-wrapper .td-pill {
	align-self: flex-start;
	width: fit-content;
	--td-chip-weight: 700;
	padding: 2px 12px;
	margin-block-end: 8px;
}

.td-company {
	font-weight: 600;
	color: var(--td-violet-ink);
}

/* About me (board 03). Experience card: title left, date pill top-right on the same line. Stored
   markup is pill, h3, company, list. Grid placement does it without changing content; the width:100%
   offsets the constrained layout's auto side margins, which would shrink-wrap grid items. Phones
   (techdigest-mobile.css) stack title, pill, company. */
:is(body.td-theme, .editor-styles-wrapper) .is-style-td-sticker:has(> .td-pill:first-child + h3) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	row-gap: var(--td-stack);
	align-items: center;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-sticker:has(> .td-pill:first-child + h3) > * {
	margin-block: 0;
	width: 100%;
	max-width: none;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-sticker:has(> .td-pill:first-child + h3) > .td-pill {
	grid-column: 2;
	grid-row: 1;
	width: fit-content;
	white-space: nowrap;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-sticker:has(> .td-pill:first-child + h3) > h3 {
	grid-column: 1;
	grid-row: 1;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-sticker:has(> .td-pill:first-child + h3) > :not(.td-pill, h3) {
	grid-column: 1 / -1;
}

/* "Let's talk" band: stacked copy then buttons; two columns (copy left, buttons right) from 1280 px,
   where the three buttons fit beside a readable copy column. */
:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: 16px;
	align-items: center;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) > * {
	margin-block: 0;
	width: 100%;
	max-width: none;
	grid-column: 1;
}

:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) > .wp-block-buttons {
	justify-content: flex-start;
}

@media (min-width: 1280px) {
	:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) {
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 32px;
		row-gap: 0;
	}

	:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) > h2 {
		margin-block-end: var(--td-stack);
	}

	:is(body.td-theme, .editor-styles-wrapper) .is-style-td-violet:not(.td-newsletter):has(> h2 + p + .wp-block-buttons) > .wp-block-buttons {
		grid-column: 2;
		grid-row: 1 / span 2;
		width: auto;
		justify-content: flex-end;
	}
}

body.td-theme ul.td-skill-chips,
.editor-styles-wrapper ul.td-skill-chips {
	padding: 0;
}

ul.td-skill-chips {
	list-style: none;
	margin: 0 0 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

ul.td-skill-chips li {
	margin: 0;
	color: inherit;
}

body.td-theme .td-author,
.editor-styles-wrapper .td-author {
	gap: 20px;
}

body.td-theme .td-author p,
.editor-styles-wrapper .td-author p {
	margin: 0;
}

.td-author a {
	color: var(--td-ink);
	font-weight: 600;
}

/* Author box, horizontal variant (pattern "Author box (horizontal)", Cover stories): avatar left, text right,
   stacked under 600px. Own classes, so the original .td-author box is not affected. */
body.td-theme .td-author-h,
.editor-styles-wrapper .td-author-h {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: clamp(18px, 3vw, 28px);
}

body.td-theme .td-author-h > *,
.editor-styles-wrapper .td-author-h > * {
	margin-block: 0;
}

body.td-theme .td-author-h .td-avatar-h,
.editor-styles-wrapper .td-author-h .td-avatar-h {
	flex: none;
	width: 96px;
	height: 96px;
	overflow: hidden;
}

body.td-theme .td-author-h > :last-child,
.editor-styles-wrapper .td-author-h > :last-child {
	flex: 1 1 0;
	min-width: 0;
	gap: 6px;
}

body.td-theme .td-author-h p,
.editor-styles-wrapper .td-author-h p {
	margin: 0;
}

body.td-theme .td-author-h p:first-child,
.editor-styles-wrapper .td-author-h p:first-child {
	font-size: var(--td-text-lg);
}

body.td-theme .td-author-h p:last-child a,
.editor-styles-wrapper .td-author-h p:last-child a {
	display: inline-block;
	margin-top: 4px;
	padding: 4px 14px;
	border-radius: var(--td-radius-pill);
	background: var(--td-ink);
	color: var(--td-lime);
	font-size: var(--td-text-sm);
	text-decoration: none;
}

body.td-theme .td-author-h p:last-child a:hover,
body.td-theme .td-author-h p:last-child a:focus-visible {
	background: var(--td-paper);
	color: var(--td-ink);
}

@media (max-width: 599px) {
	body.td-theme .td-author-h,
	.editor-styles-wrapper .td-author-h {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
}

.td-til-strip .wp-block-post-template {
	gap: 20px;
}

body.td-theme .td-til-card,
.editor-styles-wrapper .td-til-card {
	height: 100%;
	padding: 20px;
}

.td-til-card .wp-block-post-title {
	font-size: var(--td-text-lg);
	line-height: 1.35;
}

.td-til-card .wp-block-post-title a {
	color: var(--td-ink);
	text-decoration: none;
}

body.td-theme .td-til-tag,
.editor-styles-wrapper .td-til-tag {
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	font-size: var(--td-text-xl);
	margin: 0 0 6px;
}

/* Blocksy renders a single's featured image as <figure class="ct-featured-image">
   (blocksy_get_featured_image_output). It is off by default (single_blog_post_has_featured_image
   = no); if it is switched on, the cover hero and TIL cards already carry the image. */
.td-layout-cover .ct-featured-image,
.td-layout-til .ct-featured-image {
	display: none;
}

/* --------------------------------------------------------------------------
   Canvas header and dark footer (design review item 2). Row height,
   background, border, sticky shrink, the Subscribe button and the footer
   row are Blocksy settings (tools/customizer.php); this is the styling those
   settings can't express. Blocksy markup: nav[data-id="menu"] > ul.menu >
   li > a.ct-menu-link; button = .ct-header-cta > a.ct-button.
   -------------------------------------------------------------------------- */

body.td-theme .ct-header [data-id="menu"] > ul > li > a.ct-menu-link {
	--theme-link-initial-color: var(--td-ink);
	--theme-link-hover-color: var(--td-ink);
	text-transform: none;
	font-family: var(--td-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
	padding: 10px 14px;
	height: auto;
	min-height: 0;
	border-radius: 999px;
	color: var(--td-ink);
}

body.td-theme .ct-header [data-id="menu"] > ul {
	gap: 2px;
}

/* Hover background only where a pointer can really hover: on touch, :hover sticks after a tap and leaves a grey pill.
   The keyboard ring is :focus-visible (never plain :focus). */
@media (hover: hover) {
	body.td-theme .ct-header [data-id="menu"] > ul > li:hover > a.ct-menu-link {
		background: rgba(17, 17, 17, 0.08);
	}
}

body.td-theme .ct-header [data-id="menu"] > ul > li > a.ct-menu-link:focus-visible {
	background: rgba(17, 17, 17, 0.08);
	outline: 2px solid var(--td-violet);
	outline-offset: 2px;
}

body.td-theme .ct-header [data-id="menu"] > ul > li.current-menu-item > a.ct-menu-link,
body.td-theme .ct-header [data-id="menu"] > ul > li.current-menu-ancestor > a.ct-menu-link,
body.td-theme .ct-header [data-id="menu"] > ul > li > a.ct-menu-link[aria-current="page"] {
	background: var(--td-ink);
	color: #fff;
}

body.td-theme .ct-header .ct-header-cta .ct-button {
	background: var(--td-lime);
	color: var(--td-ink);
	border: 2px solid var(--td-ink);
	border-radius: 999px;
	box-shadow: 3px 3px 0 var(--td-ink);
	font-family: var(--td-body);
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	min-height: 44px;
	padding: 10px 18px;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

body.td-theme .ct-header .ct-header-cta .ct-button:focus-visible {
	background: var(--td-lime);
	color: var(--td-ink);
	transform: translate(1px, 1px);
	box-shadow: 2px 2px 0 var(--td-ink);
}

/* Read from the wrapper, which doesn't move (1.5.15: a hover transform on the button moves its hit area, so it pulsed). */
@media (hover: hover) {
	body.td-theme .ct-header .ct-header-cta:hover .ct-button {
		background: var(--td-lime);
		color: var(--td-ink);
		transform: translate(1px, 1px);
		box-shadow: 2px 2px 0 var(--td-ink);
	}
}

/* Footer (theme 1.5.0): lockup, tagline and menu on one row, the copyright on its own line under
   a 1px rule. The lockup, tagline and copyright sit in Blocksy's copyright text (free Blocksy has
   no footer Logo element); the two wrappers use display:contents so they share one grid with the
   menu column. The menu is light. */
body.td-theme .ct-footer [data-row="bottom"] > .ct-container {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 10px 28px;
	align-items: center;
	padding-block: 12px;
}

body.td-theme .ct-footer [data-row="bottom"] [data-column="copyright"],
body.td-theme .ct-footer .ct-footer-copyright {
	display: contents;
}

body.td-theme .ct-footer .td-footer-tagline {
	grid-column: 2;
	max-width: 380px;
	font-family: var(--td-body);
	font-size: 14px;
	line-height: 1.45;
	color: #ccc;
}

body.td-theme .ct-footer [data-row="bottom"] [data-column="menu"] {
	grid-column: 3;
	justify-self: end;
}

body.td-theme .ct-footer .td-footer-copy {
	grid-column: 1 / -1;
	order: 5;
	margin-top: 8px;
	padding-top: 14px;
	border-top: 1px solid #2e2e2e;
	font-size: 12.5px;
	color: #888;
}

/* Tablets: the six-item menu takes its own row, so the tagline keeps a readable width. */
@media (min-width: 769px) and (max-width: 999px) {
	body.td-theme .ct-footer [data-row="bottom"] [data-column="menu"] {
		grid-column: 1 / -1;
		justify-self: start;
	}
}

@media (max-width: 768px) {
	body.td-theme .ct-footer [data-row="bottom"] > .ct-container {
		grid-template-columns: 1fr;
	}

	body.td-theme .ct-footer .td-footer-tagline,
	body.td-theme .ct-footer [data-row="bottom"] [data-column="menu"] {
		grid-column: 1;
		justify-self: start;
	}

	body.td-theme .ct-footer [data-id="menu"] > ul {
		flex-wrap: wrap;
		gap: 10px 16px;
		margin: 0;
	}

	body.td-theme .ct-footer [data-id="menu"] > ul a.ct-menu-link {
		padding: 4px 0;
	}
}

body.td-theme .ct-footer .td-footer-logo {
	display: inline-flex;
	line-height: 0;
	justify-self: start; /* a grid item: don't stretch the home link across the row */
}

body.td-theme .ct-footer .td-footer-logo img {
	display: block;
	width: 158px;
	height: 34px;
	max-width: none;
}

body.td-theme .ct-footer [data-id="menu"] a.ct-menu-link {
	color: var(--td-ground);
	font-family: var(--td-body);
	font-weight: 600;
	font-size: 14px;
	text-transform: none;
	padding: 14px 8px;
}

@media (hover: hover) {
	body.td-theme .ct-footer [data-id="menu"] a.ct-menu-link:hover {
		color: var(--td-lime);
	}
}

body.td-theme .ct-footer [data-id="menu"] a.ct-menu-link:focus-visible {
	color: var(--td-lime);
}

/* --------------------------------------------------------------------------
   Contact page  (patterns: contact-page, contact-form-card, contact-link-card)
   -------------------------------------------------------------------------- */

/* Fallback only: the page has its own H1, so Blocksy emits no hero (techdigest_has_own_h1()). */
.td-page-contact .hero-section {
	display: none;
}

.td-contact {
	gap: clamp(28px, 4vw, 56px);
	align-items: flex-start;
	margin-block: clamp(24px, 4vw, 56px);
}

.td-contact-intro {
	font-size: var(--td-text-lg, 1.25rem);
	line-height: 1.6;
	margin-block: clamp(24px, 3vw, 36px);
}

.td-link-cards > * + * {
	margin-block-start: 20px;
}

/* Link card: label, value, whole card clickable, arrow drawn by the stretched link. */
body.td-theme .wp-block-group.td-link-card,
.editor-styles-wrapper .wp-block-group.td-link-card {
	--td-card-radius: 28px;
	position: relative;
	padding: 14px 64px 14px 30px;
}

body.td-theme .wp-block-group.td-link-card > * + *,
.editor-styles-wrapper .wp-block-group.td-link-card > * + * {
	margin-block-start: 2px;
}

.td-link-card .td-kicker {
	font-size: 13px;
	letter-spacing: 0.08em;
	margin: 0;
}

.td-link-card__value {
	font-weight: 600;
	font-size: clamp(15px, 1.5vw, 20px);
	overflow-wrap: break-word;
	margin: 0;
}

.td-link-card__value a {
	color: inherit;
	text-decoration: none;
}

.td-link-card__value a::after {
	content: "\2192";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 28px;
	font-size: 28px;
	line-height: 1;
}

/* No movement on hover: a hover transform moves the hit area, so a pointer at the edge made it pulse (1.5.15, see brand-motion.css). */
.td-link-card {
	transition: box-shadow 0.15s ease;
}

.td-link-card:hover {
	--td-card-shadow: var(--td-shadow-lg);
}

.td-link-card a:focus-visible {
	outline: none;
}

body.td-theme .td-link-card:has(a:focus-visible) {
	outline: 3px solid var(--td-violet);
	outline-offset: 4px;
}

.td-form-card {
	--td-card-radius: 40px;
}

body.td-theme .td-form-card {
	padding: clamp(24px, 3.5vw, 48px);
}

.td-form-card .wp-block-heading {
	margin-block-end: 24px;
}

body.td-theme .td-form-card h2.wp-block-heading {
	font-size: clamp(32px, 3vw, 44px);
}

/* Contact Form 7 (body.td-theme prefix beats Blocksy's cf-7.min.css) */
body.td-theme .wpcf7 label { font-weight: 700; font-size: 14px; display: block; }
body.td-theme .wpcf7 label > br { display: none; }
body.td-theme .wpcf7 label > .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7 .td-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea { width: 100%; box-sizing: border-box; height: 50px; padding: 0 16px; border: 2px solid #111111; border-radius: 14px; background: #F4F4F1; font: inherit; font-size: 16px; color: #111111; }
.wpcf7 textarea { height: auto; min-height: 160px; padding: 14px 16px; }
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible { outline: 3px solid var(--td-violet); outline-offset: 2px; }
.wpcf7-acceptance input { width: 22px; height: 22px; accent-color: var(--td-violet); }
body.td-theme .wpcf7 .wpcf7-acceptance label { display: flex; align-items: center; gap: 12px; font-weight: 400; font-size: 14px; }
.wpcf7-submit { height: 54px; padding: 0 28px; border-radius: 999px; border: 2px solid #111111; background: var(--td-lime); color: #111111; box-shadow: 4px 4px 0 #111111; font: inherit; font-weight: 700; cursor: pointer; }
.wpcf7-submit:disabled { opacity: 0.55; box-shadow: none; cursor: not-allowed; }
body.td-theme .wpcf7 .wpcf7-not-valid { border-color: #b3261e; }
body.td-theme .wpcf7 .wpcf7-not-valid-tip { font-style: normal; font-weight: 600; color: #b3261e; margin-top: 6px; }
body.td-theme .wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 12px 16px; border: 2px solid #111111; border-radius: 14px; background: #F4F4F1; }
body.td-theme .wpcf7 form.invalid .wpcf7-response-output, body.td-theme .wpcf7 form.unaccepted .wpcf7-response-output { border-color: var(--td-violet); }
body.td-theme .wpcf7 form.sent .wpcf7-response-output { background: var(--td-lime); }

@media (max-width: 599px) {
	.wpcf7 .td-form-row { grid-template-columns: 1fr; gap: 0; }
}

/* --------------------------------------------------------------------------
   Item 7: small bugs
   -------------------------------------------------------------------------- */

/* Cover story: the violet hero starts at the header, so drop the content's top spacing
   (Blocksy sets padding-top from [data-vertical-spacing*="top"] on .ct-container-full). */
.td-layout-cover [data-vertical-spacing*="top"] {
	padding-top: 0;
}

/* Card category chips: not uppercase (Blocksy uppercases .entry-meta). */
.td-theme .entry-card .entry-meta,
.td-theme .entry-card .entry-meta .meta-categories a,
.td-theme .hero-section .entry-meta,
.td-theme .hero-section .entry-meta .meta-categories a {
	text-transform: none;
}

/* Tablet hamburger (769-999px): 44x44 tap target, icon size unchanged. */
@media (min-width: 769px) and (max-width: 999px) {
	.ct-header [data-id="trigger"] {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}
}

/* --------------------------------------------------------------------------
   Zine archive titles: "Learn with me" series (/series/<slug>/, mageminion-content
   plugin, as in the series mockups), Tutorials and Quick notes. Same metrics as
   the h2 zine heading. Series pages also hide the visible description (it stays
   the meta description).
   -------------------------------------------------------------------------- */

body.td-theme:is(.tax-mm_series, .category-tutorial, .category-til) .entry-header .page-title {
	font-family: var(--td-display);
	font-weight: 900;
	font-style: italic;
	text-transform: uppercase;
	line-height: 0.86;
	color: var(--td-lime);
	-webkit-text-stroke: 2.5px var(--td-ink);
	paint-order: stroke fill;
	text-shadow: var(--td-shadow-sm);
	transform: rotate(-2deg);
	transform-origin: left bottom;
	padding: 0.08em 0;
	margin-bottom: 32px;
	font-size: clamp(36px, 5vw, 64px);
}

body.td-theme.tax-mm_series .entry-header .page-description {
	display: none;
}

/* Code shows exactly what to type: no JetBrains Mono ligatures (=> stays two characters, not an arrow). */
pre, code, kbd, samp {
	font-variant-ligatures: none;
	font-feature-settings: "liga" 0, "calt" 0;
}

/* --------------------------------------------------------------------------
   Tables in posts (core/table, e.g. the pack's benchmark tables): a sticker
   card like the rest of the site. Ink border, card radius, hard shadow,
   ink header row, hairlines (border-soft) between rows. Scrolls sideways
   inside its card on narrow screens instead of widening the page.
   -------------------------------------------------------------------------- */

body.td-theme .entry-content .wp-block-table {
	margin-block: 32px;
	background: var(--td-paper);
	border: var(--td-border);
	border-radius: var(--td-radius-md);
	box-shadow: var(--td-shadow-md);
	overflow-x: auto;
}

body.td-theme .entry-content .wp-block-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: var(--td-text-sm);
	line-height: 1.5;
}

body.td-theme .entry-content .wp-block-table :is(th, td) {
	padding: 12px 16px;
	border: 0;
	border-bottom: 1px solid #D5D5D0;
	text-align: left;
	vertical-align: top;
}

body.td-theme .entry-content .wp-block-table thead {
	border: 0;
}

body.td-theme .entry-content .wp-block-table thead th {
	background: var(--td-ink);
	color: var(--td-paper);
	font-weight: 600;
	border-bottom: 0;
}

body.td-theme .entry-content .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

/* Phones: keep words whole (core's has-fixed-layout squeezes columns until words split); the table keeps a
   readable width and scrolls sideways inside its card. */
@media (max-width: 768px) {
	body.td-theme .entry-content .wp-block-table table {
		table-layout: auto;
		min-width: 560px;
	}

	body.td-theme .entry-content .wp-block-table :is(th, td) {
		padding: 10px 12px;
		word-break: normal;
		overflow-wrap: normal;
	}
}

/* Code blocks with a header bar (techdigest.js wraps pre.wp-block-code in .td-code).
   The wrapper takes over the frame (ink, border, violet offset shadow); the pre inside drops its own. */
body.td-theme .td-code {
	margin-block: var(--td-stack, 24px);
	background: var(--td-ink);
	border: var(--td-border);
	border-radius: var(--td-radius-sm);
	box-shadow: var(--td-off-md) var(--td-off-md) 0 var(--td-violet);
	overflow: hidden;
}

body.td-theme .td-code > .wp-block-code {
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding-top: 14px;
}

.td-code__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	padding: 6px 8px 6px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.td-code__lang {
	font-family: var(--td-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--td-lime);
}

body.td-theme .td-code__copy {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	margin: 0 0 0 auto;
	padding: 4px 12px;
	border: 2px solid var(--td-paper);
	border-radius: var(--td-radius-pill);
	background: transparent;
	color: var(--td-paper);
	font-family: var(--td-body, inherit);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

/* 44px tap target without a taller pill. */
body.td-theme .td-code__copy::after {
	content: "";
	position: absolute;
	inset: -6px -4px;
}

body.td-theme .td-code__copy:hover,
body.td-theme .td-code__copy:focus-visible {
	background: var(--td-paper);
	color: var(--td-ink);
}

body.td-theme .td-code__copy:focus-visible,
body.td-theme .td-copyall__btn:focus-visible {
	outline: 3px solid var(--td-lime);
	outline-offset: 2px;
}

body.td-theme .td-code__copy.is-copied {
	background: var(--td-lime);
	border-color: var(--td-lime);
	color: var(--td-ink);
}

.td-code__copy svg,
.td-copyall__btn svg {
	width: 15px;
	height: 15px;
	flex: none;
}

/* "Copy all commands" (tutorials with 2+ shell blocks), placed before the first step. */
body.td-theme .td-copyall {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-block: var(--td-stack, 24px);
	padding: 14px 18px;
	background: var(--td-paper);
	border: 2px dashed var(--td-ink);
	border-radius: var(--td-radius-md);
}

.td-copyall__text strong {
	display: block;
	font-size: 15px;
}

.td-copyall__text span {
	font-family: var(--td-mono);
	font-size: 12px;
	color: var(--td-muted);
}

body.td-theme .td-copyall__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 6px 18px;
	border: var(--td-border);
	border-radius: var(--td-radius-pill);
	background: var(--td-ink);
	color: var(--td-paper);
	font-family: var(--td-body, inherit);
	font-size: 14px;
	font-weight: 700;
	box-shadow: 3px 3px 0 var(--td-violet);
	cursor: pointer;
}

body.td-theme .td-copyall__btn.is-copied {
	background: var(--td-lime);
	color: var(--td-ink);
	box-shadow: 3px 3px 0 var(--td-ink);
}

@media (max-width: 768px) {
	body.td-theme .td-copyall__btn {
		width: 100%;
		justify-content: center;
	}
}

@media print {
	.td-code__bar,
	.td-copyall {
		display: none;
	}
}

/* In-body screenshots (1.5.18): core/image blocks with className td-figure, written by the content pack's
   build (![alt](file.jpg "caption")). Ink border and radius like the cards; the image never outgrows its column.
   The figure keeps the full column width and the image is capped at 740px, the width `sizes` promises
   (inc/images.php): the tutorial column is wider than that on desktop, and core's constrained layout would
   centre a narrower figure (margin auto !important), while the text is left-aligned. The lightbox expand
   button is positioned by core from the image box. */
.wp-block-image.td-figure {
	margin-block: 28px;
}

/* The tutorial grid zeroes the block-end margin of every direct child (layouts.css, more specific), so the
   figure's own gap below is restored here. */
body.td-theme .entry-content > .wp-block-image.td-figure {
	margin-block-end: 28px;
}

.wp-block-image.td-figure img {
	display: block;
	width: auto;
	max-width: min(100%, 740px);
	height: auto;
	/* An outline, not a border (1.5.20): core's lightbox sizes its frame from the image box, and a border made
	   that box taller in proportion, so short wide shots opened cropped. */
	outline: var(--td-border);
	outline-offset: -2px;
	border-radius: var(--td-radius-xs);
}

.wp-block-image.td-figure figcaption {
	max-width: 740px;
	margin-block: 10px 0;
	color: var(--td-muted);
	font-family: var(--td-body, inherit);
	font-size: var(--td-text-sm, 14px);
	line-height: 1.5;
	text-align: left;
}

.wp-block-image.td-figure figcaption code {
	font-size: 0.9em;
}

.is-style-td-step > .wp-block-image.td-figure {
	margin-block: 18px 0;
}

.is-style-td-step > .wp-block-image.td-figure:last-child {
	margin-block-end: 0;
}

/* Core's lightbox shows a copy of the image: no outline, radius or width cap there, and the size core computes
   (1.5.20; the width: auto above would otherwise win). The copy keeps the td-figure class, so its margin is
   reset too: the 28px block margin pushed the image down and the frame cut off its bottom. */
.wp-lightbox-overlay .wp-block-image.td-figure {
	margin: 0;
}

.wp-lightbox-overlay .wp-block-image.td-figure img {
	width: var(--wp--lightbox-image-width);
	height: var(--wp--lightbox-image-height);
	outline: 0;
	border-radius: 0;
	max-width: none;
}
