/* ==========================================================================
   Virdi — main stylesheet
   Mobile first. Phone layouts are designed on their own where it helps,
   then reworked at 760px (tablet) and 1100px (desktop).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--paper: #f4f1ea;
	--surface: #fbf9f4;
	--sunken: #ebe6db;
	--ink: #17191c;
	--ink-2: #464a50;
	--ink-3: #6f737a;
	--rule: #dcd5c7;
	--rule-strong: #c4bba9;
	--accent: #b9461c;
	--accent-ink: #9a3612;
	--accent-wash: #f3dccd;
	--code-bg: #1d2024;
	--code-ink: #e8e4dc;
	--focus: #2f6db5;

	--t-ai-agents: #6247b0;
	--t-infrastructure-security: #0d6b62;
	--t-library-systems: #9c4f24;
	--t-everyday-tech: #2a62a8;
	--t-work-life: #7f6417;

	--serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
	--sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

	--wrap: 1180px;
	--measure: 42rem;
	--gutter: 1.25rem;
	--radius: 6px;
	--header-h: 64px;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #141619;
		--surface: #1b1e22;
		--sunken: #0f1113;
		--ink: #ece8e1;
		--ink-2: #bdb8af;
		--ink-3: #8f8b84;
		--rule: #2c3036;
		--rule-strong: #41464e;
		--accent: #f08a5d;
		--accent-ink: #f6a481;
		--accent-wash: #3a2219;
		--code-bg: #0e1012;
		--code-ink: #e8e4dc;
		--focus: #80aeea;
		--t-ai-agents: #ab97f2;
		--t-infrastructure-security: #5ec4b6;
		--t-library-systems: #e49e72;
		--t-everyday-tech: #86b2ec;
		--t-work-life: #d8bb5e;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--paper: #141619;
	--surface: #1b1e22;
	--sunken: #0f1113;
	--ink: #ece8e1;
	--ink-2: #bdb8af;
	--ink-3: #8f8b84;
	--rule: #2c3036;
	--rule-strong: #41464e;
	--accent: #f08a5d;
	--accent-ink: #f6a481;
	--accent-wash: #3a2219;
	--code-bg: #0e1012;
	--code-ink: #e8e4dc;
	--focus: #80aeea;
	--t-ai-agents: #ab97f2;
	--t-infrastructure-security: #5ec4b6;
	--t-library-systems: #e49e72;
	--t-everyday-tech: #86b2ec;
	--t-work-life: #d8bb5e;
	color-scheme: dark;
}

/* Topic colour hook */
.topic--ai-agents { --topic: var(--t-ai-agents); }
.topic--infrastructure-security { --topic: var(--t-infrastructure-security); }
.topic--library-systems { --topic: var(--t-library-systems); }
.topic--everyday-tech { --topic: var(--t-everyday-tech); }
.topic--work-life { --topic: var(--t-work-life); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	font-feature-settings: "kern", "liga";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent-wash); color: var(--ink); }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 560;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0;
	text-wrap: balance;
}
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 1rem; top: -100px; z-index: 100;
	background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.icon { flex: none; }

/* Small structural heading: plain sentence case, no tracking games. */
.small-heading {
	font-family: var(--sans);
	font-size: .875rem;
	font-weight: 600;
	color: var(--ink-3);
	letter-spacing: 0;
	margin-bottom: .75rem;
}

/* ---------- Buttons & links ---------- */
.button,
.ff-btn-submit,
.sv-button {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .8rem 1.25rem;
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 550;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.button:hover,
.ff-btn-submit:hover,
.sv-button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.button .icon { width: 18px; height: 18px; transition: transform .15s ease; }
.button:hover .icon { transform: translateX(3px); }

/* Secondary button: outlined, fills with ink on hover. */
.button--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.button--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button--sm { padding: .5rem .85rem; font-size: .9rem; gap: .4rem; }
.button--sm .icon { width: 16px; height: 16px; }
.topic-row:hover .topic-row__button { border-color: var(--topic); color: var(--ink); }
.topic-row:hover .topic-row__button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.text-link {
	font-weight: 550;
	text-decoration: underline;
	text-decoration-color: var(--rule-strong);
	text-underline-offset: .3em;
}
.text-link:hover { text-decoration-color: var(--accent); }

.read-link {
	display: inline-flex; align-items: center; gap: .45rem;
	font-weight: 550; text-decoration: none;
	border-bottom: 1px solid var(--accent);
	padding-bottom: 2px;
}
.read-link .icon { width: 17px; height: 17px; }

.icon-button {
	display: inline-grid; place-items: center;
	width: 40px; height: 40px;
	background: none; border: 0; border-radius: var(--radius);
	color: var(--ink-2); cursor: pointer;
}
.icon-button:hover { background: var(--sunken); color: var(--ink); }

.text-button {
	display: inline-flex; align-items: center; gap: .5rem;
	background: none; border: 0; padding: .4rem 0; cursor: pointer;
	color: var(--ink-2); text-decoration: none; font-size: .95rem;
}
.text-button span { display: inline-flex; align-items: center; gap: .5rem; }

.when-dark { display: none !important; }
:root[data-theme="dark"] .when-dark { display: inline-flex !important; }
:root[data-theme="dark"] .when-light { display: none !important; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .when-dark { display: inline-flex !important; }
	:root:not([data-theme="light"]) .when-light { display: none !important; }
}

/* Topic link: coloured text with a short leading bar. No pill. */
.topic-link {
	display: inline-flex; align-items: center; gap: .45rem;
	color: var(--topic, var(--ink-2));
	font-size: .875rem; font-weight: 550;
	text-decoration: none;
}
.topic-link::before {
	content: ""; width: 10px; height: 2px; background: currentColor; border-radius: 1px;
}
.topic-link:hover { text-decoration: underline; color: var(--topic, var(--ink)); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 40;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--rule);
}
.site-header__inner {
	display: flex; align-items: center; gap: 1rem;
	height: var(--header-h);
}
.brand {
	display: inline-flex; align-items: center; gap: .65rem;
	text-decoration: none; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__logo { height: var(--logo-h-sm, 26px); width: auto; max-width: min(70vw, 360px); object-fit: contain; object-position: left center; }
.footer-about .brand__logo { height: calc(var(--logo-h, 30px) + 2px); }
@media (min-width: 900px) { .site-header .brand__logo { height: var(--logo-h, 30px); max-width: 420px; } }
.brand__mark {
	display: grid; place-items: center;
	width: 34px; height: 34px;
	border: 1.5px solid var(--ink);
	border-radius: 50%;
	font-family: var(--serif); font-weight: 600; font-size: .9rem; letter-spacing: .02em;
	transition: background-color .2s, color .2s, border-color .2s;
}
.brand:hover .brand__mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }

.site-nav { display: none; margin-left: auto; }
.nav-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
	display: block; padding: .5rem .8rem;
	text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .975rem;
	border-radius: var(--radius);
}
.nav-list a:hover { color: var(--ink); background: var(--sunken); }
.nav-list .current-menu-item > a,
.nav-list .current_page_parent > a,
.nav-list .current-menu-parent > a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.header-actions .js-theme-toggle,
.header-actions .js-search-open { display: none; }

.menu-button {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; margin-right: -10px;
	background: none; border: 0; border-radius: 50%;
	color: var(--ink); cursor: pointer;
	transition: background-color .15s ease;
}
.menu-button:hover, .menu-button:active { background: var(--sunken); }
.menu-button .icon { width: 26px; height: 26px; stroke-width: 1.8; }

.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

@media (min-width: 900px) {
	.site-nav { display: block; }
	.site-nav + .header-actions { margin-left: .5rem; }
	.menu-button { display: none; }
	.header-actions .js-theme-toggle,
	.header-actions .js-search-open { display: inline-grid; }
	:root { --header-h: 72px; }
}

/* ---------- Mobile menu (phones only) ---------- */
.mobile-menu {
	position: fixed; inset: 0; z-index: 60;
	background: var(--paper);
	overflow-y: auto;
	display: flex; flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__top {
	display: flex; align-items: center; justify-content: space-between;
	height: var(--header-h);
	border-bottom: 1px solid var(--rule);
}
.mobile-menu__body { padding-top: 1.25rem; padding-bottom: 2rem; display: flex; flex-direction: column; gap: 1.75rem; }
.mobile-nav { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
	display: flex; justify-content: space-between; align-items: center;
	padding: .7rem 0;
	font-family: var(--serif); font-size: 2rem; font-weight: 520; line-height: 1.1;
	text-decoration: none; border-bottom: 1px solid var(--rule);
}
.mobile-nav .current-menu-item a,
.mobile-nav .current_page_parent a { color: var(--accent); }
.mobile-menu__topics ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.mobile-menu__topics a {
	display: flex; justify-content: space-between; padding: .55rem 0;
	text-decoration: none; font-weight: 500;
	border-left: 3px solid var(--topic); padding-left: .8rem;
}
.mobile-menu__topics a span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mobile-menu__foot { display: flex; gap: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
@media (prefers-reduced-motion: no-preference) {
	.mobile-menu:not([hidden]) .mobile-menu__body { animation: sheet-in .22s ease-out; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Search ---------- */
.search-form {
	position: relative;
	display: flex; align-items: center;
	background: var(--surface);
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius);
	padding-left: .9rem;
}
.search-form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search-form .icon { color: var(--ink-3); width: 20px; height: 20px; }
.search-form__input {
	flex: 1; min-width: 0;
	border: 0; background: none; outline: none;
	padding: .85rem .75rem;
	font: inherit; color: var(--ink); font-size: 1.05rem;
}
.search-form__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-form__submit {
	margin: 5px; padding: .55rem .95rem;
	background: var(--ink); color: var(--paper);
	border: 0; border-radius: 4px; cursor: pointer; font-weight: 550; font-size: .95rem;
}
.search-form__submit:hover { background: var(--accent); color: #fff; }

.search-dialog {
	width: min(680px, calc(100% - 2rem));
	margin: 12vh auto auto;
	padding: 0; border: 1px solid var(--rule); border-radius: 10px;
	background: var(--paper); color: var(--ink);
	box-shadow: 0 30px 80px -20px rgba(0,0,0,.35);
}
.search-dialog::backdrop { background: rgba(15, 16, 18, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.search-dialog__inner { position: relative; padding: 1.25rem; }
.search-dialog .search-form { margin-right: 3rem; }
.search-dialog__close { position: absolute; top: 1.5rem; right: 1.1rem; }
.search-dialog__hints { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: 1rem; font-size: .925rem; color: var(--ink-3); }
.search-dialog__hints a { color: var(--ink-2); }

/* ---------- Home: intro ---------- */
.intro {
	padding-top: 2rem; padding-bottom: 2.5rem;
	display: grid; gap: 1.5rem;
}
.intro__id-mobile { display: flex; align-items: center; gap: .85rem; }
.intro__id-mobile .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.intro__id-mobile p { margin: 0; font-size: .95rem; line-height: 1.35; color: var(--ink-2); }
.intro__id-mobile strong { color: var(--ink); font-weight: 600; }
.intro__title {
	font-size: clamp(2rem, 7.4vw, 3.6rem);
	font-weight: 480;
	line-height: 1.08;
	letter-spacing: -0.02em;
	font-variation-settings: "opsz" 72;
}
.intro__lede { font-size: 1.125rem; color: var(--ink-2); max-width: 38rem; margin-top: 1.1rem; }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.intro__portrait { display: none; margin: 0; }
.intro__title-short { display: none; }
/* Phones: a lighter intro. Short heading, no sub heading, compact identity row,
   buttons side by side. */
@media (max-width: 759px) {
	.intro { padding-top: 1.5rem; padding-bottom: 1.75rem; gap: 1.1rem; }
	.intro__id-mobile { gap: .95rem; }
	.intro__id-mobile .avatar { width: 64px; height: 64px; box-shadow: 0 0 0 2.5px var(--paper), 0 0 0 4.5px var(--accent); }
	.intro__id-mobile p { font-size: 1rem; line-height: 1.35; }
	.intro__id-mobile strong { font-size: 1.1rem; font-family: var(--serif); font-weight: 600; letter-spacing: -0.005em; }
	.intro__title { font-size: clamp(1.7rem, 7.6vw, 2.05rem); line-height: 1.16; letter-spacing: -0.015em; text-wrap: balance; }
	.intro__title.has-short .intro__title-full { display: none; }
	.intro__title.has-short .intro__title-short { display: inline; }
	.intro__lede { display: none; }
	.intro__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: 1.25rem; }
	.intro__actions .button { justify-content: center; padding: .75rem .5rem; font-size: .925rem; white-space: nowrap; }
	.intro__actions .button:only-child { grid-column: 1 / -1; }
	.intro__actions .button .icon { width: 16px; height: 16px; }
	.feature .button { width: 100%; justify-content: center; }
}

@media (min-width: 900px) {
	.intro {
		grid-template-columns: minmax(0, 1fr) 320px;
		align-items: end;
		gap: 4rem;
		padding-top: 4.5rem; padding-bottom: 4rem;
	}
	.intro__id-mobile { display: none; }
	.intro__portrait { display: block; position: relative; }
	.intro__portrait img {
		width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
		border-radius: var(--radius);
		filter: saturate(.92) contrast(1.02);
	}
	.intro__portrait::before {
		content: ""; position: absolute; top: 14px; left: 14px; width: 100%; aspect-ratio: 4 / 5;
		border: 1.5px solid var(--accent); border-radius: var(--radius); z-index: -1;
	}
	.intro__portrait figcaption { margin-top: 1.4rem; font-size: .875rem; color: var(--ink-3); }
}

/* ---------- Sections ---------- */
.home-section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section-head {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding-bottom: .85rem; margin-bottom: 1.5rem;
	border-bottom: 1.5px solid var(--ink);
}
.section-title { font-size: 1.5rem; font-weight: 560; }
.section-note { margin: 0; color: var(--ink-3); font-size: .95rem; display: none; }
@media (min-width: 760px) {
	.home-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
	.section-title { font-size: 1.85rem; }
	.section-note { display: block; }
}

/* ---------- Feature (lead story) ---------- */
.latest { display: grid; gap: 2rem; }
.feature__media { display: block; overflow: hidden; border-radius: var(--radius); margin-bottom: 1.1rem; background: var(--sunken); }
.feature__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.feature:hover .feature__media img { transform: scale(1.02); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .875rem; color: var(--ink-3); margin-bottom: .6rem; }
.meta-line .sep { color: var(--rule-strong); }
.feature__title { font-size: clamp(1.6rem, 4.8vw, 2.25rem); line-height: 1.12; margin-bottom: .75rem; }
.feature__title a { text-decoration: none; }
.feature__title a:hover { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.feature__excerpt { color: var(--ink-2); font-size: 1.05rem; }

@media (min-width: 1000px) {
	.latest { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3.5rem; }
}

/* ---------- Post list rows ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { border-bottom: 1px solid var(--rule); }
.post-row:first-child { padding-top: 0; }
.post-row article {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 84px;
	grid-template-areas: "meta thumb" "body thumb";
	column-gap: 1rem;
	padding: 1.15rem 0;
}
.post-row__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; font-size: .825rem; color: var(--ink-3); margin-bottom: .3rem; font-variant-numeric: tabular-nums; }
.post-row__body { grid-area: body; min-width: 0; }
.post-row__thumb { grid-area: thumb; align-self: start; margin-top: .2rem; }
.post-row__thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; background: var(--sunken); }
.post-row__title { font-size: 1.2rem; line-height: 1.25; font-weight: 560; }
.post-row__title a { text-decoration: none; }
.post-row__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); color: inherit; }
.post-row__excerpt { display: none; color: var(--ink-2); margin: .4rem 0 0; font-size: .975rem; }
.post-row__read { display: none; margin: .4rem 0 0; font-size: .825rem; color: var(--ink-3); }
.post-row article:not(:has(.post-row__thumb)) { grid-template-columns: 1fr; grid-template-areas: "meta" "body"; }

/* Compact rows next to the lead story keep the phone layout. */
.post-list--compact .post-row:first-child article { padding-top: 0; }

@media (min-width: 760px) {
	.listing .post-row article,
	.search-results .post-row article {
		grid-template-columns: 7.5rem minmax(0, 1fr) 132px;
		grid-template-areas: "meta body thumb";
		column-gap: 1.75rem;
		padding: 1.6rem 0;
	}
	.listing .post-row article:not(:has(.post-row__thumb)) { grid-template-columns: 7.5rem minmax(0, 1fr); grid-template-areas: "meta body"; }
	.listing .post-row__meta { flex-direction: column; align-items: flex-start; gap: .35rem; padding-top: .3rem; }
	.listing .post-row__title { font-size: 1.45rem; }
	.listing .post-row__excerpt,
	.listing .post-row__read { display: block; }
	.listing .post-row__thumb img { width: 132px; height: 96px; }
}

/* ---------- Writing / topic listings ---------- */

/* Header: title + lede on the left, a few quiet stats on the right. */
.listing-header { padding-top: 2rem; padding-bottom: 1.75rem; display: grid; gap: 1.5rem; }
.listing-header .page-lede { margin-top: .8rem; }
.listing-stats { display: flex; gap: 2rem; margin: 0; }
.listing-stats div { display: flex; flex-direction: column-reverse; gap: .1rem; }
.listing-stats dt { font-size: .8rem; color: var(--ink-3); }
.listing-stats dd { margin: 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.listing-header--archive { display: block; }
@media (min-width: 900px) {
	.listing-header:not(.listing-header--archive) {
		grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3rem;
		padding-top: 3.5rem; padding-bottom: 2.25rem;
	}
	.listing-stats { gap: 2.5rem; padding-bottom: .35rem; }
	.listing-stats dd { font-size: 1.85rem; }
}

/* Sticky toolbar: topic tabs + quick filter. */
.listing-toolbar {
	position: sticky; top: var(--header-h); z-index: 30;
	background: color-mix(in srgb, var(--paper) 92%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--rule);
}
.listing-toolbar__inner { display: flex; flex-direction: column; gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
.listing-toolbar .topic-filter { margin: 0 calc(var(--gutter) * -1); }
.listing-toolbar .topic-filter ul { border: 0; gap: .15rem; padding: 0 var(--gutter); }
.listing-toolbar .topic-filter a {
	padding: .42rem .6rem; margin: 0; border: 1px solid transparent; border-radius: var(--radius);
	font-size: .9rem; gap: .3rem;
}
/* When the tabs overflow, fade the edge so it reads as scrollable. */
.listing-toolbar .topic-filter.is-overflowing ul {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
	padding-right: 40px;
}
.listing-toolbar .topic-filter.is-overflowing.is-scrolled-end ul { -webkit-mask-image: none; mask-image: none; }
.listing-toolbar .topic-filter a:hover { background: var(--sunken); }
.listing-toolbar .topic-filter a[aria-current="page"] {
	background: var(--surface); border-color: var(--rule-strong); color: var(--ink);
	box-shadow: inset 0 -2px 0 var(--topic, var(--accent));
}

.quick-filter {
	position: relative; display: flex; align-items: center;
	background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius);
	padding-left: .7rem;
}
.quick-filter:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.quick-filter .icon { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.quick-filter input {
	flex: 1; min-width: 0; border: 0; outline: 0; background: none;
	font: inherit; font-size: .95rem; color: var(--ink); padding: .55rem .6rem;
}
.quick-filter input::-webkit-search-cancel-button { -webkit-appearance: none; }
.quick-filter__hint {
	margin-right: .5rem; font-family: var(--mono); font-size: .75rem; color: var(--ink-3);
	border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 .35rem; line-height: 1.4;
}
.quick-filter:focus-within .quick-filter__hint { display: none; }
@media (hover: none) { .quick-filter__hint { display: none; } }

@media (min-width: 900px) {
	.listing-toolbar__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
	.listing-toolbar .topic-filter { margin: 0; min-width: 0; }
	.listing-toolbar .topic-filter ul { padding: 0; }
	.quick-filter { width: 13rem; flex: none; }
}

.listing { padding-top: 1.5rem; padding-bottom: 3rem; }

/* Year groups. Phones: a sticky band. Desktop: a sticky label in its own column. */
.year-group + .year-group { margin-top: 1.5rem; }
.year-head {
	position: sticky; top: calc(var(--header-h) + var(--toolbar-h, 98px)); z-index: 5;
	display: flex; align-items: baseline; justify-content: space-between;
	padding: .55rem 0; background: var(--paper);
	border-bottom: 1.5px solid var(--ink);
}
.year-label {
	font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1;
	color: var(--ink); font-variant-numeric: lining-nums;
}
.year-count { margin: 0; font-size: .85rem; color: var(--ink-3); }

@media (min-width: 1100px) {
	.year-group { display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: 2.5rem; }
	.year-group + .year-group { margin-top: 3rem; }
	.year-head {
		top: calc(var(--header-h) + var(--toolbar-h, 62px) + 1.5rem);
		align-self: start; display: block; padding: 1.25rem 0 0; border: 0; background: none;
	}
	.year-label { font-size: 2.6rem; font-weight: 420; color: var(--ink-3); letter-spacing: -0.01em; }
	.year-count { margin-top: .5rem; }
	.year-group .entry-list { border-top: 1.5px solid var(--ink); }
}

/* Entries */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry { border-bottom: 1px solid var(--rule); }
.entry[hidden] { display: none; }
.entry__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 88px;
	grid-template-areas: "body thumb";
	column-gap: 1rem;
	padding: 1.15rem 0;
}
.entry__date { display: none; }
.entry__body { grid-area: body; min-width: 0; }
.entry__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .85rem;
	margin: 0 0 .4rem; font-size: .825rem; color: var(--ink-3);
}
.entry__meta .topic-link { position: relative; z-index: 2; white-space: nowrap; font-size: .825rem; }
.entry__read { white-space: nowrap; }
.entry__title { font-size: 1.2rem; line-height: 1.25; font-weight: 560; text-wrap: pretty; }
.entry__link { text-decoration: none; }
/* Stretch the title link over the whole row. */
.entry__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.entry__excerpt { display: none; margin: .5rem 0 0; color: var(--ink-2); font-size: .975rem; line-height: 1.55; }
.entry__thumb { grid-area: thumb; align-self: start; margin-top: .15rem; border-radius: 5px; overflow: hidden; background: var(--sunken); aspect-ratio: 1; }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.entry__placeholder {
	display: block; width: 100%; height: 100%;
	background:
		radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--topic, var(--accent)) 35%, transparent) 0 18%, transparent 19%),
		linear-gradient(135deg, color-mix(in srgb, var(--topic, var(--accent)) 14%, var(--surface)), var(--sunken));
}
.entry:hover .entry__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.entry:hover .entry__thumb img { transform: scale(1.04); }
.entry__link:focus-visible { outline: none; }
.entry:has(.entry__link:focus-visible) .entry__inner { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

@media (min-width: 760px) {
	.entry__inner {
		grid-template-columns: 4rem minmax(0, 1fr) 200px;
		grid-template-areas: "date body thumb";
		column-gap: 1.75rem;
		padding: 1.75rem 0;
	}
	.entry__date {
		grid-area: date; display: flex; flex-direction: column; align-items: flex-start;
		padding-top: .15rem; color: var(--ink-3); line-height: 1;
	}
	.entry__day { font-family: var(--serif); font-size: 1.75rem; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
	.entry__month { font-size: .8rem; margin-top: .3rem; text-transform: uppercase; letter-spacing: .06em; }
	.entry__title { font-size: 1.5rem; line-height: 1.2; }
	.entry__excerpt {
		display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}
	.entry__thumb { aspect-ratio: 16 / 10; }
	/* Desktop hover: a soft band behind the row. */
	.entry__inner::before {
		content: ""; position: absolute; inset: 0 -1rem; border-radius: 8px; z-index: -1;
		background: var(--surface); opacity: 0; transition: opacity .2s ease;
	}
	.entry:hover .entry__inner::before { opacity: 1; }
}

/* Quick-filter empty state */
.filter-empty { padding: 2.5rem 0 1rem; max-width: 34rem; }
.filter-empty[hidden] { display: none; }
.filter-empty__title { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin-bottom: .4rem; }
.filter-empty p { color: var(--ink-2); }
mark.entry-hl { background: var(--accent-wash); color: inherit; border-radius: 2px; padding: 0 .05em; }

/* ---------- Start here ---------- */
.start-here { background: var(--surface); border-block: 1px solid var(--rule); }
.start-list { list-style: none; margin: 0; padding: 0; counter-reset: start; display: grid; gap: 0; }
.start-list li { counter-increment: start; border-bottom: 1px solid var(--rule); }
.start-list li:last-child { border-bottom: 0; }
.start-list a {
	display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: .75rem;
	padding: 1.1rem 0; text-decoration: none;
}
.start-list a::before {
	content: counter(start, decimal-leading-zero);
	grid-row: span 2;
	font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: var(--accent);
	font-variant-numeric: lining-nums tabular-nums;
}
.start-list__title { font-family: var(--serif); font-size: 1.25rem; font-weight: 560; line-height: 1.2; }
.start-list a:hover .start-list__title { text-decoration: underline; text-decoration-color: var(--accent); }
.start-list__excerpt { color: var(--ink-2); font-size: .95rem; margin-top: .35rem; }
@media (min-width: 760px) {
	.start-list { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
	.start-list li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
	.start-list a { padding: 1.5rem 0; grid-template-columns: 3.5rem minmax(0, 1fr); }
	.start-list a::before { font-size: 2.2rem; }
}

/* ---------- Topics: an editorial index, not a card grid ---------- */
.topic-index { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.topic-row {
	position: relative;
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	grid-template-areas:
		"num main"
		".   action";
	column-gap: .75rem;
	row-gap: 1rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
}
.topic-row__num {
	grid-area: num;
	font-family: var(--serif);
	font-size: 1.05rem;
	line-height: 2.1;
	color: var(--topic);
	font-variant-numeric: lining-nums tabular-nums;
}
.topic-row__main { grid-area: main; min-width: 0; }
.topic-row__name {
	font-size: clamp(1.6rem, 6vw, 2.4rem);
	font-weight: 480;
	line-height: 1.08;
	letter-spacing: -0.015em;
	font-variation-settings: "opsz" 60;
}
.topic-row__name a { text-decoration: none; }
/* The whole row is clickable through the name link. */
.topic-row__name a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.topic-row__desc { color: var(--ink-2); font-size: .975rem; margin: .5rem 0 0; max-width: 34rem; }
.topic-row__latest { display: none; }
.topic-row__button { grid-area: action; justify-self: start; position: relative; z-index: 1; }
.topic-row__latest a { position: relative; z-index: 1; }

.topic-row::before {
	content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0;
	background: var(--topic); transition: width .35s ease;
}
.topic-row:hover::before { width: 100%; }
.topic-row:hover .topic-row__name a { color: var(--topic); }

@media (min-width: 900px) {
	.topic-row {
		grid-template-columns: 3.5rem minmax(0, 1.15fr) minmax(0, 1fr) auto;
		grid-template-areas: "num main latest action";
		column-gap: 2rem;
		align-items: center;
		padding: 2rem 0;
	}
	.topic-row__num { font-size: 1.25rem; line-height: 1; align-self: start; padding-top: .85rem; }
	.topic-row__latest {
		grid-area: latest;
		display: flex; flex-direction: column; gap: .3rem;
		margin: 0; padding-left: 1.5rem;
		border-left: 1px solid var(--rule);
		font-size: .95rem; line-height: 1.4;
	}
	.topic-row__label { font-size: .8rem; color: var(--ink-3); }
	.topic-row__latest a { text-decoration: none; color: var(--ink); }
	.topic-row__latest a:hover { text-decoration: underline; text-decoration-color: var(--topic); }
	.topic-row__button { justify-self: end; }
}

/* ---------- Page header ---------- */
.page-header { padding-top: 2rem; padding-bottom: 1.5rem; }
.page-title { font-size: clamp(2.1rem, 8vw, 3.5rem); font-weight: 480; letter-spacing: -0.02em; line-height: 1.05; font-variation-settings: "opsz" 72; }
.page-lede { color: var(--ink-2); font-size: 1.125rem; max-width: 40rem; margin-top: .9rem; }
.page-count { color: var(--ink-3); font-size: .925rem; margin: .4rem 0 0; }
.crumb { font-size: .9rem; color: var(--ink-3); margin-bottom: .8rem; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.crumb a { color: var(--ink-2); }
.topic-title { color: var(--ink); }
.topic-title::after { content: ""; display: block; width: 48px; height: 3px; background: var(--topic); margin-top: 1rem; }
.hash { color: var(--ink-3); font-weight: 400; margin-right: .05em; }
@media (min-width: 760px) { .page-header { padding-top: 3.5rem; padding-bottom: 2rem; } }

/* Topic filter strip */
.topic-filter { margin-top: 1.5rem; margin-inline: calc(var(--gutter) * -1); }
.topic-filter ul {
	list-style: none; margin: 0; padding: 0 var(--gutter);
	display: flex; gap: 1.4rem; overflow-x: auto; scrollbar-width: none;
	border-bottom: 1px solid var(--rule);
}
.topic-filter ul::-webkit-scrollbar { display: none; }
.topic-filter li { flex: none; }
.topic-filter a {
	display: inline-flex; align-items: baseline; gap: .35rem;
	padding: .7rem 0; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem;
	border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.topic-filter a:hover { color: var(--ink); }
.topic-filter a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--topic, var(--accent)); }
.topic-filter .count { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .topic-filter { margin-inline: 0; } .topic-filter ul { padding: 0; } }



/* Pagination */
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 2.5rem 0 0; }
.pagination a, .pagination span {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .9rem;
	border: 1px solid var(--rule-strong); border-radius: var(--radius); text-decoration: none; font-weight: 500;
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }

/* Tag index */
.tag-index { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.tag-index ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.tag-index a { text-decoration: none; color: var(--ink-2); }
.tag-index a:hover, .tag-index a[aria-current] { color: var(--accent-ink); text-decoration: underline; }
.tag-index span { font-size: .8rem; color: var(--ink-3); }

/* ---------- Article ---------- */
.article-header { padding-top: 1.75rem; padding-bottom: 1.5rem; }
/* The header spans the full content width, matching the cover image below it. */
.article-header__inner { max-width: none; }
.article-title {
	font-size: clamp(2rem, 6.4vw, 3.9rem);
	font-weight: 500; line-height: 1.06; letter-spacing: -0.02em;
	font-variation-settings: "opsz" 72;
	max-width: 72rem;
	text-wrap: pretty; /* not balance: balancing breaks long titles early and makes them look narrow */
}
.article-dek { font-family: var(--serif); font-size: clamp(1.15rem, 3.4vw, 1.5rem); line-height: 1.42; color: var(--ink-2); margin: 1.1rem 0 0; font-weight: 400; max-width: 54rem; text-wrap: pretty; }
.article-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: 1.25rem; font-size: .9rem; color: var(--ink-3); }
.article-meta > span:not(:last-child)::after { content: "·"; margin-left: 1.1rem; color: var(--ink-3); }

.article-hero { margin: 0 auto 2rem; }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--sunken); }
.article-hero figcaption { font-size: .85rem; color: var(--ink-3); margin-top: .6rem; }
/* Phones: the image runs edge to edge. */
@media (max-width: 759px) {
	.article-hero { padding-inline: 0; }
	.article-hero img { border-radius: 0; aspect-ratio: 3 / 2; }
	.article-hero figcaption { padding-inline: var(--gutter); }
}
@media (min-width: 760px) {
	.article-header { padding-top: 3.5rem; padding-bottom: 2.25rem; }
}

.article-layout { display: block; }
.toc { margin-bottom: 2rem; }
.toc__details {
	border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
.toc__details summary {
	cursor: pointer; list-style: none; padding: .85rem 1rem;
	font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; align-items: center;
}
.toc__details summary::-webkit-details-marker { display: none; }
.toc__details summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--ink-3); }
.toc__details[open] summary::after { content: "–"; }
.toc-list { list-style: none; counter-reset: toc; margin: 0; padding: 0 1rem 1rem; font-size: .95rem; }
.toc-list li { counter-increment: toc; display: grid; grid-template-columns: 1.75rem 1fr; padding: .3rem 0; line-height: 1.35; }
.toc-list li::before { content: counter(toc); color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: .1rem; }
.toc-list a { text-decoration: none; color: var(--ink-2); }
.toc-list a:hover { color: var(--ink); text-decoration: underline; }
.toc-list a.is-active { color: var(--accent-ink); font-weight: 550; }

@media (min-width: 1100px) {
	.article-layout.has-toc {
		display: grid; grid-template-columns: 15rem minmax(0, var(--measure)); column-gap: 4rem;
	}
	.article-layout:not(.has-toc) .prose { margin-inline: 0; }
	.toc { margin: 0; }
	.toc__details { position: sticky; top: calc(var(--header-h) + 1.5rem); border: 0; background: none; max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto; }
	.toc__details summary { pointer-events: none; padding: 0 0 .75rem; color: var(--ink-3); font-size: .875rem; }
	.toc__details summary::after,
	.toc__details[open] summary::after { content: none; }
	.toc-list { padding: 0; border-left: 1px solid var(--rule); }
	.toc-list li { padding: .35rem 0 .35rem .9rem; display: block; margin-left: -1px; border-left: 2px solid transparent; }
	.toc-list li::before { content: none; }
	.toc-list li:has(a.is-active) { border-left-color: var(--accent); }
}
.article-main { min-width: 0; max-width: var(--measure); }

/* ---------- Prose ---------- */
.prose { max-width: var(--measure); font-size: 1.075rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.25em; }
.prose > * { margin-bottom: 0; }
.prose p { margin: 0; }
.prose > * + p { margin-top: 1.1em; }
.prose h2 {
	font-size: clamp(1.55rem, 4.5vw, 1.9rem); margin-top: 2.4em; line-height: 1.2;
	padding-top: .1em;
}
.prose h3 { font-size: 1.3rem; margin-top: 1.9em; line-height: 1.25; }
.prose h4 { font-family: var(--sans); font-size: 1.05rem; font-weight: 650; margin-top: 1.6em; letter-spacing: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--accent-ink); }
.prose a.is-external::after {
	content: "↗"; font-size: .75em; margin-left: .15em; color: var(--ink-3); text-decoration: none; display: inline-block;
}
.prose strong { font-weight: 620; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--ink-3); }
.prose ol li::marker { font-variant-numeric: tabular-nums; font-weight: 550; }
.prose hr, .prose .wp-block-separator { border: 0; height: 1px; background: var(--rule); margin: 2.5em 0; }

.prose blockquote, .prose .wp-block-quote {
	margin-inline: 0; padding: .1em 0 .1em 1.25em;
	border-left: 3px solid var(--accent);
	font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; color: var(--ink);
}
.prose blockquote p + p { margin-top: .7em; }
.prose blockquote cite { display: block; margin-top: .6em; font-family: var(--sans); font-size: .9rem; font-style: normal; color: var(--ink-3); }

.prose code, .prose kbd {
	font-family: var(--mono); font-size: .88em;
	background: var(--sunken); padding: .12em .35em; border-radius: 3px;
	overflow-wrap: anywhere;
}
.prose pre, .prose .wp-block-code {
	position: relative;
	background: var(--code-bg); color: var(--code-ink);
	border-radius: var(--radius);
	padding: 1.1rem 1.2rem;
	overflow-x: auto;
	font-size: .9rem; line-height: 1.6;
	tab-size: 4;
	border: 0;
}
.prose pre code, .prose .wp-block-code code {
	background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; white-space: pre;
}
/* Phones: code blocks bleed to the edges so long commands have room. */
@media (max-width: 759px) {
	.prose pre, .prose .wp-block-code { margin-inline: calc(var(--gutter) * -1); border-radius: 0; padding-inline: var(--gutter); font-size: .85rem; }
}
.code-wrap { position: relative; }
.copy-button {
	position: absolute; top: .5rem; right: .5rem;
	display: inline-flex; align-items: center; gap: .35rem;
	background: rgba(255,255,255,.08); color: #d6d2ca;
	border: 1px solid rgba(255,255,255,.14); border-radius: 4px;
	padding: .25rem .55rem; font-size: .78rem; cursor: pointer;
	opacity: 0; transition: opacity .15s;
}
.copy-button .icon { width: 14px; height: 14px; }
.code-wrap:hover .copy-button, .copy-button:focus-visible, .copy-button.is-done { opacity: 1; }
@media (hover: none) { .copy-button { opacity: 1; } }
@media (max-width: 759px) { .copy-button { right: .25rem; } }

.prose figure { margin-inline: 0; }
.prose img { border-radius: 4px; }
.prose figcaption, .prose .wp-element-caption { font-size: .875rem; color: var(--ink-3); margin-top: .6rem; text-align: left; }
.prose .wp-block-image.aligncenter, .prose .aligncenter { margin-inline: auto; }
.prose .wp-block-image img { height: auto; }
@media (min-width: 1100px) {
	.prose .alignwide { margin-inline: -4rem; }
}

.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose .wp-block-table { overflow-x: auto; margin-inline: 0; }
.prose th, .prose td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose thead th { font-weight: 620; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.prose .wp-block-table td, .prose .wp-block-table th { border-left: 0; border-right: 0; border-top: 0; }
.prose .wp-block-table thead { border-bottom: 0; }

/* Callouts */
.prose .is-style-note, .prose .is-style-warning {
	padding: 1rem 1.15rem; border-radius: var(--radius);
	background: var(--surface); border: 1px solid var(--rule);
	border-left: 3px solid var(--t-everyday-tech);
	font-size: 1rem; line-height: 1.65;
}
.prose .is-style-warning { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent-wash) 45%, var(--surface)); }
.prose .is-style-note > * + *, .prose .is-style-warning > * + * { margin-top: .7em; }

