/*
Theme Name: Programmer Sheet
Theme URI: https://programmersheet.com
Description: Lightweight block theme for the Programmer Sheet developer blog and cheat sheets.
Version: 0.3.5
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: programmersheet
*/

/* Global styles live in theme.json. This file covers what theme.json cannot express. */

html {
	scroll-padding-top: 1rem;
}

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

/* Long words and URLs in prose must not widen the page on mobile. */
.wp-block-post-content,
.wp-block-post-excerpt,
.wp-block-post-title {
	overflow-wrap: break-word;
}

:where(.wp-block-post-content) :where(p, li) a {
	overflow-wrap: anywhere;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------- Header ---------- */

.ps-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.ps-header .wp-block-site-logo img {
	width: 168px;
	height: auto;
}

@media (max-width: 599px) {
	.ps-header .wp-block-site-logo img {
		width: 136px;
	}
}

.ps-header .wp-block-navigation a {
	text-decoration: none;
}

.ps-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--primary);
}

.ps-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: 6px;
	padding: 0.25rem 0;
	box-shadow: 0 8px 24px rgb(15 27 45 / 0.08);
}

/*
 * Mobile overlay: full-width rows with dividers; the cheat-sheet submenu becomes a
 * stack of tappable tiles (two columns where there is room).
 */
.ps-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
}

.ps-header .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3rem !important;
	align-items: stretch !important;
}

.ps-header .is-menu-open .wp-block-navigation__container {
	width: 100%;
	gap: 0 !important;
	align-items: stretch !important;
	font-size: var(--wp--preset--font-size--large);
}

.ps-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	width: 100%;
	align-items: stretch !important;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

.ps-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	font-weight: 700;
}

.ps-header .is-menu-open .wp-block-navigation__submenu-container {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
	gap: 0.5rem !important;
	width: 100%;
	border: 0 !important;
	box-shadow: none;
	padding: 0.75rem 0 0 !important;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.ps-header .is-menu-open .wp-block-navigation__submenu-container > .wp-block-navigation-item {
	display: flex;
	min-width: 0;
	justify-content: flex-start !important;
	align-items: stretch !important;
}

.ps-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	text-align: left;
	padding: 0.65rem 0.8rem !important;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--surface);
	line-height: 1.3;
}

.ps-header .wp-block-navigation__responsive-container-open,
.ps-header .wp-block-navigation__responsive-container-close {
	padding: 0.35rem;
	border-radius: 6px;
}

.ps-header .wp-block-navigation__responsive-container-open:hover {
	background: var(--wp--preset--color--surface);
}

/*
 * Header search: the field opens over the menu, to the left of the button, instead
 * of pushing the menu aside. Field and button are joined.
 */
.ps-header .wp-block-search {
	position: relative;
}

.ps-header .wp-block-search__input {
	position: absolute;
	top: 0;
	right: 100%;
	z-index: 20;
	height: 100%;
	width: min(24rem, calc(100vw - 6rem));
	background: var(--wp--preset--color--base);
	box-shadow: -8px 0 24px rgb(15 27 45 / 0.12);
}

.ps-header .wp-block-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__button {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

/* ---------- Search ---------- */

/* Field and button form one control and fill the width they are given. */
.wp-block-search__inside-wrapper {
	width: 100%;
}

.wp-block-search__input {
	min-width: 0;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px 0 0 6px;
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-search__input:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid rgb(10 102 194 / 0.25);
	outline-offset: 0;
}

.wp-block-search__button {
	margin-left: 0 !important;
	border-radius: 0 6px 6px 0;
	flex-shrink: 0;
}

.wp-block-search__button-only .wp-block-search__button {
	border-radius: 6px;
}

/* ---------- Front-page hero ---------- */

.ps-hero {
	position: relative;
	overflow: hidden;
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--40);
	color: #dbe5f1;
	background:
		radial-gradient(60rem 30rem at 85% -10%, rgb(28 166 239 / 0.28), transparent 60%),
		radial-gradient(40rem 24rem at -10% 110%, rgb(10 102 194 / 0.35), transparent 60%),
		var(--wp--preset--color--contrast);
}

/* Faint grid behind the hero text. */
.ps-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: linear-gradient(to bottom, #000, transparent);
	pointer-events: none;
}

.ps-hero > * {
	position: relative;
}

.ps-hero h1 {
	color: var(--wp--preset--color--base);
	margin-top: 0.5rem;
	letter-spacing: -0.01em;
}

