/*
Theme Name: TechTech Notebook
Theme URI: https://techtech.fun/
Author: TechTech.fun
Description: Editorial magazine theme for TechTech.fun: an engineer's notebook edited by an art director. The homepage fills itself automatically from your post categories.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techtech-notebook
*/

/* ==========================================================
   1. Design tokens (change colours and fonts here)
   ========================================================== */
:root {
	--paper: #F4F2EC;
	--paper-2: #EAE7DF;
	--placeholder: #DCD8CD;
	--ink: #161513;
	--graphite: #4B4944;
	--pencil: #6B6862;
	--rule: #D6D2C8;
	--signal: #1D6B48;
	--signal-light: #8FC4A8;
	--on-ink-muted: #B9B5AB;
	--serif: "Newsreader", Georgia, "Times New Roman", serif;
	--sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--wrap: 1200px;
	--text: 680px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ==========================================================
   2. Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
::selection { background: var(--signal); color: var(--paper); }
button { font: inherit; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	left: 12px;
	top: 12px;
	z-index: 100001;
	padding: 12px 16px;
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
}

/* ==========================================================
   3. Layout helpers
   ========================================================== */
.tt-wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.tt-wrap--text { max-width: calc(var(--text) + 2 * var(--gutter)); }
.tt-wrap--wide { max-width: calc(1000px + 2 * var(--gutter)); }
.tt-main { display: block; overflow-x: clip; }

/* ==========================================================
   4. Shared typography
   ========================================================== */
.tt-title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.012em;
	color: var(--ink);
	text-wrap: balance;
}
.tt-title a { color: inherit; text-decoration: none; }
.tt-title a:hover { color: var(--signal); text-decoration: underline; }
.tt-title--xl { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
.tt-title--l { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.9rem); line-height: 1.1; }
.tt-title--m { font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem); line-height: 1.2; }
.tt-title--s { font-size: 1.08rem; line-height: 1.25; }

.tt-kicker, .tt-meta, .tt-fig {
	margin: 0;
	font-family: var(--mono);
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--pencil);
}
.tt-kicker { color: var(--signal); }
.tt-kicker a { color: inherit; text-decoration: none; }
.tt-kicker a:hover { text-decoration: underline; }
.tt-meta { margin-top: 0.6rem; }
.tt-fig { margin-top: 0.45rem; }
.tt-num { color: var(--signal); }
.tt-dek { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.5; color: var(--graphite); }
.tt-dek--lead { font-size: 1.05rem; max-width: 60ch; }

/* ==========================================================
   5. Masthead and navigation
   ========================================================== */
.tt-masthead { padding-top: 12px; }
.tt-masthead__strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--pencil);
}
.tt-masthead__updated { margin: 0; }
.tt-masthead__search { width: 240px; }
.tt-masthead__brand { padding: 20px 0 4px; text-align: center; }
.tt-wordmark {
	margin: 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(2.4rem, 1.5rem + 3.2vw, 4rem);
	line-height: 1;
	letter-spacing: -0.025em;
}
.tt-wordmark a { color: var(--ink); text-decoration: none; }
.tt-dot { color: var(--signal); }
.tt-tagline { margin: 0.7rem 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--pencil); }

.tt-menu-toggle, .tt-nav__close {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 0.92rem;
	font-weight: 500;
	cursor: pointer;
}
.tt-menu-toggle svg, .tt-nav__close svg { width: 20px; height: 20px; }

.tt-menu { margin: 0; padding: 0; list-style: none; }
.tt-menu a { color: var(--ink); text-decoration: none; }
.tt-menu a:hover,
.tt-menu .current-menu-item > a,
.tt-menu .current-menu-parent > a,
.tt-menu .current-post-ancestor > a { color: var(--signal); }

