/**
 * Nutrihave design system.
 *
 * 1. Tokens
 * 2. Base & typography
 * 3. Layout helpers
 * 4. Buttons, chips, badges
 * 5. Header & navigation
 * 6. Search
 * 7. Hero
 * 8. Topics
 * 9. Cards & grids
 * 10. Archive header
 * 11. Single article
 * 12. Entry typography
 * 13. Table of contents
 * 14. Author / reviewer / disclaimer
 * 15. Comments
 * 16. Pagination & post navigation
 * 17. Newsletter & footer
 * 18. Widgets, 404, misc
 * 19. Responsive
 */

/* 1. Tokens --------------------------------------------------------------- */
:root {
	/* #0d8048 keeps white button text at 5.0:1 contrast (WCAG AA). */
	--nh-primary: #0d8048;
	--nh-primary-rgb: 13, 128, 72;
	--nh-primary-dark: #0a6f40;
	--nh-accent: #d8f36b;
	--nh-radius: 18px;

	--nh-ink: #0d1b16;
	--nh-body: #4a5c54;
	/* Darkened from #8a9a92 so small meta text passes 4.5:1 on white. */
	--nh-muted: #64756d;
	--nh-line: #e3ece7;
	--nh-surface: #f5f9f6;
	--nh-white: #ffffff;

	--nh-font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--nh-font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--nh-container: 1180px;
	--nh-shadow-sm: 0 1px 2px rgba(13, 27, 22, .05), 0 4px 12px rgba(13, 27, 22, .05);
	--nh-shadow-md: 0 8px 24px rgba(13, 27, 22, .08);
	--nh-shadow-lg: 0 18px 48px rgba(13, 27, 22, .12);
	--nh-ease: cubic-bezier(.4, 0, .2, 1);
}

/* 2. Base & typography ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	/* Keep anchor targets clear of the sticky header. */
	scroll-padding-top: 96px;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.nh-body {
	margin: 0;
	background: var(--nh-white);
	color: var(--nh-body);
	font-family: var(--nh-font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	color: var(--nh-ink);
	font-family: var(--nh-font-head);
	font-weight: 700;
	letter-spacing: -.015em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

a { color: var(--nh-primary-dark); text-decoration: none; transition: color .2s var(--nh-ease); }
a:hover { color: var(--nh-primary); }

p { margin: 0 0 1.1em; }
img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

blockquote {
	margin: 1.6em 0;
	padding: 1.1em 1.3em;
	border-left: 4px solid var(--nh-primary);
	border-radius: 0 var(--nh-radius) var(--nh-radius) 0;
	background: var(--nh-surface);
	font-size: 1.08em;
	color: var(--nh-ink);
}
blockquote p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--nh-line); margin: 2em 0; }

table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .98em; }
th, td { padding: .7em .8em; border-bottom: 1px solid var(--nh-line); text-align: left; }
th { background: var(--nh-surface); color: var(--nh-ink); font-family: var(--nh-font-head); }

code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
pre { padding: 1em 1.2em; overflow: auto; background: #0d1b16; color: #e8f5ee; border-radius: var(--nh-radius); }
code { background: var(--nh-surface); padding: .15em .4em; border-radius: 6px; }

:focus-visible { outline: 3px solid rgba(var(--nh-primary-rgb), .45); outline-offset: 2px; border-radius: 6px; }

.nh-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nh-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--nh-primary); color: #fff; padding: .7em 1.2em; border-radius: 0 0 10px 0;
}
.nh-skip-link:focus { left: 0; }

/* 3. Layout helpers ------------------------------------------------------- */
.nh-container {
	width: 100%;
	max-width: var(--nh-container);
	margin-inline: auto;
	padding-inline: 24px;
}

.nh-section { padding: 64px 0; }
.nh-section--alt { background: var(--nh-surface); }

.nh-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}
.nh-section__head h2 { margin-bottom: 0; }

.nh-eyebrow {
	margin: 0 0 6px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--nh-primary-dark);
}

.nh-grid { display: grid; gap: 28px; }
.nh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.nh-link-arrow {
	display: inline-flex; align-items: center; gap: 6px;
	font-weight: 600; font-size: .95rem; color: var(--nh-primary-dark);
}
.nh-link-arrow svg { transition: transform .2s var(--nh-ease); }
.nh-link-arrow:hover svg { transform: translateX(4px); }

/* 4. Buttons, chips, badges ---------------------------------------------- */
.nh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: .8em 1.5em;
	border: 0; border-radius: 999px;
	font-family: var(--nh-font-head);
	font-size: .95rem; font-weight: 600;
	cursor: pointer;
	transition: transform .18s var(--nh-ease), box-shadow .18s var(--nh-ease), background .18s var(--nh-ease);
}
.nh-btn:hover { transform: translateY(-2px); }
.nh-btn--primary { background: var(--nh-primary); color: #fff; box-shadow: 0 8px 20px rgba(var(--nh-primary-rgb), .28); }
.nh-btn--primary:hover { background: var(--nh-primary-dark); color: #fff; }
.nh-btn--ghost { background: transparent; color: var(--nh-ink); border: 1.5px solid var(--nh-line); }
.nh-btn--ghost:hover { border-color: var(--nh-primary); color: var(--nh-primary-dark); }

.nh-chip {
	display: inline-block;
	padding: .42em 1em;
	margin: 0 6px 8px 0;
	border-radius: 999px;
	background: rgba(var(--nh-primary-rgb), .08);
	color: var(--nh-primary-dark);
	font-size: .88rem; font-weight: 600;
	transition: background .18s var(--nh-ease), transform .18s var(--nh-ease);
}
.nh-chip:hover { background: var(--nh-primary); color: #fff; transform: translateY(-1px); }

.nh-badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: .38em .95em;
	border-radius: 999px;
	background: var(--nh-primary);
	color: #fff;
	font-size: .78rem; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase;
}
.nh-badge svg { width: 15px; height: 15px; }

/* 5. Header & navigation -------------------------------------------------- */
.nh-header {
	position: sticky; top: 0; z-index: 200;
	background: rgba(255, 255, 255, .88);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--nh-line);
}

.nh-header.is-scrolled { box-shadow: var(--nh-shadow-sm); }

.nh-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 74px;
}

