/*
 * RobotThoughts Workbench — front-end and editor CSS.
 * Colors and fonts come from theme.json custom properties, so the Daylight
 * and Terminal style variations flow through without extra rules.
 */

:root {
	--rt-bg: var(--wp--preset--color--bg);
	--rt-raised: var(--wp--preset--color--bg-raised);
	--rt-inset: var(--wp--preset--color--bg-inset);
	--rt-fg: var(--wp--preset--color--fg);
	--rt-muted: var(--wp--preset--color--fg-muted);
	--rt-subtle: var(--wp--preset--color--fg-subtle);
	--rt-accent: var(--wp--preset--color--accent);
	--rt-warm: var(--wp--preset--color--accent-warm);
	--rt-border: var(--wp--preset--color--border);
	--rt-border-strong: var(--wp--preset--color--border-strong);
	--rt-mono: var(--wp--preset--font-family--mono);
	--rt-display: var(--wp--preset--font-family--display);
	--rt-wide: 1120px;
	--rt-gutter: 24px;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(a):focus-visible,
:where(button):focus-visible,
:where(input):focus-visible {
	outline: 2px solid var(--rt-accent);
	outline-offset: 2px;
}

.rt-pixel img,
.wp-block-image.is-style-pixelated img {
	image-rendering: pixelated;
}

/* ---------- Layout helpers ---------- */

.rt-wrap {
	box-sizing: border-box;
	max-width: var(--rt-wide);
	margin-inline: auto;
	padding-inline: var(--rt-gutter);
}

.rt-body .wp-site-blocks > * {
	margin-block: 0;
}

.rt-body .rt-main {
	margin-block: 0;
	padding-bottom: 80px;
}

.rt-body .rt-sections {
	display: flex;
	flex-direction: column;
	gap: 72px;
	padding-top: 64px;
}

.rt-body .rt-sections > *,
.rt-body .rt-section > * {
	margin-block: 0;
}

.rt-body .rt-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.rt-overline,
.rt-body .rt-overline {
	margin: 0;
	font-family: var(--rt-mono);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

.rt-overline a {
	text-decoration: none;
}

/* Section title: short pixel-font label followed by a dashed rule. */
.rt-body .rt-section-title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	font-family: var(--rt-display);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	color: var(--rt-accent);
}

.rt-section-title::after {
	content: "";
	flex: 1 1 0;
	border-top: 1px dashed var(--rt-border-strong);
}

/* ---------- Header ---------- */
/*
 * Lockup: the Site Logo stands on the header's bottom rule, and the name,
 * tagline and menu stack beside it so together they match the logo's height.
 */

/* Header ground matches the Site Logo GIF's own background (#092A52) so the
   logo blends into the header. Change --rt-header-bg if the logo changes. */
.rt-site-header {
	--rt-header-bg: #092A52;
	border-bottom: 2px solid var(--rt-border-strong);
	background: var(--rt-header-bg);
}

.rt-body .rt-header-inner {
	box-sizing: border-box;
	max-width: var(--rt-wide);
	margin-inline: auto;
	padding: 16px var(--rt-gutter) 0;
	gap: 28px;
	align-items: flex-end;
}

.rt-body .rt-header-inner > * {
	margin: 0;
}

/* Site Logo (Settings > General, or the Site Editor). Animated GIFs play as uploaded. */
.rt-logo,
.rt-logo a {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

.rt-logo img {
	display: block;
	width: 136px;
	height: auto;
	border-radius: 0;
}

.rt-body .rt-header-main {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rt-body .rt-header-main > * {
	margin: 0;
}

.rt-body .rt-header-top {
	gap: 24px;
	align-items: center;
}

.rt-body .rt-brand {
	margin: 0;
	font-family: var(--rt-display);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.3;
}

.rt-site-header .rt-brand {
	font-size: clamp(15px, 2.6vw, 28px);
}

.rt-brand a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	color: var(--rt-accent);
	text-decoration: none;
}

/* The still mascot marks the footer brand; the header uses the Site Logo. */
.rt-site-footer .rt-brand a::before {
	content: "";
	flex: 0 0 34px;
	width: 34px;
	height: 44px;
	background: url(../images/mascot-small.png) center / contain no-repeat;
}

.rt-body .rt-tagline {
	font-family: var(--rt-mono);
	font-size: 14px;
	line-height: 1.5;
	color: var(--rt-muted);
}

.rt-nav {
	font-family: var(--rt-mono);
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rt-site-header nav.rt-nav {
	margin-top: 10px;
	border-top: 1px dashed var(--rt-border-strong);
}

.rt-nav .wp-block-navigation__container {
	gap: 4px;
}

.rt-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 52px;
	box-sizing: border-box;
	padding: 0 16px;
	color: var(--rt-muted);
	border-bottom: 4px solid transparent;
}

.rt-nav .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	padding-left: 0;
}

.rt-nav .wp-block-navigation-item__content:hover,
.rt-nav .current-menu-item > .wp-block-navigation-item__content,
.rt-nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--rt-accent);
	border-bottom-color: var(--rt-accent);
}

