/*
Theme Name: Huveg Workbench
Theme URI: https://huveg.com/
Author: Huveg
Description: A one-off theme for Huveg, the DIY, woodworking and home remodeling blog. Shop-drawing details, taped-photo cards, a tape-measure reading bar and a random Popular Topics cut list beside every post.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: huveg
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--paper: #f4eee3;
	--paper-2: #ebe3d4;
	--card: #fffdf8;
	--ink: #1c2a2d;
	--ink-2: #34464a;
	--muted: #586a6d;
	--line: #d9cfbd;
	--line-strong: #b9ad97;
	--accent: #e4572e;
	--accent-ink: #b23a15;
	--oak: #d9b98a;
	--tape: rgba(240, 228, 196, 0.86);
	--tape-edge: rgba(190, 172, 130, 0.35);
	--yellow: #f2c14e;

	--f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
	--radius: 6px;
	--wrap: 1240px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--f-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-optical-sizing: auto; font-weight: 650; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 var(--s-4); }
p { margin: 0 0 var(--s-4); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius);
	font: 500 .85rem var(--f-mono); text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared bits ---------- */
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
	color: var(--accent-ink); text-decoration: none;
	padding: 6px 9px 6px 8px; border: 1px solid currentColor; border-radius: 999px;
	transition: background .2s var(--ease), color .2s var(--ease);
}
.chip::before { content: ""; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.chip:hover { background: var(--accent-ink); color: var(--card); }
.chip:hover::before { background: var(--card); }
.chip--sm { padding: 4px 7px; font-size: .66rem; }

.btn {
	display: inline-flex; align-items: center; gap: 10px; min-height: 46px;
	padding: 12px 20px; border: 1.5px solid var(--ink); border-radius: var(--radius);
	background: var(--ink); color: var(--paper); cursor: pointer;
	font: 500 .8rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
	transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn--arrow::after { content: "→"; font-family: var(--f-body); transition: transform .2s var(--ease); }
.btn--arrow:hover::after { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: var(--card); }

/* Ruler strip: short tick every 10px, long tick every 50px */
.ruler {
	height: 14px;
	background:
		repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 50px) left bottom / 100% 14px no-repeat,
		repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) left bottom / 100% 7px no-repeat;
	border-bottom: 1.5px solid var(--ink);
}
.ruler--light {
	background:
		repeating-linear-gradient(90deg, var(--paper) 0 1.5px, transparent 1.5px 50px) left top / 100% 14px no-repeat,
		repeating-linear-gradient(90deg, rgba(244, 238, 227, .55) 0 1px, transparent 1px 10px) left top / 100% 7px no-repeat;
	border-bottom: 0; border-top: 1.5px solid var(--paper); opacity: .5;
}

/* Masking tape */
.tape {
	position: absolute; z-index: 3; top: -11px; left: 50%;
	width: 92px; height: 24px; margin-left: -46px;
	background: var(--tape);
	box-shadow: 0 1px 2px var(--tape-edge);
	clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
	pointer-events: none;
}
.tape--l { transform: rotate(-4deg); }
.tape--r { transform: rotate(3deg); }