.ps-hero__eyebrow {
	display: inline-block;
	margin: 0;
	padding: 0.25rem 0.7rem;
	border: 1px solid rgb(28 166 239 / 0.45);
	border-radius: 999px;
	background: rgb(28 166 239 / 0.12);
	color: #8fd3fb;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ps-hero__lead {
	color: #b9c7d8;
	max-width: 38rem;
}

.ps-hero .wp-block-search {
	max-width: 40rem;
	margin-top: var(--wp--preset--spacing--40);
}

.ps-hero .wp-block-search__inside-wrapper {
	border-radius: 8px;
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}

.ps-hero .wp-block-search__input {
	padding: 0.9rem 1rem;
	border: 0;
	border-radius: 8px 0 0 8px;
	font-size: var(--wp--preset--font-size--medium);
}

.ps-hero .wp-block-search__button {
	padding-inline: 1.5rem;
	border-radius: 0 8px 8px 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.ps-hero .wp-block-search__button:hover {
	background: #5cc3f7;
}

.ps-hero__popular {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	color: #9fb1c6;
}

.ps-hero__popular span {
	margin-right: 0.25rem;
}

.ps-hero__popular a {
	padding: 0.2rem 0.65rem;
	border: 1px solid rgb(255 255 255 / 0.18);
	border-radius: 999px;
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.ps-hero__popular a:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.ps-window {
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 10px;
	background: #0b1422;
	box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
	overflow: hidden;
}

.ps-window > * {
	margin: 0 !important;
}

.ps-window__bar {
	position: relative;
	padding: 0.55rem 1rem 0.55rem 4.5rem;
	border-bottom: 1px solid rgb(255 255 255 / 0.08);
	background: #111d2e;
	color: #8193a8;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
}

/* Window buttons. */
.ps-window__bar::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 1rem;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-radius: 50%;
	background: #ff5f57;
	box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}

.ps-hero .ps-window__code {
	background: transparent;
	border-radius: 0;
	padding: 1.1rem 1.25rem;
	font-size: 0.8125rem;
	line-height: 1.75;
	white-space: pre;
	overflow-x: auto;
}

@media (max-width: 781px) {
	.ps-hero__visual {
		display: none;
	}
}

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

.ps-footer a {
	color: inherit;
	text-decoration: none;
}

.ps-footer a:hover {
	text-decoration: underline;
}

.ps-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
}

.ps-footer .wp-block-list li + li {
	margin-top: 0.45rem;
}

.ps-footer__heading {
	margin-bottom: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: var(--wp--preset--font-size--x-small) !important;
	color: #8fd3fb !important;
}

.ps-footer .wp-block-list a {
	color: #c3cfdd;
}

.ps-footer .wp-block-list a:hover {
	color: var(--wp--preset--color--base);
}

.ps-footer__about {
	max-width: 22rem;
	color: #9fb1c6;
}

/* Two link columns side by side on tablets instead of one long stack. */
@media (min-width: 600px) and (max-width: 781px) {
	.ps-footer__columns {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
	}

	.ps-footer__columns > :first-child {
		grid-column: 1 / -1;
	}
}

/* ---------- Cards and link lists ---------- */

.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 1.25rem;
}

.is-style-card > :first-child {
	margin-top: 0;
}

.is-style-card > :last-child {
	margin-bottom: 0;
}

