/* =============================================
   CHARITABLE NONPROFIT GLOSSARY — editorial v2
   Class prefix: .cgloss-
   Palette mirrors wpcharitable.com brand:
     navy   #181d35
     orange #f97316
   Each section sets --cgloss-c (accent) inline from the PHP registry.
   ============================================= */

/* Counter so each section gets a sequential 01..11 numeral. */
body.page-template-default,
body.single,
body {
	counter-reset: cgloss-section;
}

/* ---- NAV — inline "table of contents", no cards ------------------------- */

.cgloss-nav {
	margin: 0 0 80px;
	border-top: 1px solid #181d35;
	border-bottom: 1px solid #e2e8f0;
	padding: 28px 0 32px;
}

.cgloss-nav-label {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #94a3b8;
	margin: 0 0 18px;
}

.cgloss-nav-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 28px;
}

.cgloss-nav-card {
	display: inline-flex;
	align-items: baseline;
	gap: 9px;
	padding: 4px 0;
	background: none;
	border: 0;
	border-radius: 0;
	text-decoration: none;
	color: #181d35;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
	transition: color 0.15s;
	position: relative;
}

.cgloss-nav-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.2s ease;
}

.cgloss-nav-card:hover,
.cgloss-nav-card:focus {
	color: #181d35;
	text-decoration: none;
}

.cgloss-nav-card:hover::after,
.cgloss-nav-card:focus::after {
	transform: scaleX(1);
}

.cgloss-nav-pip {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	transform: translateY(-1px);
}

/* ---- SECTION ------------------------------------------------------------ */

.cgloss-section {
	counter-increment: cgloss-section;
	margin: 0 0 88px;
	scroll-margin-top: 80px;
}

/* The "banner" was previously a tinted card. Now it is just typography.    */
.cgloss-section-banner {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0 0 40px;
	position: relative;
}

.cgloss-section-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 16px;
	padding: 0 0 18px;
	border-bottom: 1px solid var(--cgloss-c);
}

/* Oversized "01" through "11" in the category color, set in the title.    */
.cgloss-section-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: #181d35;
	letter-spacing: -0.02em;
	margin: 0;
	line-height: 1.1;
	display: flex;
	align-items: baseline;
	gap: 18px;
	min-width: 0;
}

.cgloss-section-title::before {
	content: counter(cgloss-section, decimal-leading-zero);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 800;
	color: var(--cgloss-c);
	letter-spacing: -0.04em;
	line-height: 1;
	font-feature-settings: "tnum";
	flex-shrink: 0;
}

.cgloss-back {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #94a3b8;
	text-decoration: none;
	flex-shrink: 0;
	padding: 0;
	background: none;
	border-radius: 0;
	transition: color 0.15s;
	white-space: nowrap;
}

.cgloss-back:hover,
.cgloss-back:focus {
	background: none;
	color: var(--cgloss-c);
	text-decoration: none;
}

.cgloss-section-intro {
	color: #475569;
	font-size: 1.02rem;
	line-height: 1.7;
	margin: 0;
	max-width: 68ch;
}

/* ---- TERMS — no cards, dictionary-style rows ---------------------------- */

.cgloss-terms {
	display: block;
	border-top: 1px solid #f1f5f9;
}

.cgloss-term {
	display: grid;
	grid-template-columns: minmax(180px, 24%) 1fr;
	gap: 24px 48px;
	padding: 22px 0;
	background: none;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	border-radius: 0;
	transition: background 0.15s;
}

.cgloss-term:hover {
	background: #fafbfc;
	box-shadow: none;
	border-bottom-color: #e2e8f0;
}

.cgloss-term:last-child {
	border-bottom: 0;
}

.cgloss-term-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #181d35;
	margin: 0;
	letter-spacing: -0.005em;
	line-height: 1.35;
	padding-left: 16px;
	border-left: 2px solid var(--cgloss-c);
	align-self: start;
}

.cgloss-term-body {
	margin: 0;
	font-size: 0.97rem;
	line-height: 1.75;
	color: #334155;
}

.cgloss-term-body a {
	color: #f97316;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.cgloss-term-body a:hover {
	color: #ea580c;
}

/* ---- CLOSING NOTE ------------------------------------------------------- */

.cgloss-closing {
	background: none;
	border: 0;
	border-top: 1px solid #181d35;
	border-radius: 0;
	padding: 28px 0 0;
	margin: 64px 0 32px;
}

.cgloss-closing p {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.75;
	color: #475569;
	max-width: 68ch;
	font-style: italic;
}

/* ---- RESPONSIVE --------------------------------------------------------- */

@media (max-width: 768px) {
	.cgloss-nav-grid {
		gap: 6px 20px;
	}

	.cgloss-nav-card {
		font-size: 0.9rem;
	}

	.cgloss-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.cgloss-section-title {
		font-size: 1.3rem;
		gap: 12px;
	}

	.cgloss-section-title::before {
		font-size: 2.5rem;
	}

	.cgloss-term {
		grid-template-columns: 1fr;
		gap: 8px;
		padding: 18px 0;
	}

	.cgloss-term-title {
		font-size: 1rem;
	}
}
