/*
Theme Name: Ned Hardy Puzzle Page
Theme URI: https://nedhardy.com/
Author: Nick Lee
Description: A puzzle-page theme for Ned Hardy. Today's games and the Daily Crossword lead the homepage, with a Reading Room story feed below. Eight built-in styles (Modern, Classic, Sunday Edition, Night Edition, Salmon Pages, Library, Almanac, Highlighter) plus games, crossword feature and daily links are all set in Appearance > Customize > Puzzle Page.
Version: 1.5.1
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: nedhardy-puzzle
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Tokens ----------
   Declared on body so a body.nh-style-* class can override any of them
   and every derived token follows. */
body {
	--nh-paper: #F6F3EC;
	--nh-card: #FFFDF8;
	--nh-ink: #16130F;
	--nh-body: #3B362F;
	--nh-muted: #5E574C;
	--nh-rule: #D9D2C3;
	--nh-rule-strong: #CFC7B5;
	--nh-placeholder: #E7E0D1;
	--nh-solved: #EFEADF;
	--nh-accent: #B23A26;
	--nh-blue: #1F4E8C;
	--nh-hl: #F2D9D2;
	--nh-block: var(--nh-ink);

	--nh-disp: 'Fraunces', Georgia, 'Times New Roman', serif;
	--nh-sans: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--nh-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

	--nh-mast-weight: 900;
	--nh-mast-style: normal;
	--nh-mast-case: none;
	--nh-mast-ls: -0.02em;
	--nh-head-weight: 800;

	--nh-radius: 0px;
	--nh-tile-radius: 0px;
	--nh-rule-double: 3px double var(--nh-ink);
	--nh-nav-bg: transparent;
	--nh-nav-ink: var(--nh-ink);
	--nh-nav-active: var(--nh-accent);
	--nh-btn-bg: var(--nh-ink);
	--nh-btn-ink: var(--nh-paper);
	--nh-btn-hover-ink: #FFFFFF;
	--nh-xw-bg: var(--nh-card);
	--nh-xw-muted: var(--nh-muted);
	--nh-kick: var(--nh-accent);
	--nh-kick-bg: transparent;
	--nh-kick-pad: 0;
	--nh-foot-bg: transparent;
	--nh-foot-ink: var(--nh-muted);
	--nh-foot-name: var(--nh-ink);

	--nh-max: 1200px;
	--nh-gutter: 24px;
}

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

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

body {
	margin: 0;
	background: var(--nh-paper);
	color: var(--nh-ink);
	font-family: var(--nh-sans);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--nh-ink); text-decoration: none; }
a:hover { color: var(--nh-accent); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--nh-blue);
	outline-offset: 2px;
}

img,
video { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--nh-disp);
	font-weight: var(--nh-head-weight);
	line-height: 1.15;
	margin: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	z-index: 1000;
	top: 8px;
	left: 8px;
	padding: 10px 16px;
	background: var(--nh-ink);
	color: var(--nh-paper);
	white-space: normal;
}

.nh-wrap {
	max-width: var(--nh-max);
	margin: 0 auto;
	padding-left: var(--nh-gutter);
	padding-right: var(--nh-gutter);
}

.nh-mono { font-family: var(--nh-mono); }
.nh-muted { color: var(--nh-muted); }

/* ---------- Utility bar ---------- */
.nh-utility { border-bottom: 1px solid var(--nh-rule); font-size: 13px; color: var(--nh-muted); }
.nh-utility__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.nh-utility__left,
.nh-utility__right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.nh-utility__date { font-weight: 600; color: var(--nh-ink); }

/* Search */
.nh-search { display: flex; align-items: stretch; }
.nh-search__input {
	height: 34px;
	width: 170px;
	border: 1px solid var(--nh-rule-strong);
	border-right: 0;
	background: var(--nh-card);
	color: var(--nh-ink);
	padding: 0 10px;
	font: inherit;
	font-size: 13px;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}
