/*
Theme Name: Peribat
Theme URI: https://peribat.com/
Author: Peribat
Description: A handmade "workbench" theme for peribat.com: kraft-paper tones, stitched dividers, washi-tape cards and a Popular Topics pattern box under every article. Includes a "Header" widget area printed right after the site header for analytics and ad code.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 7.1
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: peribat
Tags: blog, one-column, grid-layout, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/fraunces-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/fraunces-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/fraunces-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/fraunces-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 600; font-display: swap; src: url(assets/fonts/fraunces-latin-600-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 600; font-display: swap; src: url(assets/fonts/fraunces-latin-ext-600-italic.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/figtree-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/figtree-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/figtree-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/figtree-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/figtree-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/figtree-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
	--paper: #F6EEE0;
	--paper-deep: #ECE0CB;
	--card: #FFFCF6;
	--ink: #1E2B2F;
	--ink-2: #4A585C;
	--ink-3: #6B7774;
	--thread: #C4513A;
	--thread-dark: #9E3B27;
	--sage: #6E8B6A;
	--sage-dark: #4E6A4B;
	--mustard: #E3A63B;
	--line: #DCCCB1;
	--on-ink: #F6EEE0;
	--on-ink-2: #C9C1B2;

	--font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

	--wrap: 1200px;
	--prose: 720px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 6px;
	--shadow: 0 1px 0 rgba(30, 43, 47, .06), 0 10px 24px -14px rgba(30, 43, 47, .35);
	--shadow-lift: 0 1px 0 rgba(30, 43, 47, .06), 0 22px 36px -18px rgba(30, 43, 47, .45);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--font-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--thread-dark); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--thread); }
:focus-visible { outline: 2px dashed var(--thread); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1.1em; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); 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: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: var(--on-ink); }
.site-main:focus { outline: none; }
.icon { flex: none; }

.kicker {
	font: 700 .75rem/1.2 var(--font-body);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--thread-dark);
	margin: 0 0 .6rem;
}
.meta { display: inline-flex; align-items: center; gap: .35em; color: var(--ink-3); font-size: .875rem; }
.meta .icon { width: 16px; height: 16px; }

/* Stitched divider: a running stitch in thread colour. */
.stitch {
	height: 6px;
	background:
		repeating-linear-gradient(90deg, var(--thread) 0 14px, transparent 14px 24px) center / 100% 2px no-repeat;
}
.stitch--light { background: repeating-linear-gradient(90deg, var(--ink-3) 0 10px, transparent 10px 20px) center / 100% 2px no-repeat; opacity: .45; }

/* Buttons */
.btn, .search-submit, .form-submit .submit {
	display: inline-flex; align-items: center; gap: .5em;
	min-height: 46px; padding: .7em 1.25em;
	background: var(--ink); color: var(--on-ink);
	border: 0; border-radius: 999px;
	font: 700 .95rem/1 var(--font-body);
	text-decoration: none; cursor: pointer;
	transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover, .search-submit:hover, .form-submit .submit:hover { background: var(--thread-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

/* Category chip */
.chip {
	display: inline-block;
	font: 700 .72rem/1 var(--font-body);
	letter-spacing: .08em; text-transform: uppercase;
	padding: .45em .7em .4em;
	border: 1.5px dashed currentColor;
	border-radius: 999px;
	color: var(--sage-dark);
	text-decoration: none;
	background: transparent;
}
a.chip:hover { color: var(--thread-dark); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 40;
	background: var(--paper);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 44px; height: 44px; transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-24deg); }
.brand-word { font: 700 1.85rem/1 var(--font-display); letter-spacing: -.03em; }
.brand-logo { max-height: 56px; width: auto; }

.main-nav { margin-left: auto; }
.nav-list, .nav-list ul { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 4px; align-items: center; }
.nav-list > li { position: relative; }
.nav-list a {
	display: block; padding: 10px 14px; border-radius: 999px;
	color: var(--ink); text-decoration: none; font-weight: 500;
}
.nav-list a:hover, .nav-list .current-menu-item > a { background: var(--paper-deep); color: var(--ink); }
.nav-list .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 220px; padding: 8px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s var(--ease);
}
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.header-tools { display: flex; gap: 8px; margin-left: auto; }
.main-nav + .header-tools { margin-left: 8px; }
.tool-btn {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; min-width: 44px; padding: 0 14px;
	border: 1.5px solid var(--ink); border-radius: 999px;
	background: transparent; color: var(--ink);
	font: 700 .9rem/1 var(--font-body); cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); }