/* Search form */
.tt-search { display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.tt-search:focus-within { outline: 2px solid var(--signal); outline-offset: 3px; }
.tt-search__input {
	flex: 1;
	min-width: 0;
	padding: 10px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}
.tt-search__input::placeholder { color: var(--pencil); opacity: 1; }
.tt-search__input:focus { outline: none; }
.tt-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	cursor: pointer;
}
.tt-search__button svg { width: 18px; height: 18px; }
.tt-masthead__search .tt-search__input { padding: 6px 0; font-family: var(--mono); font-size: 0.8rem; }
.tt-masthead__search .tt-search__button { min-height: 32px; }

/* Desktop navigation */
@media (min-width: 900px) {
	.tt-menu-toggle, .tt-nav__bar, .tt-nav__search { display: none; }
	.tt-nav { margin-top: 18px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
	.tt-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; }
	.tt-menu a { display: block; padding: 12px 0; font-size: 0.92rem; font-weight: 500; }
	.tt-menu .current-menu-item > a,
	.tt-menu .current-menu-parent > a,
	.tt-menu .current-post-ancestor > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
}

/* Mobile header and full-screen menu */
@media (max-width: 899px) {
	.tt-masthead { padding-top: 0; border-bottom: 2px solid var(--ink); }
	.tt-masthead__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		column-gap: 12px;
		padding-block: 8px;
	}
	.tt-masthead__strip, .tt-tagline { display: none; }
	.tt-masthead__brand { padding: 0; text-align: left; }
	.tt-wordmark { font-size: 1.7rem; }
	.tt-nav { grid-column: 1 / -1; }
	.js .tt-nav { display: none; }
	.no-js .tt-menu-toggle, .no-js .tt-nav__bar { display: none; }
	.tt-menu-open { overflow: hidden; }
	.tt-menu-open .tt-nav {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		overflow-y: auto;
		padding: 0 var(--gutter) 40px;
		background: var(--paper);
	}
	.tt-nav__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 8px 0;
		border-bottom: 2px solid var(--ink);
	}
	.tt-nav__brand { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; line-height: 1; letter-spacing: -0.025em; }
	.tt-nav__search { margin: 20px 0 8px; }
	.tt-menu { counter-reset: ttnav; }
	.tt-menu li { counter-increment: ttnav; border-bottom: 1px solid var(--rule); }
	.tt-menu a {
		display: flex;
		align-items: baseline;
		gap: 14px;
		min-height: 52px;
		padding: 12px 0;
		font-family: var(--serif);
		font-size: 1.45rem;
		font-weight: 500;
		line-height: 1.2;
	}
	.tt-menu a::before {
		content: "\00A7" counter(ttnav, decimal-leading-zero);
		font-family: var(--mono);
		font-size: 0.75rem;
		font-weight: 400;
		color: var(--signal);
	}
}

/* ==========================================================
   6. Images and the graph-paper fallback
   ========================================================== */
.tt-media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--placeholder);
}
.tt-media--3x2 { aspect-ratio: 3 / 2; }
.tt-media--4x3 { aspect-ratio: 4 / 3; }
.tt-media--1x1 { aspect-ratio: 1 / 1; }
.tt-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tt-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ink);
	background-color: var(--paper-2);
	background-image:
		linear-gradient(var(--rule) 1px, transparent 1px),
		linear-gradient(90deg, var(--rule) 1px, transparent 1px);
	background-size: 22px 22px;
	background-position: -1px -1px;
}
.tt-fallback__art { width: 34%; max-width: 150px; height: auto; }
.tt-fallback__dim { stroke: var(--signal); }
.tt-fallback__label {
	position: absolute;
	left: 10px;
	bottom: 8px;
	padding: 1px 4px;
	background: var(--paper-2);
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--pencil);
}

/* ==========================================================
   7. Homepage
   ========================================================== */
.tt-home { padding-top: clamp(20px, 3vw, 32px); }

/* Section headings */
.tt-section { margin-top: clamp(44px, 6vw, 72px); }
.tt-sh {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin-bottom: 20px;
	padding-top: 10px;
	border-top: 1px solid var(--ink);
}
.tt-sh__num { font-family: var(--mono); font-size: 0.78rem; color: var(--signal); }
.tt-sh__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
	line-height: 1.1;
	letter-spacing: -0.012em;
}
.tt-sh__more {
	margin-left: auto;
	padding: 6px 0;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
}
.tt-sh__more:hover { color: var(--signal); text-decoration: underline; }

