/*
Theme Name: The Pun Press
Theme URI: https://thepunpress.com
Author: The Pun Press
Description: A bright yellow, funny sticker-style blog theme for puns and wordplay. Homepage sections, colors, text, links and menus are all editable from Appearance > Customize.
Version: 1.0.4
Requires at least: 5.8
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: punpress
*/

/* ---------- Variables (colors are overridden from the Customizer) ---------- */
:root {
	--bg: #FFD93B;
	--ink: #17120A;
	--accent: #FF8FB1;
	--accent2: #7AD3FF;
	--paper: #FFFFFF;
	--soft: color-mix(in srgb, var(--bg) 30%, #fff);
	--muted: color-mix(in srgb, var(--bg) 70%, #fff);
	--display: 'Bagel Fat One', system-ui, sans-serif;
	--body: 'Fredoka', system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 18px;
	line-height: 1.5;
	overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	background: var(--ink); color: var(--bg);
	padding: 12px 18px; z-index: 100; top: 8px; left: 8px;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 860px; }

/* ---------- Top strip ---------- */
.strip {
	background: var(--ink);
	color: var(--bg);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 10px 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 28px;
	text-align: center;
}

/* ---------- Header ---------- */
.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 28px 0;
}

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo .custom-logo { max-height: 64px; width: auto; }
.logo__a { font-family: var(--display); font-size: 36px; line-height: 1; }
.logo__b {
	font-family: var(--display);
	font-size: 36px;
	line-height: 1;
	background: var(--accent);
	border: 3px solid var(--ink);
	border-radius: 14px;
	padding: 4px 12px 6px;
	transform: rotate(-3deg);
	box-shadow: 3px 3px 0 var(--ink);
	display: inline-block;
}

.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.main-nav .menu, .footer-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.main-nav .menu a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	font-weight: 600;
	font-size: 16px;
}
.main-nav .menu a:hover { background: var(--paper); text-decoration: none; }
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-menu-parent > a,
.main-nav .current-cat > a,
.main-nav .current-post-ancestor > a {
	background: var(--ink);
	color: var(--bg);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 28px;
	border: 3px solid var(--ink);
	border-radius: 16px;
	font-family: var(--body);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	cursor: pointer;
	color: var(--ink);
	background: var(--paper);
}
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); }
.btn--ink { background: var(--ink); color: var(--bg); box-shadow: 5px 5px 0 var(--accent); }
.btn--paper { background: var(--paper); box-shadow: 5px 5px 0 var(--ink); }
.btn--pill {
	min-height: 44px;
	padding: 10px 22px;
	border-radius: 999px;
	font-size: 16px;
	box-shadow: 3px 3px 0 var(--ink);
}
.btn--accent { background: var(--accent); }
.btn--bg { background: var(--bg); }
.btn--small {
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 15px;
	box-shadow: none;
}
.btn--share {
	min-height: 44px;
	padding: 0 20px;
	border-radius: 999px;
	font-size: 15px;
	box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- Hero ---------- */
.hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px;
	padding: 36px 0 64px;
}
.hero__text { flex: 1 1 460px; min-width: 0; }
.hero__card { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }

.pill-tag {
	display: inline-block;
	background: var(--paper);
	border: 3px solid var(--ink);
	border-radius: 999px;
	padding: 6px 16px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transform: rotate(-2deg);
	margin-bottom: 22px;
}

.hero__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(44px, 7.4vw, 88px);
	line-height: 0.98;
	letter-spacing: -0.01em;
	margin-bottom: 20px;
}
.hero__title .mark {
	background: var(--accent);
	border: 3px solid var(--ink);
	border-radius: 16px;
	padding: 0 14px 4px;
	display: inline-block;
	transform: rotate(-2deg);
	box-shadow: 4px 4px 0 var(--ink);
}
.hero__lead { font-size: 21px; line-height: 1.5; max-width: 520px; margin-bottom: 32px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.pod {
	background: var(--paper);
	border: 3px solid var(--ink);
	border-radius: 28px;
	padding: 32px;
	box-shadow: 10px 10px 0 var(--ink);
	transform: rotate(1.5deg);
	max-width: 520px;
	width: 100%;
}
.pod__label {
	display: inline-block;
	background: var(--accent);
	border: 3px solid var(--ink);
	border-radius: 999px;
	padding: 4px 14px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 18px;
}
.pod__q {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.08;
	margin-bottom: 18px;
}
.pod__a {
	font-family: var(--display);
	font-size: clamp(24px, 3vw, 32px);
	line-height: 1.15;
	background: var(--bg);
	border: 3px solid var(--ink);
	border-radius: 16px;
	padding: 14px 18px;
	margin-bottom: 26px;
}

.groan__label {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 10px;
}
.groan__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.groan__btn {
	min-height: 44px;
	padding: 0 18px;
	cursor: pointer;
	font-family: var(--body);
	font-weight: 700;
	font-size: 15px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
}
.groan__btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.groan__msg { margin: 14px 0 0; font-size: 16px; }

/* ---------- Homepage category sections ---------- */
.band {
	background: var(--paper);
	border-top: 4px solid var(--ink);
	border-bottom: 4px solid var(--ink);
	padding: 64px 0;
}
.band--alt { background: transparent; border-top: 0; border-bottom: 0; }
.band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 36px;
}
.band__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(34px, 5vw, 52px);
	line-height: 1;
}