.rt-nav .wp-block-navigation__responsive-container-open,
.rt-nav .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 48px;
	justify-content: center;
	align-items: center;
	color: var(--rt-fg);
}

.rt-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px;
}

.rt-nav .is-menu-open .wp-block-navigation-item__content {
	padding-left: 0;
}

.rt-nav .wp-block-navigation__submenu-container {
	background: var(--rt-raised);
	border: 1px solid var(--rt-border-strong);
}

@media (max-width: 781px) {
	.rt-body .rt-header-inner {
		gap: 16px;
	}

	.rt-logo img {
		width: 96px;
	}

	.rt-body .rt-tagline {
		font-size: 13px;
	}
}

@media (max-width: 599px) {
	.rt-logo img {
		width: 76px;
	}

	.rt-body .rt-tagline {
		display: none;
	}

	.rt-site-header nav.rt-nav {
		margin-top: 0;
	}
}

/* Search: icon button that opens a field. */
.rt-search .wp-block-search__inside-wrapper {
	border: 0;
	padding: 0;
	gap: 8px;
}

.rt-search .wp-block-search__input {
	min-height: 44px;
	padding: 0 12px;
	background: var(--rt-inset);
	color: var(--rt-fg);
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
	font-family: var(--rt-mono);
	font-size: 14px;
}

.rt-search .wp-block-search__button {
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rt-search.wp-block-search__button-only .wp-block-search__button {
	background: transparent;
	color: var(--rt-muted);
	border: 1px solid var(--rt-border-strong);
}

.rt-search.wp-block-search__button-only .wp-block-search__button:hover {
	color: var(--rt-accent);
	border-color: var(--rt-accent);
}

/* ---------- Bands (hero, page heads) ---------- */

.rt-band {
	position: relative;
	overflow: hidden;
	background: var(--rt-raised);
	border-bottom: 1px solid var(--rt-border);
}

.rt-band::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url(../images/pattern-hex.png) repeat;
	background-size: 72px 84px;
	image-rendering: pixelated;
	opacity: 0.09;
	pointer-events: none;
}

.rt-band > * {
	position: relative;
}

.rt-body .rt-hero-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px;
	padding-block: 72px 56px;
}

.rt-body .rt-hero-inner > * {
	margin-block: 0;
}

.rt-body .rt-hero-copy {
	flex: 999 1 480px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.rt-body .rt-hero-copy > * {
	margin-block: 0;
}

.rt-body .rt-hero-title {
	font-family: var(--rt-display);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.3;
	color: var(--rt-accent);
}

.rt-body .rt-hero-lead {
	max-width: 560px;
	font-size: var(--wp--preset--font-size--body-lg);
	line-height: 1.6;
}

.rt-hero-mascot {
	flex: 1 1 240px;
	display: flex;
	justify-content: center;
	margin: 0;
}

.rt-hero-mascot img {
	width: 258px;
	max-width: 60vw;
	height: auto;
	aspect-ratio: 258 / 331;
	image-rendering: pixelated;
	border-radius: 0;
}

.rt-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 16px 0 0;
	font-family: var(--rt-mono);
}

.rt-stat {
	display: flex;
	flex-direction: column-reverse;
	gap: 4px;
}

.rt-stat dd {
	margin: 0;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--rt-fg);
}

.rt-stat dt {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rt-subtle);
}

/* ---------- Buttons ---------- */

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	box-sizing: border-box;
	text-decoration: none;
}

.wp-block-button:not(.is-style-ghost):not(.is-style-outline) .wp-block-button__link {
	box-shadow: 4px 4px 0 var(--rt-warm);
}

