/* ==========================================================================
   Monologas — one voice, one stream.
   Near-monochrome. Charis SIL for reading (Charter design, hinted for crisp screens),
   Source Serif 4 for large titles, IBM Plex Mono for small labels. The line lives in the margins only.
   ========================================================================== */

body.mono {
	--paper: #ffffff;
	--ink: #111111;
	--soft: #5e5e5a;   /* dates, labels — 6.6:1 on white */
	--mid: #8f8f8a;    /* dots, decorative only */
	--light: #d2d2ce;  /* ghost line, half disc */
	--rule: #e0e0dc;
	--tint: #f2f2f0;   /* code */
	--band: #111111;
	--band-ink: #ffffff;
	--band-soft: #b4b4af;
	--band-rule: #333331;
	--col: 640px;

	--f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
	--f-body: "Charis SIL", Charter, "Bitstream Charter", "Sitka Text", Georgia, serif;
	--f-mono: "IBM Plex Mono", ui-monospace, Consolas, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
	body.mono:not(.mono-light) {
		--paper: #121211; --ink: #ecece7; --soft: #a3a39e; --mid: #6e6e69; --light: #3a3a36;
		--rule: #2c2c29; --tint: #1e1e1c; --band: #1e1e1c; --band-ink: #ecece7; --band-soft: #a3a39e; --band-rule: #34342f;
		color-scheme: dark;
	}
}
body.mono.mono-dark {
	--paper: #121211; --ink: #ecece7; --soft: #a3a39e; --mid: #6e6e69; --light: #3a3a36;
	--rule: #2c2c29; --tint: #1e1e1c; --band: #1e1e1c; --band-ink: #ecece7; --band-soft: #a3a39e; --band-rule: #34342f;
	color-scheme: dark;
}

