/* Nomostatic — layout, reading styles, and the reflexive color scheme.
   Palette tokens come from theme.json. This file only overrides them when
   the reader is in a dark context, and handles layout theme.json cannot. */

:root {
	color-scheme: light;
}

html[data-color-scheme="dark"] {
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	html:not([data-color-scheme="light"]) {
		color-scheme: dark;
	}
}

html[data-color-scheme="light"],
html[data-color-scheme="light"] body {
	--wp--preset--color--base: #f3f4ef;
	--wp--preset--color--surface: #fbfbf8;
	--wp--preset--color--ink: #15181d;
	--wp--preset--color--muted: #4e5964;
	--wp--preset--color--line: #d5dacf;
	--wp--preset--color--accent: #0b6a56;
	--wp--preset--color--accent-strong: #084c3e;
	--wp--preset--color--accent-ink: #f4fffb;
	--wp--preset--color--code: #e7eee8;
	--wp--preset--color--mark: #d7f3ea;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
}

html[data-color-scheme="dark"],
html[data-color-scheme="dark"] body {
	--wp--preset--color--base: #101412;
	--wp--preset--color--surface: #181d1b;
	--wp--preset--color--ink: #e7eee8;
	--wp--preset--color--muted: #a3aea6;
	--wp--preset--color--line: #2a3330;
	--wp--preset--color--accent: #7ddec0;
	--wp--preset--color--accent-strong: #b6ffe4;
	--wp--preset--color--accent-ink: #06241c;
	--wp--preset--color--code: #0c1411;
	--wp--preset--color--mark: #16352c;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
}

@media (prefers-color-scheme: dark) {
	html:not([data-color-scheme="light"]),
	html:not([data-color-scheme="light"]) body {
		--wp--preset--color--base: #101412;
		--wp--preset--color--surface: #181d1b;
		--wp--preset--color--ink: #e7eee8;
		--wp--preset--color--muted: #a3aea6;
		--wp--preset--color--line: #2a3330;
		--wp--preset--color--accent: #7ddec0;
		--wp--preset--color--accent-strong: #b6ffe4;
		--wp--preset--color--accent-ink: #06241c;
		--wp--preset--color--code: #0c1411;
		--wp--preset--color--mark: #16352c;
		background-color: var(--wp--preset--color--base);
		color: var(--wp--preset--color--ink);
	}
}

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

body {
	text-rendering: optimizeLegibility;
}

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

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

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	clip: auto;
	clip-path: none;
	display: block;
	height: auto;
	left: 1rem;
	padding: 0.6rem 0.8rem;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

h1,
h2,
h3,
h4,
h5,
h6,
:target {
	scroll-margin-top: 5.5rem;
}

.wp-site-blocks {
	min-height: 100vh;
	min-height: 100dvh;
}

body .wp-site-blocks.is-layout-flow,
body .wp-site-blocks.is-layout-constrained {
	gap: 0;
}

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

.nomostatic-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background-color: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.admin-bar .nomostatic-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .nomostatic-header {
		top: 46px;
	}
}

.nomostatic-bar {
	padding-block: 0.85rem;
}

.nomostatic-tools {
	margin-inline-start: auto;
}

.wp-block-site-title {
	margin: 0;
}

.wp-block-site-title a {
	align-items: center;
	color: inherit;
	display: inline-flex;
	gap: 0.55rem;
	text-decoration: none;
}

.wp-block-site-title a::before {
	background: var(--wp--preset--color--accent);
	border-radius: 50%;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent);
	content: "";
	flex: none;
	height: 0.45rem;
	width: 0.45rem;
}

.nomostatic-header .wp-block-navigation a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.nomostatic-header .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0 0.15rem 0 0.85rem;
}

.nomostatic-header .wp-block-search__input {
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	min-height: 2.25rem;
	padding: 0;
	width: 8.5rem;
}

.nomostatic-header .wp-block-search__button {
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	padding: 0.35rem;
}

.nomostatic-scheme {
	align-items: center;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	display: inline-flex;
	flex: none;
	height: 2.25rem;
	justify-content: center;
	padding: 0;
	width: 2.25rem;
}

.nomostatic-scheme:hover {
	border-color: var(--wp--preset--color--accent);
}

.nomostatic-scheme .nomostatic-scheme__moon,
.nomostatic-scheme .nomostatic-scheme__sun {
	display: block;
}

.nomostatic-scheme .nomostatic-scheme__sun {
	display: none;
}