.wp-block-button.is-style-ghost .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--rt-fg);
	border: 2px solid var(--rt-border-strong);
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--rt-accent);
	color: var(--rt-accent);
}

/* ---------- Post cards ---------- */

.rt-body .wp-block-post-template {
	margin: 0;
	padding: 0;
}

.rt-body .rt-grid.wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 24px;
}

.rt-body .rt-grid.wp-block-post-template > li {
	margin: 0;
	display: flex;
	min-width: 0;
}

.rt-body .rt-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	background: var(--rt-raised);
	border: 2px solid var(--rt-border);
	border-radius: 4px;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.rt-body .rt-card:hover,
.rt-body .rt-card:focus-within {
	border-color: var(--rt-border-strong);
}

.rt-body .rt-card > *,
.rt-body .rt-card-body > * {
	margin-block: 0;
}

.rt-body .rt-card-body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 12px;
	padding: 20px;
}

.rt-thumb,
.rt-body .rt-thumb {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--rt-inset);
}

.rt-thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.rt-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.rt-thumb--fallback::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url(../images/pattern-hex.png) repeat;
	background-size: 72px 84px;
	image-rendering: pixelated;
	opacity: 0.18;
}

.rt-thumb--fallback a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	text-decoration: none;
}

.rt-thumb-label {
	font-family: var(--rt-display);
	font-size: 12px;
	line-height: 1.6;
	text-align: center;
	color: var(--rt-accent);
	text-transform: uppercase;
}

.rt-body .rt-card .wp-block-post-terms,
.rt-body .rt-feature-card .wp-block-post-terms {
	font-family: var(--rt-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

.rt-card .wp-block-post-terms a,
.rt-feature-card .wp-block-post-terms a {
	text-decoration: none;
}

.rt-body .rt-card .wp-block-post-title {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}

.rt-card .wp-block-post-title a,
.rt-feature-card .wp-block-post-title a {
	color: var(--rt-fg);
	text-decoration: none;
}

.rt-card .wp-block-post-title a:hover,
.rt-feature-card .wp-block-post-title a:hover {
	color: var(--rt-accent);
}

.rt-body .rt-card .wp-block-post-excerpt {
	font-size: 15px;
	line-height: 1.55;
	color: var(--rt-muted);
}

.rt-body .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.rt-body .rt-card .wp-block-post-date {
	margin-top: auto;
	padding-top: 4px;
}

/* Featured card */
.rt-body .rt-feature-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background: var(--rt-raised);
	border: 2px solid var(--rt-border);
	border-radius: 4px;
	overflow: hidden;
}

.rt-body .rt-feature-card > *,
.rt-body .rt-feature-body > * {
	margin-block: 0;
}

.rt-body .rt-feature-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
	padding: 32px;
	min-width: 0;
}

.rt-body .rt-feature-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--h-2);
	line-height: 1.25;
}

.rt-body .rt-feature-card .wp-block-post-excerpt {
	color: var(--rt-muted);
}

.rt-body .rt-more,
.rt-body .wp-block-read-more {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	min-height: 44px;
	font-family: var(--rt-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--rt-accent);
}

.rt-body .wp-block-read-more:hover {
	color: var(--rt-warm);
}

@media (min-width: 782px) {
	.rt-body .rt-feature-card {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.rt-body .rt-feature-card .rt-thumb {
		aspect-ratio: auto;
		min-height: 320px;
		height: 100%;
	}

	/* Take the image out of flow so a tall photo cannot stretch the card. */
	.rt-body .rt-feature-card .rt-thumb:not(.rt-thumb--fallback) a {
		position: absolute;
		inset: 0;
	}
}

/* ---------- Topic chips (Categories block) ---------- */

.rt-body .rt-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--rt-mono);
	font-size: 14px;
	color: var(--rt-accent);
	font-weight: 600;
}

.rt-chips li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
}

.rt-chips li:hover {
	border-color: var(--rt-accent);
}

.rt-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rt-fg);
	font-weight: 400;
	text-decoration: none;
}

/* ---------- Archive band ---------- */

.rt-body .rt-archive-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px 32px;
	padding: 40px;
	background: var(--rt-accent);
	color: var(--rt-bg);
	border-radius: 4px;
	box-shadow: 6px 6px 0 var(--rt-warm);
}