.prose .is-style-checklist { list-style: none; padding-left: 0; }
.prose .is-style-checklist li { padding-left: 1.75em; position: relative; }
.prose .is-style-checklist li::before { content: "✓"; position: absolute; left: .1em; color: var(--t-infrastructure-security); font-weight: 700; }

.prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 2rem; }
.prose .wp-block-column { flex: 1 1 260px; min-width: 0; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.prose .wp-block-button__link { display: inline-block; padding: .8rem 1.25rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); text-decoration: none; font-weight: 550; }
.prose .wp-block-button__link:hover { background: var(--accent); color: #fff; }
.prose .wp-block-button.is-style-outline .wp-block-button__link { background: none; color: var(--ink); border: 1px solid var(--ink); }

/* Article footer */
.article-footer { padding-top: .5rem; }
.article-footer__inner { max-width: var(--measure); }
.article-tags { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.article-tags a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.article-tags a:hover { color: var(--accent-ink); text-decoration: underline; }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: 1.5rem 0; border-block: 1px solid var(--rule); }
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-box p { margin: 0; color: var(--ink-2); font-size: .975rem; }
.author-box__name { font-weight: 600; color: var(--ink) !important; margin-bottom: .25rem !important; }

/* ---------- Reactions & share ---------- */
.engage {
	margin-top: 3.5rem;
	display: grid; gap: 1.75rem;
	padding: 1.5rem 0;
	border-top: 1.5px solid var(--ink);
}
.engage-heading { font-family: var(--serif); font-size: 1.25rem; font-weight: 560; margin-bottom: .85rem; }
.reactions__list, .share__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.reaction {
	display: inline-flex; align-items: center; gap: .5rem;
	padding: .55rem .8rem .55rem .7rem;
	background: var(--surface); color: var(--ink-2);
	border: 1px solid var(--rule-strong); border-radius: var(--radius);
	font-size: .925rem; font-weight: 500; cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s, transform .12s;
}
.reaction .icon { width: 18px; height: 18px; }
.reaction:hover { border-color: var(--ink); color: var(--ink); }
.reaction:active { transform: scale(.97); }
.reaction__count {
	font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: .85rem;
	padding-left: .55rem; border-left: 1px solid var(--rule); min-width: 1.6em; text-align: center;
}
.reaction[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); background: color-mix(in srgb, var(--accent-wash) 55%, var(--surface)); }
.reaction[aria-pressed="true"] .icon { fill: currentColor; fill-opacity: .18; }
.reaction[aria-pressed="true"] .reaction__count { color: var(--accent-ink); border-left-color: color-mix(in srgb, var(--accent) 35%, transparent); }
@media (prefers-reduced-motion: no-preference) {
	.reaction.is-bump .icon { animation: bump .35s ease; }
}
@keyframes bump { 40% { transform: scale(1.3) rotate(-8deg); } 100% { transform: none; } }
.reactions__thanks { margin: .7rem 0 0; font-size: .9rem; color: var(--ink-3); min-height: 1.4em; }

