/*
 * WhiteNet main stylesheet.
 *
 * Conventions
 * -----------
 * - Design tokens come from theme.json as `--wp--preset--*` custom properties.
 *   This file reads them; it never redefines a colour literal except in the
 *   severity scale, which is semantic rather than themeable.
 * - Naming is BEM-ish: `.block__element.is-modifier`.
 * - No `!important` outside the accessibility utilities.
 * - Layout uses logical properties throughout, so a right-to-left locale needs
 *   no overrides.
 *
 * Inversion
 * ---------
 * The palette is light-first: white page, navy ink, electric-blue accents.
 * Navy bands are achieved with `.section--navy`, which reassigns a small set of
 * local custom properties (`--wn-ink`, `--wn-ink-muted`, `--wn-line`,
 * `--wn-panel`, `--wn-link`). Every component below reads those locals rather
 * than the presets directly, so a component dropped into a navy band inverts
 * without a single component-level override.
 */

/* -------------------------------------------------------------------------
 * Tokens not expressible in theme.json.
 * ---------------------------------------------------------------------- */

:root {
	--wn-header-height: 72px;
	--wn-radius: 12px;
	--wn-radius-sm: 6px;
	--wn-transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
	--wn-transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);

	/* Rhythm used by every full-bleed band. */
	--wn-band: clamp(3.5rem, 2rem + 6vw, 7rem);
	--wn-shell: 1200px;
	--wn-gutter: 1.5rem;

	/*
	 * Contextual locals. Light context by default; `.section--navy` overrides
	 * these four and every component follows.
	 */
	--wn-ink: var(--wp--preset--color--contrast);
	--wn-ink-muted: var(--wp--preset--color--muted);
	--wn-line: var(--wp--preset--color--border);
	--wn-panel: var(--wp--preset--color--base);
	--wn-panel-alt: var(--wp--preset--color--surface);
	--wn-link: var(--wp--preset--color--accent);

	/*
	 * Severity scale. Hue carries meaning here, so these are fixed. Values are
	 * chosen to clear 4.5:1 against white, since the scale now renders on a
	 * light page rather than a dark one.
	 */
	--wn-critical: #c1121f;
	--wn-high: #b3541e;
	--wn-medium: #8a5a00;
	--wn-low: #0b5cff;
	--wn-info: #5a6b80;
}

/* -------------------------------------------------------------------------
 * Layout primitives.
 * ---------------------------------------------------------------------- */

.site {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.site-main {
	flex: 1;
}

.site-main--full {
	max-width: none;
	padding: 0;
}

/*
 * Full-bleed band. `.section__inner` re-establishes the shell so the band's
 * background runs edge to edge while its content stays aligned with the header.
 */
.section {
	padding-block: var(--wn-band);
	background: var(--wn-panel);
	color: var(--wn-ink);
}

.section--tight {
	padding-block: calc(var(--wn-band) * 0.6);
}

.section--mist {
	--wn-panel: var(--wp--preset--color--surface);
	--wn-panel-alt: var(--wp--preset--color--base);
}

.section--navy {
	--wn-ink: #ffffff;
	--wn-ink-muted: #9fb0c7;
	--wn-line: #1c3153;
	--wn-panel: var(--wp--preset--color--contrast);
	--wn-panel-alt: #0f2342;
	--wn-link: var(--wp--preset--color--accent-alt);
}

.section--midnight {
	--wn-ink: #ffffff;
	--wn-ink-muted: #9fb0c7;
	--wn-line: #16273f;
	--wn-panel: var(--wp--preset--color--navy-deep);
	--wn-panel-alt: #0c1a30;
	--wn-link: var(--wp--preset--color--accent-alt);
}

.section__inner {
	max-width: var(--wn-shell);
	margin-inline: auto;
	padding-inline: var(--wn-gutter);
}

.section__inner--narrow {
	max-width: 820px;
}

.section__header {
	max-width: 62ch;
	margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.section__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wn-link);
}

.section__eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	background: currentcolor;
	flex: none;
}

.section__title {
	margin: 0;
	color: var(--wn-ink);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: -0.026em;
}

.section__intro {
	margin: 1rem 0 0;
	color: var(--wn-ink-muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.section__footer {
	margin-top: clamp(2rem, 1rem + 2vw, 3rem);
}

/* Constrain long-form reading regardless of the shell width. */
.prose {
	max-width: var(--wp--custom--max-reading-width);
}

/* -------------------------------------------------------------------------
 * Header and navigation.
 * ---------------------------------------------------------------------- */

.primary-navigation {
	display: flex;
}

.primary-menu,
.sub-menu,
.footer-menu,
.legal-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.25rem;
}

.primary-menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.menu-item__link {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 550;
	text-decoration: none;
	border-radius: var(--wn-radius-sm);
	transition: color var(--wn-transition-fast), background-color var(--wn-transition-fast);
}

.menu-item__link:hover,
.menu-item__link:focus-visible {
	color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent-soft);
}