.nh-header__brand { flex-shrink: 0; }
.nh-logo { display: inline-flex; align-items: center; gap: 10px; }
.nh-logo img { max-height: 40px; width: auto; }

.nh-logo__mark {
	display: block; overflow: hidden;
	width: 40px; height: 40px;
	border-radius: 12px;
	background: var(--nh-primary);
	box-shadow: 0 6px 16px rgba(var(--nh-primary-rgb), .3);
}
.nh-logo__mark img { display: block; width: 100%; height: 100%; }

.nh-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.nh-logo__text strong { font-family: var(--nh-font-head); font-size: 1.15rem; color: var(--nh-ink); }
.nh-logo__text small { font-size: .74rem; color: var(--nh-muted); }

.nh-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nh-menu li { margin: 0; position: relative; }
.nh-menu a {
	display: block; padding: .55em .85em;
	border-radius: 10px;
	color: var(--nh-ink);
	font-size: .96rem; font-weight: 500;
}
.nh-menu a:hover { background: var(--nh-surface); color: var(--nh-primary-dark); }
.nh-menu .current-menu-item > a { color: var(--nh-primary-dark); background: rgba(var(--nh-primary-rgb), .1); }

.nh-menu .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 20;
	min-width: 220px; margin: 6px 0 0; padding: 8px;
	list-style: none;
	background: #fff; border: 1px solid var(--nh-line); border-radius: 14px;
	box-shadow: var(--nh-shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: all .18s var(--nh-ease);
}
.nh-menu li:hover > .sub-menu,
.nh-menu li:focus-within > .sub-menu,
.nh-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nh-menu .sub-menu a { font-size: .92rem; }

/* Caret affordance on dropdown parents */
.nh-menu > li.menu-item-has-children > a::after {
	content: ""; display: inline-block;
	width: 6px; height: 6px; margin-left: 7px;
	vertical-align: middle;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	transition: transform .18s var(--nh-ease);
}
.nh-menu > li.menu-item-has-children:hover > a::after,
.nh-menu > li.menu-item-has-children:focus-within > a::after,
.nh-menu > li.menu-item-has-children.is-open > a::after { transform: rotate(-135deg) translateY(-1px); }

/* Mobile drawer expands the submenu with a short drop-in. */
@keyframes nh-submenu-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

.nh-header__actions { display: flex; align-items: center; gap: 8px; }

.nh-icon-btn {
	display: grid; place-items: center;
	width: 42px; height: 42px;
	border: 1px solid var(--nh-line); border-radius: 12px;
	background: #fff; color: var(--nh-ink); cursor: pointer;
	transition: all .18s var(--nh-ease);
}
.nh-icon-btn:hover { border-color: var(--nh-primary); color: var(--nh-primary); }

.nh-burger { display: none; }
.nh-nav__close { display: none; }

/* The in-drawer search form must stay hidden on desktop. This needs to be more
   specific than the generic .nh-search rule further down the file. */
.nh-header .nh-search--mobile { display: none; }

/* Backdrop shown behind the mobile drawer.
   The header is `position: sticky` with a z-index, so it forms a stacking
   context: the fixed drawer is a descendant of it and can never paint above a
   sibling overlay, no matter how high its own z-index is. Keeping the overlay
   below the header is what lets the drawer stay clickable. */
.nh-nav-overlay {
	position: fixed; inset: 0; z-index: 150;
	background: rgba(13, 27, 22, .45);
	opacity: 0; visibility: hidden;
	transition: opacity .25s var(--nh-ease), visibility .25s var(--nh-ease);
}
.nh-nav-overlay.is-open { opacity: 1; visibility: visible; }

body.nh-nav-open { overflow: hidden; }

/* 6. Search --------------------------------------------------------------- */
.nh-search-panel {
	border-top: 1px solid var(--nh-line);
	background: #fff;
	padding: 20px 0;
	animation: nh-slide-down .2s var(--nh-ease);
}
@keyframes nh-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.nh-search {
	position: relative;
	display: flex; align-items: center; gap: 10px;
	padding: 8px 8px 8px 18px;
	background: #fff;
	border: 1.5px solid var(--nh-line);
	border-radius: 999px;
	box-shadow: var(--nh-shadow-sm);
	transition: border-color .2s var(--nh-ease), box-shadow .2s var(--nh-ease);
}
.nh-search:focus-within { border-color: var(--nh-primary); box-shadow: 0 0 0 4px rgba(var(--nh-primary-rgb), .12); }
.nh-search__icon { display: flex; color: var(--nh-muted); }
.nh-search__input {
	flex: 1; min-width: 0;
	padding: .7em 0;
	border: 0; background: transparent;
	font-family: var(--nh-font-body); font-size: 1rem; color: var(--nh-ink);
}
.nh-search__input:focus { outline: none; }
.nh-search__submit {
	display: grid; place-items: center;
	width: 40px; height: 40px;
	border: 0; border-radius: 999px;
	background: var(--nh-surface); color: var(--nh-ink); cursor: pointer;
}

/* 7. Hero ----------------------------------------------------------------- */
.nh-hero {
	position: relative;
	overflow: hidden;
	padding: 72px 0 64px;
	background:
		radial-gradient(900px 420px at 88% -10%, rgba(var(--nh-primary-rgb), .16), transparent 60%),
		radial-gradient(700px 380px at 4% 110%, rgba(216, 243, 107, .35), transparent 60%),
		var(--nh-white);
	border-bottom: 1px solid var(--nh-line);
	isolation: isolate;
}

/* Slow aurora that drifts behind the hero copy.
   Softness comes from the gradient falloff itself — no blur filter, which
   would force the browser to re-rasterise the layer on every frame. */
