/*
Theme Name: Dima Botezatu
Theme URI: https://github.com/dimabotezatu/dimabotezatu-theme
Author: Dima Botezatu
Author URI: https://dimabotezatu.com/
Description: A calm, typographic block theme for a personal site and public journal of ideas. Editorial post numbering, a 720px reading column, locally hosted Source Serif 4 and Manrope, no frontend JavaScript by default, and a hand-tuned dark scheme.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dimabotezatu
Tags: blog, one-column, block-patterns, full-site-editing, custom-colors, custom-menu, editor-style, accessibility-ready, translation-ready, threaded-comments
*/

/* ---------------------------------------------------------------------------
   Contents
   1.  Tokens
   2.  Dark scheme
   3.  Base
   4.  Accessibility
   5.  Header
   6.  Footer
   7.  Editorial post list
   8.  Single post
   9.  Pages: Now and Interests
   10. Search and 404
   11. Content elements
   12. Pagination
   13. Print
   --------------------------------------------------------------------------- */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
	--dbz-rule: var( --wp--preset--color--rule );
	--dbz-measure: 45rem;
	--dbz-number-width: 3.25rem;
	--dbz-number-gap: 1.25rem;
	--dbz-focus-width: 2px;
	--dbz-focus-offset: 3px;
	--dbz-transition: 120ms;
}

/* 2. Dark scheme ------------------------------------------------------------
   Hand-tuned rather than inverted. Every pair is verified against WCAG 2.2 AA.
   Only the presets are re-pointed, so any block using a theme colour follows.
   --------------------------------------------------------------------------- */

@media ( prefers-color-scheme: dark ) {
	:root {
		--wp--preset--color--base: #17160F;
		--wp--preset--color--surface: #221F17;
		--wp--preset--color--rule: #3A3527;
		--wp--preset--color--secondary: #A9A493;
		--wp--preset--color--contrast: #EFEADC;
		--wp--preset--color--accent: #E5876A;
	}

	html {
		color-scheme: dark;
	}

	/* Keep media from glaring against a dark page. */
	img:not( [src$=".svg"] ),
	video {
		opacity: 0.92;
	}
}

/* 3. Base ------------------------------------------------------------------ */

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 2rem;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
	text-rendering: optimizeLegibility;
}

/* Nothing may push the page sideways. */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

::selection {
	background-color: var( --wp--preset--color--accent );
	color: var( --wp--preset--color--base );
}

hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var( --dbz-rule );
	opacity: 1;
	margin-block: var( --wp--preset--spacing--40 );
}

.wp-block-separator.is-style-asterism {
	border: 0;
	text-align: center;
	overflow: visible;
	height: 0;
}

.wp-block-separator.is-style-asterism::before {
	content: "···";
	display: block;
	color: var( --wp--preset--color--secondary );
	font-family: var( --wp--preset--font-family--serif );
	font-size: 1.25rem;
	letter-spacing: 0.4em;
	line-height: 1;
	transform: translateY( -50% );
}

/* 4. Accessibility --------------------------------------------------------- */

:where( a, button, input, select, textarea, summary, [tabindex] ):focus-visible {
	outline: var( --dbz-focus-width ) solid var( --wp--preset--color--contrast );
	outline-offset: var( --dbz-focus-offset );
	border-radius: 1px;
}

/* Never remove the ring for keyboard users; only hide it for pointer clicks. */
:where( a, button ):focus:not( :focus-visible ) {
	outline: none;
}

.skip-link {
	background-color: var( --wp--preset--color--base );
	color: var( --wp--preset--color--contrast );
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	display: block;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.75rem 1.25rem;
	z-index: 100000;
	border: 1px solid var( --wp--preset--color--contrast );
	text-decoration: none;
}

@media ( prefers-reduced-motion: reduce ) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 5. Header ---------------------------------------------------------------- */

/*
 * The rule sits on the inner element, not the header itself, so it lines up
 * with the reading column instead of bleeding to the viewport edges.
 */
.dbz-header {
	padding-top: clamp( 0.9rem, 2vw, 1.15rem );
}