html[data-color-scheme="dark"] .nomostatic-scheme .nomostatic-scheme__moon {
	display: none;
}

html[data-color-scheme="dark"] .nomostatic-scheme .nomostatic-scheme__sun {
	display: block;
}

@media (prefers-color-scheme: dark) {
	html:not([data-color-scheme="light"]) .nomostatic-scheme .nomostatic-scheme__moon {
		display: none;
	}

	html:not([data-color-scheme="light"]) .nomostatic-scheme .nomostatic-scheme__sun {
		display: block;
	}
}

/* Menu overlay ---------------------------------------------------------- */

.nomostatic-overlay {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	min-height: 100vh;
	min-height: 100dvh;
}

.nomostatic-overlay .wp-block-navigation__container,
.nomostatic-overlay .wp-block-page-list {
	counter-reset: nomostatic-nav;
	flex-direction: column;
	gap: 0.35rem;
}

.nomostatic-overlay .wp-block-navigation-item,
.nomostatic-overlay .wp-block-pages-list__item {
	counter-increment: nomostatic-nav;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base);
}

.nomostatic-overlay .wp-block-navigation-item__content,
.nomostatic-overlay .wp-block-pages-list__item__link {
	font-size: clamp(2.5rem, 11vw, 4rem);
	font-weight: 600;
	letter-spacing: -0.045em;
	line-height: 1.05;
	text-decoration: none;
}

