/*
Theme Name: 42nd Generation Foundation Library
Theme URI: https://library.42ndgenerationfoundation.com/
Author: 42nd Generation Foundation
Description: A study library for CEFMORSI Ministries International — articles, video messages, magazines and Bible study outlines, organised by topic, series and scripture. Requires the 42GF Library plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gf-library
Tags: custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--forest:      #0E3B2F;
	--forest-2:    #14493B;
	--forest-3:    #0A2B22;
	--accent:      #3F9377;
	--accent-2:    #58AE90;
	--mint:        #DCEDE3;
	--mint-2:      #EAF4EE;
	--ground:      #F2F8F4;
	--surface:     #FFFFFF;
	--ink:         #12241E;
	--ink-2:       #3D554C;
	--muted:       #6B857A;
	--line:        #D9E6DE;
	--line-2:      #C3D8CB;
	--on-dark:     #EAF4EE;
	--on-dark-2:   #93B7A6;

	--f-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--fs-hero:  clamp(38px, 5.2vw, 56px);
	--fs-h1:    clamp(32px, 4.4vw, 46px);
	--fs-h2:    clamp(24px, 2.8vw, 32px);
	--fs-h3:    20px;
	--fs-lead:  18px;
	--fs-body:  16px;
	--fs-sm:    14px;
	--fs-xs:    12.5px;
	--fs-label: 11px;

	--sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
	--sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 88px;

	--r-sm: 4px;  --r:  8px;   --r-lg: 14px; --r-pill: 999px;
	--wrap: 1280px;
	--shadow: 0 1px 2px rgba(14,59,47,.05), 0 8px 24px -12px rgba(14,59,47,.14);
	--shadow-lift: 0 2px 4px rgba(14,59,47,.06), 0 18px 40px -18px rgba(14,59,47,.24);
	--ease: cubic-bezier(.2,.7,.3,1);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--f-sans);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: var(--r-sm);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.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; top: 0; z-index: 999;
	background: var(--forest); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. Shared atoms
   ========================================================================== */

.eyebrow {
	font-size: var(--fs-label);
	letter-spacing: .18em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--accent);
	margin: 0 0 var(--sp-3);
}
.eyebrow--dark { color: var(--on-dark-2); }

.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.6; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
	padding: 12px 22px; border-radius: var(--r-pill); border: 1px solid transparent;
	font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
	transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
	text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--forest); color: #fff; }
