/*
 * NexAli World: components.
 *
 * Shared marks, Button, Card, Pill, Section header, Stats, Accordion and FAQ, Carousel,
 * Drawer, Video, Reveal, Check list, Comparison, Plans, Call to action band, Tile, Stars,
 * Admin note.
 *
 * Each block starts with the markup it expects. Blocks with behaviour name the data-nx-*
 * attribute main.js looks for. Tokens come from base.css.
 */

/* Shared marks ------------------------------------------------------------------
 * Single-colour icons used as CSS masks, so they take the colour of the element
 * they mask: background: currentColor; mask: var(--nx-mark-check) center / contain no-repeat.
 */
:root {
	--nx-mark-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	--nx-mark-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
	--nx-mark-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	--nx-mark-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
}

/* Button -------------------------------------------------------------------------
 * <a class="nx-btn nx-btn--primary" href="…">Join NexAli World</a>   (or a <button>)
 * --primary: the gold gradient, for the one main action of a view.
 * --secondary: ivory outline.  --ghost: text with an arrow.
 * At least 48px tall, full width under 560px.
 * NexAli Core's [nexali_plans] prints its buttons as <a class="nx-plan__cta"> without
 * nx-btn, so they share these rules (their colours are set under Plans).
 */
.nx-btn,
.nx-plan__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--nx-space-1);
	min-height: 48px;
	padding: .75rem 1.75rem;
	border: 1px solid transparent;
	border-radius: var(--nx-radius-pill);
	font-family: var(--nx-font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: .01em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .3s ease, translate .2s ease;
}

.nx-btn--primary,
.nx-plan--highlighted .nx-plan__cta {
	background: linear-gradient(135deg, var(--nx-gold), var(--nx-gold-2));
	color: var(--nx-charcoal);
}

/* The only glow on the site: a restrained gold one, on hover. */
.nx-btn--primary:hover,
.nx-plan--highlighted .nx-plan__cta:hover {
	color: var(--nx-charcoal);
	box-shadow: 0 10px 28px -10px rgba(198, 168, 91, .6);
	translate: 0 -1px;
}

.nx-btn--secondary {
	border-color: rgba(247, 244, 236, .5);
	background: transparent;
	color: var(--nx-ivory);
}

.nx-btn--secondary:hover {
	border-color: var(--nx-ivory);
	background: rgba(247, 244, 236, .06);
	color: var(--nx-ivory);
}

.nx-btn--ghost {
	padding-inline: .25rem;
	background: none;
	color: var(--nx-ivory);
}

.nx-btn--ghost::after {
	content: "";
	width: 1.125em;
	height: 1.125em;
	background: currentColor;
	-webkit-mask: var(--nx-mark-arrow) center / contain no-repeat;
	mask: var(--nx-mark-arrow) center / contain no-repeat;
	transition: translate .2s var(--nx-ease);
}

.nx-btn--ghost:hover {
	color: var(--nx-gold-2);
}

.nx-btn--ghost:hover::after {
	translate: 4px 0;
}

.nx-btn:disabled,
.nx-btn[aria-disabled="true"] {
	opacity: .5;
	pointer-events: none;
}

@media (max-width: 559.98px) {
	.nx-btn {
		width: 100%;
	}
}

/* Card ----------------------------------------------------------------------------
 * <article class="nx-card">…</article>
 * A navy panel a step lighter than the page, 1px line border, soft shadow; content stacks.
 */
.nx-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--nx-space-2);
	padding: clamp(var(--nx-space-3), 1rem + 1vw, var(--nx-space-4));
	border: 1px solid var(--nx-line);
	border-radius: var(--nx-radius);
	background: linear-gradient(180deg, rgba(22, 59, 115, .55), rgba(22, 59, 115, .3));
	box-shadow: var(--nx-shadow);
	color: var(--nx-ivory-70);
}

/* Pill ----------------------------------------------------------------------------
 * <li class="nx-pill"><svg class="nx-icon">…</svg>Step-by-step learning</li>
 * An optional icon in a gold-tinted circle and a short label (two lines at most).
 * <li class="nx-pill nx-pill--check">Complete the roadmap</li> draws a gold check before the label.
 */