/* Thumbs and generated placeholders */
.thumb__img { width: 100%; height: 100%; object-fit: cover; }
.thumb__ph {
	position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden;
	background:
		repeating-radial-gradient(ellipse 140% 38% at 20% 120%, transparent 0 9px, rgba(70, 40, 10, .10) 9px 10px),
		var(--oak);
}
.thumb__ph--walnut { background-color: #8a6142; }
.thumb__ph--birch { background-color: #e6d3ad; }
.thumb__ph--slate { background-color: #4b6064; }
.thumb__ph-letter {
	font: 700 clamp(2.5rem, 7vw, 5rem)/1 var(--f-display); color: rgba(255, 253, 248, .85);
	text-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.thumb__ph--birch .thumb__ph-letter { color: rgba(28, 42, 45, .55); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__bar { display: flex; align-items: center; gap: var(--s-5); min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand__mark { width: 42px; height: 42px; flex-shrink: 0; }
.brand__word {
	font: 700 2rem/1 var(--f-display); letter-spacing: -0.04em;
	font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
	transform: translateY(-2px);
}
.brand__dot { color: var(--accent); }
.brand__img { max-height: 52px; width: auto; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
	display: inline-block; padding: 10px 12px;
	font: 500 .78rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
	text-decoration: none; color: var(--ink-2);
	background: linear-gradient(var(--accent), var(--accent)) left calc(100% - 4px) / 0 2px no-repeat;
	transition: background-size .25s var(--ease), color .2s;
}
.nav__link:hover, .nav__item.is-current > .nav__link { color: var(--ink); background-size: calc(100% - 24px) 2px; background-position-x: 12px; }
.nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 0 12px 30px rgba(28, 42, 45, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.nav__item:hover > .sub-menu, .nav__item:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu .nav__link { display: block; }

.site-header__tools { display: flex; gap: 6px; }
.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
	background: transparent; border: 1.5px solid var(--ink); border-radius: 50%; color: var(--ink);
	transition: background .2s, color .2s;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.icon-btn--menu { display: none; }

.site-search { border-top: 1px dashed var(--line-strong); padding: var(--s-4) 0; }
.search-form { display: flex; gap: var(--s-2); max-width: 640px; }
.search-form__input {
	flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px;
	font: inherit; color: var(--ink); background: var(--card);
	border: 1.5px solid var(--ink); border-radius: var(--radius);
}

@media (max-width: 900px) {
	.icon-btn--menu { display: inline-grid; }
	.site-header__tools { margin-left: auto; }
	.nav {
		position: absolute; left: 0; right: 0; top: 100%; margin: 0;
		background: var(--card); border-bottom: 1.5px solid var(--ink);
		padding: var(--s-3) clamp(16px, 4vw, 40px) var(--s-5);
		display: none;
	}
	.nav.is-open { display: block; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__link { display: block; padding: 14px 0; border-bottom: 1px dashed var(--line); background: none; }
	.nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.brand__word { font-size: 1.7rem; }
}

/* ---------- Lead (latest post) ---------- */
.lead {
	display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
	align-items: center; padding-block: clamp(36px, 6vw, 80px);
	position: relative;
}
.lead::before {
	content: ""; position: absolute; inset: 0 auto 0 0; width: 62%; z-index: -1;
	background-image:
		linear-gradient(rgba(28, 42, 45, .06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(28, 42, 45, .06) 1px, transparent 1px);
	background-size: 24px 24px;
	mask-image: linear-gradient(90deg, #000 60%, transparent);
	-webkit-mask-image: linear-gradient(90deg, #000 60%, transparent);
}
.lead__media { position: relative; padding: 18px; }
.lead__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--paper-2); box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(28, 42, 45, .45); }
.lead__img .thumb__img, .lead__img .thumb__ph { transition: transform .8s var(--ease); }
.lead__img:hover .thumb__img { transform: scale(1.03); }
.crop { position: absolute; width: 28px; height: 28px; border: 0 solid var(--ink); }
.crop--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.crop--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.lead__dim {
	position: absolute; left: 18px; right: 18px; bottom: -14px; height: 10px;
	border-inline: 1.5px solid var(--accent);
	background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat;
}
.lead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.lead__flag {
	font: 500 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
	background: var(--yellow); color: var(--ink); padding: 7px 10px; transform: rotate(-1.5deg);
}
.lead__title { font-size: clamp(2.2rem, 4.6vw, 4.1rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: var(--s-5); }
.lead__link { text-decoration: none; background: linear-gradient(var(--yellow), var(--yellow)) 0 88% / 0 .28em no-repeat; transition: background-size .45s var(--ease); }
.lead__link:hover { background-size: 100% .28em; }
.lead__excerpt { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.lead__foot { display: flex; gap: 10px; font: 500 .78rem var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--s-5); }

@media (max-width: 860px) {
	.lead { grid-template-columns: 1fr; }
	.lead::before { width: 100%; height: 60%; }
}

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-7); }
.section-head__title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; white-space: nowrap; }
.section-head__rule {
	flex: 1; height: 12px;
	border-inline: 1.5px solid var(--ink);
	background: linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat;
}

.list-head { padding-block: clamp(36px, 6vw, 72px) var(--s-7); }
.list-head__kicker { font: 500 .75rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.list-head__title { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; margin: var(--s-2) 0 var(--s-3); }
.list-head__desc { color: var(--ink-2); max-width: 62ch; }

/* ---------- Grid + cards ---------- */
.latest { padding-bottom: var(--s-9); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 44px) clamp(20px, 2.5vw, 32px); }

.card {
	position: relative; display: flex; flex-direction: column;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px) rotate(-.25deg); border-color: var(--line-strong); box-shadow: 0 22px 40px -24px rgba(28, 42, 45, .45); }
.card__media { position: relative; padding: 10px 10px 0; }
.card__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 3px; background: var(--paper-2); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: var(--s-4) var(--s-5) var(--s-5); }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3); min-height: 24px; }
.card__no { font: 500 .72rem var(--f-mono); color: var(--muted); letter-spacing: .08em; }
.card__title { font-size: 1.32rem; font-weight: 650; line-height: 1.2; margin-bottom: var(--s-3); }
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.card .chip { position: relative; z-index: 2; }
.card__excerpt { color: var(--ink-2); font-size: .97rem; margin-bottom: var(--s-4); }
.card__foot {
	display: flex; align-items: center; gap: 10px; margin-top: auto;
	font: 500 .72rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.card__dim {
	flex: 1; height: 8px; border-inline: 1px solid var(--line-strong);
	background: linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat;
}

.card--wide { grid-column: span 2; flex-direction: row; }
.card__media { min-width: 0; }
.card--wide .card__media { flex: 0 0 55%; padding: 10px 0 10px 10px; }
.card--wide .card__img { height: 100%; aspect-ratio: auto; min-height: 280px; }
.card--wide .card__body { padding: var(--s-6); justify-content: center; }
.card--wide .card__title { font-size: clamp(1.5rem, 2.4vw, 2rem); }

@media (max-width: 1020px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.grid { grid-template-columns: 1fr; }
	.card--wide { grid-column: auto; flex-direction: column; }
	.card--wide .card__media { flex: none; padding: 10px 10px 0; }
	.card--wide .card__img { aspect-ratio: 3 / 2; min-height: 0; }
	.card--wide .card__body { padding: var(--s-4) var(--s-5) var(--s-5); }
}

/* Pagination */
.pager { margin-top: var(--s-8); }
.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pager li > .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1.5px solid var(--ink); border-radius: var(--radius); text-decoration: none;
	font: 500 .82rem var(--f-mono); background: var(--card);
}
.pager a.page-numbers:hover { background: var(--ink); color: var(--paper); }
.pager li > .current { background: var(--ink); color: var(--paper); }
.pager li > .dots { border-color: transparent; background: none; }
.pager .prev, .pager .next { display: inline-flex; gap: 8px; white-space: nowrap; }

/* ---------- Popular Topics ---------- */
.popular__head { margin-bottom: var(--s-5); }
.popular__kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.popular__kicker::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.popular__title { margin: 6px 0 0; }
.popular__list { list-style: none; margin: 0; padding: 0; }
.pop__link { display: flex; text-decoration: none; height: 100%; }
.pop__thumb { display: block; overflow: hidden; flex-shrink: 0; background: var(--paper-2); }
.pop__text { display: flex; flex-direction: column; min-width: 0; }
.pop__no { font: 700 1rem/1 var(--f-display); color: var(--accent-ink); font-variant-numeric: lining-nums; }
.pop__title { font: 600 1rem/1.3 var(--f-display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pop__meta { font: 500 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: auto; padding-top: 8px; }
.pop__link:hover .pop__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pop .thumb__ph-letter { font-size: 2rem; }

/* Band: full-width dark blueprint on listing pages */
.band {
	background-color: var(--ink); color: var(--paper);
	background-image:
		linear-gradient(rgba(244, 238, 227, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(244, 238, 227, .05) 1px, transparent 1px);
	background-size: 32px 32px;
	padding-block: clamp(56px, 8vw, 96px);
}
.popular--band .popular__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-7); }
.popular--band .popular__head { flex-direction: column; align-items: flex-start; }
.popular--band .popular__title { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; color: var(--paper); }
.popular--band .popular__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); counter-reset: none; }
.popular--band .pop { background: rgba(244, 238, 227, .04); border: 1px solid rgba(244, 238, 227, .14); border-radius: var(--radius); transition: background .25s, border-color .25s, transform .25s var(--ease); }
.popular--band .pop:hover { background: rgba(244, 238, 227, .08); border-color: rgba(244, 238, 227, .35); transform: translateY(-3px); }
.popular--band .pop__link { flex-direction: column; }
.popular--band .pop__thumb { aspect-ratio: 16 / 10; margin: 8px 8px 0; border-radius: 3px; }
.popular--band .pop__text { padding: var(--s-4); gap: 8px; flex: 1; }
.popular--band .pop__no { color: var(--accent); font-size: 1.5rem; }
.popular--band .pop__title { color: var(--paper); font-size: 1.08rem; }
.popular--band .pop__meta { color: rgba(244, 238, 227, .6); }
@media (max-width: 1020px) { .popular--band .popular__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
	.popular--band .popular__list { grid-template-columns: 1fr; gap: var(--s-3); }
	.popular--band .pop__link { flex-direction: row; }
	.popular--band .pop__thumb { width: 96px; aspect-ratio: 1; margin: 8px 0 8px 8px; }
	.popular--band .pop__text { padding: var(--s-3) var(--s-4); }
}

/* Rail: beside the post (desktop) / under it (mobile) */
.popular--rail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); position: relative; }
.popular--rail::before { content: ""; position: absolute; top: -11px; left: 28px; width: 80px; height: 22px; background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px var(--tape-edge); }
.popular--rail .popular__kicker { color: var(--accent-ink); }
.popular--rail .popular__title { font-size: 1.6rem; }
.popular--rail .pop { border-top: 1px dashed var(--line-strong); }
.popular--rail .pop__link { gap: 14px; padding: 14px 0; align-items: stretch; }
.popular--rail .pop__thumb { width: 76px; height: 76px; border-radius: 4px; }
.popular--rail .pop__text { gap: 4px; padding-block: 2px; }
.popular--rail .pop__title { font-size: .98rem; }