.rt-body .rt-archive-band > *,
.rt-body .rt-archive-copy > * {
	margin-block: 0;
}

.rt-body .rt-archive-badge {
	flex: 0 0 88px;
	margin: 0;
}

.rt-archive-badge img {
	display: block;
	width: 88px;
	height: 88px;
	image-rendering: pixelated;
	border-radius: 0;
}

.rt-body .rt-archive-copy {
	flex: 999 1 380px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rt-body .rt-archive-band .rt-overline,
.rt-body .rt-archive-band h2 {
	color: var(--rt-bg);
}

.rt-body .rt-archive-band .rt-overline {
	font-weight: 600;
	font-size: 12px;
}

.rt-body .rt-archive-band h2 {
	font-weight: 700;
	line-height: 1.25;
}

.rt-body .rt-archive-band .wp-block-button__link {
	background: var(--rt-bg);
	color: var(--rt-accent);
	border-color: var(--rt-bg);
	box-shadow: none;
}

/* ---------- Page and archive heads ---------- */

.rt-body .rt-page-head-inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-block: 56px 48px;
}

.rt-body .rt-page-head-inner > * {
	margin-block: 0;
}

.rt-body .rt-page-head-inner .wp-block-post-title,
.rt-body .rt-page-head-inner .wp-block-query-title {
	max-width: 880px;
}

.rt-body .rt-page-head-inner .wp-block-term-description {
	max-width: 720px;
	color: var(--rt-muted);
}

.rt-body .rt-meta {
	gap: 4px 12px;
	font-family: var(--rt-mono);
	font-size: 14px;
	color: var(--rt-subtle);
}

.rt-body .rt-meta > * {
	margin: 0;
}

.rt-meta p {
	margin: 0;
}

.rt-meta > * + *::before {
	content: "·";
	margin-right: 12px;
}

.rt-body .rt-meta .wp-block-post-date {
	font-size: 14px;
}

.rt-body .rt-listing {
	padding-top: 48px;
}

/* ---------- Single post ---------- */

.rt-body .rt-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 720px);
	justify-content: center;
	gap: 56px;
	padding-top: 48px;
}

.rt-body .rt-single-grid > * {
	margin-block: 0;
	min-width: 0;
}

.rt-body .rt-rail {
	display: none;
}

@media (min-width: 1040px) {
	.rt-body.rt-has-toc .rt-single-grid {
		grid-template-columns: minmax(0, 720px) minmax(220px, 280px);
		justify-content: space-between;
	}

	.rt-body.rt-has-toc .rt-rail {
		display: block;
		position: sticky;
		top: 32px;
		align-self: start;
	}
}

.rt-toc {
	padding: 20px;
	border: 2px solid var(--rt-border);
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.4;
}