.nh-search__button {
	width: 36px;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
	color: var(--nh-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.nh-search__button:hover { color: var(--nh-accent); }

/* ---------- Header ---------- */
.nh-brand { display: flex; align-items: center; gap: 16px; }
.nh-brand__name { margin: 0; font-family: var(--nh-disp); font-weight: var(--nh-mast-weight); font-style: var(--nh-mast-style); text-transform: var(--nh-mast-case); line-height: 1; letter-spacing: var(--nh-mast-ls); }
.nh-brand__name a { color: var(--nh-ink); }
.nh-brand__tagline { margin: 6px 0 0; font-family: var(--nh-disp); font-style: italic; font-size: 18px; color: var(--nh-muted); }

.nh-monogram {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 2px solid var(--nh-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--nh-disp);
	font-weight: 800;
	font-size: 20px;
	color: var(--nh-ink);
}
.custom-logo-link { display: inline-flex; flex: 0 0 auto; }

/* Ned the mascot pup (default logo) */
.nh-mascot { display: inline-flex; flex: 0 0 auto; width: 88px; height: 88px; transition: transform 0.2s ease; }
.nh-mascot svg { display: block; width: 100%; height: 100%; }
.nh-brand:hover .nh-mascot { transform: rotate(-8deg); }
.nh-header--compact .nh-mascot { width: 48px; height: 48px; }
.custom-logo { max-height: 72px; width: auto; }

/* Masthead (homepage) */
.nh-header--masthead .nh-header__inner {
	padding-top: 32px;
	padding-bottom: 20px;
	display: flex;
	justify-content: center;
	text-align: center;
}
.nh-header--masthead .nh-brand { flex-direction: row; }
.nh-header--masthead .nh-brand__text { display: flex; flex-direction: column; align-items: center; }
.nh-header--masthead .nh-brand__name { font-size: clamp(44px, 7vw, 68px); }
.nh-header--masthead .nh-nav {
	background: var(--nh-nav-bg);
	border-top: var(--nh-rule-double);
	border-bottom: 1px solid var(--nh-ink);
}
.nh-header--masthead .nh-nav__list { justify-content: center; }
.nh-header--masthead .nh-nav__list a,
.nh-header--masthead .nh-nav__toggle { color: var(--nh-nav-ink); border-color: var(--nh-nav-ink); }

/* Compact (inner pages) */
.nh-header--compact { border-bottom: 1px solid var(--nh-ink); }
.nh-header--compact .nh-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 28px;
	padding-top: 14px;
	padding-bottom: 14px;
}
.nh-header--compact .nh-monogram { width: 40px; height: 40px; font-size: 15px; }
.nh-header--compact .custom-logo { max-height: 44px; }
.nh-header--compact .nh-brand { gap: 10px; }
.nh-header--compact .nh-brand__name { font-size: 30px; }

/* Nav */
.nh-nav__list {
	list-style: none;
	margin: 0 auto;
	padding: 0 var(--nh-gutter);
	max-width: var(--nh-max);
	display: flex;
	flex-wrap: wrap;
	gap: 0 28px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.nh-header--compact .nh-nav__list { padding: 0; margin: 0; gap: 0 22px; font-size: 13px; }
.nh-nav__list a { display: block; padding: 12px 0; }
.nh-nav__list .current-menu-item > a,
.nh-nav__list .current_page_item > a,
.nh-nav__list .nh-menu-games > a { color: var(--nh-accent); }
.nh-header--masthead .nh-nav__list .current-menu-item > a,
.nh-header--masthead .nh-nav__list .current_page_item > a,
.nh-header--masthead .nh-nav__list .nh-menu-games > a { color: var(--nh-nav-active); }

.nh-nav__toggle {
	display: none;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 14px;
	margin: 6px var(--nh-gutter);
	border: 1px solid var(--nh-ink);
	background: transparent;
	color: var(--nh-ink);
	font: inherit;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}
.nh-header--compact .nh-nav__toggle { margin: 0; }
.nh-nav__toggle-bars,
.nh-nav__toggle-bars::before,
.nh-nav__toggle-bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	position: relative;
}
.nh-nav__toggle-bars::before,
.nh-nav__toggle-bars::after { content: ''; position: absolute; left: 0; }
.nh-nav__toggle-bars::before { top: -6px; }
.nh-nav__toggle-bars::after { top: 6px; }

@media (max-width: 760px) {
	.nh-nav__toggle { display: inline-flex; }
	.nh-nav__panel { display: none; width: 100%; }
	.nh-nav.is-open .nh-nav__panel { display: block; }
	.nh-nav__list,
	.nh-header--compact .nh-nav__list { flex-direction: column; padding: 0 var(--nh-gutter) 8px; gap: 0; }
	.nh-header--compact .nh-nav__list { padding: 0 0 8px; }
	.nh-nav__list li + li a { border-top: 1px solid var(--nh-rule); }
	.nh-header--masthead .nh-nav { display: flex; flex-direction: column; align-items: center; }
	.nh-header--masthead .nh-nav__panel { text-align: center; }
	.nh-header--compact .nh-nav { width: 100%; }
	.nh-header--compact .nh-header__inner { flex-wrap: wrap; }
	.nh-header--compact .nh-nav__toggle { position: absolute; right: var(--nh-gutter); top: 12px; }
	.nh-header--compact { position: relative; }
	.nh-header--masthead .nh-header__inner { padding-top: 20px; padding-bottom: 12px; }
	.nh-header--masthead .nh-monogram { width: 44px; height: 44px; font-size: 16px; }
	.nh-search__input { width: 130px; }
}

/* ---------- Phones: icon-only menu button in the header row ---------- */
@media (max-width: 760px) {
	.nh-header { position: relative; }
	.nh-nav__toggle {
		position: absolute;
		top: 46px;
		right: var(--nh-gutter);
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		justify-content: center;
		transform: translateY(-50%);
	}
	.nh-nav.is-open .nh-nav__toggle-bars { background: transparent; }
	.nh-nav.is-open .nh-nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
	.nh-nav.is-open .nh-nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }

	/* Masthead becomes one row: logo and name on the left, menu icon on the right */
	.nh-header--masthead { border-bottom: var(--nh-rule-double); border-bottom-color: var(--nh-ink); }
	.nh-header--masthead .nh-header__inner { justify-content: flex-start; text-align: left; padding-top: 16px; padding-bottom: 16px; padding-right: calc(var(--nh-gutter) + 56px); }
	.nh-header--masthead .nh-brand { gap: 12px; }
	.nh-header--masthead .nh-brand__text { align-items: flex-start; }
	.nh-header--masthead .nh-brand__name { font-size: clamp(30px, 9vw, 40px); }
	.nh-header--masthead .nh-brand__tagline { font-size: 15px; margin-top: 4px; }
	.nh-header--masthead .nh-monogram { width: 42px; height: 42px; font-size: 15px; }
	.nh-header--masthead .nh-mascot { width: 52px; height: 52px; }
	.nh-header--compact .nh-mascot { width: 44px; height: 44px; }
	.nh-header--masthead .custom-logo { max-height: 48px; }
	.nh-header--masthead .nh-nav { position: static; display: block; border: 0; background: transparent; }
	.nh-header--masthead .nh-nav.is-open { background: var(--nh-nav-bg); border-top: 1px solid var(--nh-rule); }
	.nh-header--masthead .nh-nav__toggle { color: var(--nh-ink); border-color: var(--nh-ink); top: 46px; }
	.nh-header--masthead .nh-nav__panel { text-align: left; }
	.nh-header--masthead .nh-nav__list { padding: 0 var(--nh-gutter) 8px; }
	.nh-header--masthead .nh-nav__list a { color: var(--nh-nav-ink); }
	.nh-header--compact .nh-header__inner { padding-right: calc(var(--nh-gutter) + 56px); }
	.nh-header--compact .nh-nav__toggle { top: 34px; }
}