.menu-item__link.is-current {
	color: var(--wp--preset--color--accent);
	font-weight: 650;
}

.menu-item__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	margin-inline-start: -0.5rem;
	padding: 0;
	background: none;
	border: 0;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
	border-radius: var(--wn-radius-sm);
}

.menu-item__toggle:hover {
	color: var(--wp--preset--color--accent);
}

.menu-item__chevron {
	transition: transform var(--wn-transition-fast);
}

.menu-item__toggle[aria-expanded="true"] .menu-item__chevron {
	transform: rotate(180deg);
}

/*
 * Submenus are hidden with `display: none` deliberately. A submenu positioned
 * off-screen stays in the tab order, which strands keyboard users in a menu
 * they cannot see. The disclosure button in WhiteNet_Nav_Walker is what makes
 * this accessible.
 */
.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 120;
	flex-direction: column;
	gap: 0;
	min-width: 260px;
	padding: 0.5rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
	box-shadow: var(--wp--preset--shadow--raised);
}

.sub-menu.is-open {
	display: flex;
}

.sub-menu .menu-item__link {
	display: block;
	padding: 0.625rem 0.75rem;
}

.nav-trigger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}

.nav-trigger__bars,
.nav-trigger__bars::before,
.nav-trigger__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentcolor;
	border-radius: 2px;
	transition: transform var(--wn-transition-fast), opacity var(--wn-transition-fast);
}

.nav-trigger__bars::before,
.nav-trigger__bars::after {
	content: "";
	position: absolute;
}

.nav-trigger__bars::before {
	transform: translateY(-6px);
}

.nav-trigger__bars::after {
	transform: translateY(6px);
}

.nav-trigger[aria-expanded="true"] .nav-trigger__bars {
	transform: rotate(45deg);
}

.nav-trigger[aria-expanded="true"] .nav-trigger__bars::before {
	opacity: 0;
}

.nav-trigger[aria-expanded="true"] .nav-trigger__bars::after {
	transform: rotate(-90deg);
}

.site-header__cta {
	flex: none;
	padding: 0.6em 1.25em;
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 960px) {
	.nav-trigger {
		display: inline-flex;
		order: 3;
	}

	.primary-navigation {
		display: none;
		order: 4;
		flex-basis: 100%;
		padding-block: 1rem 0.5rem;
		border-top: 1px solid var(--wp--preset--color--border);
	}

	.primary-navigation.is-open {
		display: block;
	}

	.site-header__inner {
		flex-wrap: wrap;
	}

	.primary-menu {
		flex-direction: column;
		gap: 0;
	}

	.primary-menu > li {
		flex-wrap: wrap;
	}

	.menu-item__link {
		flex: 1;
		padding: 0.75rem 0.5rem;
	}

	.sub-menu {
		position: static;
		flex-basis: 100%;
		box-shadow: none;
		border: 0;
		padding: 0 0 0.5rem 1rem;
		min-width: 0;
	}

	.site-header__cta {
		order: 2;
	}
}

@media (max-width: 600px) {
	.site-header__cta {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Hero.
 * ---------------------------------------------------------------------- */

/*
 * Deliberately not "hacker imagery": no terminal, no matrix rain, no padlock.
 * The only decoration is a faint coordinate grid and a soft radial lift, both
 * pure CSS, both behind `aria-hidden` markup, both dropped under
 * `prefers-reduced-motion` where they animate.
 */
.hero__grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(to right, rgba(91, 157, 255, 0.07) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(91, 157, 255, 0.07) 1px, transparent 1px);
	background-size: 72px 72px;
	mask-image: radial-gradient(120% 100% at 82% 0%, #000 0%, transparent 72%);
}

.hero__glow {
	position: absolute;
	inset-block-start: -30%;
	inset-inline-end: -10%;
	width: min(760px, 70vw);
	aspect-ratio: 1;
	pointer-events: none;
	background: radial-gradient(circle, rgba(11, 92, 255, 0.28) 0%, transparent 62%);
}

.hero__actions .button {
	padding: 0.9em 1.8em;
}

/* Ghost button on navy: white outline, fills on hover. */
.hero__actions .button.is-style-ghost,
.section--navy .button.is-style-ghost,
.section--midnight .button.is-style-ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.45);
	color: #ffffff;
}

.hero__actions .button.is-style-ghost:hover,
.section--navy .button.is-style-ghost:hover,
.section--midnight .button.is-style-ghost:hover {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--wp--preset--color--contrast);
}

/* A short factual strip under the hero. Carries no claims by itself. */
.hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2.5rem;
	margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
	padding-top: 1.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	list-style: none;
	padding-inline-start: 0;
}

.hero__meta li {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: #c3d1e3;
	font-size: var(--wp--preset--font-size--small);
}

.hero__meta li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-alt);
	flex: none;
}