.nomostatic-overlay .wp-block-navigation-item__content::before,
.nomostatic-overlay .wp-block-pages-list__item__link::before {
	color: var(--wp--preset--color--muted);
	content: counter(nomostatic-nav, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	margin-inline-end: 0.85rem;
}

.wp-block-navigation-overlay-close {
	align-items: center;
	background: transparent;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	height: 2.5rem;
	justify-content: center;
	width: 2.5rem;
}

/* Front page and index -------------------------------------------------- */

.nomostatic-masthead {
	padding-bottom: var(--wp--preset--spacing--60);
	position: relative;
}

.nomostatic-masthead::before {
	background-image:
		linear-gradient(to right, color-mix(in srgb, var(--wp--preset--color--line) 80%, transparent) 1px, transparent 1px),
		linear-gradient(to bottom, color-mix(in srgb, var(--wp--preset--color--line) 80%, transparent) 1px, transparent 1px);
	background-size: 4.5rem 4.5rem;
	content: "";
	height: 18rem;
	inset: -1.5rem 0 auto;
	mask-image: linear-gradient(to bottom, #000 10%, transparent 90%);
	opacity: 0.8;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.nomostatic-masthead > * {
	position: relative;
	z-index: 1;
}

.nomostatic-masthead h1,
.nomostatic-lede {
	max-width: 16em;
}

.nomostatic-lede {
	max-width: 34em;
}

.nomostatic-kicker,
.nomostatic-kicker a {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	line-height: 1.4;
	margin: 0;
	text-decoration: none;
	text-transform: uppercase;
}

.nomostatic-kicker a:hover {
	color: var(--wp--preset--color--accent);
}

.nomostatic-section-label {
	margin-bottom: 0.35rem;
}

ul.nomostatic-index {
	container-type: inline-size;
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.nomostatic-index > li {
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 0;
}

ul.nomostatic-index > li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

@media (hover: hover) {
	ul.nomostatic-index > li:hover {
		background: color-mix(in srgb, var(--wp--preset--color--mark) 72%, transparent);
	}
}

.nomostatic-entry {
	align-items: start;
	column-gap: 1.5rem;
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	padding: 1.2rem 0.7rem;
	row-gap: 0.35rem;
}

@container (max-width: 40rem) {
	.nomostatic-entry {
		grid-template-columns: 1fr;
		padding-inline: 0;
	}
}

@media (max-width: 640px) {
	.nomostatic-entry {
		grid-template-columns: 1fr;
		padding-inline: 0;
	}
}

.nomostatic-entry__date,
.nomostatic-entry .wp-block-post-title,
.nomostatic-entry .wp-block-post-excerpt,
.nomostatic-entry .wp-block-post-excerpt__excerpt,
.nomostatic-entry__terms {
	margin: 0;
}

.nomostatic-entry__date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	padding-top: 0.4rem;
}

.nomostatic-entry__date a {
	color: inherit;
	text-decoration: none;
}

.nomostatic-entry .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.nomostatic-entry .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

.nomostatic-entry .wp-block-post-excerpt__excerpt {
	line-height: 1.5;
	margin-top: 0.35rem;
}

.nomostatic-entry__terms {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	margin-top: 0.55rem;
}

.nomostatic-entry__terms a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.nomostatic-entry__terms a:hover {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	margin-top: var(--wp--preset--spacing--60);
}

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

.wp-block-query-pagination a:hover {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/* Essay ----------------------------------------------------------------- */

.nomostatic-article {
	padding-bottom: var(--wp--preset--spacing--80);
	padding-top: var(--wp--preset--spacing--70);
}

.nomostatic-byline {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
}

.nomostatic-byline > * + *::before {
	color: var(--wp--preset--color--line);
	content: "·";
	margin-inline: 0.7rem;
}

.nomostatic-byline .wp-block-post-author-name,
.nomostatic-byline .wp-block-post-date,
.nomostatic-reading-time {
	margin: 0;
}

.nomostatic-byline .wp-block-post-author-name a {
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	text-decoration: none;
}

.nomostatic-reading-time {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

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

.wp-block-post-featured-image img,
.wp-block-post-content img {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	height: auto;
}

.wp-block-post-content {
	overflow-wrap: anywhere;
}

.wp-block-post-content a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.wp-block-post-content li + li {
	margin-top: 0.35em;
}

.wp-block-post-content :where(code):not(.wp-block-code code) {
	background: var(--wp--preset--color--code);
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.88em;
	padding: 0.08em 0.35em;
}

.wp-block-code,
.wp-block-preformatted {
	overflow-x: auto;
	tab-size: 2;
}

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

kbd {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-bottom-width: 2px;
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.85em;
	padding: 0.05em 0.4em;
}

.wp-block-quote {
	border-inline-start: 2px solid var(--wp--preset--color--accent);
	margin-inline: 0;
	padding-inline-start: 1rem;
}

.wp-block-pullquote {
	padding-block: 0.25rem;
}

.wp-block-pullquote blockquote {
	margin: 0;
}

.wp-block-pullquote cite {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
}

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

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

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--line);
	padding: 0.55rem 0.7rem;
	text-align: start;
	vertical-align: top;
}

.wp-block-table th {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nomostatic-note {
	border: 1px solid var(--wp--preset--color--line);
	border-inline-start: 2px solid var(--wp--preset--color--accent);
	border-radius: 8px;
	padding: 1rem 1.1rem;
}

.nomostatic-definition {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 0.9rem;
}

.nomostatic-definition__term {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	margin: 0 0 0.3rem;
}

.nomostatic-tags {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--40);
}

.nomostatic-tags .wp-block-post-terms {
	margin: 0.4rem 0 0;
}

.nomostatic-tags .wp-block-post-terms a {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	margin: 0.2rem 0.35rem 0.2rem 0;
	padding: 0.15rem 0.6rem;
	text-decoration: none;
}

.nomostatic-tags .wp-block-post-terms a:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.nomostatic-pager {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--40);
}

.nomostatic-pager .wp-block-post-navigation-link a {
	text-decoration: none;
}

.nomostatic-pager .post-navigation-link__label {
	color: var(--wp--preset--color--muted);
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nomostatic-comments {
	margin-top: var(--wp--preset--spacing--70);
}

.nomostatic-comments textarea,
.nomostatic-comments input[type="text"],
.nomostatic-comments input[type="email"],
.nomostatic-comments input[type="url"] {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	color: var(--wp--preset--color--ink);
	padding: 0.7rem 0.8rem;
	width: 100%;
}

.nomostatic-status {
	color: var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 500;
	letter-spacing: -0.06em;
	line-height: 0.9;
	margin: 0;
}

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

.nomostatic-footer {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: var(--wp--preset--spacing--70);
	padding-block: var(--wp--preset--spacing--60);
}

.nomostatic-colophon {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

@media (prefers-contrast: more) {
	.nomostatic-header,
	.wp-block-code,
	.nomostatic-note,
	.wp-block-table th,
	.wp-block-table td {
		border-color: var(--wp--preset--color--ink);
	}
}

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

@media print {
	.nomostatic-header,
	.nomostatic-footer,
	.nomostatic-scheme,
	.wp-block-query-pagination,
	.nomostatic-comments,
	.nomostatic-pager {
		display: none !important;
	}

	body,
	html {
		background: #fff;
		color: #000;
	}

	.wp-block-post-content a {
		text-decoration: underline;
	}
}