.nx-pill {
	display: inline-flex;
	align-items: center;
	gap: .625rem;
	padding: .5rem 1.125rem;
	border: 1px solid var(--nx-line);
	border-radius: var(--nx-radius-pill);
	background: rgba(247, 244, 236, .04);
	color: var(--nx-ivory);
	font-size: var(--nx-text-small);
	font-weight: 500;
	line-height: 1.3;
}

.nx-pill:has(> .nx-icon) {
	padding-left: .5rem;
}

.nx-pill > .nx-icon {
	width: 2rem;
	height: 2rem;
	padding: .4375rem;
	border-radius: 50%;
	background: rgba(198, 168, 91, .14);
	color: var(--nx-gold);
}

.nx-pill--check::before {
	content: "";
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	background: var(--nx-gold);
	-webkit-mask: var(--nx-mark-check) center / contain no-repeat;
	mask: var(--nx-mark-check) center / contain no-repeat;
}

/* Section header --------------------------------------------------------------------
 * <header class="nx-section-header [nx-section-header--center]">
 *   <span class="nx-eyebrow">…</span><h2>…</h2><p class="nx-lead">…</p>
 * </header>
 */
.nx-section-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--nx-space-2);
	max-width: 52rem;
	margin-bottom: clamp(var(--nx-space-6), 2rem + 2vw, 4.5rem);
}

.nx-section-header--center {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

/* Stats ---------------------------------------------------------------------------
 * <ul class="nx-stats"><li class="nx-stat"><span class="nx-stat__number">12+</span>
 *   <span class="nx-stat__label">Courses</span></li>…</ul>
 * Two per row on phones, all in one row from 720px.
 */
.nx-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--nx-space-4) var(--nx-space-3);
}

@media (min-width: 720px) {
	.nx-stats {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
	}
}

.nx-stat {
	display: flex;
	flex-direction: column;
	gap: var(--nx-space-1);
	padding-left: var(--nx-space-3);
	border-left: 1px solid var(--nx-line);
}

.nx-stat__number {
	color: var(--nx-ivory);
	font-family: var(--nx-font-display);
	font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem);
	font-weight: 600;
	line-height: 1;
}

.nx-stat__label {
	font-size: var(--nx-text-small);
	font-weight: 500;
	letter-spacing: .04em;
}

/* Accordion and FAQ -------------------------------------------------------------------
 * <div class="nx-accordion" data-nx-accordion>
 *   <details><summary>Question</summary><div>Answer</div></details>…
 * </div>
 * <div class="nx-faq" data-nx-accordion>       (NexAli Core's [nexali_faq], the theme's FAQ block)
 *   <details class="nx-faq__item"><summary class="nx-faq__q">…</summary><div class="nx-faq__a">…</div></details>…
 * </div>
 * With data-nx-accordion, main.js closes the open item when another opens. Native
 * <details>, so keyboard and screen readers work without JavaScript. The height
 * animates where the browser supports ::details-content; elsewhere items open at once.
 */
.nx-accordion,
.nx-faq {
	display: flex;
	flex-direction: column;
	gap: .75rem;
	interpolate-size: allow-keywords;
}

/* FAQs read best in one narrow column. */
.nx-faq {
	max-width: 760px;
	margin-inline: auto;
}

.nx-accordion > details,
.nx-faq__item {
	border: 1px solid var(--nx-line);
	border-radius: var(--nx-radius);
	background: rgba(22, 59, 115, .3);
	transition: background-color .25s ease, border-color .25s ease;
}

.nx-accordion > details[open],
.nx-faq__item[open] {
	border-color: rgba(198, 168, 91, .35);
	background: rgba(22, 59, 115, .5);
}

.nx-accordion > details > summary,
.nx-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--nx-space-2);
	padding: 1.125rem 1.5rem;
	border-radius: inherit;
	color: var(--nx-ivory);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}

.nx-accordion > details > summary::-webkit-details-marker,
.nx-faq__q::-webkit-details-marker {
	display: none;
}

/* The chevron: an L-shaped corner turned to point down, and up when open. */
.nx-accordion > details > summary::after,
.nx-faq__q::after {
	content: "";
	flex: none;
	width: .5rem;
	height: .5rem;
	margin: 0 .25rem .25rem 0;
	border-right: 2px solid var(--nx-gold);
	border-bottom: 2px solid var(--nx-gold);
	rotate: 45deg;
	transition: rotate .25s var(--nx-ease), margin .25s var(--nx-ease);
}