/* ---------- Single ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 5vw, 72px); padding-block: clamp(32px, 5vw, 64px) var(--s-9); align-items: start; }
.bench__sticky { position: sticky; top: 112px; }
.admin-bar .bench__sticky { top: 144px; }
.entry { min-width: 0; max-width: 760px; }
.entry__meta-top { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.entry__read { font: 500 .75rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.entry__title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; margin-bottom: var(--s-5); }
.entry__byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 500 .8rem var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-bottom: var(--s-5); border-bottom: 1.5px solid var(--ink); }
.entry__avatar { border-radius: 50%; }
.entry__hero { position: relative; margin: var(--s-7) 0; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.entry__hero .tape { left: 18%; }
.entry__hero .tape--r { left: auto; right: 12%; }
.entry__hero-img { width: 100%; border-radius: 3px; }

/* Tape-measure reading bar */
.tape-measure { position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 60; pointer-events: none; }
.admin-bar .tape-measure { top: 32px; }
.tape-measure__fill {
	display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
	background:
		repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 12px) left top / 100% 3px no-repeat,
		var(--yellow);
}

/* Prose */
.prose { font-size: 1.125rem; line-height: 1.78; margin-top: var(--s-6); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2em 0 .6em; }
.prose h3 { font-size: 1.4rem; margin: 1.8em 0 .5em; }
.prose h2::before { content: ""; display: block; width: 44px; height: 3px; background: var(--accent); margin-bottom: 14px; }
.prose a { color: var(--accent-ink); text-decoration-thickness: 1.5px; }
.prose a:hover { background: rgba(242, 193, 78, .35); }
.prose img, .prose .wp-block-image img { border-radius: 4px; height: auto; }
.prose figure { margin: 2em 0; }
.prose figcaption, .prose .wp-element-caption { font: 500 .78rem/1.5 var(--f-mono); color: var(--muted); margin-top: 10px; letter-spacing: .02em; }
.prose blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--accent); font: 500 1.35rem/1.45 var(--f-display); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { font-family: var(--f-mono); color: var(--accent-ink); }
.prose code { font: .9em var(--f-mono); background: var(--paper-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--ink); color: var(--paper); padding: var(--s-5); border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 14px; margin: 3em 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 10px) center / 100% 8px no-repeat; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.prose iframe { width: 100%; }
.alignwide { margin-inline: 0; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }

.page-links { margin-top: var(--s-6); font-family: var(--f-mono); }

.entry__foot { margin-top: var(--s-8); }
.entry__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--s-7); }
.entry__tags-label { font: 500 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.entry__tags .tag { font: 500 .78rem var(--f-mono); text-decoration: none; padding: 6px 10px; background: var(--paper-2); border-radius: 4px; }
.entry__tags .tag::before { content: "#"; color: var(--accent-ink); }
.entry__tags .tag:hover { background: var(--ink); color: var(--paper); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.post-nav__item { display: flex; flex-direction: column; gap: 8px; padding: var(--s-5); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s var(--ease); }
.post-nav__item:hover { border-color: var(--ink); transform: translateY(-2px); }
.post-nav__item--next { text-align: right; grid-column: 2; }
.post-nav__dir { font: 500 .72rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.post-nav__title { font: 600 1.1rem/1.3 var(--f-display); }

@media (max-width: 1100px) {
	.bench { grid-template-columns: 1fr; }
	.entry { max-width: 760px; margin-inline: auto; width: 100%; }
	.bench__side { max-width: 760px; margin-inline: auto; width: 100%; }
	.bench__sticky { position: static; }
	.popular--rail .popular__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5); }
}
@media (max-width: 600px) {
	.popular--rail .popular__list { grid-template-columns: 1fr; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__item--next { grid-column: auto; }
}

/* ---------- Comments ---------- */
.comments { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1.5px solid var(--ink); }
.comments__title { font-size: 1.6rem; }
.comments__list, .comments__list .children { list-style: none; margin: 0; padding: 0; }
.comments__list .children { padding-left: clamp(16px, 4vw, 40px); }
.comment-body { padding: var(--s-5) 0; border-bottom: 1px dashed var(--line-strong); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font: 500 .72rem var(--f-mono); color: var(--muted); margin: 6px 0 10px; }
.comment-metadata a { text-decoration: none; }
.comment-reply-link { font: 500 .75rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.comment-form label { display: block; font: 500 .75rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; font: inherit; background: var(--card); color: var(--ink);
	border: 1.5px solid var(--ink); border-radius: var(--radius);
}
.comment-form p { margin-bottom: var(--s-4); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; letter-spacing: 0; font: 400 .9rem var(--f-body); }

/* ---------- 404 / empty ---------- */
.lost, .empty { padding-block: clamp(56px, 10vw, 120px); max-width: 760px; }
.lost__code { font: 800 clamp(5rem, 16vw, 10rem)/1 var(--f-display); color: transparent; -webkit-text-stroke: 2px var(--ink); letter-spacing: -0.04em; }
.lost__title { font-size: clamp(2rem, 4vw, 3rem); margin-top: var(--s-4); }
.lost__text, .empty__text { color: var(--ink-2); font-size: 1.15rem; }
.lost .search-form { margin: var(--s-6) 0 var(--s-5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); border-top: 1px solid rgba(244, 238, 227, .12); }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-7); padding-block: var(--s-8) var(--s-7); }
.brand--footer { color: var(--paper); }
.brand--footer .brand__mark rect:first-child { fill: var(--paper); }
.brand--footer .brand__mark > path:not(:last-child) { fill: var(--ink); }
.brand--footer .brand__mark g { fill: var(--paper); }
.brand--footer .brand__word { font-size: 2.6rem; }
.brand--footer .brand__mark { width: 52px; height: 52px; }
.site-footer__tag { margin-top: var(--s-4); color: rgba(244, 238, 227, .72); max-width: 40ch; }
.foot-nav__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 40px; justify-content: end; }
.foot-nav__link { font: 500 .78rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(244, 238, 227, .82); text-decoration: none; display: inline-block; padding: 6px 0; }
.foot-nav__link:hover { color: var(--yellow); text-decoration: underline; }
.site-footer__widgets { grid-column: 1 / -1; color: rgba(244, 238, 227, .82); }
.footer-widget__title { font-size: 1.1rem; color: var(--paper); }
.site-footer__base { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-block: var(--s-5) var(--s-6); border-top: 1px dashed rgba(244, 238, 227, .2); font: 500 .75rem var(--f-mono); color: rgba(244, 238, 227, .6); letter-spacing: .06em; text-transform: uppercase; }
.to-top { color: inherit; text-decoration: none; }
.to-top:hover { color: var(--yellow); }
@media (max-width: 720px) {
	.site-footer__grid { grid-template-columns: 1fr; }
	.foot-nav__list { justify-content: start; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
	.card:hover, .pop:hover, .post-nav__item:hover { transform: none !important; }
}

@media print {
	.site-header, .site-footer, .band, .bench__side, .tape-measure, .comments { display: none !important; }
	.bench { display: block; }
}