/* ---------- Cards ---------- */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 32px;
}
.card {
	background: var(--paper);
	border: 3px solid var(--ink);
	border-radius: 24px;
	box-shadow: 7px 7px 0 var(--ink);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	margin: 0;
}
.card__img {
	display: block;
	height: 190px;
	border-bottom: 3px solid var(--ink);
	background: var(--accent);
	overflow: hidden;
}
.card__img--2 { background: var(--accent2); }
.card__img--3 { background: var(--bg); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__title { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.12; }
.card__dek { margin: 0; font-size: 18px; line-height: 1.5; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Page headings (archives, search, 404) ---------- */
.page-head { padding: 24px 0 36px; }
.page-head__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(38px, 6vw, 68px);
	line-height: 1.02;
	margin-bottom: 14px;
}
.page-head__desc { font-size: 20px; max-width: 700px; }
.site-main { padding-bottom: 72px; }
.site-main:has(.band) { padding-bottom: 0; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 16px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	font-weight: 700;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); }
.pagination .page-numbers:hover { text-decoration: none; background: var(--accent); }

/* ---------- Panels ---------- */
.panel {
	background: var(--paper);
	border: 3px solid var(--ink);
	border-radius: 28px;
	padding: 24px;
}
.panel__title { font-family: var(--display); font-weight: 400; font-size: 26px; margin-bottom: 14px; }
.panel--accent { background: var(--accent); box-shadow: 8px 8px 0 var(--ink); }
.panel--accent .panel__title { font-size: 30px; line-height: 1.05; }

/* ---------- Single article ---------- */
.post-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
	padding-top: 16px;
}
.post { flex: 2 1 560px; min-width: 0; max-width: 780px; }
.post-sidebar { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }

.crumbs { margin-bottom: 18px; font-weight: 600; font-size: 15px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.crumbs li + li::before { content: "/"; margin-right: 10px; }
.crumbs a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; }
.container > .crumbs { margin-top: 8px; }

.post__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(36px, 6vw, 68px);
	line-height: 1.02;
	margin-bottom: 18px;
}
.post__dek { font-size: 22px; line-height: 1.45; margin-bottom: 22px; }
.post__meta {
	background: var(--paper);
	border: 3px solid var(--ink);
	border-radius: 999px;
	padding: 10px 20px;
	margin-bottom: 28px;
	display: inline-block;
	font-weight: 500;
	font-size: 15px;
}
.post__image {
	border: 3px solid var(--ink);
	border-radius: 28px;
	box-shadow: 8px 8px 0 var(--ink);
	overflow: hidden;
	margin-bottom: 40px;
}
.post__image img { width: 100%; }

.page-article .post__title { margin-bottom: 28px; }

/* Article text. Numbered lists become pun cards automatically. */
.entry-content { padding: clamp(22px, 4vw, 40px); font-size: 20px; line-height: 1.65; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 36px 0 20px; }
.entry-content h3 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 28px 0 14px; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.entry-content a:hover { background: var(--accent); }
.entry-content img { border-radius: 16px; }

/* "Also read:" box (made automatically, or add the CSS class "also-read" to any paragraph) */
.entry-content p.also-read {
	background: var(--soft);
	border: 3px solid var(--ink);
	border-radius: 18px;
	box-shadow: 5px 5px 0 var(--ink);
	padding: 14px 18px;
	margin: 30px 0;
	font-size: 19px;
	line-height: 1.5;
	font-weight: 600;
}
.entry-content p.also-read .also-read__label {
	display: inline-block;
	background: var(--ink);
	color: var(--bg);
	border-radius: 999px;
	padding: 2px 14px 3px;
	margin-right: 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	vertical-align: 1px;
}
.entry-content p.also-read a { font-weight: 700; text-decoration-color: var(--ink); }
.entry-content blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	background: var(--soft);
	border: 3px solid var(--ink);
	border-radius: 18px;
	font-size: 22px;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.entry-content th, .entry-content td { border: 3px solid var(--ink); padding: 10px 14px; text-align: left; }

.entry-content ol {
	list-style: none;
	counter-reset: pun;
	padding: 0;
	margin: 0 0 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.entry-content ol > li {
	counter-increment: pun;
	position: relative;
	margin: 0;
	padding: 16px 18px 16px 80px;
	min-height: 76px;
	display: block;
	background: var(--soft);
	border: 3px solid var(--ink);
	border-radius: 18px;
	font-size: 20px;
	line-height: 1.45;
}
.entry-content ol > li::before {
	content: counter(pun);
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--accent);
	border: 3px solid var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--display);
	font-size: 20px;
	line-height: 1;
}

