/*
Theme Name: ACL Trace
Author: Ash Creative Labs
Description: A terminal-inspired editorial block theme with a dark Trace Magenta design system, native templates, responsive typography, and eight production patterns.
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 8.0
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: acl-trace
Domain Path: /languages
Tags: block-patterns, block-styles, full-site-editing, editor-style, custom-logo, custom-menu, wide-blocks, one-column, threaded-comments, translation-ready, blog, news

ACL Trace WordPress Theme, (C) 2026 Ash Creative Labs
ACL Trace is distributed under the terms of the GNU GPL v2 or later.
*/

/*
 * ============================================================
 * ACL Trace — palette-neutral component behavior.
 *
 * theme.json owns default component values. This file contains
 * pseudo states, native-control internals, responsive containment,
 * accessibility modes, and stable WordPress markup selectors.
 * ============================================================
 */

/* --- Shared interaction and reading behavior --- */
:where(.wp-site-blocks, .editor-styles-wrapper) :where(
	a,
	button,
	input,
	textarea,
	select,
	summary,
	[tabindex]
) {
	transition: color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--easing--standard),
		background-color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--easing--standard),
		border-color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--easing--standard),
		box-shadow var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--easing--standard);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(
	a,
	button,
	input,
	textarea,
	select,
	summary,
	[tabindex]
):focus-visible {
	outline: var(--wp--custom--border--width--strong) solid var(--wp--preset--color--focus);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-post-title,
.wp-block-query-title {
	overflow-wrap: anywhere;
	text-wrap: balance;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--inverse-text);
}

code,
kbd,
samp,
pre {
	font-family: var(--wp--preset--font-family--terminal);
}

:where(.wp-block-post-content, .wp-block-post-excerpt, .wp-block-comment-content) a:not(.wp-element-button) {
	text-decoration-line: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

:where(.wp-block-post-content, .wp-block-post-excerpt, .wp-block-comment-content) a:not(.wp-element-button):visited {
	color: var(--wp--preset--color--text-muted);
}

:where(.wp-block-navigation, .wp-block-buttons, .wp-block-query-pagination, .wp-block-comments-pagination) a {
	text-decoration: none;
}

/* --- Buttons and compact actions --- */
:where(.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 44px;
	box-sizing: border-box;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	text-wrap: pretty;
}

.wp-block-post-comments-form input[type="submit"] {
	background: var(--wp--preset--color--primary);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--primary);
	border-radius: var(--wp--preset--border-radius--control);
	color: var(--wp--preset--color--inverse-text);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.2;
	padding: var(--wp--custom--spacing--control-padding);
}

:where(.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"]):hover {
	background-color: var(--wp--preset--color--primary-hover);
	border-color: var(--wp--preset--color--primary-hover);
	color: var(--wp--preset--color--inverse-text);
	box-shadow: var(--wp--preset--shadow--subtle);
}

:where(.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"]):active {
	box-shadow: inset 0 0 0 var(--wp--custom--border--width--hairline) var(--wp--preset--color--inverse-text);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border-color: var(--wp--preset--color--primary);
	border-width: var(--wp--custom--border--width--hairline);
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface-elevated);
	border-color: var(--wp--preset--color--primary-hover);
	color: var(--wp--preset--color--primary-hover);
}

.wp-block-button.is-style-acl-text .wp-block-button__link {
	background: transparent;
	border-color: transparent;
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 -1px 0 currentColor;
	text-decoration-line: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

.wp-block-button.is-style-acl-text .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface-elevated);
	border-color: var(--wp--preset--color--border);
	color: var(--wp--preset--color--primary-hover);
	box-shadow: inset 0 -2px 0 currentColor;
}

.wp-block-button.is-style-acl-destructive .wp-block-button__link,
.wp-element-button.has-error-background-color,
.wp-block-button__link.has-error-background-color {
	background: var(--wp--preset--color--error);
	border-color: var(--wp--preset--color--error);
	color: var(--wp--preset--color--inverse-text);
}

.wp-block-button.is-style-acl-destructive .wp-block-button__link:hover,
.wp-element-button.has-error-background-color:hover,
.wp-block-button__link.has-error-background-color:hover {
	background: color-mix(in srgb, var(--wp--preset--color--error) 82%, var(--wp--preset--color--canvas));
	border-color: var(--wp--preset--color--error);
	color: var(--wp--preset--color--inverse-text);
}

