/*
Theme Name: Networking Circle
Theme URI: https://ntdigital.co.nz
Author: NT Digital
Description: The theme for Networking Circle: a network of capped, facilitator-led business networking groups. Pairs with the AI Network Portal plugin for Circles, membership and sessions.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ainet
Tags: business, membership, one-column, custom-colors, custom-menu, editor-style
*/

/* ==========================================================================
   Tokens
   Palette is pounamu (greenstone) + kōwhai (gold): grounded in NZ rather
   than the usual black-and-neon "AI" default.
   ========================================================================== */

:root {
	--ink: #10201d;
	--pounamu: #14524a;
	--tide: #3c8c7e;
	--kowhai: #efb03a;
	--clay: #a34a38;
	--mist: #eaeeea;
	--paper: #fbfcfa;
	--muted: #5c6b66;
	--line: rgba(16, 32, 29, 0.14);

	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--header-h: 4.9rem;
	--wrap: 68rem;
	--wrap-narrow: 44rem;
	--gap: clamp(3rem, 7vw, 6rem);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	overflow-wrap: break-word;
	-webkit-tap-highlight-color: transparent;
}

/* Stop the sticky header covering anchor targets. */
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Long words, URLs and emails should never force a sideways scroll. */
h1, h2, h3, h4, p, li, dd, a { overflow-wrap: break-word; }

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--pounamu); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--kowhai); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.015em;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1.15em; }

.wrap,
.wrap-narrow {
	width: 100%;
	margin-inline: auto;
	padding-inline: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
}
.wrap { max-width: calc(var(--wrap) + 2.5rem); }
.wrap-narrow { max-width: calc(var(--wrap-narrow) + 2.5rem); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	background: var(--ink);
	color: #fff;
	padding: 0.7rem 1.2rem;
	z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Shared utility labels */
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 0.9rem;
}

.lede { font-size: 1.2rem; line-height: 1.6; color: var(--muted); }

.section { padding-block: var(--gap); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--mist); }
.section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink .eyebrow { color: var(--kowhai); }
/* Exclude buttons: .section--ink a would otherwise outrank .btn--gold and
   paint the label gold on a gold background. */
.section--ink a:not(.btn) { color: var(--kowhai); }