/* Empty state */
.tt-empty {
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--pencil);
}
.tt-empty__admin { display: block; margin-top: 6px; color: var(--signal); }

/* Lead story + news wire */
.tt-top { display: grid; gap: 36px; }
.tt-lead .tt-kicker { margin-top: 18px; }
.tt-lead .tt-title { margin-top: 8px; }
.tt-wire__head {
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--ink);
	font-family: var(--mono);
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--ink);
}
.tt-wire__sub { font-weight: 400; color: var(--pencil); }
.tt-wire__list { margin: 0; padding: 0; list-style: none; }
.tt-wire__item { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.tt-wire__time { margin: 0 0 4px; font-family: var(--mono); font-size: 0.75rem; color: var(--signal); }
.tt-more {
	display: inline-block;
	margin-top: 10px;
	padding: 8px 0;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink);
	text-decoration: none;
}
.tt-more:hover { color: var(--signal); text-decoration: underline; }
@media (min-width: 900px) {
	.tt-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0; }
	.tt-lead { padding-right: 32px; }
	.tt-wire { padding-left: 28px; border-left: 1px solid var(--rule); }
}

/* AI: feature + text strip */
.tt-feature { display: grid; gap: 16px; }
.tt-feature .tt-media { order: -1; }
.tt-feature .tt-dek { margin-top: 10px; }
@media (min-width: 760px) {
	.tt-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
	.tt-feature .tt-media { order: 0; }
}
.tt-strip { display: grid; margin-top: 24px; border-top: 1px solid var(--rule); }
.tt-strip__item { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.tt-strip__item .tt-meta { margin-top: 6px; }
@media (min-width: 760px) {
	.tt-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tt-strip__item { padding: 16px 20px 4px; border-bottom: 0; border-left: 1px solid var(--rule); }
	.tt-strip__item:first-child { padding-left: 0; border-left: 0; }
}

/* Reviews */
.tt-reviews { display: grid; gap: 28px; }
.tt-reviews__main .tt-title { margin-top: 14px; }
.tt-minilist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.tt-mini {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--rule);
}
.tt-mini .tt-meta { margin-top: 6px; }
.tt-mini .tt-fallback__label { display: none; }
@media (min-width: 760px) {
	.tt-reviews { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: start; }
	.tt-minilist { border-top: 0; }
	.tt-mini:first-child { padding-top: 0; }
}