/* ---------- Layout ---------- */
.nh-main { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 48px; }
.nh-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.nh-primary { flex: 999 1 560px; min-width: 0; }
.nh-sidebar { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.nh-no-sidebar .nh-primary { max-width: 820px; margin: 0 auto; }
.home.nh-no-sidebar .nh-primary { max-width: none; }

.nh-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	border-bottom: 1px solid var(--nh-ink);
	padding-bottom: 8px;
}
.nh-section-title { font-size: 32px; letter-spacing: -0.01em; }
.nh-section-title--sm { font-size: 24px; }
.nh-more-link { font-size: 14px; font-weight: 600; color: var(--nh-accent); }
.nh-more-link:hover { text-decoration: underline; }

.nh-kicker {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nh-kick);
	background: var(--nh-kick-bg);
	padding: var(--nh-kick-pad);
}
.nh-kicker--b { color: var(--nh-blue); }
a.nh-kicker:hover { text-decoration: underline; }

.nh-byline { font-size: 13px; color: var(--nh-muted); }
.nh-byline a { color: var(--nh-ink); font-weight: 600; }

.nh-button,
.entry-content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	background: var(--nh-btn-bg);
	color: var(--nh-btn-ink);
	border: 1px solid var(--nh-btn-bg);
	border-radius: var(--nh-radius);
	font-family: var(--nh-sans);
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	text-decoration: none;
}
.nh-button:hover,
.entry-content .wp-block-button__link:hover { background: var(--nh-accent); border-color: var(--nh-accent); color: var(--nh-btn-hover-ink); }

/* ---------- Puzzle band ---------- */
.nh-band { display: flex; flex-direction: column; gap: 20px; }
.nh-band__row { display: flex; flex-wrap: wrap; gap: 24px; }

