/* ---------------------------------------------------------------------------
   Header, footer, and the shared page chrome.

   Measured from post-120946.css (header) and post-4569.css (footer):
     topbar   background = kit accent #72069E, white 500-weight centred text,
              10px widget margin, shadow 0 0 10px rgba(0,0,0,.5)
     header   white, flex row, space-between, align centre, 18px block padding,
              1px #F8FAFC bottom border, shadow 0 2px 20px rgba(17,17,17,.125)
     brand    25% desktop / 40% mobile, logo rendered at 258px
     actions  26% desktop, flex-end, 16px gap
     nav      16px / 600, #111111, hover + current #72069E
   --------------------------------------------------------------------------- */

.nx-page { display: flex; flex-direction: column; min-height: 100vh; }
.nx-main { flex: 1 0 auto; }

/* --- Announcement bar ---------------------------------------------------- */

.nx-topbar {
	background: var(--nx-purple);
	color: var(--nx-white);
	box-shadow: var(--nx-shadow-topbar);
	position: relative;
	z-index: 2;
}

.nx-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding-block: 10px;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
}

.nx-topbar__icon { font-size: 15px; line-height: 1; }

/* --- Header -------------------------------------------------------------- */

.nx-header__main {
	position: sticky;
	top: 0;
	z-index: 999;
	background: var(--nx-white);
	border-bottom: 1px solid var(--nx-hairline);
	box-shadow: var(--nx-shadow-header);
}

.nx-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-block: 18px;
}

.nx-header__brand { flex: 0 0 25%; display: flex; justify-content: flex-start; }

.nx-logo { display: inline-flex; }
.nx-logo img { width: 258px; max-width: 100%; height: auto; }
.nx-logo__text {
	font-family: var(--nx-font-heading);
	font-size: 30px;
	color: var(--nx-ink);
	letter-spacing: 0.04em;
}

/* --- Primary nav --------------------------------------------------------- */

.nx-nav { flex: 1 1 auto; display: flex; justify-content: center; }

.nx-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nx-nav__list > li > a,
.nx-nav__list .menu-item > a {
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--nx-ink);
	white-space: nowrap;
}

.nx-nav__list > li > a:hover,
.nx-nav__list > li.is-current > a,
.nx-nav__list .current-menu-item > a {
	color: var(--nx-purple);
}

/* --- Header actions ------------------------------------------------------ */

.nx-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
}

.nx-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--nx-ink);
	cursor: pointer;
	transition: background var(--nx-transition), color var(--nx-transition);
}
.nx-iconbtn:hover { background: var(--nx-pale); color: var(--nx-purple); }
.nx-iconbtn svg { fill: currentColor; }

.nx-cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--nx-purple);
	color: var(--nx-white);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.nx-cart-count.is-empty { display: none; }

/* --- Search drawer ------------------------------------------------------- */

.nx-searchbar {
	border-top: 1px solid var(--nx-hairline);
	background: var(--nx-white);
	padding-block: 14px;
}
.nx-searchbar[hidden] { display: none; }

.nx-searchform {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}
.nx-searchform__icon {
	position: absolute;
	left: 12px;
	fill: var(--nx-muted);
	pointer-events: none;
}
.nx-searchform input[type="search"] { padding-left: 40px; }

/* --- Burger + mobile nav ------------------------------------------------- */

.nx-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	padding: 0 7px;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.nx-burger span {
	display: block;
	height: 2px;
	background: var(--nx-ink);
	border-radius: 2px;
	transition: transform var(--nx-transition), opacity var(--nx-transition);
}
.nx-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nx-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nx-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nx-mobile-nav {
	background: var(--nx-white);
	border-top: 1px solid var(--nx-hairline);
	box-shadow: var(--nx-shadow-header);
}
.nx-mobile-nav[hidden] { display: none; }
.nx-mobile-nav__list {
	margin: 0;
	padding: 6px var(--nx-gutter) 14px;
	list-style: none;
}
.nx-mobile-nav__list > li > a {
	display: block;
	padding: 11px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--nx-ink);
	border-bottom: 1px solid var(--nx-hairline);
}
.nx-mobile-nav__list > li:last-child > a { border-bottom: 0; }
.nx-mobile-nav__list > li > a:hover { color: var(--nx-purple); }

/* --- Footer -------------------------------------------------------------- */

.nx-footer { background: var(--nx-white); }