.nx-accordion > details[open] > summary::after,
.nx-faq__item[open] > .nx-faq__q::after {
	margin: .25rem .25rem 0 0;
	rotate: -135deg;
}

.nx-accordion > details > :not(summary),
.nx-faq__a {
	padding: 0 1.5rem 1.5rem;
	color: var(--nx-ivory-70);
}

/* :not(:first-child) rather than * + *: on the courses pages it outranks learnpress.css's
 * p:last-child { margin: 0 }, which would pull an answer's last paragraph up. */
.nx-accordion > details > :not(summary) > :not(:first-child),
.nx-faq__a > :not(:first-child) {
	margin-top: .75em;
}

.nx-accordion > details::details-content,
.nx-faq__item::details-content {
	block-size: 0;
	overflow-y: clip;
	transition: block-size .3s var(--nx-ease), content-visibility .3s allow-discrete;
}

.nx-accordion > details[open]::details-content,
.nx-faq__item[open]::details-content {
	block-size: auto;
}

/* Carousel ----------------------------------------------------------------------------
 * <div class="nx-carousel" data-nx-carousel>
 *   <div class="nx-carousel__track" role="region" aria-label="Member wins">…cards…</div>
 *   <button type="button" class="nx-carousel__btn" data-nx-carousel-prev aria-label="Previous"></button>
 *   <button type="button" class="nx-carousel__btn" data-nx-carousel-next aria-label="Next"></button>
 * </div>
 * The cards go inside the track, never directly in .nx-carousel. The track scrolls sideways
 * and snaps to each card; the buttons sit below it, at the end (wrapping them in
 * <div class="nx-carousel__controls"> works too). main.js moves the track one card per click
 * and sets aria-disabled on a button at its end. Cards are 85% of the track on phones and
 * 360px from 720px; set --nx-carousel-card on the carousel to change that. The buttons'
 * chevrons are drawn in CSS whatever the button holds (whitespace, a .nx-visually-hidden
 * label), so give them no visible content and name them with aria-label.
 */
.nx-carousel {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--nx-space-3) .75rem;
}

.nx-carousel__track {
	flex: 1 0 100%; /* a row of its own: the buttons wrap below it */
	min-width: 0;
	display: grid;
	grid-auto-columns: var(--nx-carousel-card, 85%);
	grid-auto-flow: column;
	gap: var(--nx-space-3);
	padding-block: .25rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.nx-carousel__track::-webkit-scrollbar {
	display: none;
}

.nx-carousel__track > * {
	scroll-snap-align: start;
}

@media (min-width: 720px) {
	.nx-carousel__track {
		grid-auto-columns: var(--nx-carousel-card, 360px);
	}
}

.nx-carousel__controls {
	display: flex;
	gap: .75rem;
}

.nx-carousel__btn {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid rgba(247, 244, 236, .25);
	border-radius: 50%;
	background: rgba(247, 244, 236, .04);
	color: var(--nx-ivory);
	transition: border-color .2s ease, color .2s ease, opacity .2s ease;
}

.nx-carousel__btn:hover {
	border-color: var(--nx-gold);
	color: var(--nx-gold);
}

.nx-carousel__btn[aria-disabled="true"] {
	border-color: rgba(247, 244, 236, .25);
	color: var(--nx-ivory);
	opacity: .35;
	cursor: default;
}

.nx-carousel__btn::before {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	background: currentColor;
	-webkit-mask: var(--nx-mark-chevron) center / contain no-repeat;
	mask: var(--nx-mark-chevron) center / contain no-repeat;
}

.nx-carousel__btn[data-nx-carousel-prev]::before {
	rotate: 180deg;
}

/* Drawer --------------------------------------------------------------------------------
 * <button type="button" data-nx-drawer-open aria-controls="nx-drawer" aria-expanded="false">Menu</button>
 * <nav id="nx-drawer" class="nx-drawer" data-nx-drawer aria-label="Site navigation">
 *   <button type="button" data-nx-drawer-close aria-label="Close menu">…</button> …
 * </nav>
 * A 360px panel fixed to the left edge, off screen and hidden until main.js sets
 * data-nx-open="true". main.js adds <div class="nx-drawer-backdrop"> right after the panel
 * when the markup has none, keeps keyboard focus inside while open, closes on Escape, a click
 * on the backdrop or any [data-nx-drawer-close], and sets html.is-drawer-open meanwhile.
 */
.nx-drawer {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 1001;
	display: flex;
	flex-direction: column;
	gap: var(--nx-space-4);
	width: 360px;
	max-width: 100%;
	padding: var(--nx-space-3);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-right: 1px solid var(--nx-line);
	background: var(--nx-bg-2);
	box-shadow: 24px 0 48px -24px rgba(0, 0, 0, .6);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform .35s var(--nx-ease), visibility 0s linear .35s;
}

.nx-drawer[data-nx-open="true"] {
	transform: translateX(0);
	visibility: visible;
	transition: transform .35s var(--nx-ease), visibility 0s;
}

.nx-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(5, 13, 26, .6);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility 0s linear .35s;
}