.tool-btn--menu { display: none; padding: 0; justify-content: center; }

.search-drawer { border-top: 1px solid var(--line); background: var(--paper-deep); padding: 18px 0; }
.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-field {
	flex: 1; min-width: 0; min-height: 48px; padding: 0 18px;
	border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card);
	font: inherit; color: var(--ink);
}
.search-field::placeholder { color: var(--ink-3); }
.search-submit .icon { width: 18px; height: 18px; }

@media (max-width: 900px) {
	.tool-btn--menu { display: inline-flex; }
	.tool-label { display: none; }
	.tool-btn { padding: 0; justify-content: center; }
	.main-nav { order: 3; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; display: none; }
	.main-nav.is-open { display: block; }
	.nav-list { flex-direction: column; align-items: stretch; }
	.nav-list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: transparent; }
	.main-nav + .header-tools { margin-left: auto; }
}

/* ---------- Intro (cutting-mat) ---------- */
.intro {
	position: relative;
	padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 56px);
	background:
		repeating-linear-gradient(0deg, rgba(110, 139, 106, .13) 0 1px, transparent 1px 32px),
		repeating-linear-gradient(90deg, rgba(110, 139, 106, .13) 0 1px, transparent 1px 32px),
		var(--paper);
}
.intro::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
	background:
		repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 16px) bottom / 100% 6px no-repeat,
		repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 80px) bottom / 100% 12px no-repeat;
	opacity: .5;
}
.intro-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; }
.intro-title { font-size: clamp(2.2rem, 4.8vw, 3.75rem); font-style: italic; font-weight: 600; margin: 0; max-width: 18ch; text-wrap: balance; }
.intro--slim .intro-title { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; }
.intro-sub { color: var(--ink-2); font-size: 1.125rem; margin: 0; max-width: 46ch; }
.intro--slim .intro-sub { margin-top: 14px; }
.intro-search { margin-top: 24px; }
@media (max-width: 760px) { .intro-row { grid-template-columns: 1fr; } }

/* ---------- Feature ---------- */
.feature {
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px); align-items: center;
	margin: clamp(36px, 6vw, 64px) 0;
}
.feature-media {
	position: relative; display: block;
	padding: 12px 12px 44px; background: var(--card);
	box-shadow: var(--shadow-lift); transform: rotate(-1.2deg);
	transition: transform .4s var(--ease);
}
.feature-media:hover { transform: rotate(0); }
.feature-media::before {
	content: ""; position: absolute; z-index: 2; top: -14px; left: 50%; width: 132px; height: 30px;
	transform: translateX(-50%) rotate(-3deg);
	background: repeating-linear-gradient(45deg, rgba(227, 166, 59, .82) 0 8px, rgba(240, 190, 96, .82) 8px 16px);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.feature-media .card-img, .feature-media .card-swatch { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.feature-title { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.feature-title a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--mustard), var(--mustard)) 0 92% / 0 .28em no-repeat; transition: background-size .4s var(--ease); }
.feature-title a:hover { background-size: 100% .28em; color: var(--ink); }
.feature-excerpt { color: var(--ink-2); font-size: 1.1rem; }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.feature-foot .btn { margin-left: auto; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature-foot .btn { margin-left: 0; } }