/* Versus: the dark band */
.tt-section--versus { padding: 24px 0 clamp(32px, 5vw, 48px); background: var(--ink); color: var(--paper); }
.tt-section--versus .tt-sh { border-top-color: var(--paper); }
.tt-section--versus .tt-sh__num { color: var(--signal-light); }
.tt-section--versus .tt-sh__title,
.tt-section--versus .tt-sh__more { color: var(--paper); }
.tt-section--versus a:hover { color: var(--signal-light); }
.tt-section--versus :focus-visible { outline-color: var(--signal-light); }
.tt-section--versus .tt-dek { color: var(--rule); }
.tt-section--versus .tt-meta { color: var(--on-ink-muted); }
.tt-section--versus .tt-empty { color: var(--on-ink-muted); border-color: var(--graphite); }
.tt-section--versus .tt-empty__admin { color: var(--signal-light); }
.tt-vs-grid { display: grid; gap: 28px; }
.tt-vs + .tt-vs { padding-top: 28px; border-top: 1px solid var(--graphite); }
@media (min-width: 760px) {
	.tt-vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
	.tt-vs { padding-right: 32px; }
	.tt-vs + .tt-vs { padding: 0 0 0 32px; border-top: 0; border-left: 1px solid var(--graphite); }
}
.tt-vs__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(1.7rem, 1.25rem + 1.7vw, 2.4rem);
	line-height: 1.05;
	letter-spacing: -0.018em;
}
.tt-vs__title a { color: var(--paper); text-decoration: none; }
.tt-vs__side { display: block; }
.tt-vs__mark { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.tt-vs__mark::after { content: ""; flex: 1; border-top: 1px solid var(--graphite); }
.tt-vs__box {
	padding: 1px 8px;
	border: 1px solid var(--pencil);
	font-family: var(--mono);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
}

/* Explainers: numbered index */
.tt-explain { display: grid; gap: 28px; }
.tt-explain__fig { order: -1; margin: 0; }
@media (min-width: 760px) {
	.tt-explain { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: start; }
	.tt-explain__fig { order: 0; }
}
.tt-index { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.tt-index__item {
	display: grid;
	grid-template-columns: 2.6rem minmax(0, 1fr);
	gap: 8px;
	padding: 14px 0;
	border-bottom: 1px solid var(--rule);
}
.tt-index__num { font-family: var(--mono); font-size: 1rem; line-height: 1.6; color: var(--signal); }
.tt-index .tt-dek { margin-top: 4px; }

/* Gadgets: contact sheet */
.tt-sheet {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tt-sheet .tt-title { margin-top: 10px; }
.tt-sheet .tt-meta { margin-top: 6px; }
@media (min-width: 900px) {
	.tt-sheet { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}

/* Bench Notes: lab log */
.tt-log {
	max-width: 860px;
	margin: 0;
	padding: 0 0 0 18px;
	list-style: none;
	border-left: 2px solid var(--signal);
}
.tt-log__item { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.tt-log__item:last-child { border-bottom: 0; }
.tt-log__item .tt-meta { margin: 0 0 2px; }
.tt-log__note {
	margin: 0;
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-size: 1.15rem;
	line-height: 1.4;
}
.tt-log__note a { color: var(--ink); text-decoration: none; }
.tt-log__note a:hover { color: var(--signal); text-decoration: underline; }
@media (min-width: 600px) {
	.tt-log__item { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 16px; align-items: baseline; }
	.tt-log__item .tt-meta { margin: 0; }
}

/* ==========================================================
   8. Archive, search and blog listings
   ========================================================== */
.tt-listing { padding-top: clamp(28px, 4vw, 48px); }
.tt-pagehead { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.tt-pagehead__title {
	margin: 8px 0 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(2rem, 1.4rem + 2.5vw, 3.1rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.tt-pagehead__desc { max-width: 62ch; margin-top: 12px; color: var(--graphite); }
.tt-pagehead__desc p { margin: 0; }
.tt-pagehead__search { max-width: 420px; margin-top: 20px; }
.tt-rows { max-width: 920px; }
.tt-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 96px;
	gap: 16px;
	padding: 22px 0;
	border-bottom: 1px solid var(--rule);
}
.tt-row .tt-media { order: 2; align-self: start; }
.tt-row .tt-fallback__label { display: none; }
.tt-row .tt-title { margin-top: 6px; }
@media (min-width: 640px) {
	.tt-row { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
	.tt-row .tt-media { order: 0; }
	.tt-row .tt-fallback__label { display: inline; }
}
@media (min-width: 900px) {
	.tt-row { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; }
}

.pagination { margin-top: 32px; font-family: var(--mono); font-size: 0.85rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--rule);
	text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pagination .page-numbers.dots { border: 0; }
.pagination a.page-numbers:hover { border-color: var(--signal); }

.tt-404-search { max-width: 420px; margin-top: 24px; }

/* ==========================================================
   9. Single article and pages
   ========================================================== */
.tt-article { padding-top: clamp(28px, 5vw, 56px); }
.tt-article__head { max-width: calc(860px + 2 * var(--gutter)); }
.tt-article__title {
	margin: 12px 0 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(2.1rem, 1.3rem + 3.3vw, 3.7rem);
	line-height: 1.04;
	letter-spacing: -0.024em;
	text-wrap: balance;
}
.tt-article--page .tt-article__title { margin-top: 0; }
.tt-article__dek p {
	max-width: 40em;
	margin: 16px 0 0;
	font-family: var(--serif);
	font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
	line-height: 1.4;
	color: var(--graphite);
}
.tt-byline {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 22px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--pencil);
}
.tt-byline a { color: var(--ink); }
.tt-article__figure { margin-top: 32px; margin-bottom: 0; }
.tt-article__figure img { display: block; width: 100%; height: auto; }

/* Article body */
.tt-prose {
	display: flow-root;
	margin-top: 36px;
	font-family: var(--serif);
	font-size: clamp(1.08rem, 1rem + 0.35vw, 1.2rem);
	line-height: 1.68;
	color: var(--ink);
}
.tt-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.tt-prose > :last-child { margin-bottom: 0; }
.tt-prose h2 {
	margin: 1.9em 0 0.55em;
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
	line-height: 1.15;
	letter-spacing: -0.012em;
}
.tt-prose h3 { margin: 1.7em 0 0.5em; font-family: var(--sans); font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.tt-prose h4, .tt-prose h5, .tt-prose h6 {
	margin: 1.6em 0 0.5em;
	font-family: var(--mono);
	font-weight: 500;
	font-size: 0.85rem;
	color: var(--graphite);
}
.tt-prose a { color: var(--signal); text-decoration: underline; }
.tt-prose a:hover { color: var(--ink); }
.tt-prose ul, .tt-prose ol { padding-left: 1.3em; }
.tt-prose li + li { margin-top: 0.4em; }
.tt-prose li::marker { color: var(--signal); }
.tt-prose blockquote {
	margin: 1.6em 0;
	padding-left: 20px;
	border-left: 2px solid var(--signal);
	font-style: italic;
	color: var(--graphite);
}
.tt-prose figure { margin-left: 0; margin-right: 0; }
.tt-prose figcaption,
.tt-prose .wp-element-caption,
.wp-caption-text {
	margin-top: 8px;
	font-family: var(--mono);
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--pencil);
	text-align: left;
}
.tt-prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--rule); }
.tt-prose code { padding: 0.1em 0.3em; background: var(--paper-2); font-family: var(--mono); font-size: 0.85em; }
.tt-prose pre {
	overflow-x: auto;
	padding: 18px 20px;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--mono);
	font-size: 0.85rem;
	line-height: 1.6;
}
.tt-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.tt-prose .wp-block-table { overflow-x: auto; }
.tt-prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.95rem; line-height: 1.45; }
.tt-prose th, .tt-prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tt-prose th { border-bottom-color: var(--ink); font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--graphite); }
.tt-prose .wp-block-pullquote {
	margin: 2em 0;
	padding: 22px 0;
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	text-align: left;
}
.tt-prose .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; font-style: normal; color: var(--ink); }
.tt-prose .wp-block-pullquote p { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); line-height: 1.3; }
.tt-prose .wp-block-pullquote cite { font-family: var(--mono); font-size: 0.75rem; font-style: normal; color: var(--pencil); }

