/* ==========================================================================
   POLICY PAGES
   Dark title band, raised content card, and the long-form typography that
   .nx-entry needs on any text page (policies, About, FAQs, Research info).
   ========================================================================== */

/* ---- Width --------------------------------------------------------------- */

/* Policies carry tables and long clause lists, so they get more room than the
   68ch prose measure the other text pages use. Scoped to the policy template
   only — About, FAQs and the rest keep the narrower measure. */
.nx-policy__head .nx-container--text,
.nx-policy .nx-container--text {
	max-width: 860px;
}

/* ---- Title band ---------------------------------------------------------- */

.nx-policy__head {
	text-align: center;
}

.nx-policy__head .nx-eyebrow {
	padding: 0.5em 1.1em;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
}

.nx-policy__head h1 {
	margin-top: var(--nx-space-4);
	color: var(--nx-white);
}

.nx-policy__updated {
	margin-top: var(--nx-space-3);
	color: rgba(255, 255, 255, 0.62);
	font-size: var(--nx-text-sm);
}

/* ---- Content card -------------------------------------------------------- */

/* The card lifts into the band above it, the way the source design does. */
.nx-policy {
	padding-bottom: calc(var(--nx-section-y) * 0.6);
	background: var(--nx-bg-alt);
}

.nx-policy__card {
	margin-top: calc(var(--nx-space-8) * -1);
	padding: clamp(var(--nx-space-6), 4vw, var(--nx-space-9));
	border: 1px solid var(--nx-grey-200);
	border-radius: var(--nx-radius-lg);
	background: var(--nx-surface);
	box-shadow: 0 18px 48px rgba(6, 24, 47, 0.09);
}

/* ==========================================================================
   ABOUT PAGE
   Light band with the hero's grid, content card lifted into it.
   ========================================================================== */