/* Crossword card: the game's own brand (charcoal and orange by default) */
.nh-xw {
	--xw-bg: #26282B;
	--xw-accent: #F28C28;
	flex: 1 1 380px;
	min-width: 0;
	background: var(--xw-bg);
	color: #F4F1EA;
	border-radius: var(--nh-tile-radius);
	padding: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
}
.nh-xw__grid {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: repeat(5, 36px);
	border: 2px solid #F4F1EA;
}
.nh-xw__cell {
	position: relative;
	height: 36px;
	border: 1px solid var(--xw-bg);
	background: #F4F1EA;
	color: #26282B;
}
.nh-xw__cell.is-black { background: #111111; }
.nh-xw__cell.is-hl { background: var(--xw-accent); }
.nh-xw__cell i { position: absolute; top: 1px; left: 3px; font-style: normal; font-family: var(--nh-mono); font-size: 9px; line-height: 1.1; }
.nh-xw__body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nh-xw__logo {
	margin: 0;
	display: flex;
	flex-direction: column;
	font-family: 'Archivo Black', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 0.92;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: #FFFFFF;
}
.nh-xw__logo span { color: var(--xw-accent); font-size: 0.64em; }
.nh-xw__text { margin: 0; color: #C9C6BF; }
.nh-xw__meta { color: #C9C6BF; }
.nh-xw__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; font-size: 13px; }
.nh-xw .nh-button { background: var(--xw-accent); border-color: var(--xw-accent); color: #1A1A1A; font-weight: 800; }
.nh-xw .nh-button:hover { background: #FFFFFF; border-color: #FFFFFF; color: #1A1A1A; }

/* Game blocks: each one wears its game's logo and colors (Customizer > Game 1-6) */
.nh-games {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}
.nh-games--band { flex: 1 1 520px; min-width: 0; }
.nh-game {
	--g-bg: #2B2F36;
	--g-a: #FFFFFF;
	--g-b: #22D3EE;
	--g-fg: #D7DCE2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
	min-height: 168px;
	padding: 18px;
	background: var(--g-bg);
	color: var(--g-fg);
	border-radius: var(--nh-tile-radius);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.nh-game:hover { color: var(--g-fg); transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); }
a.nh-game:focus-visible { outline-offset: 3px; }
.nh-game__meta { display: flex; flex-direction: column; gap: 3px; }
.nh-game__desc { font-size: 14px; line-height: 1.35; }
.nh-game__time { font-family: var(--nh-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }

/* Logos (Archivo Black, like the games themselves) */
.nh-logo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-family: 'Archivo Black', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 400;
	font-size: 30px;
	line-height: 0.92;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--g-a);
}
.nh-logo__b { color: var(--g-b); }
.nh-logo__hollow { color: transparent; -webkit-text-stroke: 1.5px var(--g-a); }
@supports not (-webkit-text-stroke: 1px black) { .nh-logo__hollow { color: var(--g-a); } }
.nh-logo__tag { margin-top: 3px; padding: 3px 7px 1px; background: var(--g-a); color: var(--g-bg); }
.nh-logo__chip {
	width: 74px;
	height: 74px;
	border-radius: 50%;
	background: var(--g-a);
	border: 4px dashed #FFFFFF;
	outline: 2px solid var(--g-a);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--g-bg);
	font-size: 19px;
	line-height: 0.95;
}
.nh-logo__ladder {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 2px 8px;
	border-left: 3px solid var(--g-b);
	border-right: 3px solid var(--g-b);
}
.nh-logo__ladder span:first-child { padding-bottom: 4px; border-bottom: 3px solid var(--g-b); }

/* Under posts: smaller blocks, no one-liners */
.nh-games--strip { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.nh-games--strip .nh-game { min-height: 118px; padding: 14px; }
.nh-games--strip .nh-game__desc { display: none; }
.nh-games--strip .nh-logo { font-size: 22px; }
.nh-games--strip .nh-logo__chip { width: 58px; height: 58px; font-size: 15px; border-width: 3px; }
@media (max-width: 520px) {
	.nh-games--strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Daily strip */
.nh-dailies { display: flex; flex-wrap: wrap; gap: 12px; }
.nh-daily {
	flex: 1 1 200px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 10px 16px;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
	font-weight: 600;
}
.nh-daily .nh-mono { font-size: 12px; font-weight: 500; text-align: right; }

/* Phones: compact two-column game blocks and dailies */
@media (max-width: 520px) {
	.nh-games--band { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.nh-games--band .nh-game { min-height: 124px; padding: 12px; gap: 10px; }
	.nh-games--band .nh-game__desc { display: none; }
	.nh-games .nh-logo { font-size: 22px; }
	.nh-games .nh-logo__hollow { -webkit-text-stroke-width: 1.2px; }
	.nh-games .nh-logo__chip { width: 58px; height: 58px; font-size: 15px; border-width: 3px; }
	.nh-xw__logo { font-size: 32px; }
	.nh-daily { flex: 1 1 140px; padding: 10px 12px; }
	.nh-daily .nh-mono { display: none; }
}
.nh-band-after { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Band heading: title, progress, all-games link ---------- */
.nh-band__head { align-items: center; }
.nh-band__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.nh-progress {
	margin: 0;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	font-family: var(--nh-mono);
	font-size: 13px;
	font-weight: 600;
	color: var(--nh-ink);
}
.nh-progress__sep { color: var(--nh-muted); }
.nh-progress.is-done .nh-progress__played { color: var(--nh-accent); }
@media (max-width: 520px) {
	.nh-band__head { align-items: flex-start; flex-direction: column; gap: 4px; }
	.nh-band__meta { width: 100%; justify-content: space-between; }
}

/* ---------- Compact puzzle band (homepage) ---------- */
.nh-band { gap: 14px; }
.nh-band .nh-section-head { padding-bottom: 6px; }
.nh-band .nh-section-title { font-size: 26px; }
.nh-band__row { gap: 16px; }
.nh-xw { flex: 1 1 300px; padding: 18px; gap: 16px; }
.nh-xw__grid { grid-template-columns: repeat(5, 26px); }
.nh-xw__cell { height: 26px; }
.nh-xw__cell i { font-size: 8px; left: 2px; }
.nh-xw__body { flex: 1 1 160px; gap: 8px; }
.nh-xw__logo { font-size: 24px; }
.nh-xw__text { font-size: 14px; line-height: 1.4; }
.nh-xw__actions { margin-top: 2px; }
.nh-xw .nh-button { padding: 0 18px; white-space: nowrap; }
.nh-games--band { flex: 2 1 560px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nh-games--band .nh-game { min-height: 112px; padding: 14px; gap: 8px; }
.nh-games--band .nh-game__desc { display: none; }
.nh-games--band .nh-logo { font-size: 22px; }
.nh-games--band .nh-logo__hollow { -webkit-text-stroke-width: 1.2px; }
.nh-games--band .nh-logo__chip { width: 52px; height: 52px; font-size: 13px; border-width: 3px; }
.nh-daily { min-height: 44px; }
@media (max-width: 760px) {
	.nh-games--band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.nh-band__row { gap: 12px; }
	/* Crossword card: small grid left, title and text right, full-width button below */
	.nh-xw {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 14px;
		row-gap: 6px;
		align-items: center;
		padding: 14px;
	}
	.nh-xw__grid { grid-row: 1 / span 2; grid-template-columns: repeat(5, 20px); }
	.nh-xw__cell { height: 20px; }
	.nh-xw__cell i { font-size: 7px; left: 1px; top: 0; }
	.nh-xw__body { display: contents; }
	.nh-xw__logo { grid-column: 2; align-self: end; font-size: 22px; }
	.nh-xw__text { grid-column: 2; align-self: start; font-size: 13px; line-height: 1.35; }
	.nh-xw__actions { grid-column: 1 / -1; margin-top: 6px; }
	.nh-xw .nh-button { width: 100%; justify-content: center; padding: 0 14px; font-size: 15px; }
	.nh-games--band { gap: 8px; }
	.nh-games--band .nh-game { min-height: 84px; padding: 10px 12px; }
	.nh-games--band .nh-logo { font-size: 20px; }
	.nh-games--band .nh-logo__chip { width: 46px; height: 46px; font-size: 12px; }
}

/* ---------- Feed ---------- */
.nh-feed { display: flex; flex-direction: column; }
.nh-feed__title { font-size: 28px; border-bottom: 1px solid var(--nh-ink); padding-bottom: 8px; margin-bottom: 4px; }

.nh-thumb {
	display: block;
	position: relative;
	overflow: hidden;
	background: var(--nh-placeholder);
	border: 1px solid var(--nh-rule-strong);
}
.nh-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nh-thumb--empty { display: flex; align-items: center; justify-content: center; }
.nh-thumb__mark { font-family: var(--nh-disp); font-weight: 900; font-size: 40px; color: var(--nh-rule-strong); }

.nh-lead { display: flex; flex-direction: column; gap: 12px; padding: 20px 0 28px; border-bottom: 1px solid var(--nh-rule); }
.nh-thumb--lead { aspect-ratio: 16 / 9; }
.nh-lead__title { font-size: clamp(28px, 4vw, 38px); line-height: 1.08; letter-spacing: -0.01em; }
.nh-lead__excerpt { margin: 0; font-size: 17px; color: var(--nh-body); }

.nh-row { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--nh-rule); }
.nh-thumb--row { flex: 0 0 200px; height: 130px; }
.nh-row__body { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.nh-row__title { font-weight: 700; font-size: 23px; line-height: 1.2; }
.nh-row__excerpt { margin: 0; font-size: 15px; color: var(--nh-muted); }
@media (max-width: 520px) {
	.nh-thumb--row { flex: 1 1 100%; height: auto; aspect-ratio: 16 / 9; }
}

.nh-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
	padding-top: 24px;
}
.nh-card { display: flex; flex-direction: column; gap: 8px; }
.nh-thumb--card { aspect-ratio: 16 / 10; }
.nh-card__title { font-weight: 700; font-size: 19px; line-height: 1.25; }

/* Pagination */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
	font-family: var(--nh-mono);
	font-size: 14px;
}
.pagination .page-numbers.current { background: var(--nh-ink); border-color: var(--nh-ink); color: var(--nh-paper); }
.pagination .page-numbers.dots { border: 0; background: transparent; }

/* ---------- Page headers ---------- */
.nh-page-head { display: flex; flex-direction: column; gap: 6px; border-bottom: var(--nh-rule-double); padding-bottom: 20px; }
.nh-page-title { font-weight: var(--nh-mast-weight); font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.02em; }
.nh-page-desc { font-family: var(--nh-disp); font-style: italic; font-size: 18px; color: var(--nh-muted); }
.nh-page-desc p { margin: 0; }
.nh-empty { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 20px 0; }
.nh-empty .nh-search__input { width: 260px; height: 44px; font-size: 15px; }

/* ---------- Single ---------- */
.nh-entry__head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.nh-entry__head--rule { border-bottom: var(--nh-rule-double); padding-bottom: 20px; }
.nh-entry__title { font-weight: var(--nh-head-weight); font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.015em; }
.nh-entry__title--xl { font-size: clamp(40px, 6vw, 60px); }
.nh-entry__dek { margin: 0; font-family: var(--nh-disp); font-style: italic; font-size: 18px; color: var(--nh-muted); }
.nh-entry__hero { margin: 0 0 24px; }
.nh-entry__hero img { display: block; width: 100%; border: 1px solid var(--nh-rule-strong); }

/* Post body */
.entry-content { font-size: 18px; line-height: 1.65; color: var(--nh-body); }
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { color: var(--nh-ink); margin-top: 1.6em; margin-bottom: 0.5em; }
.entry-content h2 { font-size: 30px; }
.entry-content h3 { font-size: 24px; }
.entry-content h4 { font-size: 20px; }
.entry-content a { color: var(--nh-accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--nh-ink); }
.entry-content img { display: block; margin-left: auto; margin-right: auto; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption,
.entry-content .wp-caption-text,
.entry-content .wp-element-caption { font-size: 14px; color: var(--nh-muted); margin-top: 8px; text-align: left; }
.entry-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--nh-accent);
	font-family: var(--nh-disp);
	font-size: 22px;
	line-height: 1.4;
	color: var(--nh-ink);
}
.entry-content ul,
.entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: 0.3em; }
.entry-content hr { border: 0; border-top: 1px solid var(--nh-rule); margin: 2em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th,
.entry-content td { border-bottom: 1px solid var(--nh-rule); padding: 8px 6px; text-align: left; }
.entry-content pre,
.entry-content code { font-family: var(--nh-mono); font-size: 0.9em; }
.entry-content pre { background: var(--nh-card); border: 1px solid var(--nh-rule); padding: 16px; overflow-x: auto; }
.entry-content iframe,
.entry-content embed,
.entry-content object { max-width: 100%; }
.entry-content .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content .more-link { font-weight: 600; }
.nh-entry--full .entry-content { max-width: none; }
.wp-caption { max-width: 100%; }
.sticky,
.gallery-caption,
.bypostauthor { outline: 0; }

.nh-page-links { font-family: var(--nh-mono); font-size: 14px; margin-top: 24px; }
.nh-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.nh-tags a {
	font-size: 13px;
	padding: 6px 12px;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
}

/* Author box */
.nh-author {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-top: 32px;
	padding: 18px;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
}
.nh-author__avatar { border-radius: 50%; flex: 0 0 auto; }
.nh-author__body { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.nh-author__name { margin: 0; font-family: var(--nh-disp); font-weight: 800; font-size: 18px; }
.nh-author__bio { margin: 0; color: var(--nh-body); }

/* Games strip under posts */
.nh-strip { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }

/* Post navigation */
.post-navigation { margin-top: 40px; border-top: 1px solid var(--nh-ink); }
.post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-top: 16px; }
.post-navigation .nav-previous,
.post-navigation .nav-next { flex: 1 1 240px; }
.post-navigation .nav-next { text-align: right; }
.nh-postnav__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-accent); }
.nh-postnav__title { font-family: var(--nh-disp); font-weight: 700; font-size: 19px; line-height: 1.25; }

/* ---------- Sidebar widgets ---------- */
.nh-sidebar .widget { font-size: 15px; }
.widget-title {
	font-size: 20px;
	border-bottom: 1px solid var(--nh-ink);
	padding-bottom: 6px;
	margin-bottom: 12px;
}
.nh-sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.nh-sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--nh-rule); }
.nh-sidebar .widget li:last-child { border-bottom: 0; }
.nh-sidebar .widget p { margin: 0 0 0.8em; }
.nh-sidebar .widget_search .nh-search__input { width: 100%; height: 40px; font-size: 15px; }
.nh-sidebar .widget_search .nh-search { width: 100%; }
.nh-sidebar .widget_search .nh-search__button { width: 44px; }
.nh-sidebar .wp-block-search__input { border: 1px solid var(--nh-rule-strong); background: var(--nh-card); }
.nh-sidebar .wp-block-search__button { background: var(--nh-ink); color: var(--nh-paper); border: 0; border-radius: 0; }