/* Preserve Site Style Kit's configured palette inside the button hierarchy. */
body.acl-ssk-enabled .wp-block-button:not(.is-style-outline):not(.is-style-acl-text):not(.is-style-acl-destructive) .wp-block-button__link {
	background: var(--acl-ssk-button-bg, var(--wp--preset--color--primary));
	border-color: var(--acl-ssk-button-bg, var(--wp--preset--color--primary));
	color: var(--acl-ssk-button-text, var(--wp--preset--color--inverse-text));
}

body.acl-ssk-enabled .wp-block-button:not(.is-style-outline):not(.is-style-acl-text):not(.is-style-acl-destructive) .wp-block-button__link:hover {
	background: var(--acl-ssk-button-hover-bg, var(--wp--preset--color--primary-hover));
	border-color: var(--acl-ssk-button-hover-bg, var(--wp--preset--color--primary-hover));
	color: var(--acl-ssk-button-hover-text, var(--wp--preset--color--inverse-text));
}

body.acl-ssk-enabled .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border-color: var(--acl-ssk-link, var(--wp--preset--color--primary));
	color: var(--acl-ssk-link, var(--wp--preset--color--primary));
}

body.acl-ssk-enabled .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--acl-ssk-surface-soft, var(--wp--preset--color--surface-elevated));
	border-color: var(--acl-ssk-link-hover, var(--wp--preset--color--primary-hover));
	color: var(--acl-ssk-link-hover, var(--wp--preset--color--primary-hover));
}

body.acl-ssk-enabled .wp-block-button.is-style-acl-text .wp-block-button__link {
	background: transparent;
	border-color: transparent;
	color: var(--acl-ssk-link, var(--wp--preset--color--primary));
}

body.acl-ssk-enabled .wp-block-button.is-style-acl-text .wp-block-button__link:hover {
	background: var(--acl-ssk-surface-soft, var(--wp--preset--color--surface-elevated));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-link-hover, var(--wp--preset--color--primary-hover));
}

body.acl-ssk-enabled .wp-block-button.is-style-acl-destructive .wp-block-button__link {
	background: var(--acl-ssk-danger, var(--wp--preset--color--error));
	border-color: var(--acl-ssk-danger, var(--wp--preset--color--error));
	color: var(--acl-ssk-button-text, var(--wp--preset--color--inverse-text));
}

body.acl-ssk-enabled .wp-block-button.is-style-acl-destructive .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--acl-ssk-danger, var(--wp--preset--color--error)) 82%, var(--acl-ssk-bg, var(--wp--preset--color--canvas)));
	border-color: var(--acl-ssk-danger, var(--wp--preset--color--error));
	color: var(--acl-ssk-button-text, var(--wp--preset--color--inverse-text));
}

:where(.wp-element-button, .wp-block-button__link)[aria-pressed="true"] {
	box-shadow: inset 0 -3px 0 currentColor;
}

:where(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 44px;
	min-block-size: 44px;
	background: transparent;
	border: var(--wp--custom--border--width--hairline) solid transparent;
	border-radius: var(--wp--preset--border-radius--control);
	color: inherit;
}

:where(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close):hover {
	background: var(--wp--preset--color--surface-elevated);
	border-color: var(--wp--preset--color--border);
	color: var(--wp--preset--color--primary-hover);
}

:where(.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"]):disabled,
:where(.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"])[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.62;
	border-style: dashed;
	box-shadow: none;
	pointer-events: none;
}

/* --- Native forms and search --- */
:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) {
	font-family: var(--wp--preset--font-family--body);
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) label {
	display: inline-block;
	margin-block-end: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(
	input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
	textarea,
	select
) {
	inline-size: 100%;
	min-block-size: 44px;
	box-sizing: border-box;
	background: var(--wp--preset--color--surface-elevated);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--control);
	color: var(--wp--preset--color--text);
	font: inherit;
	line-height: 1.4;
	padding: var(--wp--custom--spacing--control-padding);
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) textarea {
	min-block-size: 8rem;
	resize: vertical;
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) ::placeholder {
	color: var(--wp--preset--color--text-muted);
	opacity: 0.82;
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(input, textarea, select):focus-visible {
	border-color: var(--wp--preset--color--focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--focus) 22%, transparent);
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(input, textarea, select)[aria-invalid="true"] {
	border-color: var(--wp--preset--color--error);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--error) 22%, transparent);
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(input, textarea, select).is-success {
	border-color: var(--wp--preset--color--success);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--wp--preset--color--success) 20%, transparent);
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(input, textarea, select):disabled {
	cursor: not-allowed;
	opacity: 0.62;
	border-style: dashed;
}