.btn--dark { background: var(--forest); color: #fff; }
.btn--dark:hover { background: var(--forest-2); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--onDark { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.btn--onDark:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn--sm { padding: 8px 16px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 15px; border-radius: var(--r-pill);
	border: 1px solid var(--line-2); background: var(--surface);
	font-size: var(--fs-xs); color: var(--ink-2); text-decoration: none;
	transition: all .16s var(--ease); white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip[aria-current="true"], .chip.is-active {
	background: var(--forest); border-color: var(--forest); color: #fff;
}
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.badge {
	display: inline-block; padding: 3px 8px; border-radius: var(--r-sm);
	background: var(--mint); color: var(--accent);
	font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.badge--onDark { background: rgba(255,255,255,.14); color: #fff; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Section headings used across pages */
.section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5);
}
.section-head h2 { font-size: var(--fs-h2); font-weight: 400; }
.section-head h2 .qualifier { color: var(--muted); font-style: italic; font-size: .62em; font-weight: 400; letter-spacing: 0; }
.section-head .more { font-size: var(--fs-sm); }

/* Concentric-ring motif, used on dark panels */
.rings { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .5; }
.rings::before, .rings::after {
	content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
}
.rings::before { width: 340px; height: 340px; right: -90px; top: -110px; box-shadow: 0 0 0 40px rgba(255,255,255,.04); }
.rings::after  { width: 180px; height: 180px; right: -10px; top: -30px; }

/* ==========================================================================
   4. Header
   ========================================================================== */

.topbar {
	background: var(--forest-3); color: var(--on-dark-2);
	font-size: var(--fs-xs); padding: 9px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.topbar a { color: var(--accent-2); font-weight: 500; }

.site-header {
	background: var(--surface);
	border-bottom: 3px solid var(--accent);
	position: sticky; top: 0; z-index: 50;
	transition: box-shadow .2s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 30px -20px rgba(14,59,47,.5); }
.site-header .wrap {
	display: flex; align-items: center; gap: var(--sp-5);
	padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
	width: 46px; height: 46px; border-radius: 50%; flex: none;
	border: 1.5px solid var(--accent); color: var(--forest);
	display: grid; place-items: center; font-size: 15px; font-weight: 600; letter-spacing: -.02em;
	position: relative;
}
.brand-mark::after {
	content: ""; position: absolute; left: 26%; right: 26%; bottom: 12px;
	height: 5px; border-bottom: 1.5px solid var(--accent); border-radius: 0 0 50% 50%;
}
.brand-name { font-size: 19px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.brand-sub { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.nav-main ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-main a {
	display: block; padding: 8px 14px; font-size: var(--fs-sm); color: var(--ink-2);
	border-bottom: 2px solid transparent; text-decoration: none;
}
.nav-main a:hover { color: var(--forest); text-decoration: none; }
.nav-main .current-menu-item > a,
.nav-main .is-current > a { color: var(--forest); font-weight: 500; border-bottom-color: var(--accent); }

.header-search { position: relative; }
.header-search input {
	width: 190px; padding: 9px 14px 9px 36px; font-size: var(--fs-sm); font-family: inherit;
	border: 1px solid var(--line-2); border-radius: var(--r-pill);
	background: var(--ground); color: var(--ink);
	transition: width .2s var(--ease), border-color .18s var(--ease);
}
.header-search input:focus { width: 240px; border-color: var(--accent); outline-offset: 1px; }
.header-search input::placeholder { color: var(--muted); }
.header-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 3px 0; }

@media (max-width: 1100px) {
	.header-search input { width: 150px; }
	.nav-main a { padding: 8px 10px; }
}
@media (max-width: 940px) {
	.nav-toggle { display: block; order: 3; }
	.site-header .wrap { flex-wrap: wrap; }
	.nav-main { order: 5; flex-basis: 100%; display: none; }
	.nav-main.is-open { display: block; }
	.nav-main ul { flex-direction: column; gap: 0; padding-bottom: var(--sp-3); }
	.nav-main a { padding: 11px 0; border-bottom: 1px solid var(--line); }
	.nav-main .current-menu-item > a { border-bottom-color: var(--line); }
	.header-search { order: 4; }
	.header-search input, .header-search input:focus { width: 100%; }
	.header-search { flex: 1 1 auto; }
	.site-header .btn { display: none; }
}

/* ==========================================================================
   5. Footer
   ========================================================================== */

.newsletter-band {
	background: var(--forest); color: var(--on-dark);
	padding: var(--sp-9) 0; text-align: center; position: relative; overflow: hidden;
}
.newsletter-band .wrap { position: relative; z-index: 1; }
.newsletter-band .brand-mark { margin: 0 auto var(--sp-4); border-color: var(--accent-2); color: #fff; }
.newsletter-band h2 { font-size: var(--fs-h2); font-weight: 400; color: #fff; margin-bottom: var(--sp-2); }
.newsletter-band p { color: var(--on-dark-2); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }

.subscribe-form { display: flex; max-width: 520px; margin: 0 auto; gap: 0; }
.subscribe-form input[type="email"] {
	flex: 1; min-width: 0; padding: 14px 18px; font-family: inherit; font-size: var(--fs-sm);
	border: 1px solid rgba(255,255,255,.18); border-right: 0;
	background: rgba(255,255,255,.06); color: #fff; border-radius: var(--r) 0 0 var(--r);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,.45); }
.subscribe-form button {
	padding: 14px 28px; border: 0; border-radius: 0 var(--r) var(--r) 0;
	background: var(--accent); color: #fff; font-weight: 500; font-size: var(--fs-sm); cursor: pointer;
}
.subscribe-form button:hover { background: var(--accent-2); }
@media (max-width: 520px) {
	.subscribe-form { flex-direction: column; gap: var(--sp-2); }
	.subscribe-form input[type="email"] { border-right: 1px solid rgba(255,255,255,.18); border-radius: var(--r); }
	.subscribe-form button { border-radius: var(--r); }
}

.site-footer { background: var(--forest-2); color: var(--on-dark-2); padding: var(--sp-8) 0 0; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-6); padding-bottom: var(--sp-8); }
.footer-brand .brand-mark { border-color: var(--accent-2); color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: var(--on-dark-2); }
.footer-brand p { margin-top: var(--sp-4); max-width: 34ch; line-height: 1.6; }
.footer-col h3 {
	font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase;
	color: var(--accent-2); font-weight: 600; margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--on-dark); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1); padding: var(--sp-5) 0;
	display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
	font-size: var(--fs-xs); color: var(--on-dark-2);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* ==========================================================================
   6. Home — hero
   ========================================================================== */

.hero { padding: var(--sp-9) 0; position: relative; overflow: hidden; }
.hero::before, .hero::after {
	content: ""; position: absolute; border-radius: 50%; background: var(--mint); z-index: 0; opacity: .8;
}
.hero::before { width: 260px; height: 260px; left: -130px; top: 42%; }
.hero::after  { width: 96px;  height: 96px;  left: 22%;  bottom: 8%; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--sp-8); align-items: center; }
.hero h1 { font-size: var(--fs-hero); font-weight: 300; line-height: 1.06; margin-bottom: var(--sp-5); }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 300; }
.hero .lead { max-width: 44ch; margin-bottom: var(--sp-6); }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-7); }

.stat-row { display: grid; grid-template-columns: repeat(4, auto); gap: var(--sp-6); justify-content: start; }
.stat-row .stat strong { display: block; font-size: 26px; font-weight: 400; letter-spacing: -.03em; color: var(--forest); font-variant-numeric: tabular-nums; }
.stat-row .stat span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.hero-media { position: relative; }
.feature-video {
	position: relative; border-radius: var(--r); overflow: hidden;
	background: var(--forest); color: #fff; aspect-ratio: 4 / 5;
	display: grid; place-content: center; text-align: center; padding: var(--sp-6);
	box-shadow: var(--shadow-lift);
}
.feature-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.feature-video > * { position: relative; z-index: 1; }
.feature-video .eyebrow { color: var(--on-dark-2); }
.feature-video h2 { color: #fff; font-size: 22px; font-weight: 400; max-width: 16ch; margin: 0 auto var(--sp-2); }
.feature-video .by { font-size: var(--fs-sm); color: var(--on-dark-2); }

.play {
	width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8);
	display: grid; place-items: center; margin: 0 auto var(--sp-5);
	background: rgba(255,255,255,.08); color: #fff;
	transition: background .18s var(--ease), transform .18s var(--ease);
}
.play svg { margin-left: 3px; }
a:hover > .play, button:hover > .play, .card-video:hover .play { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.play--sm { width: 44px; height: 44px; }
.play--lg { width: 78px; height: 78px; }

.hero-quote {
	position: absolute; left: -46px; bottom: 44px; max-width: 330px;
	background: var(--surface); padding: var(--sp-5); border-left: 3px solid var(--accent);
	box-shadow: var(--shadow); font-size: var(--fs-sm); font-style: italic; color: var(--ink-2);
}
.hero-quote cite {
	display: block; margin-top: var(--sp-3); font-style: normal; font-size: 10.5px;
	letter-spacing: .14em; text-transform: uppercase; color: var(--forest); font-weight: 600;
}
@media (max-width: 980px) {
	.hero-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
	.feature-video { aspect-ratio: 16 / 10; }
	.hero-quote { position: static; max-width: none; margin-top: var(--sp-4); }
	.hero::before, .hero::after { display: none; }
}
@media (max-width: 520px) {
	.stat-row { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
}

/* ==========================================================================
   7. Home — collections
   ========================================================================== */

.collections { padding: var(--sp-8) 0; }
.collections-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--sp-4); }

.collection-feature {
	background: var(--forest); color: var(--on-dark); border-radius: var(--r);
	padding: var(--sp-6); position: relative; overflow: hidden;
	display: flex; flex-direction: column; justify-content: space-between; min-height: 250px;
}
.collection-feature > * { position: relative; z-index: 1; }
.collection-feature h3 { color: #fff; font-size: 27px; font-weight: 400; margin-bottom: var(--sp-2); }
.collection-feature p { font-size: var(--fs-sm); color: var(--on-dark-2); max-width: 30ch; }
.collection-feature .scripture { font-style: italic; font-size: var(--fs-xs); color: var(--on-dark-2); }

.collection-card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
	padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3);
	transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
	text-decoration: none; color: inherit;
}
.collection-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.collection-card .ico {
	width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--mint);
	display: grid; place-items: center; color: var(--accent);
}
.collection-card h3 { font-size: var(--fs-h3); font-weight: 500; }
.collection-card p { font-size: var(--fs-xs); color: var(--muted); margin: 0; flex: 1; line-height: 1.55; }
.collection-card .more { font-size: var(--fs-xs); color: var(--accent); font-weight: 500; }

@media (max-width: 1080px) { .collections-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px)  { .collections-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   8. Browse panel — tabs, A–Z rail, sidebar
   ========================================================================== */

.browse { background: var(--mint-2); border-top: 1px solid var(--line); padding-bottom: var(--sp-9); }

.browse-tabs { border-bottom: 1px solid var(--line); background: var(--mint-2); }
.browse-tabs .wrap { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; }
.browse-tabs .wrap::-webkit-scrollbar { display: none; }
.browse-tabs a {
	padding: 15px 18px; font-size: var(--fs-sm); color: var(--ink-2);
	border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.browse-tabs a:hover { color: var(--forest); text-decoration: none; }
.browse-tabs a[aria-current="page"] { color: var(--forest); font-weight: 500; border-bottom-color: var(--forest); }

.browse-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--sp-7); padding-top: var(--sp-6); }

.az {
	display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: var(--sp-6);
}
.az a, .az span {
	display: grid; place-items: center; aspect-ratio: 1;
	font-size: var(--fs-xs); border-radius: var(--r-sm);
	border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
	text-decoration: none; transition: all .14s var(--ease);
}
.az a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.az a[aria-current="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.az span { color: var(--line-2); background: transparent; border-color: transparent; }

.side-block { margin-bottom: var(--sp-6); }
.side-block h3 {
	font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; margin-bottom: var(--sp-3);
}
.term-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.term-list a {
	display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
	padding: 8px 11px; border-radius: var(--r-sm); font-size: var(--fs-sm);
	color: var(--ink-2); text-decoration: none;
}
.term-list a:hover { background: var(--surface); color: var(--forest); text-decoration: none; }
.term-list a[aria-current="page"] { background: var(--forest); color: #fff; }
.term-list .count {
	font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums;
	background: var(--surface); padding: 1px 7px; border-radius: var(--r-sm); border: 1px solid var(--line);
}
.term-list a[aria-current="page"] .count { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }

.browse-main > section { margin-bottom: var(--sp-8); }
.browse-main > section:last-child { margin-bottom: 0; }

.theme-banner {
	background: var(--forest); color: var(--on-dark); border-radius: var(--r);
	padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-7);
	display: flex; gap: var(--sp-4); align-items: flex-start;
}
.theme-banner .mark { font-size: 30px; line-height: 1; color: var(--accent-2); font-family: Georgia, serif; }
.theme-banner blockquote { margin: 0; font-style: italic; font-size: var(--fs-sm); color: #fff; max-width: 62ch; }
.theme-banner .attrib {
	margin-top: var(--sp-3); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
	color: var(--on-dark-2); display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center;
}
.theme-banner .attrib a { color: var(--accent-2); font-weight: 600; }

@media (max-width: 960px) {
	.browse-layout { grid-template-columns: 1fr; gap: var(--sp-5); }
	.browse-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
	.az { grid-template-columns: repeat(9, 1fr); }
}
@media (max-width: 620px) {
	.browse-sidebar { grid-template-columns: 1fr; }
	.az { grid-template-columns: repeat(7, 1fr); }
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.grid { display: grid; gap: var(--sp-4); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* Video card */
.card-video {
	background: var(--surface); border-radius: var(--r); overflow: hidden;
	border: 1px solid var(--line); display: flex; flex-direction: column;
	transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card-video:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); border-color: var(--line-2); }
.card-video .thumb {
	position: relative; aspect-ratio: 16 / 9; background: var(--forest);
	display: grid; place-items: center; overflow: hidden;
}
.card-video .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s var(--ease), transform .4s var(--ease); }
.card-video:hover .thumb img { opacity: 1; transform: scale(1.03); }
.card-video .thumb .play { position: relative; z-index: 2; margin: 0; }
.card-video .msg-no {
	position: absolute; left: 12px; top: 11px; z-index: 2;
	font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); font-weight: 600;
}
.card-video .series-tag {
	position: absolute; right: 12px; top: 11px; z-index: 2;
	font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
	background: rgba(255,255,255,.16); color: #fff; padding: 3px 8px; border-radius: var(--r-sm);
	backdrop-filter: blur(4px);
}
.card-video .duration {
	position: absolute; right: 12px; bottom: 11px; z-index: 2;
	font-size: 11px; background: rgba(6,20,16,.78); color: #fff; padding: 2px 7px; border-radius: var(--r-sm);
	font-variant-numeric: tabular-nums;
}
.card-video .body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.card-video h3 { font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; letter-spacing: -.005em; }
.card-video h3 a { color: var(--ink); }
.card-video h3 a:hover { color: var(--accent); text-decoration: none; }
.card-video .meta {
	display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
	margin-top: auto; padding-top: var(--sp-2);
	font-size: var(--fs-xs); color: var(--muted);
}

/* Article card */
.card-article {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
	padding: var(--sp-4); display: flex; gap: var(--sp-4); align-items: flex-start;
	transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card-article:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-article .initial {
	width: 38px; height: 38px; flex: none; border-radius: var(--r-sm);
	background: var(--mint); color: var(--forest);
	display: grid; place-items: center; font-size: 16px; font-weight: 500;
}
.card-article .body { min-width: 0; }
.card-article .kicker {
	font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; display: block; margin-bottom: 3px;
}
.card-article h3 { font-size: var(--fs-sm); font-weight: 500; line-height: 1.45; margin-bottom: 4px; }
.card-article h3 a { color: var(--ink); }
.card-article h3 a:hover { color: var(--accent); text-decoration: none; }
.card-article .meta { font-size: var(--fs-xs); color: var(--muted); }

/* Series card, used in "Continue the series" */
.card-series {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
	border-top: 3px solid var(--accent); padding: var(--sp-5);
	display: flex; flex-direction: column; gap: var(--sp-2);
	transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card-series:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-series .pos { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.card-series h3 { font-size: 22px; font-weight: 400; }
.card-series p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; margin: 0; flex: 1; }
.card-series .more { font-size: var(--fs-xs); font-weight: 500; color: var(--accent); }

/* Magazine shelf */
.shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); align-items: end; }
.mag {
	position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm) var(--r) var(--r) var(--r-sm);
	background: linear-gradient(150deg, var(--forest-2), var(--forest-3));
	color: #fff; padding: var(--sp-4); overflow: hidden;
	display: flex; flex-direction: column; justify-content: space-between;
	box-shadow: var(--shadow); transition: transform .22s var(--ease), box-shadow .22s var(--ease);
	text-decoration: none;
}
.mag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: rgba(0,0,0,.28); }
.mag:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); text-decoration: none; }
.mag img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mag > * { position: relative; z-index: 1; }
.mag .kicker { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.mag .title { font-size: 19px; font-weight: 400; line-height: 1.15; margin-top: 2px; }
.mag .date { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.mag.has-cover .kicker, .mag.has-cover .title, .mag.has-cover .date { display: none; }
@media (max-width: 1000px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .shelf { grid-template-columns: repeat(2, 1fr); } }

/* Testimonials */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); }
.quote-card p { font-style: italic; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--sp-3); }
.quote-card cite { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 780px) { .quotes { grid-template-columns: 1fr; } }