/* Optional boxed widget: add the CSS class "nh-box" to a block or widget. */
.nh-box,
.nh-sidebar .widget.nh-box {
	border: 1px solid var(--nh-ink);
	background: var(--nh-card);
	padding: 20px;
}

/* ---------- Comments ---------- */
.nh-comments { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.nh-comment-list,
.nh-comment-list .children { list-style: none; margin: 0; padding: 0; }
.nh-comment-list .children { padding-left: 24px; }
.nh-comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--nh-rule); font-size: 15px; }
.nh-comment-list .comment-meta { font-size: 13px; color: var(--nh-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.nh-comment-list .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.nh-comment-list .reply a { font-size: 13px; font-weight: 600; color: var(--nh-accent); }
.comment-form { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.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 {
	width: 100%;
	border: 1px solid var(--nh-rule-strong);
	background: var(--nh-card);
	color: var(--nh-ink);
	padding: 10px 12px;
	font: inherit;
	border-radius: 0;
}

/* ---------- Footer ---------- */
.nh-footer { border-top: var(--nh-rule-double); border-top-color: var(--nh-ink); margin-top: 24px; font-size: 14px; color: var(--nh-foot-ink); background: var(--nh-foot-bg); }
.nh-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-top: 28px;
	padding-bottom: 12px;
}
.nh-footer__name { font-family: var(--nh-disp); font-weight: var(--nh-mast-weight); font-style: var(--nh-mast-style); text-transform: var(--nh-mast-case); font-size: 22px; color: var(--nh-foot-name); }
.nh-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.nh-footer__links a { color: var(--nh-foot-ink); }
.nh-footer__links a:hover { color: var(--nh-accent); }
.nh-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 8px; padding-bottom: 28px; font-size: 13px; }

/* ---------- Shared rounding (0 in the newsprint styles) ---------- */
.nh-thumb,
.nh-daily,
.nh-xw,
.nh-author,
.nh-box,
.nh-tags a,
.pagination .page-numbers,
.nh-nav__toggle,
.nh-entry__hero img { border-radius: var(--nh-radius); }

/* ==========================================================
   Styles: Appearance > Customize > Puzzle Page > General > Style
   ========================================================== */

/* Modern: bold sans, rounded, colored game tiles */
body.nh-style-modern {
	--nh-paper: #FFFFFF;
	--nh-card: #F5F5F5;
	--nh-ink: #111111;
	--nh-body: #333333;
	--nh-muted: #5C5C5C;
	--nh-rule: #E4E4E4;
	--nh-rule-strong: #D0D0D0;
	--nh-placeholder: #ECECEC;
	--nh-solved: #F0F0F0;
	--nh-accent: #D6311F;
	--nh-blue: #2457D6;
	--nh-hl: #FFE08A;
	--nh-disp: 'Archivo', system-ui, sans-serif;
	--nh-sans: 'DM Sans', system-ui, sans-serif;
	--nh-mast-weight: 900;
	--nh-mast-case: uppercase;
	--nh-mast-ls: -0.04em;
	--nh-head-weight: 800;
	--nh-radius: 12px;
	--nh-tile-radius: 10px;
	--nh-rule-double: 3px solid var(--nh-ink);
}

/* Classic: cream newsprint (the base tokens) */
body.nh-style-classic { }

/* Sunday Edition: navy, blue, italic serif masthead */
body.nh-style-sunday {
	--nh-paper: #FFFFFF;
	--nh-card: #F4F7FC;
	--nh-ink: #14213D;
	--nh-body: #2E3A55;
	--nh-muted: #56627A;
	--nh-rule: #D6DEEA;
	--nh-rule-strong: #B9C6DA;
	--nh-placeholder: #E3EAF4;
	--nh-solved: #EAF0F8;
	--nh-accent: #2456A6;
	--nh-blue: #B4400C;
	--nh-hl: #FCEBB0;
	--nh-disp: 'Source Serif 4', Georgia, serif;
	--nh-sans: 'Public Sans', system-ui, sans-serif;
	--nh-mast-weight: 700;
	--nh-mast-style: italic;
	--nh-mast-ls: -0.01em;
	--nh-head-weight: 700;
	--nh-rule-double: 0 solid transparent;
	--nh-nav-bg: #14213D;
	--nh-nav-ink: #FFFFFF;
	--nh-nav-active: #FCD34D;
	--nh-btn-bg: #2456A6;
	--nh-btn-ink: #FFFFFF;
	--nh-foot-bg: #14213D;
	--nh-foot-ink: #D8E0EE;
	--nh-foot-name: #FFFFFF;
}
.nh-style-sunday .nh-header--masthead .nh-nav__list a { padding-top: 13px; padding-bottom: 13px; }

/* Night Edition: dark paper, amber ink */
body.nh-style-night {
	--nh-paper: #15130F;
	--nh-card: #1E1B16;
	--nh-ink: #EDE6D6;
	--nh-body: #D6CEBC;
	--nh-muted: #A69E8E;
	--nh-rule: #34302A;
	--nh-rule-strong: #4A443B;
	--nh-placeholder: #2A261F;
	--nh-solved: #24211B;
	--nh-accent: #E8A33D;
	--nh-blue: #8CB4E8;
	--nh-hl: #5A4520;
	--nh-block: #050504;
	--nh-btn-bg: #E8A33D;
	--nh-btn-ink: #15130F;
	--nh-btn-hover-ink: #15130F;
	color-scheme: dark;
}
.nh-style-night .nh-button:hover { background: #F2BC66; border-color: #F2BC66; }

/* Salmon Pages: financial-paper pink, teal */
body.nh-style-salmon {
	--nh-paper: #FBE9DD;
	--nh-card: #FFF4EC;
	--nh-ink: #33261F;
	--nh-body: #4A3A30;
	--nh-muted: #6E5A4C;
	--nh-rule: #EBCDB9;
	--nh-rule-strong: #DDB89F;
	--nh-placeholder: #F2D3BF;
	--nh-solved: #F6DCCB;
	--nh-accent: #0F6E73;
	--nh-blue: #9E2B25;
	--nh-hl: #CDE7E5;
	--nh-disp: 'Newsreader', Georgia, serif;
	--nh-sans: 'IBM Plex Sans', system-ui, sans-serif;
	--nh-mast-weight: 600;
	--nh-mast-ls: -0.01em;
	--nh-head-weight: 700;
	--nh-btn-bg: #0F6E73;
	--nh-btn-ink: #FFFFFF;
}

/* Library: forest green, brass, ivory */
body.nh-style-library {
	--nh-paper: #F3F0E6;
	--nh-card: #FBF9F2;
	--nh-ink: #1E3B2C;
	--nh-body: #2F4A3B;
	--nh-muted: #5B6B5F;
	--nh-rule: #D5D8C8;
	--nh-rule-strong: #BFC4AE;
	--nh-placeholder: #E2E3D4;
	--nh-solved: #E9EADF;
	--nh-accent: #7D5F1F;
	--nh-blue: #1E3B2C;
	--nh-hl: #EADFB8;
	--nh-disp: 'Lora', Georgia, serif;
	--nh-sans: 'Work Sans', system-ui, sans-serif;
	--nh-mast-weight: 700;
	--nh-mast-ls: 0;
	--nh-head-weight: 700;
	--nh-rule-double: 0 solid transparent;
	--nh-nav-bg: #1E3B2C;
	--nh-nav-ink: #F3F0E6;
	--nh-nav-active: #E3C77A;
	--nh-btn-bg: #1E3B2C;
	--nh-btn-ink: #F3F0E6;
	--nh-foot-bg: #1E3B2C;
	--nh-foot-ink: #DCE3DA;
	--nh-foot-name: #F3F0E6;
}

/* Almanac: aged paper, sepia, typewriter details */
body.nh-style-almanac {
	--nh-paper: #F2E6C4;
	--nh-card: #F8EFD6;
	--nh-ink: #3B2A1A;
	--nh-body: #4A3826;
	--nh-muted: #6B5638;
	--nh-rule: #D9C79B;
	--nh-rule-strong: #C8B37F;
	--nh-placeholder: #E6D6A8;
	--nh-solved: #EADCB2;
	--nh-accent: #8C2F1B;
	--nh-blue: #355E3B;
	--nh-hl: #E8C9A0;
	--nh-disp: 'Old Standard TT', Georgia, serif;
	--nh-mono: 'Special Elite', ui-monospace, monospace;
	--nh-mast-weight: 700;
	--nh-mast-case: uppercase;
	--nh-mast-ls: 0.06em;
	--nh-head-weight: 700;
	--nh-btn-bg: #8C2F1B;
	--nh-btn-ink: #F8EFD6;
}

/* Highlighter: white, black display serif, lime marker */
body.nh-style-highlighter {
	--nh-paper: #FFFFFF;
	--nh-card: #FAFAFA;
	--nh-ink: #0E0E0E;
	--nh-body: #2B2B2B;
	--nh-muted: #5A5A5A;
	--nh-rule: #E6E6E6;
	--nh-rule-strong: #0E0E0E;
	--nh-placeholder: #EFEFEF;
	--nh-solved: #F2F2F2;
	--nh-accent: #4B3FD1;
	--nh-blue: #4B3FD1;
	--nh-hl: #D4F53C;
	--nh-disp: 'DM Serif Display', Georgia, serif;
	--nh-sans: 'DM Sans', system-ui, sans-serif;
	--nh-mast-weight: 400;
	--nh-mast-ls: -0.01em;
	--nh-head-weight: 400;
	--nh-rule-double: 2px solid var(--nh-ink);
	--nh-kick: #0E0E0E;
	--nh-kick-bg: #D4F53C;
	--nh-kick-pad: 2px 6px;
	--nh-xw-bg: #D4F53C;
	--nh-xw-muted: #2B2B2B;
}
.nh-style-highlighter :is(.nh-row__title, .nh-card__title, .nh-postnav__title, .nh-author__name, .nh-monogram) { font-weight: 400; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