.dbz-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.35rem 1.5rem;
	padding-bottom: clamp( 0.75rem, 1.6vw, 0.95rem );
	border-bottom: 1px solid var( --dbz-rule );
}

.dbz-header .wp-block-site-title {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.3;
}

.dbz-header .wp-block-site-title a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color var( --dbz-transition ) ease;
}

.dbz-header .wp-block-site-title a:hover {
	border-bottom-color: var( --wp--preset--color--contrast );
}

/*
 * The navigation carries only four short items, so it never needs an overlay
 * or a hamburger. That keeps it keyboard friendly and entirely JavaScript free.
 */
.dbz-header .wp-block-navigation {
	font-family: var( --wp--preset--font-family--sans );
	font-size: 0.875rem;
	font-weight: 500;
}

.dbz-header .wp-block-navigation__container {
	gap: clamp( 0.8rem, 2.6vw, 1.35rem );
	flex-wrap: wrap;
}

/*
 * Padding keeps each link at least 24px tall so the compact header still
 * satisfies WCAG 2.2 target size, without adding visible height.
 */
.dbz-header .wp-block-navigation-item__content {
	text-decoration: none;
	padding-block: 0.3rem;
	border-bottom: 1px solid transparent;
	transition: border-color var( --dbz-transition ) ease, color var( --dbz-transition ) ease;
}

.dbz-header .wp-block-navigation-item__content:hover,
.dbz-header .current-menu-item > .wp-block-navigation-item__content {
	color: var( --wp--preset--color--contrast );
	border-bottom-color: var( --wp--preset--color--accent );
}

@media ( max-width: 480px ) {
	.dbz-header__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
}

/* 6. Footer ---------------------------------------------------------------- */

.dbz-footer {
	margin-top: var( --wp--preset--spacing--60 );
	padding-bottom: var( --wp--preset--spacing--40 );
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
}

/* Matches the header: the rule aligns with the reading column. */
.dbz-footer__inner {
	padding-top: var( --wp--preset--spacing--30 );
	border-top: 1px solid var( --dbz-rule );
}

.dbz-footer a {
	color: var( --wp--preset--color--secondary );
	text-decoration: none;
	border-bottom: 1px solid var( --dbz-rule );
	transition: color var( --dbz-transition ) ease, border-color var( --dbz-transition ) ease;
}

.dbz-footer a:hover {
	color: var( --wp--preset--color--contrast );
	border-bottom-color: var( --wp--preset--color--contrast );
}

.dbz-footer .wp-block-navigation {
	font-size: var( --wp--preset--font-size--tiny );
}

.dbz-footer .wp-block-navigation__container {
	gap: 0.4rem 1.15rem;
	flex-wrap: wrap;
}

/* Restrained text links, never platform-coloured buttons. */
.dbz-social__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dbz-social__item {
	margin: 0;
}

.dbz-footer__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

/* 7. Editorial post list ---------------------------------------------------
   A typographic list with a strong hierarchy, not a grid of identical cards.
   --------------------------------------------------------------------------- */

.dbz-entries.wp-block-post-template,
ul.dbz-entries {
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.dbz-entries > li {
	margin: 0;
	padding-block: clamp( 1.35rem, 3vw, 1.9rem );
	border-bottom: 1px solid var( --dbz-rule );
}

.dbz-entries > li:first-child {
	border-top: 1px solid var( --dbz-rule );
}

.dbz-entry {
	display: grid;
	grid-template-columns: var( --dbz-number-width ) minmax( 0, 1fr );
	column-gap: var( --dbz-number-gap );
	align-items: start;
}

/*
 * The number is the identity motif: tabular, tracked, and sized to sit beside
 * the title without competing with it.
 */
.dbz-entry__number {
	margin: 0;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	letter-spacing: 0.06em;
	line-height: 1.6;
	color: var( --wp--preset--color--accent );
	padding-top: 0.28em;
}

/* Without the numbering plugin the paragraph is empty; collapse it cleanly. */
.dbz-entry__number:empty {
	display: none;
}

.dbz-entry__body {
	min-width: 0;
}

.dbz-entry__title {
	margin: 0;
	font-size: var( --wp--preset--font-size--large );
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.012em;
}

.dbz-entry__title a {
	text-decoration: none;
	background-image: linear-gradient( currentColor, currentColor );
	background-size: 0 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size var( --dbz-transition ) ease;
}

.dbz-entry__title a:hover,
.dbz-entry__title a:focus-visible {
	background-size: 100% 1px;
}

.dbz-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0.55rem;
	margin-top: 0.4rem;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	line-height: 1.5;
	color: var( --wp--preset--color--secondary );
}