.nh-hero::before {
	content: "";
	position: absolute;
	inset: -28% -10%;
	z-index: 0;
	background:
		radial-gradient(44% 54% at 26% 34%, rgba(var(--nh-primary-rgb), .17), transparent 72%),
		radial-gradient(40% 48% at 74% 28%, rgba(216, 243, 107, .40), transparent 74%),
		radial-gradient(48% 56% at 60% 82%, rgba(var(--nh-primary-rgb), .12), transparent 72%);
	opacity: .9;
	pointer-events: none;
	animation: nh-aurora 20s ease-in-out infinite alternate;
}

.nh-hero__inner {
	position: relative; z-index: 1;
	display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}

.nh-hero__badge {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 18px; padding: .45em 1em;
	border-radius: 999px;
	background: rgba(var(--nh-primary-rgb), .1);
	color: var(--nh-primary-dark);
	font-size: .85rem; font-weight: 600;
}
.nh-hero__badge svg { width: 16px; height: 16px; }

.nh-hero__title { margin-bottom: 16px; }
.nh-hero__text { max-width: 56ch; font-size: 1.1rem; color: var(--nh-body); }

.nh-search--hero { max-width: 620px; margin: 26px 0 20px; }

.nh-hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 30px; }
.nh-hero__chips-label { font-size: .9rem; color: var(--nh-muted); margin-right: 4px; }

.nh-hero__stats {
	display: flex; flex-wrap: wrap; gap: 32px;
	margin: 0; padding: 0; list-style: none;
}
.nh-hero__stats li { display: flex; flex-direction: column; margin: 0; }
.nh-hero__stats strong { font-family: var(--nh-font-head); font-size: 1.6rem; color: var(--nh-ink); }
.nh-hero__stats span { font-size: .84rem; color: var(--nh-muted); }

/* Staggered entrance for the hero copy — runs on load, no JS required.
   Ease-out-expo curve: quick to arrive, gentle to settle, never sluggish. */
.nh-hero__badge,
.nh-hero__title,
.nh-hero__text,
.nh-search--hero,
.nh-hero__chips,
.nh-hero__stats {
	opacity: 0;
	animation: nh-rise .7s cubic-bezier(.16, 1, .3, 1) both;
}
.nh-hero__badge  { animation-delay: .04s; }
.nh-hero__title  { animation-delay: .10s; }
.nh-hero__text   { animation-delay: .17s; }
.nh-search--hero { animation-delay: .24s; }
.nh-hero__chips  { animation-delay: .31s; }
.nh-hero__stats  { animation-delay: .38s; }

.nh-hero__art {
	position: relative; min-height: 340px;
	/* Offset is written per frame by main.js — no CSS transition, so it tracks
	   the pointer immediately instead of trailing behind it. */
	transform: translate3d(var(--nh-x, 0px), var(--nh-y, 0px), 0);
	animation: nh-art-fade .7s ease both;
}
.nh-hero__orb {
	position: absolute; inset: 10% 8%;
	border-radius: 50%;
	background: radial-gradient(circle at 38% 32%, rgba(var(--nh-primary-rgb), .32), rgba(216, 243, 107, .30) 55%, transparent 74%);
	animation: nh-breathe 10s ease-in-out infinite;
}
.nh-hero__card {
	position: absolute;
	display: flex; align-items: center; gap: 12px;
	padding: 14px 18px;
	background: #fff; border: 1px solid var(--nh-line); border-radius: 16px;
	box-shadow: var(--nh-shadow-md);
	font-family: var(--nh-font-head); font-weight: 600; color: var(--nh-ink);
	animation: nh-float 6.5s ease-in-out infinite;
}
.nh-hero__card p { margin: 0; font-size: .92rem; }
.nh-hero__card span {
	display: grid; place-items: center;
	width: 34px; height: 34px; border-radius: 10px;
	background: rgba(var(--nh-primary-rgb), .12); color: var(--nh-primary-dark);
}
.nh-hero__card--1 { top: 8%; left: 4%; }
.nh-hero__card--2 { top: 42%; right: 2%; animation-delay: 1.2s; }
.nh-hero__card--3 { bottom: 6%; left: 16%; animation-delay: 2.4s; }

/* Motion library for the hero. All of these animate transform/opacity only,
   so the browser can run them on the compositor without repainting. */
@keyframes nh-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}
@keyframes nh-aurora {
	0%   { transform: translate3d(-3%, -2%, 0) scale(1.04); }
	50%  { transform: translate3d(2%, 2%, 0) scale(1.10); }
	100% { transform: translate3d(4%, -2%, 0) scale(1.06); }
}
@keyframes nh-breathe {
	0%, 100% { transform: scale(1); opacity: .85; }
	50%      { transform: scale(1.05); opacity: 1; }
}
@keyframes nh-art-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes nh-float {
	0%, 100% { transform: translateY(0) rotate(-.8deg); }
	50%      { transform: translateY(-9px) rotate(.8deg); }
}

/* 8. Topics --------------------------------------------------------------- */
.nh-topics__grid {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.nh-topic {
	display: flex; align-items: center; gap: 14px;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--nh-line);
	border-radius: var(--nh-radius);
	transition: transform .2s var(--nh-ease), box-shadow .2s var(--nh-ease), border-color .2s var(--nh-ease);
}
.nh-topic:hover { transform: translateY(-3px); border-color: rgba(var(--nh-primary-rgb), .4); box-shadow: var(--nh-shadow-md); }
.nh-topic__icon {
	display: grid; place-items: center;
	flex-shrink: 0; width: 46px; height: 46px;
	border-radius: 14px; color: #fff;
}
.nh-topic__icon svg { width: 22px; height: 22px; }
.nh-topic__name {
	flex: 1; min-width: 0;
	font-family: var(--nh-font-head); font-weight: 600; color: var(--nh-ink);
	line-height: 1.3;
}
.nh-topic__count { font-size: .82rem; color: var(--nh-muted); white-space: nowrap; }