.nx-drawer[data-nx-open="true"] + .nx-drawer-backdrop {
	opacity: 1;
	visibility: visible;
	transition: opacity .35s ease, visibility 0s;
}

/* Keep clear of the WordPress toolbar for logged-in visitors, where it is fixed (from 601px;
 * below that it scrolls away, and the open drawer covers it: pages.css, Header). */
@media (min-width: 601px) {
	.admin-bar .nx-drawer,
	.admin-bar .nx-drawer-backdrop {
		top: var(--wp-admin--admin-bar--height, 0px);
	}
}

html.is-drawer-open {
	overflow: hidden;
}

/* Video ---------------------------------------------------------------------------------
 * <div class="nx-video" data-nx-video="https://www.youtube.com/watch?v=…"><img src="poster" alt="…"></div>
 * A 16:9 frame showing its poster image. With data-nx-video (a YouTube, Vimeo or .mp4 URL)
 * main.js adds a play button (.nx-video__play) and, on click, swaps the poster for the
 * player and adds .is-playing. Without data-nx-video the frame is just the image.
 */
.nx-video {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--nx-line);
	border-radius: var(--nx-radius);
	background: var(--nx-bg-2);
}

.nx-video img,
.nx-video iframe,
.nx-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.nx-video video {
	background: #000;
	object-fit: contain;
}

.nx-video[data-nx-video]:not(.is-playing) {
	cursor: pointer;
}

/* A soft shade at the bottom of the poster so the play button stands out. */
.nx-video[data-nx-video]:not(.is-playing)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 26, 51, 0) 40%, rgba(10, 26, 51, .55));
	pointer-events: none;
}

.nx-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--nx-gold), var(--nx-gold-2));
	box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6);
	color: var(--nx-charcoal);
	translate: -50% -50%;
	transition: scale .2s var(--nx-ease), box-shadow .3s ease;
}

/* The play triangle, nudged right so it looks centred. */
.nx-video__play::before {
	content: "";
	margin-left: .25rem;
	border-style: solid;
	border-width: .6875rem 0 .6875rem 1.125rem;
	border-color: transparent transparent transparent currentColor;
}

.nx-video:hover .nx-video__play,
.nx-video__play:focus-visible {
	scale: 1.06;
	box-shadow: 0 12px 32px -10px rgba(198, 168, 91, .6);
}

/* Reveal --------------------------------------------------------------------------------
 * <div class="nx-reveal" data-nx-reveal [style="--nx-reveal-delay: 120ms"]>…</div>
 * Fades and rises into place the first time it scrolls into view (main.js adds .is-visible).
 * Only hidden while main.js runs (html.nx-js), and elements already on screen when the page
 * loads show at once, so nothing blinks and nothing stays hidden without JavaScript.
 * --nx-reveal-delay staggers neighbours. Keep it off elements with transitions of their own
 * (its transition replaces theirs): put it on a wrapper.
 */
.nx-js .nx-reveal:not(.is-visible) {
	opacity: 0;
	translate: 0 24px;
}

/* The transition belongs to the visible state only, so hiding is instant and only the reveal animates. */
.nx-reveal.is-visible {
	transition: opacity .7s var(--nx-ease), translate .7s var(--nx-ease);
	transition-delay: var(--nx-reveal-delay, 0s);
}