/* ---------- Card grid ---------- */
.card-grid {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 3.4vw, 44px) clamp(20px, 2.6vw, 32px);
	margin: clamp(32px, 5vw, 56px) 0;
}
@media (max-width: 1020px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
	position: relative; display: flex; flex-direction: column;
	background: var(--card); border: 1px solid var(--line); border-radius: 4px;
	box-shadow: var(--shadow);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card::before {
	content: ""; position: absolute; z-index: 2; top: -11px; left: 50%; width: 96px; height: 24px;
	transform: translateX(-50%) rotate(-2.5deg);
	background: repeating-linear-gradient(45deg, rgba(227, 166, 59, .8) 0 7px, rgba(240, 190, 96, .8) 7px 14px);
}
.card.tape-1::before { background: repeating-linear-gradient(-45deg, rgba(110, 139, 106, .75) 0 7px, rgba(140, 168, 135, .75) 7px 14px); transform: translateX(-38%) rotate(2deg); }
.card.tape-2::before { background: radial-gradient(circle at 4px 4px, rgba(196, 81, 58, .55) 1.6px, transparent 2px) 0 0 / 9px 9px, rgba(246, 210, 196, .85); transform: translateX(-62%) rotate(-1deg); }
.card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-lift); }
.card-media { display: block; margin: 10px 10px 0; overflow: hidden; border-radius: 2px; }
.card-media, .pt-media, .feature-media .card-img { background: repeating-linear-gradient(0deg, rgba(196, 81, 58, .12) 0 10px, transparent 10px 20px), repeating-linear-gradient(90deg, rgba(196, 81, 58, .12) 0 10px, transparent 10px 20px), var(--paper-deep); }
.card-media .card-img, .card-media .card-swatch { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media .card-img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.card-title { font-size: 1.3rem; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--thread-dark); }
.card-excerpt { color: var(--ink-2); font-size: .975rem; margin: 0; }
.card-foot { margin-top: auto; padding-top: 10px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1.5px dashed var(--line); }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: .92rem; color: var(--thread-dark); text-decoration: none; }
.more .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.more:hover .icon { transform: translateX(4px); }