.share__btn {
	display: inline-flex; align-items: center; gap: .45rem;
	padding: .5rem .75rem; border-radius: var(--radius);
	border: 1px solid var(--rule); background: none; color: var(--ink-2);
	font-size: .9rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.share__btn .icon { width: 17px; height: 17px; }
.share__btn[hidden] { display: none; }
.share__btn:hover { border-color: var(--ink); color: var(--ink); }
.share__btn.is-done { border-color: var(--t-infrastructure-security); color: var(--t-infrastructure-security); }
.share__native { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.share__native:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Phones: one native "Share" button replaces the row of networks when supported. */
@media (max-width: 759px) {
	.reactions__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
	.reaction { flex-direction: column; gap: .3rem; padding: .75rem .3rem; text-align: center; }
	.reaction__label { font-size: .8rem; line-height: 1.2; }
	.reaction__count { border-left: 0; padding-left: 0; }
	.share--has-native .share__btn:not(.share__native):not(.js-copy-link) { display: none; }
	.share__native { flex: 1; justify-content: center; padding: .75rem; }
	.share--has-native .js-copy-link { padding: .75rem 1rem; }
}

/* ---------- Comments ---------- */
.comments { margin-top: 3rem; }
.comments__title { font-size: 1.6rem; padding-bottom: .8rem; border-bottom: 1.5px solid var(--ink); margin-bottom: 1.5rem; }
.comments__empty, .comments__closed { color: var(--ink-2); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list > li + li { border-top: 1px solid var(--rule); }
.comment-list .children { margin-left: 1rem; padding-left: 1rem; border-left: 2px solid var(--rule); }
@media (min-width: 760px) { .comment-list .children { margin-left: 1.5rem; padding-left: 1.5rem; } }
.comment-card { padding: 1.25rem 0; }
.comment-card__head { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.initials {
	flex: none; display: grid; place-items: center;
	width: 38px; height: 38px; border-radius: 50%;
	font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: #fff;
	object-fit: cover;
}
.initials--0 { background: var(--t-ai-agents); }
.initials--1 { background: var(--t-infrastructure-security); }
.initials--2 { background: var(--t-library-systems); }
.initials--3 { background: var(--t-everyday-tech); }
.initials--4 { background: var(--t-work-life); }
.initials--5 { background: var(--accent); }
:root[data-theme="dark"] .initials { color: #141619; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .initials { color: #141619; } }
.comment-card__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; line-height: 1.3; }
.comment-card__name { font-weight: 600; }
.comment-card__badge { font-size: .8rem; font-weight: 600; color: var(--accent-ink); }
.comment-card__date { font-size: .85rem; color: var(--ink-3); text-decoration: none; }
.comment-card__date:hover { text-decoration: underline; }
.comment-card__body { padding-left: calc(38px + .75rem); font-size: 1rem; line-height: 1.65; }
.comment-card__body p { margin: 0 0 .7em; }
.comment-card__body p:last-child { margin-bottom: 0; }
.comment-card__body code { font-family: var(--mono); font-size: .88em; background: var(--sunken); padding: .1em .3em; border-radius: 3px; }
.comment-card__pending { font-size: .9rem; color: var(--ink-3); font-style: italic; }
.comment-card__actions { padding-left: calc(38px + .75rem); margin-top: .5rem; display: flex; gap: 1rem; font-size: .875rem; }
.comment-card__actions a { color: var(--ink-3); font-weight: 550; text-decoration: none; }
.comment-card__actions a:hover { color: var(--accent-ink); text-decoration: underline; }
@media (max-width: 759px) {
	.comment-card__body, .comment-card__actions { padding-left: 0; }
}

.comment-respond {
	margin-top: 2rem; padding: 1.4rem;
	background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.comment-list .comment-respond { margin: .5rem 0 1rem; }
.comment-reply-title { font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.comment-reply-title small a { font-family: var(--sans); font-size: .875rem; font-weight: 500; color: var(--ink-3); }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--ink-3); margin: .5rem 0 1.25rem; }
.logged-in-as a { color: var(--ink-2); }
.comment-form { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.comment-form > * { flex: 1 1 100%; }
.comment-field { margin: 0 0 1rem; }
.comment-field--half { flex: 1 1 220px; }
.comment-field label { display: block; font-weight: 550; font-size: .925rem; margin-bottom: .35rem; }
.comment-field__hint { font-weight: 400; color: var(--ink-3); }
.comment-field input[type="text"], .comment-field input[type="email"], .comment-field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
	background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius);
	padding: .75rem .85rem; line-height: 1.5;
}
.comment-field textarea { min-height: 8rem; resize: vertical; }
.comment-field input:focus, .comment-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.comment-field--check { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-2); }
.comment-field--check label { margin: 0; font-weight: 400; font-size: .9rem; }
.comment-field--check input { width: 18px; height: 18px; accent-color: var(--accent); }
.comment-field--trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { margin: .25rem 0 0; }
@media (max-width: 759px) {
	.comment-respond { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; padding: 1.25rem var(--gutter); }
	.form-submit .button { width: 100%; justify-content: center; }
}

/* Prev / next */
.post-nav { display: grid; gap: 1rem; padding-top: 2.5rem; }
.post-nav__link {
	display: flex; flex-direction: column; gap: .35rem;
	padding: 1.1rem 1.2rem; border: 1px solid var(--rule); border-radius: var(--radius);
	text-decoration: none; background: var(--surface);
}
.post-nav__link:hover { border-color: var(--ink); color: inherit; }
.post-nav__label { font-size: .85rem; color: var(--ink-3); }
.post-nav__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 560; line-height: 1.25; }
.post-nav__next { text-align: right; }
@media (min-width: 760px) { .post-nav { grid-template-columns: 1fr 1fr; } .post-nav__next { grid-column: 2; } }

/* Related cards */
.related { padding-top: 3.5rem; padding-bottom: 1rem; }
.card-grid { display: grid; gap: 1.5rem; }
.card__media { display: block; overflow: hidden; border-radius: var(--radius); margin-bottom: .85rem; background: var(--sunken); }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__title { font-size: 1.2rem; line-height: 1.25; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); color: inherit; }
.card__meta { font-size: .85rem; color: var(--ink-3); margin: .4rem 0 0; }
/* Phones: related posts become compact rows with a small image. */
@media (max-width: 759px) {
	.card { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: start; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
	.card__media { margin: 0; grid-row: span 2; }
	.card__media img { aspect-ratio: 1; }
	.card-grid { gap: 1.25rem; }
}
@media (min-width: 760px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* ---------- Pages ---------- */
.page-content { padding-bottom: 3rem; }
.page-article .prose { max-width: 46rem; }
.page-article .prose:has(.wp-block-columns) { max-width: none; }

/* About page building blocks */
.prose .is-style-lead p, .prose p.is-style-lead { font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; color: var(--ink); }
.prose .timeline { list-style: none; padding: 0; border-left: 1px solid var(--rule-strong); margin-left: .35rem; }
.prose .timeline li { position: relative; padding: 0 0 1.4rem 1.4rem; margin: 0; }
.prose .timeline li::before { content: ""; position: absolute; left: -5px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.prose .timeline li strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.prose .stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; padding: 0; list-style: none; }
.prose .stat-row li { margin: 0; padding: 1rem 0; border-top: 1.5px solid var(--ink); font-size: .95rem; color: var(--ink-2); line-height: 1.4; }
.prose .stat-row li strong { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--ink); line-height: 1.1; margin-bottom: .25rem; }

/* ---------- Forms (Fluent Forms, themed) ---------- */
.fluentform { max-width: 40rem; }
.fluentform .ff-el-group { margin-bottom: 1.25rem; }
.fluentform .ff-el-input--label { margin-bottom: .4rem; }
.fluentform .ff-el-input--label label { font-weight: 550; font-size: .95rem; color: var(--ink); }
.fluentform .ff-el-input--label.asterisk-right label::after,
.fluentform .ff-el-is-required.asterisk-right label::after { content: " *"; color: var(--accent); }
.fluentform .ff-el-form-control,
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform select,
.fluentform textarea {
	display: block; width: 100%;
	font: inherit; font-size: 1rem; color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius);
	padding: .8rem .9rem;
	line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.fluentform select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236f737a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .95rem center; padding-right: 2.5rem;
}
.fluentform textarea { min-height: 10rem; resize: vertical; }
.fluentform .ff-el-form-control:focus,
.fluentform input:focus, .fluentform select:focus, .fluentform textarea:focus {
	outline: none; border-color: var(--ink);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}
.fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--accent); }
.fluentform .error, .fluentform .text-danger { color: var(--accent-ink); font-size: .875rem; margin-top: .35rem; }
.fluentform .ff-t-container { display: flex; gap: 1rem; flex-wrap: wrap; }
.fluentform .ff-t-cell { flex: 1 1 200px; }
.fluentform .ff_submit_btn_wrapper { margin-top: .5rem; }
.fluentform .ff-btn-submit { font-size: 1rem; }
.fluentform .ff-btn-submit:disabled { opacity: .6; cursor: progress; }
.ff-message-success {
	padding: 1.25rem 1.4rem; border-radius: var(--radius);
	background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--t-infrastructure-security);
	box-shadow: none !important;
}
.ff-message-success p { margin: 0; }
.ff-errors-in-stack { color: var(--accent-ink); margin-top: 1rem; }
.fluentform .ff_screen_reader_title { position: absolute; left: -9999px; }
.ff-el-help-message { font-size: .85rem; color: var(--ink-3); margin-top: .35rem; }
.ff-hidden, .fluentform .ff-hidden { display: none; }

/* Contact page layout */
.contact-aside { font-size: 1rem; }
.contact-aside .small-heading { margin-top: 1.5rem; }

/* ---------- Empty / 404 ---------- */
.empty-state { padding: 1rem 0 3rem; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.search-page-form { margin-top: 1.5rem; max-width: 40rem; }
.not-found { padding-top: 3rem; padding-bottom: 4rem; }
.not-found__code {
	font-family: var(--serif); font-size: clamp(5rem, 22vw, 10rem); line-height: .9; margin: 0 0 1rem;
	color: transparent; -webkit-text-stroke: 1.5px var(--accent); font-weight: 400; letter-spacing: -0.03em;
}
.not-found__grid { display: grid; gap: 2rem; margin: 3rem 0; }
@media (min-width: 760px) { .not-found__grid { grid-template-columns: 1fr 1fr; max-width: 52rem; } }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { border-top: 1px solid var(--rule); }
.plain-list a { display: block; padding: .7rem 0; text-decoration: none; }
.plain-list a:hover { color: var(--accent-ink); }
.plain-list a[class*="topic--"] { border-left: 3px solid var(--topic); padding-left: .8rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; background: var(--surface); border-top: 1px solid var(--rule); }
.footer-cta {
	display: flex; flex-direction: column; gap: 1.25rem;
	padding: 2.5rem 0; border-bottom: 1px solid var(--rule);
}
.footer-cta__text { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.2; margin: 0; max-width: 34rem; font-weight: 450; }
@media (min-width: 760px) { .footer-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 3.5rem 0; } }