:where(.wp-block-search, .wp-block-post-comments-form, .comment-form, .acl-trace-form) :where(input[type="checkbox"], input[type="radio"]) {
	inline-size: 1.25rem;
	block-size: 1.25rem;
	margin: 0 var(--wp--preset--spacing--10) 0 0;
	accent-color: var(--wp--preset--color--primary);
}

:where(.comment-notes, .form-allowed-tags, .logged-in-as, .acl-trace-help) {
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--caption);
	line-height: 1.5;
}

:where(.required, .acl-trace-required) {
	color: var(--wp--preset--color--error);
}

.wp-block-search__inside-wrapper {
	gap: var(--wp--custom--spacing--control-gap);
}

/* --- Trace Card and Query Loop cards --- */
.wp-block-group.is-style-acl-card {
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--card);
	color: var(--wp--preset--color--text);
	padding: var(--wp--custom--spacing--card-padding);
	box-shadow: var(--wp--preset--shadow--subtle);
	overflow-wrap: anywhere;
	transition: border-color var(--wp--custom--motion--duration--standard) var(--wp--custom--motion--easing--standard),
		box-shadow var(--wp--custom--motion--duration--standard) var(--wp--custom--motion--easing--standard);
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card {
	background: var(--acl-ssk-surface, var(--wp--preset--color--surface));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

.wp-block-group.is-style-acl-card :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--heading);
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card :where(h1, h2, h3, h4, h5, h6) {
	color: var(--acl-ssk-heading, var(--wp--preset--color--heading));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card a:not(.wp-element-button) {
	color: var(--acl-ssk-link, var(--wp--preset--color--primary));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card :where(
	.wp-block-post-author,
	.wp-block-post-date,
	.wp-block-post-terms,
	.wp-element-caption,
	figcaption
) {
	color: var(--acl-ssk-muted, var(--wp--preset--color--text-muted));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card :where(.acl-trace-form, .wp-block-search) label {
	color: var(--acl-ssk-heading, var(--wp--preset--color--heading));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card :where(.acl-trace-form, .wp-block-search) :where(
	input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
	textarea,
	select
) {
	background: var(--acl-ssk-surface-soft, var(--wp--preset--color--surface-elevated));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card :where(.acl-trace-form, .wp-block-search) ::placeholder {
	color: var(--acl-ssk-muted, var(--wp--preset--color--text-muted));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card .wp-block-details {
	background: var(--acl-ssk-surface-soft, var(--wp--preset--color--surface-elevated));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card .wp-block-details summary {
	color: var(--acl-ssk-heading, var(--wp--preset--color--heading));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card .wp-block-table {
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card .wp-block-table :where(th, td) {
	background: var(--acl-ssk-surface, var(--wp--preset--color--surface));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

body.acl-ssk-enabled .wp-block-group.is-style-acl-card .wp-block-table th {
	background: var(--acl-ssk-surface-soft, var(--wp--preset--color--surface-elevated));
	color: var(--acl-ssk-heading, var(--wp--preset--color--heading));
}

.wp-block-group.is-style-acl-card :where(p, li, dd, figcaption, .wp-block-post-excerpt) {
	overflow-wrap: anywhere;
}

.wp-block-group.is-style-acl-card :where(a[href], button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border--width--strong) solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

.wp-block-group.is-style-acl-card:has(a[href]):hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--raised);
}

.wp-block-group.is-style-acl-card:focus-within {
	border-color: var(--wp--preset--color--focus);
	outline: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--focus);
	outline-offset: 3px;
	box-shadow: var(--wp--preset--shadow--raised);
}

.wp-block-post-template {
	gap: var(--wp--custom--spacing--component-gap);
}

.wp-block-query .wp-block-group.is-style-acl-card {
	min-inline-size: 0;
}

.wp-block-query :where(.wp-block-post-title, .wp-block-post-excerpt, .wp-block-post-author, .wp-block-post-date, .wp-block-post-terms) {
	overflow-wrap: anywhere;
}

.wp-block-query .wp-block-post-title a {
	text-decoration: none;
}

.wp-block-query .wp-block-post-excerpt {
	margin-block: 0;
}

.wp-block-query .wp-block-post-excerpt__more-text {
	margin-block: var(--wp--preset--spacing--10) 0;
}

.wp-block-query .wp-block-post-excerpt__more-link {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.3;
	text-decoration-line: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

:where(.wp-block-post-author, .wp-block-post-date, .wp-block-post-terms, .wp-block-comment-date) {
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	overflow-wrap: anywhere;
}

:where(.wp-block-post-author, .wp-block-post-date, .wp-block-post-terms) :where(a, span) {
	overflow-wrap: anywhere;
}

/* Empty media collapses on the front end; the editor keeps its placeholder. */
.wp-site-blocks .wp-block-query .wp-block-post-featured-image:not(.acl-fip-featured-image-frame .wp-block-post-featured-image):not(:has(img)) {
	display: none;
}

/* Query images keep the ratio selected by the block instead of forcing a crop. */
.wp-block-query .wp-block-post-featured-image:not([class*="acl-fip"]):not(.acl-fip-featured-image-frame .wp-block-post-featured-image) img {
	inline-size: 100%;
	max-inline-size: 100%;
}

/* --- Header, navigation, and footer --- */
body:not(.acl-ssk-enabled) :where(header.wp-block-template-part, footer.wp-block-template-part) > .wp-block-group {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--border);
	color: var(--wp--preset--color--text);
}

:where(header.wp-block-template-part, footer.wp-block-template-part) {
	font-family: var(--wp--preset--font-family--terminal);
}

:where(header.wp-block-template-part, footer.wp-block-template-part) .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item__content {
	border-radius: var(--wp--preset--border-radius--small);
	padding: 0.625rem 0.75rem;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.wp-block-navigation :where(.current-menu-item > .wp-block-navigation-item__content, .wp-block-navigation-item__content[aria-current="page"]) {
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--primary);
}

.wp-block-navigation .wp-block-navigation-item__content:active {
	background: var(--wp--preset--color--surface-elevated);
}

.wp-block-navigation :where(.wp-block-navigation-submenu__toggle[aria-expanded="true"], .wp-block-navigation__responsive-container-open[aria-expanded="true"]) {
	box-shadow: inset 0 -2px 0 currentColor;
}

.wp-block-navigation .wp-block-navigation__submenu-container {
	min-inline-size: min(18rem, calc(100vw - (2 * var(--wp--custom--spacing--page-gutter))));
	background: var(--wp--preset--color--surface-elevated);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--control);
	box-shadow: var(--wp--preset--shadow--raised);
	color: var(--wp--preset--color--text);
	padding: var(--wp--preset--spacing--10);
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	padding: var(--wp--custom--spacing--page-gutter);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	inline-size: 100%;
	max-inline-size: 28rem;
	box-sizing: border-box;
}

footer.wp-block-template-part :where(p, .wp-block-site-title) {
	color: var(--wp--preset--color--text-muted);
	overflow-wrap: anywhere;
}

/* --- Pagination and post navigation --- */
:where(.wp-block-query-pagination, .wp-block-comments-pagination) {
	gap: var(--wp--preset--spacing--10);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
}

:where(.wp-block-query-pagination, .wp-block-comments-pagination) :where(a, .page-numbers),
.wp-block-post-navigation-link a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 44px;
	box-sizing: border-box;
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--control);
	padding: 0.625rem 0.875rem;
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	overflow-wrap: anywhere;
}

:where(.wp-block-query-pagination, .wp-block-comments-pagination) :where(a, .page-numbers):hover,
.wp-block-post-navigation-link a:hover {
	background: var(--wp--preset--color--surface-elevated);
	border-color: var(--wp--preset--color--primary);
}

:where(.wp-block-query-pagination, .wp-block-comments-pagination) .current {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--inverse-text);
	box-shadow: inset 0 -3px 0 currentColor;
	font-weight: 700;
}

body.acl-ssk-enabled :where(.wp-block-query-pagination, .wp-block-comments-pagination) .current {
	background: var(--acl-ssk-button-bg, var(--wp--preset--color--primary));
	border-color: var(--acl-ssk-button-bg, var(--wp--preset--color--primary));
	color: var(--acl-ssk-button-text, var(--wp--preset--color--inverse-text));
}

:where(.wp-block-query-pagination, .wp-block-comments-pagination) [aria-disabled="true"] {
	opacity: 0.62;
	border-style: dashed;
}

/* --- Comments --- */
.wp-block-comments-title {
	margin-block-end: var(--wp--preset--spacing--40);
}

.wp-block-comment-template {
	list-style: none;
	padding-inline-start: 0;
}

.wp-block-comment-template > li {
	padding-block: var(--wp--preset--spacing--30);
	border-block-end: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
}

.wp-block-comment-template .wp-block-comment-template {
	margin-block-start: var(--wp--preset--spacing--20);
	padding-inline-start: clamp(1rem, 4vw, 2.5rem);
	border-inline-start: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
}

.wp-block-comment-author-name a {
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

:where(.wp-block-comment-reply-link, .wp-block-comment-edit-link) a {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.wp-block-comment-content {
	max-inline-size: 70ch;
}

:where(.comment-awaiting-moderation, .wp-block-comment-content .awaiting-moderation) {
	color: var(--wp--preset--color--warning);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
}

/* --- Tables --- */
.wp-block-table {
	max-inline-size: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-color: var(--wp--preset--color--primary) var(--wp--preset--color--surface-elevated);
}

.wp-block-table table {
	inline-size: 100%;
	min-inline-size: 36rem;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.wp-block-table :where(th, td) {
	padding: 0.75rem 1rem;
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	text-align: start;
	vertical-align: top;
}

.wp-block-table th {
	background: var(--wp--preset--color--surface-elevated);
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: color-mix(in srgb, var(--wp--preset--color--surface-elevated) 72%, transparent);
}

/* --- Quotes, pullquotes, code, and disclosure --- */
.wp-block-quote {
	border-inline-start-color: var(--wp--preset--color--primary);
	border-inline-start-width: var(--wp--custom--border--width--strong);
}

:where(.wp-block-quote, .wp-block-pullquote) cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--terminal);
	font-size: var(--wp--preset--font-size--caption);
	font-style: normal;
	line-height: 1.5;
}

:where(.wp-block-code, .wp-block-preformatted) {
	max-inline-size: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	white-space: pre;
	scrollbar-color: var(--wp--preset--color--primary) var(--wp--preset--color--surface);
}

.wp-block-code code {
	display: block;
	min-inline-size: max-content;
}

.wp-block-post-content :where(p, li, dd, figcaption) > code {
	background: var(--wp--preset--color--surface-elevated);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--small);
	color: var(--wp--preset--color--secondary);
	font-size: 0.9em;
	padding: 0.12em 0.35em;
}

.wp-block-details summary {
	min-block-size: 44px;
	box-sizing: border-box;
	cursor: pointer;
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--terminal);
	font-weight: 700;
	line-height: 1.4;
	padding-block: 0.65rem;
}

.wp-block-details summary::marker {
	color: var(--wp--preset--color--primary);
}

.wp-block-details summary:hover {
	color: var(--wp--preset--color--primary-hover);
}

.wp-block-details[open] {
	border-color: var(--wp--preset--color--primary);
}

.wp-block-details[open] summary {
	margin-block-end: var(--wp--preset--spacing--20);
}

/* --- Lists and separators --- */
.wp-block-post-content :where(ul, ol) {
	padding-inline-start: 1.5em;
}

.wp-block-post-content :where(ul, ol) :where(ul, ol) {
	margin-block-start: var(--wp--preset--spacing--10);
}

.wp-block-post-content li + li {
	margin-block-start: var(--wp--preset--spacing--10);
}

.wp-block-post-content :where(ul, ol) > li::marker {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--terminal);
	font-weight: 700;
}

.wp-block-post-content :where(ul, ol) :where(ul, ol) > li::marker {
	color: var(--wp--preset--color--text-muted);
}

.wp-block-separator {
	block-size: var(--wp--custom--border--width--hairline);
	border: 0;
	background: var(--wp--preset--color--border);
	opacity: 1;
}

.wp-block-separator:not(.is-style-wide) {
	max-inline-size: 8rem;
}

/* --- Media and captions --- */
:where(
	.wp-block-image:not([class*="acl-fip"]),
	.wp-block-gallery,
	.wp-block-post-featured-image:not([class*="acl-fip"]):not(.acl-fip-featured-image-frame .wp-block-post-featured-image)
) {
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--small);
}