.dbz-meta > * {
	margin: 0;
	font-size: inherit;
	color: inherit;
}

/* Separators are generated, so an absent item never leaves a stray dot. */
.dbz-meta > * + *::before {
	content: "·";
	margin-right: 0.55rem;
	color: var( --wp--preset--color--rule );
}

.dbz-meta a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var( --dbz-rule );
}

.dbz-meta a:hover {
	color: var( --wp--preset--color--contrast );
	border-bottom-color: var( --wp--preset--color--contrast );
}

.dbz-entry__excerpt {
	margin-top: 0.55rem;
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.6;
	color: var( --wp--preset--color--secondary );
	max-width: 38rem;
}

.dbz-entry__excerpt p {
	margin: 0;
}

.dbz-entry__excerpt .wp-block-post-excerpt__more-link {
	display: none;
}

@media ( max-width: 599px ) {
	:root {
		--dbz-number-width: 2.6rem;
		--dbz-number-gap: 0.9rem;
	}

	.dbz-entry__title {
		font-size: 1.1875rem;
	}
}

/* 8. Single post ----------------------------------------------------------- */

.dbz-post-header {
	margin-bottom: var( --wp--preset--spacing--40 );
}

.dbz-post-header__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0.6rem;
	margin-bottom: 1rem;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var( --wp--preset--color--secondary );
}

.dbz-post-header__number {
	margin: 0;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	color: var( --wp--preset--color--accent );
}

.dbz-post-header__number:empty {
	display: none;
}