/* Fabric swatch: used only when a post has no image at all. */
.card-swatch { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; color: var(--card); font: 700 3rem/1 var(--font-display); }
.card-swatch span { width: 2.2em; height: 2.2em; display: grid; place-items: center; border-radius: 50%; background: rgba(30, 43, 47, .55); border: 2px dashed rgba(255, 252, 246, .7); }
.card-swatch.tone-0 { background: repeating-linear-gradient(0deg, rgba(196, 81, 58, .45) 0 12px, transparent 12px 24px), repeating-linear-gradient(90deg, rgba(196, 81, 58, .45) 0 12px, transparent 12px 24px), #F3D9CF; }
.card-swatch.tone-1 { background: repeating-linear-gradient(45deg, #6E8B6A 0 10px, #8DA889 10px 20px); }
.card-swatch.tone-2 { background: radial-gradient(circle, #E3A63B 3px, transparent 3.5px) 0 0 / 18px 18px, #F7E7C6; }
.card-swatch.tone-3 { background: linear-gradient(135deg, #2B3B40 25%, transparent 25%) -12px 0 / 24px 24px, linear-gradient(225deg, #2B3B40 25%, transparent 25%) -12px 0 / 24px 24px, linear-gradient(315deg, #2B3B40 25%, transparent 25%) 0 0 / 24px 24px, linear-gradient(45deg, #2B3B40 25%, transparent 25%) 0 0 / 24px 24px, #4A585C; }

/* ---------- Pager (sewing buttons) ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 clamp(48px, 7vw, 80px); }
.pager .page-numbers {
	display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 10px;
	border-radius: 999px; background: var(--card); border: 1.5px solid var(--line);
	color: var(--ink); font-weight: 700; text-decoration: none;
	box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5.5px transparent;
	transition: .2s var(--ease);
}
.pager a.page-numbers:hover { border-color: var(--ink); }
.pager .page-numbers.current { background: var(--thread); border-color: var(--thread); color: #fff; box-shadow: inset 0 0 0 4px var(--thread), inset 0 0 0 5.5px rgba(255, 255, 255, .55); }
.pager .page-numbers.dots { background: transparent; border-color: transparent; }
.pager .icon { width: 18px; height: 18px; }

.empty { text-align: center; padding: 64px 0; max-width: 560px; margin: 0 auto; }
.empty .search-form { margin: 24px auto 0; }

/* ---------- Popular Topics (pattern box) ---------- */
.pt {
	position: relative;
	background: var(--ink);
	color: var(--on-ink);
	padding: clamp(48px, 7vw, 84px) 0 clamp(52px, 7vw, 88px);
	margin-top: clamp(40px, 6vw, 72px);
	background-image: radial-gradient(rgba(246, 238, 224, .07) 1px, transparent 1.5px);
	background-size: 18px 18px;
}
.pt::before {
	content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 2px;
	background: repeating-linear-gradient(90deg, rgba(246, 238, 224, .35) 0 12px, transparent 12px 22px);
}
.pt-head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(24px, 4vw, 40px); }
.pt-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--thread); color: var(--on-ink); flex: none; }
.pt-icon .icon { width: 28px; height: 28px; }
.pt .kicker { color: var(--mustard); margin-bottom: .35rem; }
.pt-title { color: var(--on-ink); font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0; }
.pt-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(16px, 2.2vw, 28px);
}
@media (max-width: 1020px) { .pt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.pt-grid[data-count="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .pt-grid[data-count="8"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-item { display: flex; }
.pt-card {
	display: flex; flex-direction: column; width: 100%;
	color: var(--on-ink); text-decoration: none;
	background: #26363B; border-radius: 4px; overflow: hidden;
	transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.pt-card:hover { color: var(--on-ink); background: #2D4046; transform: translateY(-4px); }
/* Pinking-shear edge along the bottom of every swatch. */
.pt-media {
	display: block; position: relative; aspect-ratio: 1; overflow: hidden;
	-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
	mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.pt-media .card-img, .pt-media .card-swatch { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; transition: transform .6s var(--ease); }
.pt-card:hover .pt-media .card-img { transform: scale(1.06); }
.pt-text { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px 16px; flex: 1; }
.pt-num { font: 600 italic .95rem/1 var(--font-display); color: var(--mustard); flex: none; }
.pt-name { font-weight: 500; font-size: .98rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-card:hover .pt-name { text-decoration: underline; text-decoration-color: var(--mustard); text-underline-offset: .2em; }
@media (max-width: 680px) { .pt-text { padding: 10px 10px 14px; gap: 8px; } .pt-name { font-size: .9rem; } }

/* ---------- Single ---------- */
.entry-head { max-width: calc(var(--prose) + var(--gutter) * 2); padding-top: clamp(28px, 5vw, 56px); text-align: left; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: .875rem; }
.crumb { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.crumb:hover { color: var(--thread-dark); text-decoration: underline; }
.crumb-sep { color: var(--line); }
.entry-title { font-size: clamp(2.1rem, 5vw, 3.5rem); margin-bottom: 18px; text-wrap: balance; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 22px; border-bottom: 1.5px dashed var(--line); }
.meta-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--thread); }
.entry-hero { max-width: calc(1040px + var(--gutter) * 2); margin: clamp(28px, 4vw, 44px) auto; }
.hero-frame { position: relative; background: var(--card); padding: 12px; box-shadow: var(--shadow-lift); }
.hero-frame::before, .hero-frame::after {
	content: ""; position: absolute; z-index: 2; width: 110px; height: 28px;
	background: repeating-linear-gradient(45deg, rgba(227, 166, 59, .8) 0 8px, rgba(240, 190, 96, .8) 8px 16px);
}
.hero-frame::before { top: -10px; left: -24px; transform: rotate(-32deg); }
.hero-frame::after { bottom: -10px; right: -24px; transform: rotate(-32deg); }
.hero-frame img { width: 100%; max-height: 640px; object-fit: cover; }
.hero-frame { margin-inline: 0; }
@media (max-width: 620px) { .hero-frame { padding: 8px; } .hero-frame::before { left: -6px; width: 80px; } .hero-frame::after { right: -6px; width: 80px; } }
.entry-hero figcaption { color: var(--ink-3); font-size: .875rem; margin-top: 12px; text-align: center; }

.prose { max-width: calc(var(--prose) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.entry-content { font-size: 1.125rem; line-height: 1.75; padding-top: 8px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.25em; }
.entry-content h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin-top: 1.8em; padding-bottom: .35em; background: repeating-linear-gradient(90deg, var(--thread) 0 10px, transparent 10px 18px) left bottom / 96px 2px no-repeat; }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.6em; }
.entry-content h4 { font-size: 1.15rem; margin-top: 1.4em; }
.entry-content a { font-weight: 500; }
.entry-content ul { list-style: none; padding-left: 1.6em; }
.entry-content ul > li { position: relative; margin-bottom: .45em; }
.entry-content ul > li::before { content: ""; position: absolute; left: -1.25em; top: .72em; width: .7em; height: 2px; background: var(--thread); box-shadow: 0 -4px 0 -0px transparent; }
.entry-content ol { padding-left: 1.6em; }
.entry-content ol > li { margin-bottom: .45em; }
.entry-content ol > li::marker { font: 600 italic 1em var(--font-display); color: var(--thread-dark); }
.entry-content img { border-radius: 4px; }
.entry-content figure { margin-inline: 0; }
.entry-content figure.wp-block-image img, .entry-content p > img { box-shadow: var(--shadow); }
.entry-content figcaption, .entry-content .wp-element-caption { color: var(--ink-3); font-size: .875rem; text-align: center; margin-top: .6em; }
.entry-content blockquote {
	position: relative; margin: 2em 0; padding: 26px 26px 22px;
	background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
	font: 600 italic 1.2rem/1.55 var(--font-display);
}
.entry-content blockquote::before { content: ""; position: absolute; top: -12px; left: 28px; width: 90px; height: 24px; transform: rotate(-3deg); background: repeating-linear-gradient(-45deg, rgba(110, 139, 106, .75) 0 7px, rgba(140, 168, 135, .75) 7px 14px); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: 10px; font: 500 normal .9rem var(--font-body); color: var(--ink-3); }
.entry-content hr { border: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 10px, transparent 10px 20px); opacity: .4; margin: 2.4em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--paper-deep); }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.entry-content pre { background: var(--ink); color: var(--on-ink); padding: 18px; overflow: auto; border-radius: var(--radius); }
.entry-content iframe, .entry-content .wp-block-embed iframe { width: 100%; border-radius: 4px; }
.entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.entry-content .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; height: 100%; }
.entry-content .alignwide { max-width: 1040px; margin-inline: calc((min(1040px, 100vw - var(--gutter) * 2) - min(var(--prose), 100vw - var(--gutter) * 2)) / -2); }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.page-parts { display: flex; gap: 8px; flex-wrap: wrap; }

.entry-foot { margin-top: 40px; }
.post-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.step {
	display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-height: 96px;
	background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius);
	color: var(--ink); text-decoration: none; transition: border-color .2s var(--ease);
}
.step:hover { border-color: var(--thread); color: var(--ink); }
.step--next { text-align: right; grid-column: 2; }
.step-label { font: 700 .72rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--thread-dark); }
.step-title { font: 700 1.05rem/1.3 var(--font-display); }
@media (max-width: 620px) { .post-steps { grid-template-columns: 1fr; } .step--next { grid-column: auto; } }

/* ---------- Comments ---------- */
.notes { padding-block: clamp(40px, 6vw, 64px); }
.notes-title { font-size: 1.6rem; }
.note-list, .note-list .children { list-style: none; margin: 0; padding: 0; }
.note-list .children { padding-left: clamp(16px, 4vw, 40px); }
.note-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.note-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.note-avatar { border-radius: 50%; }
.note-author { display: block; }
.note-date { color: var(--ink-3); font-size: .85rem; }
.note-text p:last-child { margin-bottom: 0; }
.note-reply { margin-top: 10px; }
.comment-reply-link { font-weight: 700; font-size: .9rem; text-decoration: none; }
.comment-form label { display: block; font-weight: 500; 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; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); font: inherit; color: var(--ink);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); outline: none; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-deep); color: var(--ink-2); }
.pt + .site-footer, .pt + .notes + .site-footer { margin-top: 0; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; padding-top: 44px; padding-bottom: 28px; }
.footer-brand { max-width: 420px; }
.footer-note { margin: 14px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.footer-links a { display: inline-block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 999px; }
.footer-links a:hover { background: var(--paper); color: var(--thread-dark); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 28px; border-top: 1.5px dashed var(--line); font-size: .9rem; }
.footer-base p { margin: 0; }
.to-top { color: var(--ink); font-weight: 700; text-decoration: none; padding: 10px 0; }

/* ---------- WordPress core classes ---------- */
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--ink-3); font-size: .875rem; text-align: center; }
.sticky .card-title::after { content: " ★"; color: var(--mustard); }
.bypostauthor > .note-body { border-color: var(--sage); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

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