:where(.wp-block-image:not([class*="acl-fip"]) img, .wp-block-gallery img) {
	max-inline-size: 100%;
	block-size: auto;
}

.wp-block-post-featured-image:not([class*="acl-fip"]):not(.acl-fip-featured-image-frame .wp-block-post-featured-image) img {
	max-inline-size: 100%;
}

:where(.wp-block-audio, .wp-block-video) {
	max-inline-size: 100%;
	overflow: hidden;
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--small);
	background: var(--wp--preset--color--surface);
}

:where(.wp-block-audio audio, .wp-block-video video) {
	display: block;
	inline-size: 100%;
	max-inline-size: 100%;
}

:where(.wp-element-caption, figcaption) {
	overflow-wrap: anywhere;
}

/* --- Status and notice presentation primitives --- */
.acl-trace-notice {
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width--hairline) solid var(--wp--preset--color--border);
	border-inline-start-width: var(--wp--custom--border--width--strong);
	border-radius: var(--wp--preset--border-radius--control);
	color: var(--wp--preset--color--text);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--25);
}

body.acl-ssk-enabled .acl-trace-notice {
	background: var(--acl-ssk-surface, var(--wp--preset--color--surface));
	border-color: var(--acl-ssk-border, var(--wp--preset--color--border));
	color: var(--acl-ssk-text, var(--wp--preset--color--text));
}