.rt-body .rt-toc-title {
	margin: 0 0 8px;
	font-family: var(--rt-display);
	font-weight: 400;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

.rt-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rt-toc a {
	display: block;
	padding: 10px 0;
	color: var(--rt-muted);
	text-decoration: none;
}

.rt-toc a:hover {
	color: var(--rt-accent);
}

.rt-body .rt-article > * {
	margin-block: 0 28px;
}

.rt-body .rt-article > .wp-block-post-featured-image {
	margin-inline: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 2px solid var(--rt-border);
	border-radius: 4px;
}

.rt-article > .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wp-block-post-content {
	font-size: 18px;
	line-height: 1.7;
}

.wp-block-post-content a {
	text-underline-offset: 3px;
}

.wp-block-post-content :where(h2, h3, h4) {
	margin-top: 1.8em;
	scroll-margin-top: 24px;
}

.wp-block-post-content :where(p, li) code,
.wp-block-post-content :where(td, th) code {
	padding: 2px 6px;
	background: var(--rt-inset);
	border: 1px solid var(--rt-border);
	border-radius: 2px;
	font-family: var(--rt-mono);
	font-size: 0.86em;
}

.wp-block-post-content pre,
.wp-block-code {
	overflow-x: auto;
	white-space: pre;
	tab-size: 4;
}

.wp-block-post-content pre:not(.wp-block-code) {
	padding: 20px;
	background: var(--rt-inset);
	border: 1px solid var(--rt-border-strong);
	border-radius: 4px;
	font-family: var(--rt-mono);
	font-size: 14px;
	line-height: 1.7;
}

.wp-block-code code {
	font-family: inherit;
	white-space: inherit;
}

.rt-code {
	position: relative;
}

.rt-code > pre {
	margin: 0;
}

.rt-code-copy {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 72px;
	min-height: 44px;
	padding: 0 14px;
	background: var(--rt-raised);
	color: var(--rt-accent);
	border: 1px solid var(--rt-border-strong);
	border-radius: 0 4px 0 4px;
	font-family: var(--rt-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease;
}

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

@media (hover: none) {
	.rt-code-copy {
		opacity: 1;
	}
}

/* Code block with a filename tab: <pre class="wp-block-code" data-filename="main.ino"> */
.wp-block-code[data-filename] {
	position: relative;
	padding-top: 56px;
}

.wp-block-code[data-filename]::before {
	content: attr(data-filename);
	position: absolute;
	top: 0;
	left: 0;
	padding: 10px 16px;
	background: var(--rt-raised);
	border-right: 1px solid var(--rt-border);
	border-bottom: 1px solid var(--rt-border);
	font-size: 13px;
	color: var(--rt-muted);
}

.wp-block-post-content :where(table) {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.wp-block-post-content :where(th, td) {
	padding: 10px 12px;
	border: 1px solid var(--rt-border-strong);
	text-align: left;
}

.wp-block-post-content :where(th) {
	background: var(--rt-raised);
	font-family: var(--rt-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

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

.wp-block-separator {
	border: 0;
	border-top: 1px dashed var(--rt-border-strong);
	background: transparent;
}

.wp-block-list.is-style-pixel-squares {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-pixel-squares li {
	position: relative;
	padding-left: 20px;
}

.wp-block-list.is-style-pixel-squares li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.65em;
	width: 6px;
	height: 6px;
	background: var(--rt-accent);
}

/* Tags under a post */
.rt-body .rt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-family: var(--rt-mono);
	font-size: 13px;
}

.rt-tags .wp-block-post-terms__separator {
	display: none;
}

.rt-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
	color: var(--rt-fg);
	text-decoration: none;
}

.rt-tags a::before {
	content: "#";
	color: var(--rt-accent);
}

.rt-tags a:hover {
	border-color: var(--rt-accent);
}

/* Callout and spec panel patterns */
.rt-callout {
	display: flex;
	gap: 16px;
	padding: 20px;
	background: var(--rt-raised);
	border: 1px solid var(--rt-accent);
	border-radius: 4px;
}

.rt-callout.is-warn {
	border-color: var(--rt-warm);
}

.rt-callout-icon {
	flex: 0 0 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rt-accent);
	color: var(--rt-bg);
	font-family: var(--rt-display);
	font-size: 14px;
}

.rt-callout.is-warn .rt-callout-icon {
	background: var(--rt-warm);
}

.rt-callout-title {
	margin: 0 0 4px;
	font-family: var(--rt-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

.rt-callout-body {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--rt-muted);
}

.rt-spec {
	padding: 20px;
	background: var(--rt-raised);
	border: 2px solid var(--rt-border);
	border-radius: 4px;
	font-family: var(--rt-mono);
	font-size: 14px;
}

.rt-spec-title {
	margin: 0 0 8px;
	font-family: var(--rt-display);
	font-weight: 400;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

.rt-spec-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--rt-border-strong);
}

.rt-spec-row:last-child {
	border-bottom: 0;
}

.rt-spec-row-label {
	color: var(--rt-subtle);
}

.rt-spec-row-value {
	font-weight: 600;
	text-align: right;
}

/* Previous / next */
.rt-body .rt-post-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 24px;
	padding-top: 64px;
}

.rt-body .rt-post-nav > * {
	margin: 0;
}

.rt-post-nav .wp-block-post-navigation-link a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: 100%;
	box-sizing: border-box;
	padding: 24px;
	background: var(--rt-raised);
	border: 2px solid var(--rt-border);
	border-radius: 4px;
	color: var(--rt-fg);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.rt-post-nav .wp-block-post-navigation-link a:hover {
	border-color: var(--rt-accent);
}

.rt-post-nav .post-navigation-link__label {
	font-family: var(--rt-mono);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rt-accent);
}

/* Comments */
.rt-body .rt-comments {
	max-width: 720px;
	margin-inline: auto;
	padding-top: 64px;
}