/* -------------------------------------------------------------------------
 * Page header and breadcrumbs.
 * ---------------------------------------------------------------------- */

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.breadcrumbs__item + .breadcrumbs__item::before {
	content: "/";
	margin-inline-end: 0.5rem;
	color: var(--wp--preset--color--border);
}

.breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.breadcrumbs a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

.page-header {
	max-width: 64ch;
	margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.page-header__title {
	margin: 0;
	letter-spacing: -0.03em;
}

.page-header__description,
.front-section__intro {
	margin: 1rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.page-header__query {
	color: var(--wp--preset--color--contrast);
	font-style: normal;
}

/*
 * A page header dropped inside an inverted band follows the band, so templates
 * never need an inline colour override to stay readable on navy.
 */
.section--navy .page-header__title,
.section--midnight .page-header__title {
	color: var(--wn-ink);
}

.section--navy .page-header__description,
.section--midnight .page-header__description {
	color: var(--wn-ink-muted);
}

.section--navy .breadcrumbs ol,
.section--midnight .breadcrumbs ol {
	color: var(--wn-ink-muted);
}

.section--navy .breadcrumbs__item + .breadcrumbs__item::before,
.section--midnight .breadcrumbs__item + .breadcrumbs__item::before {
	color: var(--wn-line);
}

.section--navy .breadcrumbs a:hover,
.section--midnight .breadcrumbs a:hover {
	color: var(--wn-link);
}

/* -------------------------------------------------------------------------
 * Coverage grid: the six surfaces WhiteNet tests.
 * ---------------------------------------------------------------------- */

.coverage-grid {
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	background: var(--wn-line);
	border: 1px solid var(--wn-line);
	border-radius: var(--wn-radius);
	overflow: hidden;
}

.coverage-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
	background: var(--wn-panel);
	transition: background-color var(--wn-transition);
}

.coverage-card:hover {
	background: var(--wn-panel-alt);
}

.coverage-card__icon {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: var(--wn-radius-sm);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	flex: none;
}

.section--navy .coverage-card__icon,
.section--midnight .coverage-card__icon {
	background: rgba(91, 157, 255, 0.14);
	color: var(--wp--preset--color--accent-alt);
}

.coverage-card__icon svg {
	width: 20px;
	height: 20px;
}

.coverage-card__title {
	margin: 0;
	color: var(--wn-ink);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.02em;
}

.coverage-card__title a {
	color: inherit;
	text-decoration: none;
}

.coverage-card__title a:hover {
	color: var(--wn-link);
	text-decoration: underline;
}

.coverage-card__body {
	margin: 0;
	color: var(--wn-ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.coverage-card__list {
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.coverage-card__list li {
	padding: 0.2rem 0.55rem;
	background: var(--wn-panel-alt);
	border: 1px solid var(--wn-line);
	border-radius: 999px;
	color: var(--wn-ink-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
 * Approach: numbered engagement phases.
 * ---------------------------------------------------------------------- */

.approach {
	display: grid;
	gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	counter-reset: approach;
	list-style: none;
	margin: 0;
	padding: 0;
}

.approach-step {
	position: relative;
	padding-top: 2.5rem;
	border-top: 2px solid var(--wn-line);
	counter-increment: approach;
}

.approach-step::before {
	content: counter(approach, decimal-leading-zero);
	position: absolute;
	top: 1rem;
	inset-inline-start: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--wn-link);
}

/* The active-phase rule: the top border lights up on hover/focus-within. */
.approach-step:hover {
	border-top-color: var(--wp--preset--color--accent);
}

.approach-step__title {
	margin: 0 0 0.5rem;
	color: var(--wn-ink);
	font-size: var(--wp--preset--font-size--large);
}

.approach-step__body {
	margin: 0;
	color: var(--wn-ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.65;
}

/* -------------------------------------------------------------------------
 * Deliverables.
 * ---------------------------------------------------------------------- */

.deliverables {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.deliverable {
	display: flex;
	gap: 1rem;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	background: var(--wn-panel-alt);
	border: 1px solid var(--wn-line);
	border-radius: var(--wn-radius);
}

.deliverable__mark {
	flex: none;
	width: 24px;
	height: 24px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	color: #ffffff;
	margin-top: 0.15rem;
}

.deliverable__mark svg {
	width: 13px;
	height: 13px;
}

.deliverable__title {
	margin: 0 0 0.35rem;
	color: var(--wn-ink);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 650;
	letter-spacing: -0.015em;
}

.deliverable__body {
	margin: 0;
	color: var(--wn-ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

/* -------------------------------------------------------------------------
 * Editor-only content slots.
 *
 * Rendered by whitenet_empty_slot() and visible only to signed-in users who
 * can edit the page. This is how the theme refuses to invent client logos,
 * testimonials, certifications and metrics: the layout reserves the space and
 * tells the team what belongs there, and the public sees nothing at all.
 * ---------------------------------------------------------------------- */

.empty-slot {
	padding: clamp(1.25rem, 1rem + 1vw, 2rem);
	border: 1px dashed var(--wp--preset--color--accent);
	border-radius: var(--wn-radius);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--contrast);
}

.section--navy .empty-slot,
.section--midnight .empty-slot {
	background: rgba(91, 157, 255, 0.1);
	border-color: var(--wp--preset--color--accent-alt);
	color: #ffffff;
}

.empty-slot__label {
	display: inline-block;
	margin-bottom: 0.5rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.section--navy .empty-slot__label,
.section--midnight .empty-slot__label {
	color: var(--wp--preset--color--accent-alt);
}

.empty-slot__body {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

/* -------------------------------------------------------------------------
 * Cards and grids.
 * ---------------------------------------------------------------------- */

.entry-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.entry-grid--three {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.entry-grid--list {
	grid-template-columns: 1fr;
}

.entry-card {
	display: flex;
	flex-direction: column;
	background: var(--wn-panel);
	border: 1px solid var(--wn-line);
	border-radius: var(--wn-radius);
	overflow: hidden;
	transition: border-color var(--wn-transition), box-shadow var(--wn-transition), transform var(--wn-transition);
}

.entry-card:hover {
	border-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--preset--shadow--raised);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.entry-card:hover {
		transform: none;
	}
}

.entry-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	flex: 1;
}

.entry-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.02em;
}

.entry-card__title a {
	color: var(--wn-ink);
	text-decoration: none;
}

.entry-card__title a:hover {
	color: var(--wn-link);
	text-decoration: underline;
}

.entry-card__eyebrow {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wn-link);
}

.entry-card__excerpt,
.entry-card__summary {
	margin: 0;
	color: var(--wn-ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.entry-card__excerpt p {
	margin: 0;
}

.entry-card__more {
	margin-top: auto;
	align-self: flex-start;
	color: var(--wn-link);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.entry-card__more::after {
	content: " \2192";
	transition: transform var(--wn-transition-fast);
	display: inline-block;
}

.entry-card__more:hover {
	text-decoration: underline;
}

.entry-card__more:hover::after {
	transform: translateX(3px);
}

.entry-card__url {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: var(--wn-ink-muted);
	word-break: break-all;
}

.entry-card__duration {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wn-ink-muted);
}

/*
 * Editor-only approval chip on case-study cards. Never rendered for visitors,
 * so it carries no public meaning and needs no legend.
 */
.entry-card__approval {
	align-self: flex-start;
	margin: 0;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.entry-card__approval.is-approved {
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
}

.entry-card__approval.is-pending {
	background: var(--wn-panel-alt);
	color: var(--wn-ink-muted);
	border: 1px dashed var(--wn-line);
}

.entry-card__duration-label {
	display: block;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wn-ink);
}

.entry-card__media,
.entry__media {
	margin: 0;
	display: block;
	background: var(--wn-panel-alt);
}

.entry__image,
.entry-card__image {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.entry--single .entry__image {
	aspect-ratio: 16 / 9;
	border-radius: var(--wn-radius);
}

.entry-card__facts,
.entry-card__stats,
.service-facts,
.advisory-identifiers {
	display: grid;
	gap: 0.5rem 1.5rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
}

.entry-card__facts dt,
.entry-card__stats dt,
.service-facts dt,
.advisory-identifiers dt {
	margin: 0;
	color: var(--wn-ink-muted);
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.entry-card__facts dd,
.entry-card__stats dd,
.service-facts dd,
.advisory-identifiers dd {
	margin: 0;
	color: var(--wn-ink);
}

.entry-card--advisory {
	display: grid;
	grid-template-columns: 4px 1fr;
}

.entry-card--advisory .entry-card__rail {
	background: var(--wn-severity, var(--wp--preset--color--border));
}

/* Service cards on the archive get a subtle numbered rail. */
.entry-card--service .entry-card__body {
	gap: 0.875rem;
}

/* -------------------------------------------------------------------------
 * Severity treatment.
 * ---------------------------------------------------------------------- */

.severity-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.2rem 0.6rem;
	border: 1px solid color-mix(in srgb, var(--wn-severity, currentcolor) 35%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--wn-severity, currentcolor) 10%, transparent);
	color: var(--wn-severity, currentcolor);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.04em;
}

.severity-badge__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentcolor;
	flex: none;
}

.severity-badge__score {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 700;
}

.is-critical { --wn-severity: var(--wn-critical); }
.is-high { --wn-severity: var(--wn-high); }
.is-medium { --wn-severity: var(--wn-medium); }
.is-low { --wn-severity: var(--wn-low); }
.is-info { --wn-severity: var(--wn-info); }

.severity-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.severity-legend__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.severity-legend__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wn-severity, currentcolor);
	flex: none;
}

.severity-legend__label {
	font-weight: 650;
	color: var(--wp--preset--color--contrast);
}

.severity-legend__range {
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--muted);
}

/* -------------------------------------------------------------------------
 * Single entry.
 * ---------------------------------------------------------------------- */

.entry {
	max-width: var(--wp--custom--max-reading-width);
}

.entry--service,
.entry--front {
	max-width: none;
}

.entry__header {
	margin-bottom: 2rem;
}

.entry__title {
	margin: 0;
	letter-spacing: -0.03em;
}

.entry__standfirst {
	max-width: 56ch;
	margin: 1rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: 1.25rem;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.entry__meta > * {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
}

.entry__meta > * + *::before {
	content: "";
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--wp--preset--color--border);
	margin-inline-end: 0.375rem;
}

.entry__media {
	margin-block: 2rem;
}

.entry__content > * {
	margin-block: 0 1.25em;
}

.entry__content > :last-child {
	margin-bottom: 0;
}

.entry__content h2 {
	margin-top: 2.5em;
}

.entry__content h3 {
	margin-top: 2em;
}

.entry__content ul,
.entry__content ol {
	padding-inline-start: 1.5rem;
}

.entry__content li + li {
	margin-top: 0.4em;
}

.entry__content :is(.alignwide, .alignfull) {
	max-width: none;
}

.entry__footer {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--border);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

/* Service detail extras. */
.service-facts {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 1.25rem;
	margin-block: 2rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
}

.service-facts__row dt {
	margin-bottom: 0.25rem;
}

.service-facts__row dd {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}

.service-deliverables,
.service-children {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.service-deliverables__title,
.service-children__title {
	font-size: var(--wp--preset--font-size--large);
}

.service-deliverables ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.service-deliverables li {
	position: relative;
	padding-inline-start: 1.75rem;
	color: var(--wp--preset--color--muted);
}

.service-deliverables li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.55em;
	width: 9px;
	height: 5px;
	border-inline-start: 2px solid var(--wp--preset--color--accent);
	border-block-end: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

.service-children__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.service-children__list a {
	display: inline-block;
	padding: 0.4rem 0.85rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.service-children__list a:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* Advisory extras. */
.advisory-identifiers {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 1rem;
	margin-block: 2rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
}

/* Each row is a <div> wrapping dt/dd, so it becomes the grid item. */
.advisory-identifiers__row,
.service-facts__row {
	min-width: 0;
}

.advisory-identifiers code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	word-break: break-all;
}

.disclosure-timeline {
	margin-top: 3rem;
}

.disclosure-timeline__title {
	font-size: var(--wp--preset--font-size--large);
}

.disclosure-timeline ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}

.disclosure-timeline li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	padding: 0.875rem 0 0.875rem 1.75rem;
	border-inline-start: 2px solid var(--wp--preset--color--border);
}

.disclosure-timeline li::before {
	content: "";
	position: absolute;
	inset-inline-start: -5px;
	top: 1.25rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

.disclosure-timeline time {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	min-width: 8rem;
}

/* Post navigation. */
.post-nav {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.post-nav .nav-links {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.post-nav a {
	display: block;
	padding: 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
	text-decoration: none;
}

.post-nav a:hover {
	border-color: var(--wp--preset--color--accent);
}

.post-nav__label {
	display: block;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.post-nav__title {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Team grid (About).
 * ---------------------------------------------------------------------- */

.team-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.team-card {
	padding: 1.5rem;
	background: var(--wn-panel-alt);
	border: 1px solid var(--wn-line);
	border-radius: var(--wn-radius);
}

.team-card__image {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1rem;
}

.team-card__name {
	margin: 0 0 0.25rem;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 650;
	color: var(--wn-ink);
}

.team-card__role {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wn-link);
}

.team-card__bio {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wn-ink-muted);
	line-height: 1.6;
}

/* -------------------------------------------------------------------------
 * Term pills.
 * ---------------------------------------------------------------------- */

.term-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.term-pill {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	background: var(--wn-panel-alt);
	border: 1px solid var(--wn-line);
	border-radius: 999px;
	color: var(--wn-ink-muted);
	font-size: 0.75rem;
	text-decoration: none;
	transition: border-color var(--wn-transition-fast), color var(--wn-transition-fast);
}

.term-pill:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
 * Front page sections and CTA.
 * ---------------------------------------------------------------------- */

.front-section {
	margin-block: clamp(3rem, 2rem + 4vw, 5rem);
}

.front-section__header {
	max-width: 62ch;
	margin-bottom: 2.5rem;
}

.front-section__title {
	margin: 0;
}

.front-section__more {
	margin-top: 2.5rem;
}

.cta-band {
	background: var(--wp--preset--color--contrast);
	color: #ffffff;
	position: relative;
	overflow: hidden;
}

.cta-band::before {
	content: "";
	position: absolute;
	inset-block-start: -50%;
	inset-inline-start: 50%;
	width: 620px;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(11, 92, 255, 0.26) 0%, transparent 62%);
	pointer-events: none;
}

.cta-band__inner {
	position: relative;
	z-index: 1;
	max-width: var(--wn-shell);
	margin-inline: auto;
	padding: clamp(3rem, 2rem + 4vw, 5rem) var(--wn-gutter);
	text-align: center;
}

.cta-band__heading {
	max-width: 24ch;
	margin: 0 auto;
	color: #ffffff;
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: -0.028em;
}

.cta-band__body {
	max-width: 56ch;
	margin: 1.25rem auto 0;
	color: #c3d1e3;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.cta-band__body a {
	color: var(--wp--preset--color--accent-alt);
}

.cta-band__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	justify-content: center;
	margin-top: 2.5rem;
}

.cta-band__action {
	margin-top: 2.5rem;
}

.cta-band__actions .cta-band__action {
	margin-top: 0;
}

.cta-band__note {
	margin: 1.75rem 0 0;
	color: #9fb0c7;
	font-size: var(--wp--preset--font-size--x-small);
}

/* -------------------------------------------------------------------------
 * Contact.
 * ---------------------------------------------------------------------- */

.contact-layout {
	display: grid;
	gap: clamp(2rem, 1rem + 4vw, 4rem);
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	align-items: start;
}

@media (max-width: 880px) {
	.contact-layout {
		grid-template-columns: 1fr;
	}
}

.contact-intro {
	margin-bottom: clamp(2rem, 1.5rem + 1vw, 2.5rem);
}

.contact-aside {
	display: grid;
	gap: 1.5rem;
	padding: clamp(1.5rem, 1rem + 1.5vw, 2rem);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
}

.contact-aside h2 {
	font-size: var(--wp--preset--font-size--medium);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 700;
}

.contact-aside dl {
	display: grid;
	gap: 1rem;
	margin: 0;
}

.contact-aside dt {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.contact-aside dd {
	margin: 0.2rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

/* Form primitives. */
.contact-form {
	display: grid;
	gap: 1.5rem;
}

.form-row {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.form-label .form-required {
	color: var(--wp--preset--color--critical);
	margin-inline-start: 0.15rem;
}

.form-hint {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.form-input,
.form-textarea,
.form-select {
	width: 100%;
	padding: 0.75rem 0.875rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
	transition: border-color var(--wn-transition-fast), box-shadow var(--wn-transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--preset--shadow--focus);
}

.form-textarea {
	min-height: 9rem;
	resize: vertical;
}

.form-field.has-error .form-input,
.form-field.has-error .form-textarea,
.form-field.has-error .form-select {
	border-color: var(--wp--preset--color--critical);
}

.form-error {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	color: var(--wp--preset--color--critical);
}

.form-notice {
	padding: 1rem 1.25rem;
	border-radius: var(--wn-radius-sm);
	border: 1px solid;
	font-size: var(--wp--preset--font-size--small);
}

.form-notice--success {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--contrast);
}

.form-notice--error {
	border-color: var(--wp--preset--color--critical);
	background: color-mix(in srgb, var(--wp--preset--color--critical) 8%, transparent);
	color: var(--wp--preset--color--contrast);
}

.form-consent {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.form-consent input {
	margin-top: 0.3rem;
	flex: none;
	width: 1rem;
	height: 1rem;
	accent-color: var(--wp--preset--color--accent);
}

/*
 * Honeypot. Must be reachable by assistive technology as a labelled field it
 * is told to ignore, never `display: none` with no explanation, so a screen
 * reader user is not silently failed by a trap they cannot perceive.
 */
.form-trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

/* -------------------------------------------------------------------------
 * Search form, pagination, comments.
 * ---------------------------------------------------------------------- */

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 30rem;
}

.search-form__field {
	flex: 1;
	padding: 0.7rem 0.875rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
}

.search-form__field:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--preset--shadow--focus);
}

.search-form__label {
	display: contents;
}

.search-form__submit {
	flex: none;
	padding: 0.7em 1.25em;
}

.pagination {
	margin-top: 3rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.6rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.pagination .page-numbers:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.pagination .page-numbers.current {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: #ffffff;
	font-weight: 650;
}

.pagination .dots {
	border: 0;
}

.comments {
	max-width: var(--wp--custom--max-reading-width);
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.comments__title {
	font-size: var(--wp--preset--font-size--large);
}

.comments__list,
.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comments__list li,
.comment-list li {
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.comments__list .children,
.comment-list .children {
	list-style: none;
	margin: 1.5rem 0 0;
	padding-inline-start: 1.5rem;
	border-inline-start: 2px solid var(--wp--preset--color--border);
}

.comments__closed {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.comment-form__notes {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.75rem;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.comment-form {
	display: grid;
	gap: 1.25rem;
	margin-top: 2rem;
}

.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 0.875rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
}

.comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Footer.
 * ---------------------------------------------------------------------- */

.site-footer {
	margin-top: auto;
	background: var(--wp--preset--color--navy-deep);
	color: #ffffff;
	border-top: 1px solid #16273f;
}

.site-footer a {
	color: #c3d1e3;
	text-decoration: none;
}

.site-footer a:hover {
	color: #ffffff;
	text-decoration: underline;
}

.site-footer__widgets,
.site-footer__inner {
	max-width: var(--wn-shell);
	margin-inline: auto;
	padding: clamp(2.5rem, 2rem + 2vw, 4rem) var(--wn-gutter);
	display: grid;
	gap: 2.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.site-footer__widgets {
	padding-bottom: 0;
}

.site-footer__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: #ffffff;
}

.site-footer__tagline {
	margin: 0.5rem 0 0;
	color: #9fb0c7;
	font-size: var(--wp--preset--font-size--small);
	max-width: 34ch;
}

.site-footer__heading,
.widget__title {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffffff;
}

.site-footer__disclosure p {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--small);
}

.footer-menu,
.legal-menu {
	flex-direction: column;
	gap: 0.5rem;
}

.footer-menu a,
.legal-menu a {
	font-size: var(--wp--preset--font-size--small);
}

.site-footer__legal {
	max-width: var(--wn-shell);
	margin-inline: auto;
	padding: 1.5rem var(--wn-gutter) 2.5rem;
	border-top: 1px solid #16273f;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	align-items: center;
	justify-content: space-between;
}

.site-footer__copyright,
.site-footer__note {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: #9fb0c7;
}

.legal-navigation .legal-menu {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.legal-menu a {
	font-size: var(--wp--preset--font-size--x-small);
}

.widget {
	font-size: var(--wp--preset--font-size--small);
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

/* -------------------------------------------------------------------------
 * Sidebar.
 * ---------------------------------------------------------------------- */

.sidebar {
	max-width: var(--wn-shell);
	margin-inline: auto;
	margin-bottom: 4rem;
	padding-inline: var(--wn-gutter);
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* Widget titles are white in the footer; in the sidebar they sit on white. */
.sidebar .widget__title {
	color: var(--wp--preset--color--contrast);
}

.sidebar a {
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
 * Back to top.
 * ---------------------------------------------------------------------- */

.to-top {
	position: fixed;
	inset-block-end: 1.5rem;
	inset-inline-end: 1.5rem;
	z-index: 90;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--contrast);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	box-shadow: var(--wp--preset--shadow--raised);
	cursor: pointer;
	transition: background-color var(--wn-transition-fast), transform var(--wn-transition-fast),
		opacity var(--wn-transition), visibility var(--wn-transition);
	/*
	 * app.js unhides the button immediately and then toggles `is-visible` once
	 * the visitor has scrolled a viewport. Without the opacity pair below the
	 * control would sit on the first screen, over the hero, from load.
	 */
	opacity: 0;
	visibility: hidden;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

.to-top:hover {
	background: var(--wp--preset--color--accent);
	transform: translateY(-2px);
}

/* No-JS: the control cannot work, so it stays out of the layout entirely. */
.to-top[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.to-top:hover {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
 * Reveal-on-scroll, driven by assets/js/app.js.
 * ---------------------------------------------------------------------- */

/*
 * The restrained animation the brief asks for: an 8px rise and a fade, once,
 * on entry. Nothing loops, nothing parallaxes, nothing moves on scroll after
 * the element has landed. The `.js` guard means no-JS visitors see content at
 * its final opacity rather than an invisible page.
 */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.js [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

/* Stagger children a little, capped so a long list never crawls in. */
.js [data-reveal-stagger] > * {
	transition-delay: calc(var(--wn-reveal-index, 0) * 60ms);
}

/* -------------------------------------------------------------------------
 * Block style variations registered in inc/blocks.php.
 * ---------------------------------------------------------------------- */

.is-style-panel {
	padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	background: var(--wn-panel-alt, var(--wp--preset--color--surface));
	border: 1px solid var(--wn-line, var(--wp--preset--color--border));
	border-radius: var(--wn-radius);
}

.is-style-terminal {
	padding: clamp(1.25rem, 1rem + 1vw, 2rem);
	background: var(--wp--preset--color--navy-deep);
	border: 1px solid #16273f;
	border-radius: var(--wn-radius);
	color: #e8eef5;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
}

.is-style-terminal :is(h1, h2, h3, h4, p, li, code) {
	color: inherit;
}

.wp-block-button.is-style-ghost .wp-block-button__link,
.button.is-style-ghost {
	background: transparent;
	border: 1px solid var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover,
.button.is-style-ghost:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: #ffffff;
}

.is-style-checklist {
	list-style: none;
	padding-inline-start: 0;
}

.is-style-checklist li {
	position: relative;
	padding-inline-start: 1.75rem;
}

.is-style-checklist li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.55em;
	width: 9px;
	height: 5px;
	border-inline-start: 2px solid var(--wp--preset--color--accent);
	border-block-end: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

.is-style-scanline {
	border: 0;
	height: 1px;
	background: linear-gradient(
		to right,
		var(--wp--preset--color--accent) 0%,
		var(--wp--preset--color--border) 40%,
		transparent 100%
	);
}

.is-style-findings table {
	width: 100%;
	border-collapse: collapse;
}

.is-style-findings :is(th, td) {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: start;
	vertical-align: top;
}

.is-style-findings th {
	background: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.is-style-findings tbody tr:hover {
	background: var(--wp--preset--color--surface);
}

/*
 * Testimonial styling only. The theme ships no testimonial content: a quote
 * attributed to a client is a factual claim about a real company, so it has to
 * come from the editor with sign-off, never from a theme default.
 */
.is-style-testimonial {
	border: 0;
	padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	background: var(--wn-panel-alt, var(--wp--preset--color--surface));
	border-radius: var(--wn-radius);
}

.is-style-testimonial p {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	letter-spacing: -0.015em;
}

.is-style-testimonial cite {
	display: block;
	margin-top: 1rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* -------------------------------------------------------------------------
 * Copy-to-clipboard button, injected by assets/js/app.js.
 * ---------------------------------------------------------------------- */

.copy-button {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.6rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	color: var(--wp--preset--color--muted);
	font-family: inherit;
	font-size: 0.75rem;
	cursor: pointer;
}

.copy-button:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.copy-button.is-copied {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
 * Advisory and case-study detail components.
 * ---------------------------------------------------------------------- */

.entry__header--advisory {
	display: grid;
	gap: 1rem;
}

.entry__eyebrow {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.advisory-remediation,
.case-study-outcome {
	margin-top: 3rem;
	padding: clamp(1.25rem, 1rem + 1vw, 2rem);
	background: var(--wp--preset--color--accent-soft);
	border-inline-start: 3px solid var(--wp--preset--color--accent);
	border-radius: 0 var(--wn-radius) var(--wn-radius) 0;
}

.advisory-remediation__title,
.case-study-outcome__title {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--large);
}

.advisory-remediation :last-child,
.case-study-outcome :last-child {
	margin-bottom: 0;
}

.case-study-stats {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
	margin-block: 2rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
}

.case-study-stats__item {
	display: flex;
	flex-direction: column-reverse;
	gap: 0.25rem;
	min-width: 0;
}

/*
 * Figure above label visually, label first in the DOM.
 *
 * `column-reverse` on the item gives the number visual prominence while the
 * source order keeps the label as the accessible name that precedes its value,
 * so a screen reader reads "Findings, 14" rather than "14, Findings".
 */
.case-study-stats__figure {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--wp--preset--color--contrast);
	font-variant-numeric: tabular-nums;
}

.case-study-stats__item dt,
.case-study-stats__item > span:not(.case-study-stats__figure) {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/*
 * Engagement disclaimer. Small, muted, but never hidden: it is the line that
 * makes clear what an anonymised write-up does and does not claim.
 */
.entry__disclaimer {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	max-width: 68ch;
}

/* -------------------------------------------------------------------------
 * Empty states and errors.
 * ---------------------------------------------------------------------- */

.no-results {
	max-width: 54ch;
	padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius);
}

.no-results__title {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--large);
}

.no-results :last-child {
	margin-bottom: 0;
}

.error-404 {
	max-width: 56ch;
	margin-inline: auto;
	padding-block: clamp(2rem, 1rem + 4vw, 5rem);
	text-align: center;
}

.error-404__code {
	display: block;
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--accent);
}

.error-404__title {
	margin: 0 0 1rem;
}

.error-404__body {
	margin: 0 0 2rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
}

/* Paginated single posts (<!--nextpage-->). */
.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	margin-top: 2.5rem;
	font-size: var(--wp--preset--font-size--small);
}

.page-links a,
.page-links > span:not(.screen-reader-text) {
	display: inline-grid;
	place-items: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding-inline: 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wn-radius-sm);
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.page-links a:hover {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
 * Reduced motion and forced colours.
 * ---------------------------------------------------------------------- */

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

	/*
	 * Reveal-on-scroll must not leave content invisible when its transition is
	 * cancelled, so the initial state is dropped entirely rather than sped up.
	 */
	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}

@media (forced-colors: active) {
	.entry-card,
	.coverage-card,
	.deliverable,
	.team-card,
	.is-style-panel {
		border: 1px solid CanvasText;
	}

	.hero__grid,
	.hero__glow,
	.cta-band::before {
		display: none;
	}

	.severity-badge {
		border: 1px solid CanvasText;
		background: Canvas;
		color: CanvasText;
	}

	.button {
		border: 1px solid ButtonText;
	}
}

/* -------------------------------------------------------------------------
 * Print. A report-shaped page should print like one.
 * ---------------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.to-top,
	.cta-band,
	.nav-trigger,
	.pagination,
	.post-nav,
	.empty-slot {
		display: none;
	}

	body {
		background: #ffffff;
		color: #000000;
		font-size: 11pt;
	}

	.site-main {
		max-width: none;
		padding: 0;
	}

	a {
		color: #000000;
		text-decoration: underline;
	}

	.entry__content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		word-break: break-all;
	}
}