/* 8b. Category index page -------------------------------------------------- */
.nh-cat-header {
	padding: 48px 0 8px;
	background: var(--nh-surface);
}
.nh-cat-header__title { margin-bottom: 10px; }
.nh-cat-header__desc { max-width: 680px; }
.nh-cat-header__desc p:last-child { margin-bottom: 0; }

.nh-cat-grid {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.nh-cat {
	display: flex; flex-direction: column; gap: 12px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--nh-line);
	border-radius: var(--nh-radius);
	transition: transform .2s var(--nh-ease), box-shadow .2s var(--nh-ease), border-color .2s var(--nh-ease);
}
a.nh-cat:hover {
	transform: translateY(-3px);
	border-color: rgba(var(--nh-primary-rgb), .4);
	box-shadow: var(--nh-shadow-md);
	color: inherit;
}
.nh-cat__icon {
	display: grid; place-items: center;
	width: 44px; height: 44px;
	border-radius: 13px;
	color: #fff;
}
.nh-cat__icon svg { width: 22px; height: 22px; }
.nh-cat__name {
	font-family: var(--nh-font-head); font-size: 1.02rem; font-weight: 700;
	line-height: 1.3; color: var(--nh-ink);
}
.nh-cat__desc { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--nh-body); }
.nh-cat__count {
	/* Pinned to the card base so the grid reads as aligned rows. */
	margin: auto 0 0;
	font-size: .76rem; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--nh-primary-dark);
}
.nh-cat--empty { background: var(--nh-surface); }
.nh-cat--empty .nh-cat__count { font-weight: 600; color: var(--nh-muted); }


/* 9. Cards & grids -------------------------------------------------------- */
.nh-card {
	display: flex; flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--nh-line);
	border-radius: var(--nh-radius);
	transition: transform .22s var(--nh-ease), box-shadow .22s var(--nh-ease), border-color .22s var(--nh-ease);
}
.nh-card:hover { transform: translateY(-4px); border-color: rgba(var(--nh-primary-rgb), .35); box-shadow: var(--nh-shadow-md); }

.nh-card__media {
	position: relative; display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--nh-surface);
}
.nh-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--nh-ease); }
.nh-card:hover .nh-card__media img { transform: scale(1.05); }

.nh-card__placeholder {
	display: grid; place-items: center;
	width: 100%; height: 100%;
}
.nh-card__placeholder-icon { color: rgba(255, 255, 255, .75); }
.nh-card__placeholder-icon svg { width: 40px; height: 40px; }

.nh-card__cat {
	position: absolute; left: 12px; bottom: 12px;
	padding: .32em .8em;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: var(--nh-primary-dark);
	font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

.nh-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.nh-card__title { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.nh-card__title a { color: var(--nh-ink); }
.nh-card__title a:hover { color: var(--nh-primary-dark); }
.nh-card__excerpt { margin: 0; font-size: .95rem; color: var(--nh-body); }

.nh-card--wide { flex-direction: row; }
.nh-card--wide .nh-card__media { width: 58%; aspect-ratio: auto; }
.nh-card--wide .nh-card__body { justify-content: center; padding: 28px; }
.nh-card--wide .nh-card__title { font-size: 1.55rem; }
.nh-card--wide .nh-card__excerpt { font-size: 1rem; }

.nh-card--compact { flex-direction: row; align-items: stretch; }
.nh-card--compact .nh-card__media { width: 132px; flex-shrink: 0; aspect-ratio: auto; }
.nh-card--compact .nh-card__body { padding: 16px; }
.nh-card--compact .nh-card__title { font-size: 1rem; }
.nh-card--compact .nh-card__cat { display: none; }

.nh-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
	margin-top: auto; padding-top: 4px;
	font-size: .84rem; color: var(--nh-muted);
}
.nh-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.nh-meta__item svg { width: 15px; height: 15px; opacity: .8; }
.nh-meta__item a { color: inherit; }
.nh-meta__item a:hover { color: var(--nh-primary-dark); }
.nh-author__name { font-weight: 600; color: var(--nh-body); }

/* 10. Archive header ------------------------------------------------------ */
.nh-archive-header {
	padding: 56px 0 32px;
	background: var(--nh-surface);
	border-bottom: 1px solid var(--nh-line);
}
.nh-archive-header__head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.nh-archive-header__icon {
	display: grid; place-items: center; flex-shrink: 0;
	width: 58px; height: 58px;
	border-radius: 18px;
	background: linear-gradient(140deg, var(--nh-primary), var(--nh-primary-dark));
	color: #fff;
	box-shadow: 0 10px 24px rgba(var(--nh-primary-rgb), .28);
}
.nh-archive-header__icon svg { width: 28px; height: 28px; }
.nh-archive-header__head .nh-eyebrow { margin-bottom: 2px; }
.nh-archive-header__title { margin-bottom: 8px; }
.nh-archive-header__desc { max-width: 68ch; color: var(--nh-body); }
.nh-archive-header__desc p:last-child { margin-bottom: 0; }
.nh-archive-header__count { margin: 14px 0 0; font-size: .9rem; color: var(--nh-muted); }
.nh-archive-header .nh-search { margin-top: 22px; max-width: 620px; }

.nh-breadcrumbs { padding: 20px 0 4px; font-size: .85rem; }
.nh-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nh-breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--nh-muted); }
.nh-breadcrumbs li + li::before { content: "/"; color: var(--nh-line); }
.nh-breadcrumbs a { color: var(--nh-muted); }
.nh-breadcrumbs a:hover { color: var(--nh-primary-dark); }
.nh-breadcrumbs [aria-current="page"] { color: var(--nh-ink); }

/* 11. Single article ------------------------------------------------------ */
.nh-single { padding-bottom: 56px; }

/* The header lives inside the article column so the title, the lead and the
   body copy all share the same left edge. */