/* Printed pages show everything, scrolled into view or not. */
@media (prefers-reduced-motion: reduce), print {
	.nx-js .nx-reveal:not(.is-visible),
	.nx-reveal.is-visible {
		opacity: 1;
		translate: none;
		transition: none;
	}
}

/* Check list ------------------------------------------------------------------------------
 * <ul class="nx-checklist"><li>…</li>…</ul>
 * One item under another, each after a gold check. The Comparison lists share the layout.
 */
.nx-checklist,
.nx-compare__list {
	display: grid;
	gap: .875rem;
}

.nx-checklist > li,
.nx-compare__list > li {
	position: relative;
	padding-left: 2rem;
}

.nx-checklist > li::before,
.nx-compare__list > li::before {
	content: "";
	position: absolute;
	top: .2em;
	left: 0;
	width: 1.25rem;
	height: 1.25rem;
	background: var(--nx-gold);
	-webkit-mask: var(--nx-mark-check) center / contain no-repeat;
	mask: var(--nx-mark-check) center / contain no-repeat;
}

/* Comparison ------------------------------------------------------------------------------
 * <div class="nx-compare">
 *   <div class="nx-compare__col nx-compare__col--muted">
 *     <h3 class="nx-compare__title">…</h3><ul class="nx-compare__list"><li>…</li></ul> [button]
 *   </div>
 *   <span class="nx-compare__vs">vs</span>
 *   <div class="nx-compare__col nx-compare__col--highlight">…</div>
 * </div>
 * Two panels with the badge between them: side by side from 900px, stacked below with the
 * badge on the seam. The lists are laid out as Check lists, with ivory checks: crosses in
 * --muted, gold checks in --highlight.
 * The homepage's two paths are the same layout: <div class="nx-paths">, its panels
 * .nx-paths__col--left (as --muted) and .nx-paths__col--right (as --highlight), and
 * <span class="nx-paths__vs">.
 */
.nx-compare,
.nx-paths {
	display: grid;
	gap: var(--nx-space-3);
}

@media (min-width: 900px) {
	.nx-compare,
	.nx-paths {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	}
}

.nx-compare__col,
.nx-paths__col {
	display: flex;
	flex-direction: column;
	gap: var(--nx-space-3);
	padding: clamp(var(--nx-space-3), 1rem + 2vw, 2.5rem);
	border: 1px solid var(--nx-line);
	border-radius: var(--nx-radius);
	background: rgba(22, 59, 115, .3);
}

.nx-compare__col--muted,
.nx-paths__col--left {
	background: rgba(247, 244, 236, .02);
}

.nx-compare__col--highlight,
.nx-paths__col--right {
	border-color: rgba(198, 168, 91, .55);
	background: linear-gradient(180deg, rgba(22, 59, 115, .6), rgba(22, 59, 115, .3));
	box-shadow: var(--nx-shadow);
}

.nx-compare__col > :is(.nx-btn, a, button):last-child,
.nx-paths__col > :is(.nx-btn, a, button):last-child {
	align-self: flex-start;
	margin-top: auto;
}

.nx-compare__title {
	font-size: var(--nx-text-h3);
}

.nx-compare__list > li::before {
	background: var(--nx-ivory-70);
}

.nx-compare__col--muted .nx-compare__list > li::before {
	background: rgba(247, 244, 236, .4);
	-webkit-mask-image: var(--nx-mark-cross);
	mask-image: var(--nx-mark-cross);
}

.nx-compare__col--highlight .nx-compare__list > li::before {
	background: var(--nx-gold);
}

.nx-compare__vs,
.nx-paths__vs {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	align-self: center;
	justify-self: center;
	width: 3.5rem;
	height: 3.5rem;
	margin-block: -2.25rem;
	border: 1px solid rgba(198, 168, 91, .55);
	border-radius: 50%;
	background: var(--nx-bg);
	color: var(--nx-gold);
	font-family: var(--nx-font-display);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1;
}

@media (min-width: 900px) {
	.nx-compare__vs,
	.nx-paths__vs {
		margin-block: 0;
		margin-inline: -2.25rem;
	}
}