.dbz-post-header__eyebrow .wp-block-post-terms {
	font-size: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.dbz-post-header__eyebrow > * + *::before {
	content: "·";
	margin-right: 0.6rem;
	color: var( --wp--preset--color--rule );
}

.dbz-post-title {
	margin: 0;
	font-size: var( --wp--preset--font-size--xx-large );
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

/* The optional lead sits between title and body, quieter than both. */
.dbz-lead {
	margin-top: 1.15rem;
	font-size: var( --wp--preset--font-size--large );
	line-height: 1.45;
	color: var( --wp--preset--color--secondary );
	font-weight: 400;
	max-width: 40rem;
}

.dbz-post-meta {
	margin-top: 1.35rem;
	padding-top: 1rem;
	border-top: 1px solid var( --dbz-rule );
}

.dbz-featured-image {
	margin-block: var( --wp--preset--spacing--40 );
}

.dbz-featured-image img {
	width: 100%;
	height: auto;
}

.dbz-entry-content {
	font-size: var( --wp--preset--font-size--medium );
	line-height: 1.7;
}

.dbz-entry-content > * {
	margin-block: 1.35em 0;
}

.dbz-entry-content > *:first-child {
	margin-top: 0;
}

.dbz-entry-content > h2 {
	margin-top: 2.25em;
}

.dbz-entry-content > h3 {
	margin-top: 1.9em;
}

.dbz-entry-content > h4 {
	margin-top: 1.7em;
}

.dbz-post-footer {
	margin-top: var( --wp--preset--spacing--50 );
	padding-top: var( --wp--preset--spacing--30 );
	border-top: 1px solid var( --dbz-rule );
}

.dbz-author-note {
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.65;
	color: var( --wp--preset--color--secondary );
}

.dbz-follow {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.6;
}

/* Previous / next */
.dbz-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var( --wp--preset--spacing--30 );
	margin-top: var( --wp--preset--spacing--40 );
}

.dbz-post-nav .wp-block-post-navigation-link {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
}

.dbz-post-nav .post-navigation-link-next {
	text-align: right;
}

.dbz-post-nav a {
	display: block;
	margin-top: 0.3rem;
	font-family: var( --wp--preset--font-family--serif );
	font-size: var( --wp--preset--font-size--medium );
	font-weight: 600;
	line-height: 1.3;
	color: var( --wp--preset--color--contrast );
	text-decoration: none;
}

.dbz-post-nav a:hover {
	color: var( --wp--preset--color--accent );
}

@media ( max-width: 599px ) {
	.dbz-post-nav {
		grid-template-columns: 1fr;
	}

	.dbz-post-nav .post-navigation-link-next {
		text-align: left;
	}
}

/* Related */
.dbz-related__heading {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var( --wp--preset--color--secondary );
	margin-bottom: 1rem;
}

/* 9. Pages: Now and Interests ---------------------------------------------- */

.dbz-page-title {
	margin-bottom: 0.5rem;
}

.dbz-page-intro {
	font-size: var( --wp--preset--font-size--large );
	line-height: 1.5;
	color: var( --wp--preset--color--secondary );
	max-width: 38rem;
}

.dbz-updated {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
	letter-spacing: 0.02em;
}

.dbz-updated:empty {
	display: none;
}

.dbz-now-section + .dbz-now-section {
	margin-top: var( --wp--preset--spacing--40 );
}

.dbz-section-label {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var( --wp--preset--color--secondary );
	margin-bottom: 0.85rem;
}

/* Books: cover beside a personal note. */
.dbz-books {
	display: grid;
	gap: var( --wp--preset--spacing--30 );
}

.dbz-book {
	display: grid;
	grid-template-columns: 5.5rem minmax( 0, 1fr );
	gap: 1.25rem;
	align-items: start;
}

.dbz-book img {
	width: 100%;
	height: auto;
	border: 1px solid var( --dbz-rule );
}

.dbz-book__title {
	margin: 0;
	font-size: var( --wp--preset--font-size--medium );
	font-weight: 600;
	line-height: 1.3;
}

.dbz-book__author {
	margin: 0.15rem 0 0;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
}

.dbz-book__note {
	margin: 0.5rem 0 0;
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.6;
	color: var( --wp--preset--color--secondary );
}

/* Films: a restrained poster grid. */
.dbz-films {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 8.5rem, 1fr ) );
	gap: var( --wp--preset--spacing--30 );
}

.dbz-film img {
	width: 100%;
	height: auto;
	border: 1px solid var( --dbz-rule );
}