.ps-link-list {
	list-style: none;
	padding-left: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.ps-link-list li {
	margin: 0;
}

.ps-link-list a {
	display: inline-block;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.ps-link-list a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* Cheat-sheet hub ([ps_sheet_hub]) */
.ps-sheet-hub {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
	gap: 1.25rem;
}

.ps-sheet-hub > .is-style-card {
	margin: 0;
}

/* Post lists */
.ps-post-card {
	height: 100%;
}

/*
 * The featured image fills the top of the card, edge to edge. The 16:9 frame keeps the
 * cards even; the whole image is shown inside it (scale: contain), on the surface colour.
 */
.ps-post-card > .ps-post-card__image {
	margin: -1.25rem -1.25rem 0.4rem;
	width: calc(100% + 2.5rem);
	max-width: none;
	min-height: 0;
	overflow: hidden;
	border-radius: 7px 7px 0 0;
	background: var(--wp--preset--color--surface);
}

.ps-post-card__image a,
.ps-post-card__image img {
	display: block;
	height: 100%;
}

.ps-post-card .wp-block-post-excerpt__excerpt {
	color: var(--wp--preset--color--muted);
	margin: 0;
}

/* ---------- Inline code ---------- */

:where(.wp-block-post-content, .wp-block-post-excerpt, .wp-block-table) :not(pre) > code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.875em;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	padding: 0.1em 0.35em;
	overflow-wrap: anywhere;
}

/* Keyboard shortcuts in editor and IDE cheat sheets. */
:where(.wp-block-post-content) kbd {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125em;
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-bottom-width: 2px;
	border-radius: 4px;
	padding: 0 0.4em;
	white-space: nowrap;
}

/* ---------- Code blocks ---------- */

/*
 * Long lines scroll horizontally inside the block instead of wrapping, so code
 * keeps its shape. code-tools.js adds the copy button and keyboard focus.
 */
.wp-block-post-content pre {
	max-width: 100%;
	overflow-x: auto;
	white-space: pre;
	word-wrap: normal;
	overflow-wrap: normal;
	tab-size: 4;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.wp-block-post-content pre code {
	font: inherit;
	background: none;
	border: 0;
	padding: 0;
	white-space: inherit;
}

/* Plain <pre> from imported HTML gets the same look as the Code block. */
.wp-block-post-content pre:not([class]) {
	background: var(--wp--preset--color--code-background);
	color: var(--wp--preset--color--code-text);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.875rem;
	line-height: 1.6;
	padding: 0.9rem 1rem;
	border-radius: 6px;
}

.ps-code {
	position: relative;
}

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

/* Room for the copy button on the first line. */
.ps-code > pre.wp-block-code,
.ps-code > pre:not([class]) {
	padding-right: 4.75rem;
}

.ps-code__copy {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	z-index: 1;
	padding: 0.2rem 0.55rem;
	border: 1px solid rgb(255 255 255 / 0.22);
	border-radius: 4px;
	background: rgb(21 33 49 / 0.92);
	color: var(--wp--preset--color--code-text);
	font: 600 0.75rem/1.4 var(--wp--preset--font-family--sans);
	cursor: pointer;
}

.ps-code__copy:hover,
.ps-code__copy:focus-visible {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.ps-code__copy[data-state="done"] {
	background: #1f7a3d;
	border-color: #1f7a3d;
}

/* ---------- Tables ---------- */

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

/* A bare <table> from imported HTML scrolls instead of widening the page. */
.wp-block-post-content > table,
.is-style-card > table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.wp-block-post-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-post-content :where(th, td) {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.5rem 0.7rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-post-content th,
.wp-block-post-content thead td {
	background: var(--wp--preset--color--surface);
	font-weight: 700;
}

.wp-block-post-content tbody tr:nth-child(even) {
	background: #fafbfc;
}

.wp-block-table.is-style-stripes {
	border-bottom: 0;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--surface);
}

/*
 * First column is usually a command or keyword in a cheat sheet: monospace, wrapping
 * at spaces only so commands stay readable. In two-column tables it takes at most
 * about half the width, so the description is never squeezed to a word per line.
 */
.wp-block-table.is-style-stripes table,
.ps-cheat-sheet .wp-block-table table {
	table-layout: auto;
}

.wp-block-table.is-style-stripes td:first-child:not(:only-child),
.ps-cheat-sheet .wp-block-table td:first-child:not(:only-child) {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--primary-dark);
}

.wp-block-table.is-style-stripes td:first-child:not(:only-child) code,
.ps-cheat-sheet .wp-block-table td:first-child:not(:only-child) code {
	overflow-wrap: normal;
}

.wp-block-table.is-style-stripes td:first-child:nth-last-child(2),
.ps-cheat-sheet .wp-block-table td:first-child:nth-last-child(2) {
	width: 45%;
}

.wp-block-table.is-style-stripes td:nth-child(2):last-child,
.ps-cheat-sheet .wp-block-table td:nth-child(2):last-child {
	min-width: 9rem;
}

/* ---------- Cheat-sheet layout ---------- */

/*
 * Card groups flow into balanced columns: one on phones, two on tablets, three on
 * wide screens. Anything that is not a card (intro text, notes) spans every column.
 */
.ps-cheat-sheet {
	columns: 22rem 3;
	column-gap: 1.25rem;
}

.ps-cheat-sheet > * {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

.ps-cheat-sheet > .is-style-card {
	break-inside: avoid;
	display: block;
}

.ps-cheat-sheet > :not(.is-style-card) {
	column-span: all;
}

/*
 * The card's first heading is its header: a tinted bar across the top of the card.
 * Later headings are sub-topics: smaller, with a short accent mark, no rule.
 */
.ps-cheat-sheet .is-style-card {
	padding-top: 0;
	overflow: hidden;
}

.ps-cheat-sheet .is-style-card > :is(h2, h3):first-child {
	margin: 0 -1.25rem 1rem;
	padding: 0.8rem 1.25rem;
	background: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--border);
	box-shadow: inset 4px 0 0 var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--medium);
}

.ps-cheat-sheet .is-style-card > :is(h3, h4, h5, h6):not(:first-child) {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
	text-transform: none;
	letter-spacing: 0;
}

.ps-cheat-sheet .is-style-card > :is(h3, h4, h5, h6):not(:first-child)::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 2px;
	background: var(--wp--preset--color--accent);
}