.section__head { max-width: 44rem; margin-bottom: 2.6rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.7rem;
	border: 1px solid var(--pounamu);
	border-radius: 2px;
	background: var(--pounamu);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:active { transform: translateY(1px); }

.btn--gold { background: var(--kowhai); border-color: var(--kowhai); color: var(--ink); }
.btn--gold:hover { background: #d99b26; border-color: #d99b26; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--pounamu); }
.btn--ghost:hover { background: var(--pounamu); color: #fff; }

.section--ink .btn { color: #fff; }
.section--ink .btn--gold { color: var(--ink); }
.section--ink .btn--ghost { background: transparent; color: var(--mist); border-color: rgba(234, 238, 234, 0.45); }
.section--ink .btn--ghost:hover { background: var(--mist); color: var(--ink); border-color: var(--mist); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(251, 252, 250, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-block: 0.85rem;
	min-height: var(--header-h);
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	color: var(--ink);
	min-width: 0;
}

.brand__mark { flex: none; }

/* An uploaded logo is capped by height, never by width, so any file
   lands at the same optical scale whatever its dimensions. */
.custom-logo-link {
	display: flex;
	align-items: center;
	line-height: 0;
}

.custom-logo {
	height: auto;
	max-height: 54px;
	width: auto;
	max-width: min(300px, 48vw);
	object-fit: contain;
}

.brand__text { min-width: 0; }

.brand__name {
	display: block;
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: -0.022em;
	line-height: 1.05;
	white-space: nowrap;
}

.brand__tag {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.6rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 0.28rem;
	white-space: nowrap;
}


.nav { display: flex; align-items: center; gap: 1.5rem; margin-left: 1.5rem; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a {
	font-family: var(--font-mono);
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
}
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); }

/* Account actions: always visible, never inside the menu panel */
.header-actions {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-left: auto;
}

.account-link {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	white-space: nowrap;
	border-bottom: 1px solid var(--line);
	padding-bottom: 2px;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.account-link:hover { color: var(--pounamu); border-bottom-color: var(--pounamu); }

.btn { white-space: nowrap; }
.btn--compact { padding: 0.62rem 1.15rem; font-size: 0.72rem; }
.btn__short { display: none; }

.header-actions__avatar { border-radius: 50%; }

/* The account block inside the menu panel is hidden until the panel exists */
.nav__account { display: none; }

.nav-toggle__bars {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 16px;
}
.nav-toggle__bars span {
	display: block;
	height: 1.5px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-toggle {
	display: none;
	gap: 0.55rem;
	background: none;
	border: 1px solid var(--line);
	border-radius: 2px;
	padding: 0.5rem 0.75rem;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	color: var(--ink);
}

/* ==========================================================================
   Hero: the weave is the signature element
   ========================================================================== */

.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; }

.hero__grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.hero__title { margin-bottom: 0.5em; }
.hero__title em {
	font-style: normal;
	color: var(--pounamu);
	position: relative;
	white-space: nowrap;
}
.hero__title em::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0.06em;
	height: 0.28em;
	background: var(--kowhai);
	opacity: 0.42;
	z-index: -1;
}

.hero__lede { font-size: clamp(1.05rem, 1.9vw, 1.28rem); color: var(--muted); max-width: 32rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.hero__strip {
	margin-top: 2.6rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	gap: 1.6rem;
}
.hero__stat { min-width: 8rem; }
.hero__stat dt {
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 0.25rem;
}
.hero__stat dd { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }

/* The weave */
.weave { width: 100%; max-width: 30rem; margin-inline: auto; }
.weave-thread {
	stroke-dasharray: 480;
	stroke-dashoffset: 480;
	animation: weave-in 1.6s ease forwards;
}
.weave-thread:nth-of-type(2) { animation-delay: 0.12s; }
.weave-thread:nth-of-type(3) { animation-delay: 0.24s; }
.weave-thread:nth-of-type(4) { animation-delay: 0.36s; }
.weave-thread:nth-of-type(5) { animation-delay: 0.48s; }
.weave-thread:nth-of-type(6) { animation-delay: 0.6s; }

.weave-node { opacity: 0; animation: node-in 0.5s ease forwards; }
.weave-node:nth-of-type(1) { animation-delay: 0.9s; }
.weave-node:nth-of-type(2) { animation-delay: 1.05s; }
.weave-node:nth-of-type(3) { animation-delay: 1.2s; }
.weave-node:nth-of-type(4) { animation-delay: 1.35s; }

.weave-label {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	fill: var(--ink);
}

@keyframes weave-in { to { stroke-dashoffset: 0; } }
@keyframes node-in { to { opacity: 1; } }

/* ==========================================================================
   The room / categories
   ========================================================================== */

.room__note {
	margin-top: 2.4rem;
	padding: 1.3rem 1.5rem;
	border-left: 3px solid var(--kowhai);
	background: rgba(239, 176, 58, 0.1);
	font-size: 0.98rem;
}
.room__note p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Agenda: a genuine sequence, so the timings carry information
   ========================================================================== */

.agenda { list-style: none; margin: 0; padding: 0; max-width: 46rem; }

.agenda li {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 1.4rem;
	padding: 1.15rem 0;
	border-bottom: 1px solid rgba(234, 238, 234, 0.18);
	align-items: baseline;
}
.section--ink .agenda li:last-child { border-bottom: 0; }

.agenda__time {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--kowhai);
	letter-spacing: 0.04em;
}
.agenda__what strong { display: block; font-size: 1.08rem; margin-bottom: 0.15rem; font-weight: 600; }
.agenda__what span { color: rgba(234, 238, 234, 0.72); font-size: 0.94rem; }

.agenda__total {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--kowhai);
	margin-top: 1.6rem;
}

/* ==========================================================================
   Honest exclusion block
   ========================================================================== */

.notfor { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem; }
.notfor li {
	list-style: none;
	padding: 1.1rem 1.2rem 1.1rem 2.4rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 3px;
	position: relative;
	font-size: 0.96rem;
}
.notfor li::before {
	content: "×";
	position: absolute;
	left: 1rem;
	top: 1rem;
	color: var(--clay);
	font-size: 1.2rem;
	line-height: 1;
}
.notfor { padding: 0; margin: 0; }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta { text-align: center; }
.cta h2 { max-width: 24ch; margin-inline: auto; }
.cta .lede { max-width: 40rem; margin-inline: auto; }
.cta__actions { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* ==========================================================================
   Content pages, posts, sessions
   ========================================================================== */

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.page-head h1 { margin-bottom: 0.3em; }

.entry-content { padding-bottom: var(--gap); }
.entry-content > * { max-width: var(--wrap-narrow); margin-inline: auto; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content table th,
.entry-content table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content > .alignwide, .entry-content > .alignfull { max-width: none; }
.entry-content h2 { margin-top: 2em; }
.entry-content blockquote {
	border-left: 3px solid var(--kowhai);
	padding-left: 1.4rem;
	margin-left: 0;
	font-family: var(--font-display);
	font-size: 1.2rem;
}
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--mist);
	padding: 0.15em 0.4em;
	border-radius: 2px;
}
.entry-content pre {
	background: var(--ink);
	color: var(--mist);
	padding: 1.2rem;
	border-radius: 3px;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.88rem;
}
.entry-content img { border-radius: 3px; }

.post-list { display: grid; gap: 1.6rem; padding-bottom: var(--gap); }
.post-card { padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.post-card h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.post-card h2 a { text-decoration: none; color: inherit; }
.post-card h2 a:hover { color: var(--pounamu); }
.post-card__meta { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }

.session-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 1.2rem;
	padding: 1.4rem 1.6rem;
	background: var(--mist);
	border-radius: 3px;
	margin-bottom: 2rem;
	max-width: var(--wrap-narrow);
	margin-inline: auto;
}
.session-facts dt {
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 0.2rem;
}
.session-facts dd { margin: 0; font-weight: 600; }

.pagination { display: flex; gap: 0.5rem; padding-bottom: var(--gap); font-family: var(--font-mono); font-size: 0.8rem; }
.pagination .page-numbers {
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 2px;
	text-decoration: none;
}
.pagination .current { background: var(--pounamu); color: #fff; border-color: var(--pounamu); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--ink);
	color: rgba(234, 238, 234, 0.75);
	padding-block: 3.5rem 2rem;
	font-size: 0.92rem;
}
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--kowhai); }

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
}
.site-footer__grid--4 {
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(234, 238, 234, 0.14);
}
.site-footer h4 {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--kowhai);
	margin-bottom: 0.9rem;
	font-weight: 400;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer__brand .brand__name { color: var(--paper); }