.dbz-film__title {
	margin: 0.6rem 0 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.dbz-film__credit {
	margin: 0.15rem 0 0;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
}

.dbz-film__note {
	margin: 0.35rem 0 0;
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.55;
	color: var( --wp--preset--color--secondary );
}

/* Music and other lists. */
.dbz-listing {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dbz-listing > li {
	padding-block: 0.7rem;
	border-bottom: 1px solid var( --dbz-rule );
}

.dbz-listing > li:first-child {
	border-top: 1px solid var( --dbz-rule );
}

.dbz-listing__primary {
	font-weight: 600;
}

.dbz-listing__secondary {
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	color: var( --wp--preset--color--secondary );
}

/* 10. Search and 404 -------------------------------------------------------- */

.dbz-search-form .wp-block-search__inside-wrapper {
	border: 1px solid var( --wp--preset--color--secondary );
	border-radius: 2px;
	padding: 0.15rem;
	background-color: transparent;
}

.dbz-search-form .wp-block-search__input {
	border: 0;
	background: transparent;
	color: var( --wp--preset--color--contrast );
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
	padding: 0.55rem 0.7rem;
}

.dbz-search-form .wp-block-search__input:focus {
	outline: none;
}

.dbz-search-form .wp-block-search__inside-wrapper:focus-within {
	outline: var( --dbz-focus-width ) solid var( --wp--preset--color--contrast );
	outline-offset: var( --dbz-focus-offset );
}

.dbz-search-form .wp-block-search__button {
	border: 0;
	background-color: var( --wp--preset--color--contrast );
	color: var( --wp--preset--color--base );
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 600;
	padding: 0.55rem 1rem;
	border-radius: 1px;
	cursor: pointer;
}

.dbz-search-form .wp-block-search__button:hover {
	background-color: var( --wp--preset--color--accent );
}

.dbz-empty-state {
	max-width: 34rem;
}

.dbz-empty-state__title {
	margin-bottom: 0.75rem;
}

.dbz-empty-state p {
	color: var( --wp--preset--color--secondary );
}

.dbz-404-number {
	font-family: var( --wp--preset--font-family--sans );
	font-size: clamp( 3rem, 12vw, 5rem );
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	line-height: 1;
	color: var( --wp--preset--color--rule );
	margin-bottom: 1rem;
}

/* 11. Content elements ------------------------------------------------------ */

.dbz-entry-content :where( h2, h3, h4, h5, h6 ) {
	text-wrap: balance;
}

.dbz-entry-content p a,
.dbz-entry-content li a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

.wp-block-quote {
	border-left: 2px solid var( --wp--preset--color--accent );
	font-style: normal;
}

.wp-block-quote.is-style-editorial {
	border-left: 0;
	padding-left: 0;
	text-align: center;
	font-family: var( --wp--preset--font-family--serif );
	font-size: var( --wp--preset--font-size--x-large );
	line-height: 1.3;
	letter-spacing: -0.015em;
	max-width: 34rem;
	margin-inline: auto;
}

.wp-block-quote cite,
.wp-block-pullquote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--tiny );
	font-style: normal;
	color: var( --wp--preset--color--secondary );
}

.wp-block-pullquote {
	border-top: 1px solid var( --dbz-rule );
	border-bottom: 1px solid var( --dbz-rule );
	padding-block: var( --wp--preset--spacing--30 );
}

.wp-block-code {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-code code {
	white-space: pre;
	tab-size: 2;
}

:not( pre ) > code {
	background-color: var( --wp--preset--color--surface );
	border: 1px solid var( --dbz-rule );
	border-radius: 2px;
	padding: 0.1em 0.35em;
	font-family: var( --wp--preset--font-family--mono );
	font-size: 0.875em;
}

.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border-bottom: 1px solid var( --dbz-rule );
	padding: 0.6rem 0.75rem;
	text-align: left;
}

.wp-block-table th {
	font-weight: 700;
	border-bottom-color: var( --wp--preset--color--secondary );
}

.wp-block-image.is-style-framed img {
	border: 1px solid var( --dbz-rule );
}

/*
 * A byline-sized portrait, deliberately small so it reads as editorial rather
 * than as a hero image. The fixed ratio means any photograph crops tidily
 * without the author having to prepare one.
 */
.wp-block-image.is-style-portrait {
	margin-block: 0 1.75rem;
}

/*
 * Square ratio, not 4:5 — a circle needs equal sides or the radius renders an
 * ellipse. object-position sits slightly above centre because faces usually do.
 */
.wp-block-image.is-style-portrait img {
	display: block;
	width: clamp( 5rem, 18vw, 7rem );
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center 25%;
	border: 1px solid var( --dbz-rule );
	border-radius: 50%;
}

.wp-block-image.is-style-portrait figcaption {
	max-width: 14rem;
	margin-top: 0.5rem;
}

/*
 * The introduction keeps the theme's heading scale rather than the display
 * size: the name sits one step above the lead, the lead one step above the
 * body, and every paragraph shares a measure so the block reads as one voice.
 */
.dbz-intro .dbz-page-title {
	margin-bottom: 0;
	text-wrap: balance;
}

.dbz-intro p {
	max-width: 40rem;
	text-wrap: pretty;
}

/*
 * Two-column introduction: the portrait on the left, the name and lead beside
 * it, and the remaining paragraphs running the full measure underneath. The
 * grid track sizes the photograph, so the image just fills its column.
 */
.dbz-intro--portrait {
	display: grid;
	grid-template-columns: minmax( 0, clamp( 7rem, 24vw, 12.5rem ) ) minmax( 0, 1fr );
	column-gap: clamp( 1.5rem, 4vw, 2.5rem );
	align-items: start;
}