/* Plans ------------------------------------------------------------------------------------
 * <div class="nx-plans">
 *   <article class="nx-plan [nx-plan--highlighted]">
 *     <span class="nx-plan__badge">…</span><h3 class="nx-plan__name">…</h3>
 *     <p class="nx-plan__price">$29<span>/ month</span></p><p class="nx-plan__desc">…</p>
 *     <ul class="nx-plan__features"><li>…</li></ul><a class="nx-plan__cta" href="…">…</a>
 *   </article>…
 * </div>
 * (NexAli Core's [nexali_plans] prints this markup.) Light ivory cards with charcoal text,
 * one column below 960px and one row above. The highlighted plan has a gold border and a
 * gold button, and is drawn 8% larger once the plans sit in a row.
 */
.nx-plans {
	display: grid;
	gap: var(--nx-space-3);
}

@media (min-width: 960px) {
	.nx-plans {
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		gap: var(--nx-space-4);
	}

	.nx-plans > .nx-plan--highlighted {
		z-index: 1;
		transform: scale(1.08);
	}
}

.nx-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--nx-space-2);
	padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
	border: 1px solid rgba(31, 36, 48, .08);
	border-radius: var(--nx-radius);
	background: var(--nx-ivory);
	box-shadow: var(--nx-shadow);
	color: rgba(31, 36, 48, .78);
	--nx-focus: var(--nx-indigo); /* the light ring fails on ivory; indigo gives 4.9:1 */
}

.nx-plan--highlighted {
	border: 2px solid var(--nx-gold);
	box-shadow: 0 0 0 6px rgba(198, 168, 91, .14), var(--nx-shadow);
}

.nx-plan__badge {
	align-self: flex-start;
	padding: .3125rem .75rem;
	border-radius: var(--nx-radius-pill);
	background: var(--nx-charcoal);
	color: var(--nx-gold-2);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.nx-plan--highlighted .nx-plan__badge {
	background: linear-gradient(135deg, var(--nx-gold), var(--nx-gold-2));
	color: var(--nx-charcoal);
}

.nx-plan__name {
	color: var(--nx-charcoal);
}

.nx-plan__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .375rem;
	color: var(--nx-charcoal);
	font-family: var(--nx-font-display);
	font-size: clamp(2.5rem, 2rem + 1.5vw, 3.25rem);
	font-weight: 700;
	line-height: 1;
}

.nx-plan__price > span {
	color: rgba(31, 36, 48, .7);
	font-family: var(--nx-font-body);
	font-size: 1rem;
	font-weight: 500;
}

.nx-plan__features {
	display: grid;
	gap: .75rem;
	padding-top: var(--nx-space-2);
	border-top: 1px solid rgba(31, 36, 48, .1);
}

.nx-plan__features > li {
	position: relative;
	padding-left: 1.875rem;
}

.nx-plan__features > li::before {
	content: "";
	position: absolute;
	top: .2em;
	left: 0;
	width: 1.25rem;
	height: 1.25rem;
	background: var(--nx-navy);
	-webkit-mask: var(--nx-mark-check) center / contain no-repeat;
	mask: var(--nx-mark-check) center / contain no-repeat;
}

/* Plan buttons sit at the bottom. On the light card, all but the highlighted plan's gold
   button are a charcoal outline. */
.nx-plan__cta,
.nx-plan .nx-btn {
	width: 100%;
	margin-top: auto;
}

.nx-plan:not(.nx-plan--highlighted) .nx-plan__cta,
.nx-plan .nx-btn--secondary {
	border-color: rgba(31, 36, 48, .35);
	background: transparent;
	color: var(--nx-charcoal);
}

.nx-plan:not(.nx-plan--highlighted) .nx-plan__cta:hover,
.nx-plan .nx-btn--secondary:hover {
	border-color: var(--nx-charcoal);
	background: rgba(31, 36, 48, .05);
	color: var(--nx-charcoal);
}

/* Call to action band ----------------------------------------------------------------------
 * <section id="cta" class="nx-section nx-cta-band" data-nx-section="cta">
 *   <div class="nx-container nx-cta-band__inner"><h2 class="nx-cta-band__title">…</h2>
 *     <p class="nx-cta-band__text">…</p>[primary button]</div>
 * </section>
 * The closing section of a page (template-parts/blocks/cta-band.php): centred on a
 * navy-to-indigo gradient under the hero's fine grid. The text is full ivory, which keeps
 * 4.8:1 even on the indigo end.
 */