.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; }
.footer-about p { color: var(--ink-2); margin-top: 1rem; max-width: 26rem; font-size: .975rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .95rem; }
.footer-col a { text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; gap: .5rem; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-col .icon { width: 17px; height: 17px; }
@media (min-width: 900px) {
	.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding: 3.5rem 0; }
	.footer-about { grid-column: auto; }
}
.footer-base {
	display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	padding: 1.25rem 0 1.5rem; border-top: 1px solid var(--rule);
	font-size: .875rem; color: var(--ink-3);
}
.footer-base p { margin: 0; }
.to-top { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rule-strong); border-radius: 50%; color: var(--ink-2); }
.to-top:hover { border-color: var(--ink); color: var(--ink); }
.to-top .icon { width: 18px; height: 18px; }

/* ---------- Search highlight ---------- */
mark.hl { background: var(--accent-wash); color: inherit; padding: 0 .1em; border-radius: 2px; }

/* ---------- Print ---------- */
@media print {
	.site-header, .site-footer, .toc, .post-nav, .related, .copy-button, .mobile-menu, .search-dialog { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.prose a.is-external::after { content: " (" attr(href) ")"; font-size: .8em; }
	.prose pre { white-space: pre-wrap; background: #f4f4f4; color: #000; }
}

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

.year-group[hidden], .pagination[hidden] { display: none !important; }
@media (max-width: 759px) { .entry__read { display: none; } }

/* ---------- Page photo (About etc.) ---------- */
.page-photo { margin: 0 0 2rem; }
.page-photo img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
	border-radius: var(--radius); background: var(--sunken);
}
.page-photo figcaption { margin-top: .7rem; font-size: .875rem; color: var(--ink-3); }
/* Phones: a shorter crop so the text isn't pushed far down. */
@media (max-width: 759px) {
	.page-photo img { aspect-ratio: 1; max-height: 420px; }
}
@media (min-width: 760px) and (max-width: 999px) {
	.page-photo { max-width: 320px; }
}
@media (min-width: 1000px) {
	.page-body--photo {
		display: grid; grid-template-columns: minmax(0, 46rem) 320px;
		justify-content: space-between; column-gap: 4rem; align-items: start;
	}
	.page-body--photo .page-photo {
		grid-column: 2; grid-row: 1; margin: 0;
		position: sticky; top: calc(var(--header-h) + 2rem);
	}
	.page-body--photo .page-photo::before {
		content: ""; position: absolute; top: 14px; left: 14px; width: 100%; aspect-ratio: 4 / 5;
		border: 1.5px solid var(--accent); border-radius: var(--radius); z-index: -1;
	}
	.page-body--photo .prose { grid-column: 1; grid-row: 1; }
}