.nx-about__head {
	position: relative;
	padding-bottom: calc(var(--nx-space-8) + var(--nx-space-9));
	overflow: hidden;
	text-align: center;
	background:
		radial-gradient(90% 70% at 85% 0%, rgba(0, 163, 224, 0.13) 0%, transparent 60%),
		radial-gradient(70% 60% at 8% 15%, rgba(27, 79, 156, 0.10) 0%, transparent 55%),
		linear-gradient(175deg, #F2F6FB 0%, var(--nx-white) 100%);
	border-bottom: 1px solid var(--nx-grey-200);
}

.nx-about__head::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(11, 42, 91, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(11, 42, 91, 0.06) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(80% 90% at 50% 20%, #000 0%, transparent 80%);
	-webkit-mask-image: radial-gradient(80% 90% at 50% 20%, #000 0%, transparent 80%);
	pointer-events: none;
}

.nx-about__head > * { position: relative; z-index: 1; }

.nx-about__head .nx-eyebrow {
	padding: 0.5em 1.1em;
	border: 1px solid rgba(27, 79, 156, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
}

.nx-about__head h1 {
	margin-top: var(--nx-space-4);
	color: var(--nx-primary);
	font-weight: var(--nx-weight-bold);
}

.nx-about__intro {
	max-width: 56ch;
	margin: var(--nx-space-3) auto 0;
	color: var(--nx-text-muted);
	font-size: var(--nx-text-lg);
}

.nx-about {
	padding-bottom: calc(var(--nx-section-y) * 0.6);
	background: var(--nx-bg-alt);
}

.nx-about__card {
	position: relative;
	z-index: 1;
	margin-top: calc((var(--nx-space-8) + var(--nx-space-6)) * -1);
	padding: clamp(var(--nx-space-6), 4vw, var(--nx-space-9));
	border: 1px solid var(--nx-grey-200);
	border-radius: var(--nx-radius-lg);
	background: var(--nx-surface);
	box-shadow: 0 18px 48px rgba(6, 24, 47, 0.09);
}

/* COA link at the foot of the About card. Element-scoped .nx-entry a rules
   would recolour it, so colours are set explicitly. */
.nx-entry a.nx-about__coa {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--nx-space-4);
	margin-top: var(--nx-space-8);
	padding: var(--nx-space-5) var(--nx-space-6);
	border: 1px solid rgba(0, 163, 224, 0.25);
	border-left: 4px solid var(--nx-accent);
	border-radius: var(--nx-radius-md);
	background: linear-gradient(135deg, #F2F8FD 0%, #EAF6FC 100%);
	color: var(--nx-text-muted);
	text-decoration: none;
	transition: transform var(--nx-dur) var(--nx-ease), box-shadow var(--nx-dur) var(--nx-ease);
}

.nx-entry a.nx-about__coa:hover,
.nx-entry a.nx-about__coa:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(6, 24, 47, 0.08);
}

.nx-about__coa strong {
	display: block;
	margin-bottom: var(--nx-space-1);
	color: var(--nx-primary);
}

.nx-about__coa-cta {
	color: var(--nx-action);
	font-weight: var(--nx-weight-semibold);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.nx-entry a.nx-about__coa { transition: none; }
	.nx-entry a.nx-about__coa:hover { transform: none; }
}

/* ==========================================================================
   CERTIFICATES OF ANALYSIS
   Uses the About band; cards replace the single content card.
   ========================================================================== */

.nx-coa {
	position: relative;
	z-index: 1;
	max-width: 880px;
	margin-top: calc((var(--nx-space-8) + var(--nx-space-6)) * -1);
}

.nx-coa__lead { margin-bottom: var(--nx-space-6); }

.nx-coa__card {
	margin-bottom: var(--nx-space-6);
	padding: clamp(var(--nx-space-5), 3.5vw, var(--nx-space-8));
	border: 1px solid var(--nx-grey-200);
	border-radius: var(--nx-radius-lg);
	background: var(--nx-surface);
	box-shadow: 0 18px 48px rgba(6, 24, 47, 0.09);
}

.nx-coa__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--nx-space-4);
	padding-bottom: var(--nx-space-5);
	border-bottom: 2px solid var(--nx-accent);
}

.nx-coa__head h2 {
	margin: 0 0 var(--nx-space-1);
	font-size: var(--nx-text-2xl);
}

.nx-coa__lab {
	margin: 0;
	color: var(--nx-text-muted);
	font-size: var(--nx-text-sm);
}

.nx-coa__lab a { color: var(--nx-action); }

.nx-coa__task {
	display: flex;
	flex-direction: column;
	padding: var(--nx-space-3) var(--nx-space-4);
	border-radius: var(--nx-radius-md);
	background: var(--nx-grey-50);
	text-align: right;
}

.nx-coa__task span,
.nx-coa__stats dt {
	color: var(--nx-text-muted);
	font-size: 0.72rem;
	font-weight: var(--nx-weight-semibold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nx-coa__task strong {
	color: var(--nx-primary);
	font-size: var(--nx-text-xl);
}

.nx-coa__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--nx-space-3);
	margin: var(--nx-space-5) 0;
}

.nx-coa__stats > div {
	padding: var(--nx-space-4);
	border-radius: var(--nx-radius-md);
	background: var(--nx-grey-50);
}

.nx-coa__stats dd {
	margin: var(--nx-space-2) 0 0;
	color: var(--nx-primary);
	font-size: var(--nx-text-lg);
	font-weight: var(--nx-weight-bold);
}

.nx-coa__stats .is-good { background: #ECFDF3; }
.nx-coa__stats .is-good dd { color: #067647; }

.nx-coa__notes p {
	margin: 0 0 var(--nx-space-2);
	color: var(--nx-text-muted);
	font-size: var(--nx-text-sm);
}

.nx-coa__notes strong { color: var(--nx-text); }

.nx-coa__verify {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--nx-space-3);
	margin-top: var(--nx-space-5);
	padding: var(--nx-space-4) var(--nx-space-5);
	border-radius: var(--nx-radius-md);
	background: var(--nx-grey-50);
}

.nx-coa__verify p { margin: 0; color: var(--nx-text); font-size: var(--nx-text-sm); }
.nx-coa__verify a { color: var(--nx-action); }

.nx-coa__verify code {
	padding: 0.4em 0.8em;
	border: 1px solid var(--nx-grey-200);
	border-radius: var(--nx-radius-sm, 6px);
	background: var(--nx-surface);
	color: var(--nx-primary);
	font-family: var(--nx-font-mono);
	font-weight: var(--nx-weight-bold);
	letter-spacing: 0.12em;
}

.nx-coa__report { margin-top: var(--nx-space-5); }

.nx-coa__report summary {
	display: inline-block;
	color: var(--nx-action);
	font-weight: var(--nx-weight-semibold);
	cursor: pointer;
}

.nx-coa__report img {
	display: block;
	max-width: 520px;
	width: 100%;
	height: auto;
	margin: var(--nx-space-4) auto 0;
	border: 1px solid var(--nx-grey-200);
	border-radius: var(--nx-radius-md);
}

.nx-coa__note {
	padding: var(--nx-space-4) var(--nx-space-5);
	border-left: 3px solid var(--nx-accent);
	border-radius: 0 var(--nx-radius-md) var(--nx-radius-md) 0;
	background: var(--nx-surface);
}

.nx-coa__note p { margin: 0; color: var(--nx-text-muted); font-size: var(--nx-text-sm); }
.nx-coa__note strong { color: var(--nx-text); }

@media (max-width: 720px) {
	.nx-coa__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nx-coa__task { text-align: left; }
}

/* Storefront sets h1 to weight 300, which beats the zero-specificity base
   heading rule and left page titles thin. */
.nx-section-head h1 { font-weight: var(--nx-weight-bold); }

/* ==========================================================================
   LONG-FORM ENTRY TYPOGRAPHY
   .nx-entry is used by page.php and the policy card. Gutenberg output is
   plain h2/h3/p/ul, so everything here is element-scoped.
   ========================================================================== */

.nx-entry > *:first-child { margin-top: 0; }
.nx-entry > *:last-child  { margin-bottom: 0; }

.nx-entry p {
	margin-block: var(--nx-space-4);
	color: var(--nx-text-muted);
	line-height: var(--nx-leading-loose);
}

/* Numbered policy sections get a rule above them, as separators.
   Smaller than the site's display h2: a clause heading is a signpost in a long
   document, not a section title on a landing page. Tighter tracking keeps it
   reading dense at the reduced size. */
.nx-entry h2 {
	margin-top: var(--nx-space-8);
	margin-bottom: var(--nx-space-4);
	padding-top: var(--nx-space-7);
	border-top: 1px solid var(--nx-grey-200);
	color: var(--nx-text);
	font-size: var(--nx-text-2xl);
	font-weight: var(--nx-weight-bold);
	letter-spacing: -0.015em;
}

.nx-entry > h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Stepped down too, so h2 still outranks it now that h2 is smaller. */
.nx-entry h3 {
	margin-top: var(--nx-space-6);
	margin-bottom: var(--nx-space-3);
	color: var(--nx-text);
	font-size: var(--nx-text-xl);
	font-weight: var(--nx-weight-semibold);
}

.nx-entry ul,
.nx-entry ol {
	margin-block: var(--nx-space-4);
	padding-left: 1.35em;
	color: var(--nx-text-muted);
}

.nx-entry li {
	margin-bottom: var(--nx-space-2);
	line-height: var(--nx-leading-loose);
}

.nx-entry li::marker { color: var(--nx-accent); }

.nx-entry strong { color: var(--nx-text); }

.nx-entry a {
	color: var(--nx-action);
	text-underline-offset: 0.18em;
}

/* ---- Intro callout ------------------------------------------------------- */

/* A quote block at the top of a policy renders as the tinted summary panel. */
.nx-entry blockquote {
	margin-block: var(--nx-space-5);
	padding: var(--nx-space-5) var(--nx-space-6);
	border-left: 3px solid var(--nx-action);
	border-radius: 0 var(--nx-radius-md) var(--nx-radius-md) 0;
	background: var(--nx-grey-50);
}

.nx-entry blockquote p {
	margin-block: 0;
	color: var(--nx-text);
	font-style: normal;
}

/* The lead-in phrase reads as emphasis, not as a coloured shout. Browsers
   italicise blockquote text by default, and the accent colour made the
   research-use line look like a warning banner rather than a sentence. */
.nx-entry blockquote strong {
	color: var(--nx-text);
	font-weight: var(--nx-weight-semibold);
}

/* ---- Tables -------------------------------------------------------------- */

.nx-entry table {
	width: 100%;
	margin-block: var(--nx-space-5);
	border-collapse: collapse;
	font-size: var(--nx-text-sm);
}

.nx-entry th,
.nx-entry td {
	padding: var(--nx-space-3) var(--nx-space-4);
	border-bottom: 1px solid var(--nx-grey-200);
	text-align: left;
}

.nx-entry th {
	color: var(--nx-text);
	font-weight: var(--nx-weight-semibold);
}

.nx-entry td { color: var(--nx-text-muted); }

/* ==========================================================================
   FLOATING WHATSAPP BUTTON
   Sits above .nx-totop in the same bottom-right stack. Always visible, where
   the back-to-top only appears after scrolling — so it clears that button's
   46px plus a gap and never overlaps it.
   ========================================================================== */

.nx-whatsapp {
	position: fixed;
	right: var(--nx-space-5);
	bottom: calc(var(--nx-space-5) + 46px + var(--nx-space-3));
	z-index: var(--nx-z-sticky);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--nx-radius-full);
	background: #25D366;
	color: var(--nx-white);
	box-shadow: var(--nx-shadow);
	transition: transform var(--nx-dur) var(--nx-ease), background var(--nx-dur) var(--nx-ease);
}

.nx-whatsapp:hover,
.nx-whatsapp:focus-visible {
	background: #1EBE5A;
	transform: translateY(-2px);
	color: var(--nx-white);
}

.nx-whatsapp svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.nx-whatsapp { transition: none; }
	.nx-whatsapp:hover { transform: none; }
}