/* ---------- base ---------- */
html:has(body.mono) { scroll-behavior: smooth; background: var(--paper, #ffffff); }
body.mono {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 18px;
	line-height: 1.65;
	font-optical-sizing: auto;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
body.mono *, body.mono *::before, body.mono *::after { box-sizing: border-box; }
body.mono a { color: inherit; }
/* Theme and theme.json styles may colour headings and links; the journal keeps one ink. */
body.mono :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
/* White text + difference blend = ink on paper, paper on the black disc. */
body.mono .mono-hero-title { color: #fff; }
body.mono :is(h1, h2, h3, h4, h5, h6) a, body.mono .mono-entry a { color: inherit; }
body.mono :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }
body.mono ::selection { background: var(--ink); color: var(--paper); }
body.mono img { max-width: 100%; height: auto; }

/* Anything a theme still prints into the page (Blocksy drawers, search modal, back-to-top) stays hidden. */
body.mono :is(.ct-drawer-canvas, #offcanvas, #search-modal, .ct-back-to-top, .ct-panel) { display: none !important; }

.mono-skip {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--ink); color: var(--paper) !important; padding: 10px 14px;
	font-family: var(--f-mono); font-size: 15px; text-decoration: none;
}
.mono-skip:focus { top: 12px; }

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

.mono-col {
	width: 100%;
	max-width: calc(var(--col) + 32px);
	margin-inline: auto;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- top bar ---------- */
.mono-top {
	position: relative; z-index: 5;
	height: 64px;
	display: flex; align-items: center;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
	max-width: 1232px; width: 100%; margin: 0 auto;
}
.mono-mark {
	font-family: var(--f-mono); font-size: 15px; font-weight: 500; letter-spacing: .02em;
	text-decoration: none; padding: 12px 0;
}

/* ---------- the flow (home) ---------- */
.mono-flow { position: relative; flex: 1 0 auto; }
.mono-thread {
	position: absolute; left: 0; top: 0; width: 100%; height: 100%;
	pointer-events: none; z-index: 3; overflow: visible;
}
.mono-thread path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mono-thread .ghost { stroke: var(--light); stroke-width: 1; }
.mono-thread .live { stroke: var(--ink); stroke-width: 1.5; }
.mono-thread .bead { fill: var(--paper); stroke: var(--light); stroke-width: 1; transition: fill .3s, stroke .3s; }
.mono-thread .bead.on { fill: var(--ink); stroke: var(--ink); }
.mono-thread .tip { fill: var(--ink); }

/* No z-index on these wrappers: the big title blends against the page itself. */
.mono-flow > *:not(.mono-thread) { position: relative; }
.mono-read { isolation: auto; }
.mono-read > *:not(.mono-thread) { position: relative; }

/* ---------- hero ---------- */
.mono-hero {
	position: relative;
	height: clamp(460px, 68vw + 270px, 680px);
	max-width: 1232px; margin: -64px auto 0;
	overflow: hidden;
	pointer-events: none;
	/* Own opaque ground + isolation, so the title's colour inversion over the disc works on any background. */
	background: var(--paper);
	isolation: isolate;
}
.mono-hero-art { position: absolute; inset: 0; z-index: 1; }
.mono-sh { position: absolute; display: block; will-change: transform; }
.mono-sh-disc {
	width: min(80vw, 560px); aspect-ratio: 1; border-radius: 50%;
	background: var(--ink);
	left: 37%; top: 88px;
}
.mono-sh-dots {
	width: 128px; height: 128px; left: 14%; top: 72%;
	background-image: radial-gradient(var(--mid) 1.6px, transparent 2px);
	background-size: 14px 14px;
}
.mono-sh-half {
	width: 46vw; max-width: 260px; aspect-ratio: 2 / 1;
	border-radius: 999px 999px 0 0; background: var(--light);
	left: 50%; bottom: 0;
}
.mono-hero-title {
	position: absolute; z-index: 2;
	left: max(16px, env(safe-area-inset-left, 0px)); top: 47%;
	margin: 0;
	font-family: var(--f-display); font-style: italic; font-weight: 600;
	font-size: clamp(58px, 19vw, 190px); line-height: 1; letter-spacing: -.03em;
	mix-blend-mode: difference;
	pointer-events: auto;
}

/* ---------- lede ---------- */
.mono-lede { padding-top: 8px; padding-bottom: 64px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.mono-lede-text { margin: 0; font-size: 22px; line-height: 1.45; font-weight: 400; max-width: 26ch; text-wrap: balance; }
.mono-lede-text em, .mono-lede-text i { font-family: var(--f-display); font-style: italic; font-weight: 400; }
.mono-tagline { margin: 0; font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; color: var(--soft); }
.mono-lede-small { padding-top: 32px; padding-bottom: 40px; }
.mono-page-title { margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 46px; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }

/* ---------- stream ---------- */
.mono-stream { padding-top: 64px; display: flex; flex-direction: column; gap: 112px; }
.mono-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.mono-entry.is-new { animation: mono-rise .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes mono-rise { from { opacity: .001; transform: translateY(18px); } }
.mono-meta {
	display: flex; flex-wrap: wrap; gap: 6px 16px;
	font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; line-height: 1.5; color: var(--soft);
	font-variant-numeric: tabular-nums;
}
.mono-entry-title {
	margin: 0; max-width: 12em;
	font-family: var(--f-display); font-weight: 600;
	font-size: clamp(34px, 9vw, 52px); line-height: 1.1; letter-spacing: -.015em;
	text-wrap: balance;
}
.mono-entry-title a { text-decoration: none; }
@media (hover: hover) {
	.mono-entry-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .1em; text-decoration-skip-ink: auto; }
}
.mono-entry-excerpt { margin: 0; font-size: 18px; line-height: 1.6; max-width: 38ch; }
.mono-entry-more {
	display: inline-block;
	font-family: var(--f-mono); font-size: 15px; letter-spacing: .01em; line-height: 1;
	text-decoration: none; padding: 14px 0 6px; border-bottom: 1px solid var(--ink);
}
.mono-entry-more:hover { color: var(--soft); border-color: var(--soft); }
.mono-empty { color: var(--soft); }

/* tail: loader / end */
.mono-tail { padding-top: 112px; padding-bottom: 80px; display: flex; justify-content: center; }
.mono-next, .mono-end {
	display: flex; flex-direction: column; align-items: center; gap: 14px;
	font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; color: var(--soft);
	text-decoration: none; padding: 8px 16px;
}
.mono-dots { display: flex; gap: 8px; }
.mono-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--light); display: block; }
.mono-dots i:nth-child(2) { background: var(--ink); }
.mono-next.is-loading .mono-dots i { animation: mono-blink 1.2s infinite; }
.mono-next.is-loading .mono-dots i:nth-child(2) { animation-delay: .2s; }
.mono-next.is-loading .mono-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes mono-blink { 0%, 100% { background: var(--light); } 40% { background: var(--ink); } }
.mono-end-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); display: block; }

/* ---------- single post / page ---------- */
.mono-read { position: relative; flex: 1 0 auto; padding-bottom: 24px; }
.mono-article-head { padding-top: 40px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 18px; }
.mono-article-title {
	margin: 0; font-family: var(--f-display); font-weight: 600;
	font-size: clamp(38px, 10.5vw, 66px); line-height: 1.08; letter-spacing: -.015em; text-wrap: balance;
}
.mono-standfirst { margin: 0; font-size: 20px; line-height: 1.5; font-style: italic; font-weight: 400; color: var(--soft); max-width: 32ch; }
.mono-figure { margin: 0 auto 8px; max-width: 960px; }
.mono-figure img { display: block; width: 100%; height: auto; }
.mono-figure figcaption, .mono-content figcaption, .mono-content .wp-element-caption {
	font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; line-height: 1.5; color: var(--soft);
	text-align: left; margin-top: 10px;
}
.mono-figure figcaption { padding-inline: 16px; max-width: calc(var(--col) + 32px); margin-inline: auto; }

.mono-content { position: relative; padding-top: 32px; font-size: 19px; line-height: 1.65; }
.mono-content p, .mono-content li { text-wrap: pretty; }
.mono-content > * { margin-top: 0; margin-bottom: 1.3em; }
.mono-content > *:last-child { margin-bottom: 0; }
.mono-content > p:first-of-type::first-letter,
.mono-content .has-drop-cap:not(:focus)::first-letter {
	float: left; font-family: var(--f-display); font-style: italic; font-weight: 600;
	font-size: 4.6em; line-height: .84; padding: .07em .1em 0 0; margin: 0; color: var(--ink);
}
.mono-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.mono-content a:hover { color: var(--soft); }
.mono-content h2, .mono-content h3, .mono-content h4 {
	font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance;
	margin-top: 1.8em; margin-bottom: .6em;
}
.mono-content h2 { font-size: 30px; }
.mono-content h3 { font-family: var(--f-body); font-weight: 700; font-size: 22px; letter-spacing: 0; }
.mono-content h4 { font-family: var(--f-body); font-weight: 700; font-size: 19px; font-style: italic; letter-spacing: 0; }
.mono-content ul, .mono-content ol { padding-left: 1.2em; }
.mono-content li { margin-bottom: .4em; }
.mono-content li::marker { color: var(--soft); }
.mono-content blockquote, .mono-content .wp-block-quote {
	margin: 2em 0; padding: 26px 0; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
	text-align: center; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 27px; line-height: 1.3;
}
.mono-content blockquote p { margin: 0 0 .5em; }
.mono-content blockquote p:last-of-type { margin-bottom: 0; }
.mono-content blockquote cite, .mono-content .wp-block-quote cite {
	display: block; margin-top: 16px; font-family: var(--f-mono); font-style: normal; font-size: 14px; letter-spacing: .01em; color: var(--soft);
}
.mono-content .wp-block-pullquote { border: 0; padding: 0; margin: 2.4em 0; }
.mono-content .wp-block-pullquote blockquote { font-size: 34px; }
.mono-content hr, .mono-content .wp-block-separator {
	border: 0; height: 7px; margin: 2.6em auto; width: 48px; max-width: 48px; opacity: 1;
	background: radial-gradient(circle, var(--ink) 3px, transparent 3.5px) 0 0 / 16px 7px repeat-x;
}
.mono-content code, .mono-content kbd { font-family: var(--f-mono); font-size: .85em; background: var(--tint); padding: .1em .35em; }
.mono-content pre { font-family: var(--f-mono); font-size: 14px; line-height: 1.6; background: var(--tint); padding: 18px; overflow-x: auto; }
.mono-content pre code { background: none; padding: 0; }
.mono-content img { height: auto; }
.mono-content figure { margin-left: 0; margin-right: 0; }
.mono-content .alignwide, .mono-content .alignfull { margin-left: calc(50% - min(50vw, 480px)); margin-right: calc(50% - min(50vw, 480px)); max-width: none; width: auto; }
.mono-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.mono-content table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.mono-content th, .mono-content td { border-bottom: 1px solid var(--rule); padding: 8px 10px 8px 0; text-align: left; }
.mono-content mark { background: var(--tint); color: inherit; }
.mono-pages { font-family: var(--f-mono); font-size: 15px; display: flex; gap: 12px; }

/* next / previous */
.mono-postnav { margin-top: 80px; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.mono-postnav-link { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.mono-postnav-label { font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; color: var(--soft); }
.mono-postnav-title { font-family: var(--f-body); font-weight: 700; font-size: 21px; line-height: 1.25; }
@media (hover: hover) { .mono-postnav-link:hover .mono-postnav-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .1em; } }
.mono-postnav-home { align-items: flex-end; text-align: right; border-bottom: 0; }
.mono-italic { font-style: italic; }

/* comments (only when switched on) */
.mono-comments { margin-top: 64px; font-size: 16px; }
.mono-comments-title, .mono-comments .comment-reply-title { font-family: var(--f-display); font-weight: 600; font-size: 28px; margin: 0 0 20px; }
.mono-comment-list, .mono-comment-list ol { list-style: none; padding: 0; margin: 0 0 40px; }
.mono-comment-list li { border-top: 1px solid var(--rule); padding: 18px 0; }
.mono-comment-list .comment-meta { font-family: var(--f-mono); font-size: 14px; color: var(--soft); }
.mono-comment-list .says { display: none; }
.mono-comments label { display: block; font-family: var(--f-mono); font-size: 14px; color: var(--soft); margin-bottom: 6px; }
.mono-comments input[type=text], .mono-comments input[type=email], .mono-comments input[type=url], .mono-comments textarea {
	width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 10px 0; border-radius: 0;
}
.mono-comments .submit {
	font-family: var(--f-mono); font-size: 15px; letter-spacing: .01em; background: var(--ink); color: var(--paper);
	border: 0; padding: 14px 20px; cursor: pointer; border-radius: 0; margin-top: 8px;
}

/* 404 */
.mono-404 { flex: 1 0 auto; padding-top: 48px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mono-404-art { position: relative; width: 220px; height: 150px; margin-bottom: 16px; }
.mono-404-art span { position: absolute; top: 0; width: 150px; height: 150px; border-radius: 50%; border: 1.5px solid var(--ink); }
.mono-404-art span + span { left: 70px; background: var(--ink); opacity: .1; }
.mono-404 p { margin: 0; max-width: 34ch; }

/* ---------- footer ---------- */
.mono-footer { position: relative; z-index: 2; background: var(--band); color: var(--band-ink); overflow: hidden; margin-top: 0; }
.mono-footer::before {
	content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
	border: 1px solid var(--band-rule); right: -80px; top: -70px; pointer-events: none;
}
.mono-footer-in {
	position: relative; max-width: calc(var(--col) + 32px); margin: 0 auto;
	padding: 48px max(16px, env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	display: flex; flex-direction: column; gap: 20px;
}
.mono-footer-word { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.mono-footer-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--band-soft); max-width: 32ch; }
.mono-footer-links { display: flex; gap: 24px; font-family: var(--f-mono); font-size: 15px; letter-spacing: .01em; }
.mono-footer-links a { color: var(--band-ink); text-decoration: none; padding: 12px 0; }
.mono-footer-links a:hover { text-decoration: underline; text-underline-offset: .25em; }
.mono-footer-copy { font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; color: var(--band-soft); border-top: 1px solid var(--band-rule); padding-top: 20px; }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
	body.mono { font-size: 19px; }
	.mono-top { height: 80px; }
	.mono-hero { margin-top: -80px; }
	.mono-sh-disc { left: auto; right: 5%; top: 60px; width: min(44vw, 540px); }
	.mono-sh-dots { left: 3%; top: 64%; width: 200px; height: 200px; background-size: 16px 16px; }
	.mono-sh-half { left: auto; right: 38%; width: 260px; }
	.mono-hero-title { left: 24px; top: 36%; }
	.mono-lede-text { font-size: 28px; }
	.mono-stream { gap: 140px; padding-top: 88px; }
	.mono-entry-excerpt { font-size: 18px; max-width: 36ch; }
	.mono-content { font-size: 20px; }
	.mono-content h2 { font-size: 34px; }
	.mono-content blockquote, .mono-content .wp-block-quote { font-size: 34px; }
	.mono-article-head { padding-top: 72px; padding-bottom: 48px; }
	.mono-postnav { flex-direction: row; flex-wrap: wrap; }
	.mono-postnav-link { flex: 1 1 200px; border-bottom: 0; }
	.mono-postnav-newer, .mono-postnav-home { align-items: flex-end; text-align: right; }
	.mono-footer-in { flex-direction: row; flex-wrap: wrap; align-items: flex-end; column-gap: 48px; padding-top: 64px; }
	.mono-footer-word { font-size: 60px; flex: 1 0 100%; }
	.mono-footer-text { flex: 1 1 280px; }
	.mono-footer-copy { flex: 1 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.mono) { scroll-behavior: auto; }
	.mono-sh { transform: none !important; }
	.mono-entry.is-new { animation: none; }
	.mono-next.is-loading .mono-dots i { animation: none; }
}

@media print {
	.mono-thread, .mono-hero-art, .mono-footer, .mono-postnav, .mono-tail { display: none !important; }
	body.mono { background: #fff; color: #000; }
}