.nx-cta-band {
	--nx-focus: var(--nx-ivory); /* the indigo ring fades into the gradient; ivory keeps 4.8:1 at its indigo end */
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(135deg, var(--nx-navy) 20%, var(--nx-indigo));
}

.nx-cta-band::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(rgba(247, 244, 236, .06) 1px, transparent 1px) 50% 50% / 64px 64px,
		linear-gradient(90deg, rgba(247, 244, 236, .06) 1px, transparent 1px) 50% 50% / 64px 64px;
	-webkit-mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent);
	mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent);
	pointer-events: none;
}

.nx-cta-band__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--nx-space-3);
	text-align: center;
}

.nx-cta-band__title {
	max-width: 18em;
}

.nx-cta-band__text {
	max-width: 40rem;
	color: var(--nx-ivory);
	font-size: var(--nx-text-lead);
}

.nx-cta-band .nx-btn {
	margin-top: var(--nx-space-2);
}

/* Tile ------------------------------------------------------------------------------------
 * <div class="nx-tile" data-icon="shopping-bag"><svg class="nx-icon">…</svg></div>
 * Stands in for a missing image (course cards): a 16:9 navy gradient with the icon centred.
 */
.nx-tile {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--nx-radius);
	background:
		radial-gradient(120% 90% at 0% 0%, rgba(76, 95, 215, .35), transparent 60%),
		linear-gradient(135deg, var(--nx-navy), var(--nx-bg-2));
	box-shadow: inset 0 0 0 1px var(--nx-line);
	color: var(--nx-gold-2);
}

.nx-tile .nx-icon {
	width: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	height: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	stroke-width: 1.5;
}

/* Stars ------------------------------------------------------------------------------------
 * <span class="nx-stars" aria-label="4 out of 5" role="img">
 *   <svg class="nx-icon is-filled">…</svg>×4 <svg class="nx-icon">…</svg>
 * </span>
 * A rating as five star icons: the filled ones gold, the rest a faint outline.
 */
.nx-stars {
	display: inline-flex;
	gap: .125rem;
	color: rgba(247, 244, 236, .3);
}

.nx-stars .nx-icon {
	width: 1.125rem;
	height: 1.125rem;
}

.nx-stars .is-filled {
	color: var(--nx-gold);
	fill: currentColor;
}

/* Admin note -------------------------------------------------------------------------------
 * <p class="nx-admin-note">Video URL not recognised; showing the image.</p>
 * Printed only for logged-in users who can fix what it describes. A form card without its
 * form (<p class="nx-form__placeholder">, template-parts/blocks/form.php) looks the same.
 */
.nx-admin-note,
.nx-form__placeholder {
	margin-top: .75rem;
	padding: .5rem .75rem;
	border: 1px dashed var(--nx-gold);
	border-radius: 8px;
	color: var(--nx-gold-2);
	font-size: var(--nx-text-small);
}

/* ==========================================================================
   Fix wave: rules for markup added by the theme PHP owners. The stylesheet
   owner does not edit below this line.
   ========================================================================== */

/* fix-wave T1 */
.nx-resource__type {
	display: inline-block;
	margin-top: .75rem;
	padding: .2rem .6rem;
	border: 1px solid rgba(198, 168, 91, .45);
	border-radius: 999px;
	color: var(--nx-gold-2);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* fix-wave T2 */

/* Course card tagline: one short line between the title and the excerpt. */
.nx-course-card__tagline {
	color: var(--nx-gold-2);
	font-size: var(--nx-text-small);
	font-weight: 600;
}

/* Pricing page: the membership contents, two to three columns under the resource cards. */
.nx-pricing__includes {
	max-width: 56rem;
	margin: clamp(var(--nx-space-4), 1rem + 3vw, var(--nx-space-8)) auto 0;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

/* Contact page without a form card: the email card takes the full width. */
@media (min-width: 900px) {
	.nx-contact__grid.nx-contact__grid--single {
		grid-template-columns: minmax(0, 1fr);
	}
}