.alignleft { float: left; max-width: 50%; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; max-width: 50%; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 599px) {
	.alignleft, .alignright { float: none; max-width: 100%; margin: 0 0 1em; }
}
@media (min-width: 900px) {
	.tt-prose > .alignwide {
		width: min(1000px, calc(100vw - 2 * var(--gutter)));
		max-width: none;
		margin-left: calc(50% - min(500px, 50vw - var(--gutter)));
		margin-right: 0;
	}
}
.tt-prose > .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: 0; }

.tt-pagelinks { margin-top: 24px; font-family: var(--mono); font-size: 0.85rem; }

/* Buttons (comments, block buttons) */
.comment-form .submit,
.tt-prose .wp-block-button__link,
.tt-prose .wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}
.comment-form .submit:hover,
.tt-prose .wp-block-button__link:hover,
.tt-prose .wp-element-button:hover { background: var(--signal); color: var(--paper); }

/* Tags, previous/next, related */
.tt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding: 0; list-style: none; }
.tt-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 10px;
	border: 1px solid var(--rule);
	font-family: var(--mono);
	font-size: 0.75rem;
	text-decoration: none;
}
.tt-tags a:hover { border-color: var(--signal); }
.post-navigation { margin-top: 48px; }
.post-navigation .nav-links { display: grid; gap: 20px; padding-top: 16px; border-top: 1px solid var(--ink); }
@media (min-width: 640px) {
	.post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
	.post-navigation .nav-next { grid-column: 2; text-align: right; }
}
.post-navigation a { display: block; text-decoration: none; }
.tt-postnav__label { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--pencil); }
.tt-postnav__title { display: block; margin-top: 4px; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; line-height: 1.25; }
.post-navigation a:hover .tt-postnav__title { color: var(--signal); text-decoration: underline; }
.tt-related { margin-top: 64px; }