/* Measured: the promise strip sits on WHITE with 16px block padding. */
.nx-footer__promises { background: var(--nx-white); padding-block: 16px; }

.nx-footer__promises-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px var(--nx-widget-gap);
}

.nx-promise { display: flex; align-items: flex-start; gap: 14px; }
.nx-promise__icon { flex: 0 0 auto; color: var(--nx-purple); }
.nx-promise__icon svg { fill: currentColor; }
/* Measured: DM Serif Display 500 in accent purple; body copy 13px/20px in ink. */
.nx-promise__title {
	margin: 0 0 4px;
	font-family: var(--nx-font-heading);
	font-size: 16px;
	font-weight: 500;
	color: var(--nx-purple);
}
.nx-promise__text { margin: 0; font-size: 13px; line-height: 20px; color: var(--nx-ink); }

/* Measured: 50px block padding. */
.nx-footer__links { background: var(--nx-white); padding-block: 50px; }

.nx-footer__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 30px var(--nx-widget-gap);
}

.nx-footer__brand img { width: 100%; max-width: 200px; height: auto; }

/* Measured: 22px in the accent purple. */
.nx-footer__heading {
	margin: 0 0 12px;
	font-family: var(--nx-font-heading);
	font-size: 22px;
	color: var(--nx-purple);
}

.nx-footer__list { margin: 0; padding: 0; list-style: none; }
.nx-footer__list li + li { margin-top: 7px; }
/* Measured: 16px navy, not 15px grey. */
.nx-footer__list a { font-size: 16px; color: var(--nx-navy); }
.nx-footer__list a:hover { color: var(--nx-purple); }

/* Measured from post-4569.css (section 2815878): the closing band sits on WHITE
   with 20px block padding, and both lines are centred 14px/25px in #111. The
   navy band with faded white text was mine. */
.nx-footer__legal {
	background: var(--nx-white);
	color: var(--nx-ink);
	padding-block: 20px;
	text-align: center;
	font-size: 14px;
	line-height: 25px;
	border-top: 1px solid var(--nx-rule);
}
.nx-footer__copyright { margin: 0 0 10px; color: var(--nx-ink); font-size: 14px; line-height: 25px; }
.nx-footer__disclaimer {
	margin: 0 auto;
	max-width: 1000px;
	color: var(--nx-ink);
	font-size: 14px;
	line-height: 25px;
}
.nx-footer__disclaimer strong { color: var(--nx-ink); }

/* --- Breakpoints --------------------------------------------------------- */

@media (max-width: 1200px) {
	.nx-nav__list { gap: 4px 12px; }
	.nx-nav__list > li > a { font-size: 15px; }
	.nx-logo img { width: 210px; }
}

@media (max-width: 1024px) {
	.nx-header__row { flex-wrap: wrap; }
	.nx-header__brand { flex: 0 0 auto; }
	.nx-nav { order: 3; flex: 1 0 100%; padding-top: 10px; }
	.nx-nav__list { justify-content: flex-start; }
	.nx-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nx-footer__promises-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.nx-header__row { padding-block: 10px; flex-wrap: nowrap; }
	.nx-header__brand { flex: 0 0 40%; }
	.nx-logo img { width: 100%; max-width: 190px; }
	.nx-nav { display: none; }
	.nx-burger { display: flex; }
	.nx-header__actions { gap: 4px; }
	.nx-topbar__inner { font-size: 13px; padding-block: 8px; }
	.nx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nx-footer__promises-grid { grid-template-columns: minmax(0, 1fr); }
	.nx-footer__brand { grid-column: 1 / -1; }
}

/* --- Content pages ------------------------------------------------------- */

.nx-page-body { padding-bottom: 60px; }

/* Measured from post-43.css: background image, #4f1c64 overlay at 0.5,
   min-height 40vh, centred 36px white title. */
.nx-page-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 40vh;
	margin-bottom: 34px;
	padding-block: 40px;
	background-color: var(--nx-purple-deep);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	border-bottom: 0;
}

.nx-page-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--nx-purple-deep);
	opacity: 0.5;
}

.nx-page-hero .nx-container { position: relative; z-index: 1; }

/* Measured across breakpoints on the source render: 54px down to 767px, then
   36px; container min-height 40vh / 32vh. */
.nx-page-hero__title {
	margin: 0;
	font-size: 54px;
	color: var(--nx-white);
	text-align: center;
}