.site-footer__logo {
	height: auto;
	max-height: 54px;
	width: auto;
	max-width: 260px;
	margin-bottom: 0.9rem;
}
.site-footer__brand p { color: rgba(234, 238, 234, 0.6); max-width: 24rem; }
.social {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 1.3rem 0 0;
	padding: 0;
}

.social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(234, 238, 234, 0.22);
	border-radius: 50%;
	color: var(--mist);
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.social__link svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

.social__link:hover,
.social__link:focus-visible {
	background: var(--kowhai);
	border-color: var(--kowhai);
	color: var(--ink);
}

.site-footer__entity {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	color: rgba(234, 238, 234, 0.5);
	margin-top: 0.9rem;
	margin-bottom: 0;
}
.site-footer__base {
	padding-top: 1.5rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	color: rgba(234, 238, 234, 0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
	.site-footer__grid--4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.nav { gap: 1.1rem; margin-left: 1.1rem; }
	.header-actions { gap: 0.7rem; }
}

@media (max-width: 900px) {
	.hero__grid { grid-template-columns: 1fr; }
	/* Headline leads on narrow screens; the weave follows the argument. */
	.weave { max-width: 26rem; margin-top: 2.5rem; }
	.weave-label { font-size: 14px; }
}

/* ---- Tablet and phone ---- */
@media (max-width: 900px) {
	.custom-logo { max-height: 48px; max-width: min(260px, 46vw); }
	:root { --gap: clamp(2.75rem, 9vw, 4rem); }

	.site-header__inner { position: relative; padding-block: 0.7rem; }

	.nav-toggle {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0.5rem 0.85rem;
		margin-left: 0.6rem;
	}
	.nav-toggle__text { display: none; }
	.nav-toggle { padding-inline: 0.75rem; }

	/* Join stays in the bar; log in moves into the panel where there is room. */
	.header-actions { gap: 0.75rem; margin-left: auto; }
	.header-actions .account-link { display: none; }
	.btn--compact { min-height: 44px; padding: 0.55rem 1.05rem; }

	.nav { margin-left: 0; }
	.nav__account {
		display: flex;
		flex-direction: column;
		gap: 0.9rem;
		margin-top: 1.2rem;
		padding-top: 1.2rem;
		border-top: 1px solid var(--line);
	}
	.nav__account .btn { justify-content: center; min-height: 50px; }
	.nav__account .account-link {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 46px;
		border-bottom: 0;
		font-size: 0.8rem;
	}

	.nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 12px 24px rgba(16, 32, 29, 0.09);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.25rem 1.25rem 1.5rem;
		max-height: calc(100svh - var(--header-h));
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.nav.is-open { display: flex; }
	.nav ul { flex-direction: column; gap: 0; }
	.nav li { border-bottom: 1px solid var(--line); }
	.nav a {
		display: flex;
		align-items: center;
		min-height: 52px;
		font-size: 0.88rem;
	}
	.nav .btn { margin-top: 1.1rem; justify-content: center; min-height: 50px; }

	/* Touch targets */
	.btn { min-height: 48px; padding-inline: 1.4rem; }

	.hero { padding-block: 2.5rem 3rem; }
	.hero__actions { gap: 0.7rem; }
	.hero__actions .btn { flex: 1 1 14rem; justify-content: center; }
	.hero__strip { gap: 1rem 1.4rem; margin-top: 2rem; }
	.hero__stat { min-width: 7rem; flex: 1 1 7rem; }

	.section__head { margin-bottom: 2rem; }

	.agenda li { grid-template-columns: 1fr; gap: 0.2rem; padding: 0.95rem 0; }
	.agenda__time { color: var(--kowhai); }

	.session-facts { padding: 1.1rem 1.2rem; gap: 1rem; }

	.site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
	.site-footer { padding-block: 2.75rem 1.5rem; }
	.site-footer__logo { max-height: 46px; }
	.auth-logo__img { max-height: 50px; }
	.social { margin-top: 1.1rem; }
	.social__link { width: 44px; height: 44px; }
	.site-footer a { display: inline-flex; align-items: center; min-height: 40px; }
	.site-footer__base { flex-direction: column; gap: 0.4rem; }

	.pagination { flex-wrap: wrap; }
	.pagination .page-numbers {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Wide tables scroll rather than breaking the layout */
	.entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
	body { font-size: 1rem; }

	h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
	h2 { font-size: clamp(1.55rem, 7vw, 2rem); }

	/* The strapline stays: it is short enough to hold one line. */
	.brand__mark { width: 26px; height: 26px; }
	.custom-logo { max-height: 46px; max-width: min(230px, 54vw); }
	.brand__name { font-size: 1.06rem; }
	.brand__tag { font-size: 0.55rem; letter-spacing: 0.13em; margin-top: 0.22rem; }
	.brand { gap: 0.55rem; }

	.header-actions { gap: 0.45rem; }
	.header-actions__avatar { display: none; }

	.hero { padding-block: 2rem 2.5rem; }
	.hero__lede { font-size: 1.02rem; }
	.hero__actions .btn { flex: 1 1 100%; }

	.weave { max-width: 100%; margin-top: 2rem; }
	.weave-label { font-size: 17px; }

	.page-head { padding-block: 2rem 1.2rem; }

	.notfor li { padding: 1rem 1rem 1rem 2.2rem; }
	.notfor li::before { top: 0.9rem; left: 0.85rem; }

	.cta__actions .btn { flex: 1 1 100%; justify-content: center; }
	.entry-content blockquote { padding-left: 1rem; font-size: 1.08rem; }
	.entry-content pre { padding: 0.9rem; font-size: 0.8rem; }
}

/* Below this width the full button label would push the brand off the row. */
@media (max-width: 560px) {
	.header-actions .btn__full { display: none; }
	.header-actions .btn__short { display: inline; }
	.header-actions .btn--compact { padding-inline: 1rem; letter-spacing: 0.07em; }
}

/* Narrow phones: step the logo down before it crowds the join button. */
@media (max-width: 400px) {
	.custom-logo { max-height: 42px; max-width: min(182px, 50vw); }
}

@media (max-width: 385px) {
	.custom-logo { max-height: 38px; max-width: min(164px, 48vw); }
}

@media (max-width: 365px) {
	.site-header__inner { gap: 0.6rem; }
	.brand__name { font-size: 0.98rem; }
	.brand__tag { font-size: 0.52rem; }
	.brand__mark { width: 24px; height: 24px; }
	.custom-logo { max-height: 34px; max-width: min(148px, 46vw); }
	.nav-toggle { padding-inline: 0.6rem; }
	.header-actions .btn--compact { padding-inline: 0.8rem; font-size: 0.66rem; }
}

/* Keep the mobile menu usable on short landscape screens */
@media (max-height: 480px) and (max-width: 782px) {
	.nav { max-height: calc(100svh - var(--header-h) - 0.5rem); }
	.nav a { min-height: 44px; }
}

/* No hover styling on touch: it sticks after a tap */
@media (hover: none) {
	.social__link:hover { background: transparent; border-color: rgba(234, 238, 234, 0.22); color: var(--mist); }
	.btn:hover { background: var(--pounamu); border-color: var(--pounamu); color: #fff; }
	.btn--gold:hover { background: var(--kowhai); border-color: var(--kowhai); color: var(--ink); }
	.btn--ghost:hover { background: transparent; color: var(--pounamu); }
	.section--ink .btn--ghost:hover { background: transparent; color: var(--mist); }
}

body.nav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
	.weave-thread { stroke-dashoffset: 0; }
	.weave-node { opacity: 1; }
}


/* ==========================================================================
   Account screens
   ========================================================================== */

.auth-logo {
	display: inline-flex;
	margin-bottom: 1.8rem;
	line-height: 0;
}

.auth-logo__img {
	height: auto;
	max-height: 62px;
	width: auto;
	max-width: min(320px, 78vw);
}

/* ==========================================================================
   Facilitator pathway
   ========================================================================== */

.path-layout {
	display: grid;
	grid-template-columns: 0.95fr 1.05fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

.path-layout__intro .lede { margin-bottom: 1.2rem; }

.path-note {
	font-size: 0.95rem;
	color: var(--muted);
	padding-left: 1rem;
	border-left: 2px solid var(--kowhai);
	margin-bottom: 1.8rem;
}

.path-layout__steps .ainp-path { margin-bottom: 0; }
.path-layout__steps .ainp-path__step { border-bottom: 1px solid var(--line); }
.path-layout__steps .ainp-path__step:last-child { border-bottom: 0; }

@media (max-width: 900px) {
	.path-layout { grid-template-columns: 1fr; }
	.path-layout__intro .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Circles on the front page
   ========================================================================== */

.circles-note {
	margin-top: 2.4rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.section--ink .circles-note { color: rgba(234, 238, 234, 0.6); }