.acl-trace-notice--success {
	border-inline-start-color: var(--wp--preset--color--success);
}

.acl-trace-notice--warning {
	border-inline-start-color: var(--wp--preset--color--warning);
}

.acl-trace-notice--error {
	border-inline-start-color: var(--wp--preset--color--error);
}

.acl-trace-notice--info {
	border-inline-start-color: var(--wp--preset--color--secondary);
}

.acl-trace-notice :where(strong, .acl-trace-notice__title) {
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--terminal);
}

body.acl-ssk-enabled .acl-trace-notice :where(strong, .acl-trace-notice__title) {
	color: var(--acl-ssk-heading, var(--wp--preset--color--heading));
}

/* --- Narrow viewports --- */
@media (max-width: 600px) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		inline-size: 100%;
		align-items: stretch;
	}

	.wp-block-comment-template .wp-block-comment-template {
		padding-inline-start: var(--wp--preset--spacing--20);
	}

	:where(.wp-block-query-pagination, .wp-block-comments-pagination) {
		align-items: stretch;
	}

	:where(.wp-block-query-pagination, .wp-block-comments-pagination) :where(a, .page-numbers) {
		flex: 1 1 auto;
	}
}

/* --- Forced colors --- */
@media (forced-colors: active) {
	:where(
		.wp-element-button,
		.wp-block-button__link,
		.wp-block-search__button,
		.wp-block-post-comments-form input[type="submit"],
		.wp-block-group.is-style-acl-card,
		.wp-block-table,
		.wp-block-code,
		.wp-block-preformatted,
		.wp-block-details,
		.acl-trace-notice
	) {
		border-color: CanvasText;
		box-shadow: none;
	}

	:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
		outline-color: Highlight;
	}

	.wp-block-group.is-style-acl-card:focus-within {
		border-color: Highlight;
		outline: 2px solid Highlight;
	}

	:where(.current-menu-item > .wp-block-navigation-item__content, .wp-block-navigation-item__content[aria-current="page"], .page-numbers.current) {
		outline: 2px solid Highlight;
		outline-offset: 2px;
	}
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
	:root {
		--wp--custom--motion--duration--fast: 0.01ms;
		--wp--custom--motion--duration--standard: 0.01ms;
		--wp--custom--motion--duration--slow: 0.01ms;
	}

	.wp-block-navigation__responsive-container {
		transition-duration: 0.01ms;
	}

	.wp-block-group.is-style-acl-card {
		transition: none;
	}
}

/* --- Print --- */
@media print {
	body {
		background: transparent;
		color: CanvasText;
		font-size: 12pt;
	}

	.wp-block-post-content a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		font-weight: normal;
	}

	:where(.wp-block-navigation, .wp-block-search, .wp-block-query-pagination, .wp-block-comments-pagination, footer.wp-block-template-part) {
		display: none;
	}

	:where(.wp-block-image img, .wp-block-gallery img, .wp-block-post-featured-image img) {
		max-inline-size: 100%;
		break-inside: avoid;
	}

	:where(h1, h2, h3, h4, .wp-block-quote, .wp-block-pullquote, .wp-block-table, .wp-block-code, .wp-block-preformatted) {
		break-inside: avoid;
		break-after: avoid-page;
	}

	:where(.wp-block-group.is-style-acl-card, .wp-block-quote, .wp-block-pullquote, .wp-block-code, .wp-block-preformatted, .wp-block-details, .acl-trace-notice) {
		background: transparent;
		box-shadow: none;
	}
}