/* A card without a heading still needs its top padding. */
.ps-cheat-sheet .is-style-card > :not(h2, h3):first-child {
	margin-top: 1.25rem;
}

.ps-cheat-sheet .is-style-card > * + * {
	margin-top: 0.85rem;
}

.ps-cheat-sheet .is-style-card p {
	font-size: var(--wp--preset--font-size--small);
}

.ps-cheat-sheet pre {
	font-size: 0.8125rem;
}

/* ---------- Syntax highlighting (highlight.js classes, dark code background) ---------- */

.hljs-comment,
.hljs-quote {
	color: #8b9bb0;
	font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-section {
	color: #ff8f86;
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-selector-attr,
.hljs-selector-pseudo {
	color: #a5d6ff;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet,
.hljs-variable,
.hljs-template-variable,
.hljs-attr,
.hljs-attribute,
.hljs-selector-id,
.hljs-selector-class {
	color: #79c0ff;
}

.hljs-title,
.hljs-title.function_,
.hljs-title.class_ {
	color: #d2a8ff;
}

.hljs-name,
.hljs-tag,
.hljs-built_in,
.hljs-type {
	color: #7ee787;
}

.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-params {
	color: #ffb86b;
}

.hljs-deletion {
	color: #ffa198;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: 700;
}

/* ---------- Pages and articles ---------- */

/* Blocks in a page or article fill the column; only wide images need no limit. */
.ps-page-content > *,
.ps-article-content > * {
	max-width: none;
}

/* ---------- Article sidebar ---------- */

@media (max-width: 1023px) {
	.ps-sidebar {
		display: none !important;
	}
}

.ps-sidebar__sticky {
	position: sticky;
	top: 1.5rem;
}

.ps-related {
	margin-bottom: var(--wp--preset--spacing--40);
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
}

.ps-related__title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--medium);
}

.ps-related ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ps-related li {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

.ps-related li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.ps-related__item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.ps-related__thumb {
	flex: 0 0 72px;
	width: 72px;
	height: 54px;
	object-fit: cover;
	border-radius: 4px;
	background: var(--wp--preset--color--border);
}

.ps-related__text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.ps-related__name {
	font-weight: 600;
	overflow-wrap: break-word;
}

.ps-related__item:hover .ps-related__name,
.ps-related__item:focus-visible .ps-related__name {
	color: var(--wp--preset--color--primary);
}

.ps-related time {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

/* ---------- Ad slots ---------- */

/*
 * Each slot reserves the height of the unit planned for it so the page does not
 * jump when the ad loads. Ad units placed in a slot should match these sizes.
 * An empty slot collapses, except in ad preview mode (non-production sites).
 */
.ps-ad-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-inline: auto;
	overflow: hidden;
	min-height: var(--ps-ad-height);
}

.ps-ad-slot--top {
	--ps-ad-height: 100px;
	max-width: 970px;
}

.ps-ad-slot--content-end {
	--ps-ad-height: 250px;
	max-width: 336px;
}

.ps-ad-slot--sidebar {
	--ps-ad-height: 600px;
	max-width: 300px;
}

@media (min-width: 768px) {
	.ps-ad-slot--top {
		--ps-ad-height: 90px;
	}

	.ps-ad-slot--content-end {
		--ps-ad-height: 280px;
	}
}

body:not(.ps-ad-preview) .ps-ad-slot:not(:has(*)) {
	display: none;
}

.ps-ad-preview .ps-ad-slot:not(:has(*)) {
	border: 1px dashed #9aa6b5;
	background: repeating-linear-gradient(135deg, var(--wp--preset--color--surface) 0 10px, #eef1f5 10px 20px);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	font-family: var(--wp--preset--font-family--mono);
}

.ps-ad-preview .ps-ad-slot--top:not(:has(*))::before {
	content: "Ad slot: top · 320×100 mobile, 728×90 / 970×90 desktop";
}

.ps-ad-preview .ps-ad-slot--content-end:not(:has(*))::before {
	content: "Ad slot: after content · 300×250 / 336×280";
}

.ps-ad-preview .ps-ad-slot--sidebar:not(:has(*))::before {
	content: "Ad slot: sidebar · 300×600, desktop only";
}

/* ---------- 404 ---------- */

.ps-404-code {
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--highlight);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