@media (max-width: 767px) {
	.nx-page-hero { min-height: 32vh; }
	.nx-page-hero__title { font-size: 36px; }
}

.nx-prose { max-width: 900px; font-size: 16px; line-height: 1.8; }
.nx-prose h2 { margin: 1.6em 0 0.5em; font-size: 28px; color: var(--nx-navy); }
.nx-prose h3 { margin: 1.4em 0 0.4em; font-size: 21px; color: var(--nx-navy); }
.nx-prose h4 { margin: 1.2em 0 0.4em; font-size: 18px; color: var(--nx-ink); }
.nx-prose ul, .nx-prose ol { padding-left: 1.35em; }
.nx-prose li { margin-bottom: 0.4em; }
.nx-prose img { border-radius: var(--nx-radius); margin-block: 1em; }
.nx-prose a { text-decoration: underline; }
.nx-prose table { margin-block: 1.4em; font-size: 15px; }
.nx-prose table th, .nx-prose table td {
	padding: 10px 12px;
	border: 1px solid var(--nx-rule);
	text-align: left;
}
.nx-prose table th { background: var(--nx-pale); color: var(--nx-navy); }
.nx-prose blockquote {
	margin: 1.4em 0;
	padding: 14px 20px;
	border-left: 4px solid var(--nx-purple);
	background: var(--nx-pale);
}

.nx-postcard { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--nx-rule); }
.nx-postcard__title { margin: 0 0 8px; font-size: 24px; }
.nx-postcard__title a { color: var(--nx-ink); }
.nx-postcard__title a:hover { color: var(--nx-purple); }

/* --- Contact form -------------------------------------------------------- */

.nx-contact { max-width: 640px; margin-top: 8px; }

.nx-contact__status {
	padding: 12px 16px;
	margin-bottom: 18px;
	border-left: 4px solid var(--nx-success);
	border-radius: var(--nx-radius);
	background: #f1f8f2;
	font-size: 14.5px;
}
.nx-contact__status.is-error { border-left-color: var(--nx-danger); background: #fdf3f3; color: #7a2b28; }

.nx-contact__names { margin: 0 0 16px; padding: 0; border: 0; }
.nx-contact__names legend {
	padding: 0;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--nx-ink);
}

.nx-contact__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.nx-contact__field { margin: 0 0 16px; }
.nx-contact__field label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--nx-ink);
}
.nx-contact__row .nx-contact__field { margin-bottom: 0; }

.nx-contact__req { color: var(--nx-danger); }

/* The honeypot must be reachable by a bot's parser and invisible to a person —
   display:none would let some bots skip it. */
.nx-contact__trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Lab results --------------------------------------------------------- */

.nx-labs__intro { margin-bottom: 18px; }

.nx-labs__filter { max-width: 380px; margin-bottom: 18px; }

.nx-labs__scroll { overflow-x: auto; }

.nx-labs__table { width: 100%; font-size: 14.5px; }
.nx-labs__table th,
.nx-labs__table td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--nx-rule);
	text-align: left;
	vertical-align: middle;
}
.nx-labs__table thead th {
	background: var(--nx-pale);
	font-family: var(--nx-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nx-navy);
	border-bottom: 0;
}
.nx-labs__table tbody tr:hover { background: #fbfbfd; }
.nx-labs__table code {
	font-family: ui-monospace, SFMono-Regular, Consolas, Monaco, monospace;
	font-size: 13px;
	color: var(--nx-muted);
	word-break: break-all;
}
.nx-labs__table td a { font-weight: 500; }
.nx-labs__table tbody tr[hidden] { display: none; }
.nx-labs__empty { margin-top: 16px; color: var(--nx-muted); }
.nx-labs__empty[hidden] { display: none; }

@media (max-width: 600px) {
	.nx-contact__row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.nx-contact__row .nx-contact__field { margin-bottom: 0; }
	.nx-labs__table th, .nx-labs__table td { padding: 9px 10px; }
}

/* --- Shared product title list (homepage split + archive rail) ----------
   Measured: Roboto 15px/400 in --nx-purple-deep. The line-height differs by
   context: 25px on the homepage, 32px in the archive rail (see shop.css). */

.nx-titlelist {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.nx-titlelist a {
	font-family: var(--nx-font-body);
	font-size: 15px;
	font-weight: 400;
	line-height: 25px;
	color: var(--nx-purple-deep);
}
.nx-titlelist a:hover { color: var(--nx-purple); }