.dbz-intro--portrait > .wp-block-image {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
}

.dbz-intro--portrait > .wp-block-image img {
	width: 100%;
}

.dbz-intro--portrait > .dbz-intro__head {
	grid-column: 2;
	grid-row: 1;
}

.dbz-intro--portrait > p {
	grid-column: 1 / -1;
}

/* Below this width the two columns stop earning their keep; stack them. */
@media ( max-width: 640px ) {
	.dbz-intro--portrait {
		grid-template-columns: 1fr;
	}

	.dbz-intro--portrait > .wp-block-image,
	.dbz-intro--portrait > .dbz-intro__head,
	.dbz-intro--portrait > p {
		grid-column: 1;
		grid-row: auto;
	}

	.dbz-intro--portrait > .wp-block-image {
		margin-bottom: 1.35rem;
	}

	.dbz-intro--portrait > .wp-block-image img {
		width: clamp( 6rem, 32vw, 9rem );
	}
}

.wp-block-image figcaption,
.wp-block-embed figcaption {
	margin-top: 0.6rem;
	text-align: left;
}

.wp-block-list.is-style-spaced > li {
	margin-bottom: 0.6em;
}

.wp-block-group.is-style-card {
	border: 1px solid var( --dbz-rule );
	padding: var( --wp--preset--spacing--30 );
	border-radius: 2px;
}

/* Footnotes */
.wp-block-footnotes {
	border-top: 1px solid var( --dbz-rule );
	padding-top: var( --wp--preset--spacing--20 );
	margin-top: var( --wp--preset--spacing--40 );
}

.wp-block-footnotes li {
	margin-bottom: 0.5em;
}

a[href^="#"][id^="footnote-anchor"],
sup a {
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

/* Images never overflow their column. */
img,
video,
iframe,
figure {
	max-width: 100%;
}

img {
	height: auto;
}

/* Code copy button, added only when a code block is present. */
.dbz-copy {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	font-family: var( --wp--preset--font-family--sans );
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.4rem 0.6rem;
	color: var( --wp--preset--color--secondary );
	background-color: var( --wp--preset--color--base );
	border: 1px solid var( --dbz-rule );
	border-radius: 2px;
	cursor: pointer;
	opacity: 0;
	transition: opacity var( --dbz-transition ) ease;
}

.dbz-code-wrap {
	position: relative;
}

.dbz-code-wrap:hover .dbz-copy,
.dbz-copy:focus-visible {
	opacity: 1;
}

.dbz-copy:hover {
	color: var( --wp--preset--color--contrast );
	border-color: var( --wp--preset--color--secondary );
}

/* 12. Pagination ------------------------------------------------------------ */

.dbz-pagination {
	margin-top: var( --wp--preset--spacing--40 );
	font-family: var( --wp--preset--font-family--sans );
	font-size: var( --wp--preset--font-size--small );
}

.dbz-pagination .wp-block-query-pagination-numbers,
.dbz-pagination .wp-block-query-pagination-previous,
.dbz-pagination .wp-block-query-pagination-next {
	color: var( --wp--preset--color--secondary );
}

.dbz-pagination a {
	color: var( --wp--preset--color--secondary );
	text-decoration: none;
	border-bottom: 1px solid var( --dbz-rule );
}

.dbz-pagination a:hover {
	color: var( --wp--preset--color--contrast );
	border-bottom-color: var( --wp--preset--color--contrast );
}

.dbz-pagination .page-numbers.current {
	color: var( --wp--preset--color--contrast );
	font-weight: 700;
}

/* 13. Print ----------------------------------------------------------------- */

@media print {
	.dbz-header,
	.dbz-footer,
	.dbz-post-nav,
	.dbz-related,
	.dbz-follow,
	.dbz-copy,
	.skip-link {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11pt;
	}

	.dbz-entry-content a::after {
		content: " (" attr( href ) ")";
		font-size: 0.85em;
		word-break: break-all;
	}
}