.nh-single__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.nh-single__grid.has-side { grid-template-columns: minmax(0, 1fr) 296px; gap: 48px; }
.nh-single__main { min-width: 0; }
.nh-single__grid:not(.has-side) .nh-single__main { max-width: 800px; margin-inline: auto; }

.nh-single__header { margin: 24px 0 0; }
.nh-single__title { margin: 12px 0 10px; }
.nh-single__lead { font-size: 1.15rem; color: var(--nh-body); }
.nh-single__meta { margin-bottom: 14px; }
.nh-updated { color: var(--nh-primary-dark); }

.nh-single__share { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.nh-share {
	display: inline-flex; align-items: center;
	min-height: 40px; padding: .4em 1em;
	border: 1px solid var(--nh-line); border-radius: 999px;
	font-size: .82rem; font-weight: 600; color: var(--nh-body);
}
.nh-share:hover { border-color: var(--nh-primary); color: var(--nh-primary-dark); }

.nh-single__media {
	margin: 28px 0 8px;
	overflow: hidden; border-radius: calc(var(--nh-radius) + 6px);
	box-shadow: var(--nh-shadow-md);
}
.nh-single__media img { width: 100%; }

.nh-single__side { min-width: 0; }
/* Fill the grid row so the sticky table of contents can travel the full
   height of the article instead of un-sticking after a few pixels. */
.nh-single__side-inner { height: 100%; }

/* Only the table of contents follows the reader, so it stays visible while the
   widget cards scroll underneath it. */
.nh-single__side .nh-toc { position: sticky; top: 96px; z-index: 2; }

.nh-page__inner { max-width: 820px; }
.nh-page__header { margin: 24px 0 8px; }

/* 12. Entry typography ---------------------------------------------------- */
.nh-entry { font-size: 1.08rem; line-height: 1.85; color: #3b5049; }
.nh-entry > p:first-of-type { font-size: 1.12em; }
.nh-entry h2, .nh-entry h3, .nh-entry h4 { margin-top: 1.8em; }
/* Keep jumped-to headings clear of the sticky header. */
.nh-heading-anchor { scroll-margin-top: 100px; }
.nh-entry h2 { padding-bottom: .3em; border-bottom: 1px solid var(--nh-line); }
.nh-entry ul { padding-left: 1.1em; }
.nh-entry li { margin-bottom: .5em; }
.nh-entry img { border-radius: var(--nh-radius); }
.nh-entry .wp-caption-text, .nh-entry figcaption { font-size: .86rem; color: var(--nh-muted); text-align: center; }
.nh-entry a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nh-entry .alignwide { max-width: 1180px; }
.nh-entry .alignfull { max-width: none; }

/* Inline "Read also" link injected into the middle of an article. */
.nh-read-also {
	margin: 1.9em 0;
	padding: .9em 1.15em;
	border-left: 3px solid var(--nh-primary);
	border-radius: 0 14px 14px 0;
	background: var(--nh-surface);
	font-size: .98rem;
	line-height: 1.6;
}
.nh-read-also__label { margin-right: .3em; font-weight: 700; color: var(--nh-primary-dark); }
.nh-read-also a { font-weight: 600; color: var(--nh-primary-dark); text-decoration-thickness: 1.5px; }
.nh-read-also a:hover { color: var(--nh-primary); }

.nh-page-links { margin: 2em 0; padding: 1em 1.2em; background: var(--nh-surface); border-radius: var(--nh-radius); font-weight: 600; }

.nh-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 30px 0 0; font-size: .9rem; }
.nh-tags__label { margin-right: 4px; color: var(--nh-muted); }
.nh-tags a {
	display: inline-flex; align-items: center;
	min-height: 34px; padding: .3em .85em; border-radius: 999px;
	background: var(--nh-surface); color: var(--nh-body); font-weight: 500;
}
.nh-tags a:hover { background: var(--nh-primary); color: #fff; }

/* 13. Table of contents --------------------------------------------------- */
/* Sidebar cards: the table of contents, widgets and the fallback list all
   share one visual language. */
.nh-side-card {
	padding: 20px;
	margin-bottom: 20px;
	background: #fff;
	border: 1px solid var(--nh-line);
	border-radius: var(--nh-radius);
	box-shadow: var(--nh-shadow-sm);
}
.nh-side-card:last-child { margin-bottom: 0; }

.nh-side-card__title {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 14px; padding-bottom: 12px;
	border-bottom: 1px solid var(--nh-line);
	font-family: var(--nh-font-head);
	font-size: .78rem; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--nh-ink);
}
.nh-side-card__title svg { width: 16px; height: 16px; color: var(--nh-primary); flex-shrink: 0; }

.nh-toc { font-size: .92rem; }
.nh-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.nh-toc__item { margin: 0; }
.nh-toc__item a {
	display: block; padding: .45em .6em .45em .9em;
	border-left: 2px solid transparent;
	border-radius: 0 8px 8px 0;
	color: var(--nh-body); line-height: 1.45;
}
.nh-toc__item a:hover { color: var(--nh-primary-dark); border-left-color: var(--nh-primary); background: rgba(var(--nh-primary-rgb), .06); }
.nh-toc__item.is-active a { color: var(--nh-primary-dark); font-weight: 600; border-left-color: var(--nh-primary); background: rgba(var(--nh-primary-rgb), .08); }
.nh-toc__item--sub a { padding-left: 1.8em; font-size: .88em; color: var(--nh-muted); }

.nh-side-list { margin: 0; padding: 0; list-style: none; }
.nh-side-list__item {
	display: flex; flex-direction: column; gap: 3px;
	padding: 11px 0;
	border-bottom: 1px solid var(--nh-line);
}
.nh-side-list__item:first-child { padding-top: 0; }
.nh-side-list__item:last-child { padding-bottom: 0; border-bottom: 0; }
.nh-side-list__title {
	font-family: var(--nh-font-head); font-weight: 600; font-size: .95rem;
	line-height: 1.4; color: var(--nh-ink);
}
.nh-side-list__title:hover { color: var(--nh-primary-dark); }
.nh-side-list__meta { font-size: .8rem; color: var(--nh-muted); }

/* 14. Author / reviewer / disclaimer -------------------------------------- */
.nh-authorbox {
	display: flex; gap: 20px;
	margin: 40px 0 0; padding: 26px;
	background: #fff; border: 1px solid var(--nh-line); border-radius: var(--nh-radius);
	box-shadow: var(--nh-shadow-sm);
}
.nh-authorbox__avatar { flex-shrink: 0; }
.nh-authorbox__avatar img { border-radius: 50%; }
.nh-authorbox__label { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--nh-primary); font-weight: 600; }
.nh-authorbox__name { margin: 4px 0 6px; font-size: 1.15rem; }
.nh-authorbox__bio { margin-bottom: 10px; font-size: .95rem; }