/* ==========================================================================
   10. Single article
   ========================================================================== */

.breadcrumb { padding: var(--sp-4) 0; font-size: var(--fs-xs); color: var(--muted); border-bottom: 1px solid var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; color: var(--line-2); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

.article-head { padding: var(--sp-7) 0 var(--sp-5); }
.article-head h1 { font-size: var(--fs-h1); font-weight: 300; letter-spacing: -.03em; }
.article-head .deck { font-size: 22px; font-style: italic; color: var(--accent); font-weight: 300; margin-top: 6px; }

.byline {
	display: flex; justify-content: space-between; align-items: flex-end;
	gap: var(--sp-5); flex-wrap: wrap; margin-top: var(--sp-6);
	padding-bottom: var(--sp-5); border-bottom: 1px solid var(--line);
}
.byline .who { display: flex; align-items: center; gap: var(--sp-3); }
.byline .avatar {
	width: 34px; height: 34px; border-radius: 50%; flex: none;
	background: var(--forest); color: #fff; display: grid; place-items: center;
	font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.byline .name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.byline .role { font-size: var(--fs-xs); color: var(--muted); }
.byline .facts { text-align: right; font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }
.byline .facts strong { display: block; color: var(--forest); font-weight: 600; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-8); padding: var(--sp-7) 0 var(--sp-8); }

.prose { font-size: var(--fs-lead); line-height: 1.75; color: var(--ink); max-width: 68ch; }
.prose > p:first-of-type::first-letter {
	float: left; font-size: 68px; line-height: .82; font-weight: 300;
	color: var(--accent); margin: 6px 12px 0 0;
}
.prose h2 { font-size: 26px; font-weight: 400; margin: var(--sp-7) 0 var(--sp-3); }
.prose h3 { font-size: 20px; font-weight: 600; margin: var(--sp-6) 0 var(--sp-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); margin: var(--sp-5) 0; }
.prose blockquote {
	margin: var(--sp-6) 0; padding: var(--sp-5) var(--sp-6);
	background: var(--mint-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0;
	font-style: italic; font-size: var(--fs-lead); color: var(--ink);
}
.prose blockquote cite, .prose blockquote .ref {
	display: block; margin-top: var(--sp-3); font-style: normal;
	font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--forest); font-weight: 600;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }

.source-note {
	margin-top: var(--sp-7); padding-top: var(--sp-4); border-top: 1px solid var(--line);
	font-size: var(--fs-xs); color: var(--muted);
}

.topics-block { margin-top: var(--sp-7); }
.topics-block h2 {
	font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; margin-bottom: var(--sp-3);
}

/* Sidebar */
.sidebar { display: grid; gap: var(--sp-4); align-content: start; position: sticky; top: 96px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); }
.side-card > h2 {
	font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; margin-bottom: var(--sp-4);
}
.series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.series-list a {
	display: flex; align-items: center; gap: var(--sp-3);
	padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm);
	color: var(--ink-2); text-decoration: none;
}
.series-list a:hover { background: var(--mint-2); color: var(--forest); text-decoration: none; }
.series-list .n {
	width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--mint);
	color: var(--forest); display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.series-list [aria-current="page"] { background: var(--forest); color: #fff; font-weight: 500; }
.series-list [aria-current="page"] .n { background: var(--accent); color: #fff; }

.side-card--dark {
	background: var(--forest); border-color: var(--forest); color: var(--on-dark);
	position: relative; overflow: hidden;
}
.side-card--dark > * { position: relative; z-index: 1; }
.side-card--dark h2 { color: #fff; font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.01em; text-transform: none; margin-bottom: var(--sp-2); }
.side-card--dark p { font-size: var(--fs-xs); color: var(--on-dark-2); margin-bottom: var(--sp-5); }

@media (max-width: 1000px) {
	.article-layout { grid-template-columns: 1fr; gap: var(--sp-6); }
	.sidebar { position: static; }
	.prose > p:first-of-type::first-letter { font-size: 54px; }
}

.continue { background: var(--mint-2); border-top: 1px solid var(--line); padding: var(--sp-8) 0; }

/* ==========================================================================
   11. Single video
   ========================================================================== */

.video-hero { background: var(--forest); padding: var(--sp-7) 0; }
.video-stage {
	position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
	background: var(--forest-3); width: 100%; border: 0; padding: 0; cursor: pointer; display: block;
}
.video-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.video-stage .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); margin: 0; }
.video-stage:hover .play { transform: translate(-50%,-50%) scale(1.06); background: var(--accent); border-color: var(--accent); }
.video-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-body { padding: var(--sp-7) 0; }
.video-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--sp-7); }
.video-layout h1 { font-size: var(--fs-h2); font-weight: 400; margin-bottom: var(--sp-3); }
.video-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-5) 0; }
.video-desc { white-space: pre-line; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.7; }
@media (max-width: 1000px) { .video-layout { grid-template-columns: 1fr; } }