.rt-comments .wp-block-comment-template {
	padding: 0;
	list-style: none;
}

.rt-comments .wp-block-comment-template ol {
	list-style: none;
}

.rt-comments .wp-block-comment-template > li {
	padding: 20px 0;
	border-top: 1px dashed var(--rt-border-strong);
}

.rt-comments .wp-block-comment-date,
.rt-comments .wp-block-comment-reply-link,
.rt-comments .wp-block-comment-author-name {
	font-family: var(--rt-mono);
	font-size: 13px;
}

.rt-comments .wp-block-comment-date a {
	color: var(--rt-subtle);
	text-decoration: none;
}

.rt-comments :where(input[type="text"], input[type="email"], input[type="url"], textarea),
.rt-form-field {
	width: 100%;
	box-sizing: border-box;
	padding: 12px;
	background: var(--rt-inset);
	color: var(--rt-fg);
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
	font-family: inherit;
	font-size: 16px;
}

.rt-comments label {
	display: block;
	margin-bottom: 4px;
	font-family: var(--rt-mono);
	font-size: 13px;
	color: var(--rt-muted);
}

.rt-comments .comment-form-cookies-consent label {
	display: inline;
}

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

.rt-body .wp-block-query-pagination {
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
	font-family: var(--rt-mono);
	font-size: 14px;
}

.wp-block-query-pagination .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 12px;
	color: var(--rt-muted);
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.dots {
	border-color: transparent;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--rt-accent);
	color: var(--rt-bg);
	border-color: var(--rt-accent);
	font-weight: 600;
}

.wp-block-query-pagination a:hover {
	border-color: var(--rt-accent);
	color: var(--rt-accent);
}

/* Search form in page bodies (search results, 404) */
.rt-main .wp-block-search__inside-wrapper {
	gap: 8px;
	border: 0;
	padding: 0;
}

.rt-main .wp-block-search__input {
	min-height: 48px;
	padding: 0 14px;
	background: var(--rt-inset);
	color: var(--rt-fg);
	border: 1px solid var(--rt-border-strong);
	border-radius: 2px;
	font-family: var(--rt-mono);
	font-size: 16px;
}

.rt-main .wp-block-search__button {
	margin: 0;
	min-height: 48px;
}

.rt-body .rt-404-code {
	margin: 0;
	font-family: var(--rt-display);
	font-size: clamp(56px, 12vw, 96px);
	line-height: 1;
	color: var(--rt-accent);
	text-shadow: 4px 4px 0 var(--rt-warm);
}

/* ---------- Footer ---------- */

.rt-site-footer {
	position: relative;
	overflow: hidden;
	background: var(--rt-raised);
	border-top: 1px solid var(--rt-border);
}

.rt-site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url(../images/pattern-circuit.png) repeat;
	background-size: 64px 64px;
	image-rendering: pixelated;
	opacity: 0.1;
	pointer-events: none;
}

.rt-body .rt-footer-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding-block: 56px 32px;
}

.rt-body .rt-footer-inner > *,
.rt-body .rt-footer-cols > *,
.rt-body .rt-footer-col > * {
	margin-block: 0;
}

.rt-body .rt-footer-cols {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 48px;
}

.rt-body .rt-footer-col {
	flex: 1 1 160px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rt-body .rt-footer-col--brand {
	flex: 2 1 320px;
}

.rt-body .rt-footer-col--brand p {
	max-width: 360px;
	font-size: 15px;
	color: var(--rt-muted);
}

.rt-body .rt-footer-links {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--rt-mono);
	font-size: 14px;
}

.rt-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rt-fg);
	text-decoration: none;
}

.rt-footer-links a:hover {
	color: var(--rt-accent);
}

.rt-body .rt-footer-legal {
	padding-top: 24px;
	border-top: 1px dashed var(--rt-border-strong);
	font-family: var(--rt-mono);
	font-size: 13px;
	color: var(--rt-subtle);
}

@media (max-width: 600px) {
	.rt-body .rt-hero-inner {
		padding-block: 48px 40px;
		gap: 32px;
	}

	.rt-body .rt-sections {
		gap: 56px;
		padding-top: 48px;
	}

	.rt-body .rt-archive-band,
	.rt-body .rt-feature-body {
		padding: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