.nh-reviewer {
	display: flex; gap: 16px;
	margin: 28px 0 0; padding: 20px 22px;
	background: rgba(var(--nh-primary-rgb), .07);
	border: 1px solid rgba(var(--nh-primary-rgb), .2);
	border-radius: var(--nh-radius);
}
.nh-reviewer__icon { display: flex; color: var(--nh-primary-dark); }
.nh-reviewer__icon svg { width: 22px; height: 22px; }
.nh-reviewer__body p { margin: 0; }
.nh-reviewer__label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nh-primary-dark); }
.nh-reviewer__name { font-family: var(--nh-font-head); font-weight: 700; color: var(--nh-ink); }
.nh-reviewer__credential, .nh-reviewer__date { font-size: .88rem; color: var(--nh-body); }

.nh-disclaimer {
	display: flex; gap: 14px;
	margin: 26px 0 0; padding: 18px 20px;
	background: var(--nh-surface); border-left: 4px solid var(--nh-accent);
	border-radius: 0 var(--nh-radius) var(--nh-radius) 0;
	font-size: .9rem;
}
.nh-disclaimer__icon { display: flex; color: #a0891f; }
.nh-disclaimer p { margin: 0; }

.nh-related { margin: 52px 0 0; }
.nh-related__title { margin-bottom: 20px; }

/* 15. Comments ------------------------------------------------------------ */
.nh-comments { margin: 48px 0 0; }
.nh-comments__title { margin-bottom: 20px; }
.nh-comment-list { margin: 0 0 24px; padding: 0; list-style: none; }
.nh-comment-list li { list-style: none; }
.nh-comment-list .comment-body {
	padding: 18px 20px; margin-bottom: 14px;
	background: var(--nh-surface); border-radius: var(--nh-radius);
}
.nh-comment-list .reply { font-size: .85rem; }
.nh-comments .comment-form input[type="text"],
.nh-comments .comment-form input[type="email"],
.nh-comments .comment-form input[type="url"],
.nh-comments .comment-form textarea {
	width: 100%; padding: .8em 1em;
	border: 1.5px solid var(--nh-line); border-radius: 12px;
	font-family: var(--nh-font-body); font-size: 1rem; background: #fff; color: var(--nh-ink);
}
.nh-comments .comment-form input:focus,
.nh-comments .comment-form textarea:focus { outline: none; border-color: var(--nh-primary); box-shadow: 0 0 0 4px rgba(var(--nh-primary-rgb), .12); }
.nh-comments .comment-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--nh-ink); }
.nh-comments .comment-form p { margin-bottom: 16px; }
.nh-comments .comment-form .submit { border: 0; }

/* 16. Pagination & post navigation ---------------------------------------- */
.nh-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 40px; }
.nh-pagination__link .page-numbers {
	display: grid; place-items: center;
	min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--nh-line); border-radius: 12px;
	font-weight: 600; color: var(--nh-ink);
}
.nh-pagination__link .page-numbers:hover { border-color: var(--nh-primary); color: var(--nh-primary-dark); }
.nh-pagination__link.is-current .page-numbers { background: var(--nh-primary); border-color: var(--nh-primary); color: #fff; }

.nh-postnav { padding: 20px 0 56px; border-top: 1px solid var(--nh-line); }
.nh-postnav__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 28px; }
.nh-postnav__item {
	display: flex; flex-direction: column; gap: 4px;
	padding: 18px 22px;
	background: var(--nh-surface); border-radius: var(--nh-radius);
}
.nh-postnav__item:hover { background: rgba(var(--nh-primary-rgb), .08); }
.nh-postnav__item--next { text-align: right; }
.nh-postnav__label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--nh-muted); }
.nh-postnav__title { font-family: var(--nh-font-head); font-weight: 600; color: var(--nh-ink); }

/* 17. Newsletter & footer -------------------------------------------------- */
.nh-newsletter { padding: 56px 0; background: var(--nh-surface); border-top: 1px solid var(--nh-line); }
.nh-newsletter__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.nh-newsletter__text h2 { margin: 6px 0 10px; }
.nh-newsletter__text p { margin: 0; color: var(--nh-body); }
.nh-newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; }
.nh-newsletter__form input[type="email"] {
	flex: 1; min-width: 240px; padding: .85em 1.2em;
	border: 1.5px solid var(--nh-line); border-radius: 999px;
	font-family: var(--nh-font-body); font-size: 1rem; background: #fff;
}
.nh-newsletter__form input[type="email"]:focus { outline: none; border-color: var(--nh-primary); }
.nh-newsletter__note { flex-basis: 100%; margin: 4px 0 0; font-size: .8rem; color: var(--nh-muted); }