/* Latest-message banner on the videos index */
.latest {
	background: var(--forest); border-radius: var(--r); overflow: hidden; color: var(--on-dark);
	display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--accent);
	position: relative; margin-bottom: var(--sp-7);
}
.latest > * { position: relative; z-index: 1; }
.latest .stage { min-height: 300px; }
.latest .info { padding: var(--sp-7); display: flex; flex-direction: column; justify-content: center; gap: var(--sp-3); }
.latest .info h2 { color: #fff; font-size: 30px; font-weight: 400; max-width: 18ch; }
.latest .info p { color: var(--on-dark-2); font-size: var(--fs-sm); max-width: 46ch; margin: 0; }
.latest .who { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--on-dark); }
.latest .who .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.latest .actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-3); }
@media (max-width: 900px) { .latest { grid-template-columns: 1fr; } .latest .stage { min-height: 220px; } .latest .info { padding: var(--sp-5); } }

/* ==========================================================================
   12. Archive header, filters, pagination
   ========================================================================== */

.page-head { padding: var(--sp-8) 0 var(--sp-6); }
.page-head h1 { font-size: var(--fs-h1); font-weight: 300; letter-spacing: -.03em; }
.page-head .lead { max-width: 56ch; margin-top: var(--sp-3); }

.filter-bar {
	display: flex; justify-content: space-between; align-items: center;
	gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5);
}
.filter-bar .label {
	font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; width: 100%;
}
.filter-bar select {
	padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
	background: var(--surface); font-family: inherit; font-size: var(--fs-xs); color: var(--ink-2);
}