/* Comments */
.tt-comments { margin-top: 56px; }
.tt-comments__title, .comment-reply-title {
	margin: 0 0 16px;
	font-family: var(--serif);
	font-weight: 500;
	font-size: 1.5rem;
}
.tt-comment-list, .tt-comment-list .children { margin: 0; padding: 0; list-style: none; }
.tt-comment-list .children { padding-left: 24px; border-left: 1px solid var(--rule); }
.tt-comment-list .comment-body { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.comment-author .says { display: none; }
.comment-metadata { font-family: var(--mono); font-size: 0.75rem; color: var(--pencil); }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content { margin-top: 8px; }
.reply a { font-family: var(--mono); font-size: 0.75rem; }
.comment-respond { margin-top: 32px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 0.85rem; font-weight: 500; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--rule);
	border-radius: 0;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 16px;
}

/* ==========================================================
   10. Footer
   ========================================================== */
.tt-footer { margin-top: clamp(64px, 9vw, 112px); padding: 28px 0 36px; border-top: 2px solid var(--ink); }
.tt-footer__grid { display: grid; gap: 24px; }
@media (min-width: 760px) {
	.tt-footer__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 32px; }
}
.tt-footer__brand { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; }
.tt-footer__brand a { color: var(--ink); text-decoration: none; }
.tt-footer__tagline { margin: 10px 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--pencil); }
.tt-footer__label { margin: 0 0 4px; font-family: var(--mono); font-size: 0.75rem; color: var(--pencil); }
.tt-footer__list { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.tt-footer__list a { display: inline-block; padding: 8px 0; font-size: 0.92rem; text-decoration: none; }
.tt-footer__list a:hover { text-decoration: underline; }
.tt-footer__legal {
	margin: 28px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--rule);
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--pencil);
}
.tt-footer__legal a { color: inherit; }
.page-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.page-title {
  margin: 0 0 28px;
  color: var(--ink);
}
.page-content {
  color: var(--graphite);
  line-height: 1.7;
}
.page-content a {
  color: var(--signal);
}
/* ===== Pages: match homepage fonts ===== */
.page-main,
.page-main .page-content,
.page-main .page-content p,
.page-main .page-content li,
.page-main .page-content a,
.page-main .page-content blockquote {
  font-family: "Schibsted Grotesk", system-ui, sans-serif !important;
}

.page-main .page-title,
.page-main .page-content h1,
.page-main .page-content h2,
.page-main .page-content h3,
.page-main .page-content h4 {
  font-family: "Newsreader", Georgia, serif !important;
  font-weight: 500;
  color: var(--ink);
}

.page-main .page-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}

.page-main .page-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--graphite);
}

.page-main .page-content h2 { margin: 2em 0 0.6em; font-size: 1.6rem; }
.page-main .page-content h3 { margin: 1.6em 0 0.5em; font-size: 1.25rem; }
.page-main .page-content a { color: var(--signal); }

/* Small mono labels, if you use them */
.page-main .page-content code,
.page-main .page-content .label {
  font-family: "IBM Plex Mono", ui-monospace, monospace !important;
}