.nh-footer { background: #0d1b16; color: #b9cbc3; padding: 60px 0 28px; }
.nh-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.nh-footer__col p { font-size: .93rem; }
.nh-logo--footer { margin-bottom: 14px; }
.nh-logo--footer strong { font-family: var(--nh-font-head); font-size: 1.2rem; color: #fff; }
.nh-footer__title {
	margin: 0 0 14px;
	font-family: var(--nh-font-head); font-size: .82rem; font-weight: 700;
	letter-spacing: .12em; text-transform: uppercase; color: #fff;
}
.nh-footer-menu { margin: 0; padding: 0; list-style: none; }
.nh-footer-menu li { margin-bottom: 8px; }
.nh-footer-menu a { display: inline-block; padding: 3px 0; color: #b9cbc3; font-size: .93rem; }
.nh-footer-menu a:hover { color: var(--nh-accent); }
.nh-footer .widget-title { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.nh-footer .widget { margin-bottom: 22px; }
.nh-footer a { color: #b9cbc3; }

.nh-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nh-social {
	padding: .35em .9em; border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .18);
	font-size: .84rem; color: #dbe9e3;
}
.nh-social:hover { background: var(--nh-primary); border-color: var(--nh-primary); color: #fff; }

.nh-footer__bottom {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 40px; padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: .85rem;
}
.nh-footer__bottom p { margin: 0; }
.nh-footer-inline { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.nh-footer-inline a { display: inline-block; padding: 4px 0; }

/* 18. Widgets, 404, misc --------------------------------------------------- */
.nh-widget {
	padding: 22px;
	background: var(--nh-surface); border-radius: var(--nh-radius);
	margin-bottom: 24px;
}
.nh-widget__title { margin: 0 0 14px; font-size: 1.05rem; }

.nh-single__side .widget, .nh-latest__side .widget {
	padding: 20px; margin-bottom: 20px;
	background: #fff;
	border: 1px solid var(--nh-line);
	border-radius: var(--nh-radius);
	box-shadow: var(--nh-shadow-sm);
}
.nh-single__side .widget:last-child, .nh-latest__side .widget:last-child { margin-bottom: 0; }

/* Widget titles share the sidebar card heading style, including block widgets. */
.nh-single__side .widget-title,
.nh-single__side .widget .wp-block-heading,
.nh-latest__side .widget-title,
.nh-latest__side .widget .wp-block-heading {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 14px; padding-bottom: 12px;
	border-bottom: 1px solid var(--nh-line);
	font-family: var(--nh-font-head);
	font-size: .78rem; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--nh-ink);
}
.nh-single__side .widget img, .nh-latest__side .widget img { border-radius: 10px; }
.widget-title { margin-bottom: 12px; font-size: 1rem; }

/* Widget lists: hairline dividers instead of bullet points. */
.nh-single__side .widget ul,
.nh-latest__side .widget ul { margin: 0; padding: 0; list-style: none; }
.nh-single__side .widget li,
.nh-latest__side .widget li {
	margin: 0; padding: 9px 0;
	border-bottom: 1px solid var(--nh-line);
	font-size: .95rem; line-height: 1.45;
}
.nh-single__side .widget li:first-child,
.nh-latest__side .widget li:first-child { padding-top: 0; }
.nh-single__side .widget li:last-child,
.nh-latest__side .widget li:last-child { padding-bottom: 0; border-bottom: 0; }
.nh-single__side .widget li a,
.nh-latest__side .widget li a { color: var(--nh-body); }
.nh-single__side .widget li a:hover,
.nh-latest__side .widget li a:hover { color: var(--nh-primary-dark); }
.nh-single__side .widget ul ul { padding-left: 14px; margin-top: 6px; }

/* Block search widget rendered inside a sidebar. */
.nh-single__side .wp-block-search__inside-wrapper,
.nh-latest__side .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.nh-single__side .wp-block-search__input,
.nh-latest__side .wp-block-search__input {
	flex: 1; min-width: 0;
	padding: .7em 1em;
	border: 1.5px solid var(--nh-line); border-radius: 999px;
	background: #fff; color: var(--nh-ink);
	/* 1rem keeps iOS Safari from zooming on focus. */
	font-family: var(--nh-font-body); font-size: 1rem;
}
.nh-single__side .wp-block-search__input:focus,
.nh-latest__side .wp-block-search__input:focus {
	outline: none; border-color: var(--nh-primary);
	box-shadow: 0 0 0 4px rgba(var(--nh-primary-rgb), .12);
}
.nh-single__side .wp-block-search__button,
.nh-latest__side .wp-block-search__button {
	margin: 0; padding: .7em 1.1em;
	border: 0; border-radius: 999px;
	background: var(--nh-primary); color: #fff;
	font-family: var(--nh-font-head); font-size: .9rem; font-weight: 600;
	cursor: pointer; white-space: nowrap;
}
.nh-single__side .wp-block-search__button:hover,
.nh-latest__side .wp-block-search__button:hover { background: var(--nh-primary-dark); }
.nh-single__side .wp-block-search__button svg,
.nh-latest__side .wp-block-search__button svg { width: 16px; height: 16px; fill: currentColor; }

/* Recent comments block widget. */
.nh-single__side .wp-block-latest-comments,
.nh-latest__side .wp-block-latest-comments { margin: 0; padding: 0; list-style: none; }
.nh-single__side .wp-block-latest-comments__comment,
.nh-latest__side .wp-block-latest-comments__comment {
	display: flex; gap: 10px;
	margin: 0; padding: 10px 0;
	border-bottom: 1px solid var(--nh-line);
}
.nh-single__side .wp-block-latest-comments__comment:first-child,
.nh-latest__side .wp-block-latest-comments__comment:first-child { padding-top: 0; }
.nh-single__side .wp-block-latest-comments__comment:last-child,
.nh-latest__side .wp-block-latest-comments__comment:last-child { padding-bottom: 0; border-bottom: 0; }
.nh-single__side .wp-block-latest-comments__comment-avatar,
.nh-latest__side .wp-block-latest-comments__comment-avatar {
	width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
}
.nh-single__side .wp-block-latest-comments__comment-meta,
.nh-latest__side .wp-block-latest-comments__comment-meta { font-size: .88rem; line-height: 1.5; }
.nh-single__side .wp-block-latest-comments__comment-excerpt p,
.nh-latest__side .wp-block-latest-comments__comment-excerpt p {
	margin: 4px 0 0; font-size: .84rem; color: var(--nh-muted);
}
.nh-single__side .wp-block-latest-comments__comment-date,
.nh-latest__side .wp-block-latest-comments__comment-date {
	margin-top: 2px; font-size: .78rem; color: var(--nh-muted);
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget ul li { margin-bottom: 8px; }

.nh-ranked { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.nh-ranked__item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--nh-line); }
.nh-ranked__item:last-child { border-bottom: 0; }
.nh-ranked__num {
	display: grid; place-items: center; flex-shrink: 0;
	width: 28px; height: 28px; border-radius: 8px;
	background: rgba(var(--nh-primary-rgb), .12); color: var(--nh-primary-dark);
	font-family: var(--nh-font-head); font-size: .85rem; font-weight: 700;
}
.nh-ranked__title { display: block; font-family: var(--nh-font-head); font-weight: 600; color: var(--nh-ink); line-height: 1.4; }
.nh-ranked__meta { font-size: .8rem; color: var(--nh-muted); }

.nh-latest__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.nh-featured__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: stretch; }
.nh-featured__stack { display: grid; gap: 20px; align-content: start; }

.nh-empty { padding: 60px 24px; text-align: center; }
.nh-empty__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; background: var(--nh-surface); color: var(--nh-primary); }
.nh-empty__icon svg { width: 28px; height: 28px; }
.nh-empty__title { margin-bottom: 8px; }
.nh-empty .nh-search { max-width: 520px; margin: 22px auto 0; }

.nh-404__inner { max-width: 640px; margin-inline: auto; text-align: center; }
.nh-404__code { margin: 0; font-family: var(--nh-font-head); font-size: 5rem; font-weight: 800; color: rgba(var(--nh-primary-rgb), .25); line-height: 1; }
.nh-404__title { margin: 8px 0 10px; }
.nh-404 .nh-search { margin: 24px auto 0; }
.nh-404__links { margin-top: 26px; }

/* 19. Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
	.nh-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.nh-hero__art { min-height: 240px; order: -1; }
	.nh-topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-latest__layout { grid-template-columns: minmax(0, 1fr); }
	.nh-single__grid.has-side { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	/* Article first, then the sidebar. The DOM already has this order, so no
	   `order` override — the sidebar must not jump above the content. */
	.nh-single__side .nh-toc { position: static; }
}

@media (max-width: 900px) {
	/* backdrop-filter creates a containing block, which would trap the fixed
	   drawer inside the 74px header. Drop the blur on small screens. */
	.nh-header { backdrop-filter: none; background: #fff; }

	.nh-burger { display: grid; }
	.nh-nav {
		position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 400;
		width: min(360px, 88vw);
		padding: 84px 22px 32px;
		background: #fff;
		border-left: 1px solid var(--nh-line);
		box-shadow: var(--nh-shadow-lg);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .28s var(--nh-ease), visibility .28s var(--nh-ease);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.nh-nav.is-open { transform: none; visibility: visible; }
	.nh-nav__close {
		position: absolute; top: 22px; right: 22px;
		display: grid; place-items: center;
		width: 42px; height: 42px;
		border: 1px solid var(--nh-line); border-radius: 12px; background: #fff; cursor: pointer;
	}
	.nh-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.nh-menu a { display: flex; align-items: center; padding: .8em .9em; font-size: 1.02rem; }
	/* Collapsed by default in the drawer; the parent toggles it open. */
	.nh-menu .sub-menu {
		position: static; display: none;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; margin: 0;
		padding: 0 0 0 10px; background: transparent;
	}
	.nh-menu li.is-open > .sub-menu {
		display: block;
		animation: nh-submenu-in .22s var(--nh-ease);
	}
	.nh-menu > li.menu-item-has-children > a::after { margin-left: auto; }
	.nh-header .nh-search--mobile { display: flex; margin-top: 18px; }
	.nh-card--wide { flex-direction: column; }
	.nh-card--wide .nh-card__media { width: 100%; aspect-ratio: 16 / 10; }
	.nh-featured__grid { grid-template-columns: minmax(0, 1fr); }
	.nh-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-newsletter__inner { grid-template-columns: minmax(0, 1fr); }
	.nh-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.nh-container { padding-inline: 18px; }
	.nh-section { padding: 44px 0; }
	.nh-hero { padding: 44px 0 40px; }
	.nh-topics__grid { grid-template-columns: minmax(0, 1fr); }
	.nh-grid--2, .nh-grid--3 { grid-template-columns: minmax(0, 1fr); }
	.nh-cat-grid { grid-template-columns: minmax(0, 1fr); }
	.nh-card--compact { flex-direction: row; }
	.nh-search { flex-wrap: wrap; padding: 12px; border-radius: 18px; }
	.nh-search .nh-btn { width: 100%; }
	.nh-search__icon { display: none; }
	.nh-hero__stats { gap: 22px; }
	.nh-postnav__inner { grid-template-columns: minmax(0, 1fr); }
	.nh-footer__grid { grid-template-columns: 1fr; }
	.nh-authorbox { flex-direction: column; }
	.nh-single__share { margin-bottom: 4px; }
	.nh-section__head { flex-direction: column; align-items: flex-start; gap: 10px; }

	/* Stack the decorative hero cards instead of letting them overlap. */
	.nh-hero__art { min-height: 0; display: grid; gap: 10px; }
	.nh-hero__orb { display: none; }
	.nh-hero__card { position: static; animation: none; box-shadow: var(--nh-shadow-sm); }

	/* Keep long category names from squeezing the article count. */
	.nh-topic { gap: 12px; padding: 15px; }

	/* Wide tables and code blocks scroll instead of breaking the layout. */
	.nh-entry table,
	.nh-entry pre {
		display: block; width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.nh-entry th, .nh-entry td { padding: .6em .7em; }

	/* Comfortable tap targets on touch screens. */
	.nh-menu a { display: flex; align-items: center; min-height: 46px; }
	.nh-footer-menu a, .nh-footer-inline a { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