.pagination { display: flex; justify-content: center; gap: var(--sp-2); padding: var(--sp-7) 0 0; flex-wrap: wrap; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px;
	border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
	font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .page-numbers.current { background: var(--forest); border-color: var(--forest); color: #fff; }
.pagination .dots { border-color: transparent; background: transparent; }

.empty {
	text-align: center; padding: var(--sp-9) var(--sp-5);
	background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r);
}
.empty h2 { font-size: var(--fs-h3); font-weight: 500; margin-bottom: var(--sp-2); }
.empty p { color: var(--muted); font-size: var(--fs-sm); max-width: 44ch; margin: 0 auto var(--sp-5); }

/* Search results */
.result {
	display: grid; grid-template-columns: 86px minmax(0,1fr); gap: var(--sp-4);
	padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
}
.result .type {
	font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
	color: var(--accent); padding-top: 3px;
}
.result h3 { font-size: var(--fs-lead); font-weight: 500; margin-bottom: 4px; }
.result p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* A–Z index page */
.az-index { display: grid; gap: var(--sp-6); }
.az-group { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: var(--sp-5); align-items: start; }
.az-group .letter {
	font-size: 40px; font-weight: 300; color: var(--accent); line-height: 1;
	border-top: 2px solid var(--accent); padding-top: var(--sp-3);
}
.az-group .terms { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-3); }
@media (max-width: 620px) { .az-group { grid-template-columns: 1fr; gap: var(--sp-2); } }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section { padding: var(--sp-8) 0; }
.section--tight { padding: var(--sp-7) 0; }
.section--mint { background: var(--mint-2); border-top: 1px solid var(--line); }