.share { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.share__label { font-weight: 700; font-size: 16px; margin-right: 6px; }

.related { display: flex; flex-direction: column; gap: 12px; }
.related__item {
	background: var(--soft);
	border: 3px solid var(--ink);
	border-radius: 16px;
	padding: 14px 16px;
	font-weight: 600;
	font-size: 17px;
	line-height: 1.35;
}
.related__item:hover { background: var(--accent); text-decoration: none; }

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 8px; }

/* ---------- Comments ---------- */
.comments { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 2px solid var(--ink); }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea,
.search-field {
	width: 100%;
	font-family: var(--body);
	font-size: 18px;
	padding: 12px 16px;
	border: 3px solid var(--ink);
	border-radius: 16px;
	background: var(--paper);
	color: var(--ink);
}
.comment-form .submit, .search-submit {
	min-height: 48px;
	padding: 0 24px;
	border: 3px solid var(--ink);
	border-radius: 16px;
	background: var(--ink);
	color: var(--bg);
	font-family: var(--body);
	font-weight: 700;
	font-size: 17px;
	cursor: pointer;
}
.search-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.search-form label { flex: 1 1 260px; }

/* ---------- Newsletter ---------- */
.newsletter { padding: 72px 24px; }
.newsletter__box {
	max-width: 820px;
	margin: 0 auto;
	background: var(--accent);
	border: 3px solid var(--ink);
	border-radius: 32px;
	box-shadow: 10px 10px 0 var(--ink);
	padding: clamp(28px, 5vw, 56px);
	text-align: center;
}
.newsletter__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(32px, 5vw, 52px);
	line-height: 1.05;
	margin-bottom: 14px;
}
.newsletter__text { font-size: 20px; margin-bottom: 28px; }
.newsletter__form form:not(.mc4wp-form),
.newsletter__form .mc4wp-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	align-items: center;
}
.newsletter__form p { margin: 0; }
.newsletter__form .pp-field { flex: 1 1 260px; max-width: 400px; }
.newsletter__form p input[type="email"],
.newsletter__form p input[type="text"] { width: 100%; max-width: none; }
.newsletter__form .mc4wp-response { width: 100%; margin-top: 16px; font-weight: 600; font-size: 17px; }
.newsletter__form .mc4wp-response p { margin: 0; }

/* Built-in signup form */
.newsletter__form .pp-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.newsletter__form .pp-msg { width: 100%; margin: 4px 0 0; font-weight: 700; font-size: 18px; min-height: 1.5em; }
.newsletter__form .pp-msg:empty { display: none; }
.newsletter__form .pp-btn {
	min-height: 52px;
	padding: 0 28px;
	background: var(--ink);
	color: var(--bg);
	border: 3px solid var(--ink);
	border-radius: 16px;
	font-family: var(--body);
	font-weight: 700;
	font-size: 18px;
	cursor: pointer;
}
.newsletter__form .pp-btn:disabled { opacity: 0.6; cursor: wait; }
.pp-note { margin: 18px 0 0; font-size: 15px; }
.newsletter__form input[type="email"], .newsletter__form input[type="text"] {
	flex: 1 1 260px;
	max-width: 400px;
	min-height: 52px;
	padding: 0 18px;
	font-family: var(--body);
	font-size: 18px;
	border: 3px solid var(--ink);
	border-radius: 16px;
	background: #fff;
	color: var(--ink);
}
.newsletter__form button, .newsletter__form input[type="submit"] {
	min-height: 52px;
	padding: 0 28px;
	background: var(--ink);
	color: var(--bg);
	border: 3px solid var(--ink);
	border-radius: 16px;
	font-family: var(--body);
	font-weight: 700;
	font-size: 18px;
	cursor: pointer;
}

.admin-hint {
	background: #fff;
	border: 3px dashed var(--ink);
	border-radius: 16px;
	padding: 14px 18px;
	font-size: 16px;
	margin: 24px 0;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--bg); padding: 36px 24px; }
.site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.site-footer__brand { font-family: var(--display); font-size: 28px; }
.footer-nav .menu { gap: 6px 24px; font-weight: 500; font-size: 15px; }
.footer-nav a { display: inline-block; padding: 10px 0; color: var(--bg); }
.site-footer__copy { font-size: 14px; color: var(--muted); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	body { font-size: 17px; }
	.hero { gap: 36px; padding-bottom: 48px; }
	.pod { padding: 24px; box-shadow: 7px 7px 0 var(--ink); }
	.band { padding: 48px 0; }
	.entry-content { font-size: 18px; }
	.entry-content ol > li { padding-left: 72px; font-size: 18px; }
	.entry-content ol > li::before { left: 14px; }
	.entry-content h2 { font-size: 28px; }
	.logo__a, .logo__b { font-size: 30px; }
}
