/*
Theme Name: KlikScale Academy
Theme URI: https://klikscale.academy
Author: KlikScale
Author URI: https://klikscale.academy
Description: Editorial, operator-grade theme for KlikScale Academy — cohort-based education for senior B2B SaaS operators. Ships with a Course post type, a Course Catalog page template, a coming-soon front page, editorial page/post templates, and a built-in waitlist capture system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: klikscale-academy
Tags: education, courses, custom-post-types, custom-menu, custom-logo, featured-images, one-column
*/

/* ==========================================================================
   1. Design tokens & reset
   ========================================================================== */

:root {
	--bg: #F5F0E6;
	--bg-surface: #EFEAE0;
	--bg-deep: #EBE4D5;
	--ink: #0C0F1E;
	--accent: #C9A84C;
	--accent-ink: #7A5F28; /* darkened gold for small text — passes WCAG AA on --bg */
	--secondary: #1A3D2B;
	--rule: #E2D9C9;
	--muted: #6B6B6B;
	--maxw: 1100px;
	--serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.5;
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Subtle editorial grain. Purely decorative; never intercepts clicks. */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: 0.025;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	z-index: 2000;
}

img {
	max-width: 100%;
	height: auto;
}

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

::selection {
	background: var(--accent);
	color: var(--ink);
}

:focus-visible {
	outline: 2px solid var(--accent-ink);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   2. Typography utilities
   ========================================================================== */

.serif {
	font-family: var(--serif);
	font-optical-sizing: auto;
	letter-spacing: -0.02em;
}

.eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.accent {
	color: var(--accent-ink);
}

.indigo-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	flex-shrink: 0;
}

.ksa-lede {
	max-width: 36rem;
	margin: 32px 0 0;
	font-size: 18px;
	line-height: 1.65;
	color: var(--muted);
}

.ksa-h2 {
	margin: 16px 0 0;
	font-size: clamp(28px, 4vw, 38px);
	line-height: 1.15;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.ksa-h2--lg {
	font-size: clamp(32px, 4.6vw, 44px);
	line-height: 1.1;
}

.ksa-h1-sm {
	margin: 16px 0 0;
	font-size: clamp(34px, 5vw, 52px);
	line-height: 1.05;
	font-weight: 300;
	letter-spacing: -0.02em;
}

@media (min-width: 768px) {
	.ksa-lede {
		font-size: 19px;
	}
}

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

.ksa-wrap {
	max-width: var(--maxw);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

@media (min-width: 768px) {
	.ksa-wrap {
		padding-left: 40px;
		padding-right: 40px;
	}
}

.ksa-section {
	border-bottom: 1px solid var(--rule);
}

.ksa-pad-md {
	padding-top: 64px;
	padding-bottom: 64px;
}

.ksa-pad-lg {
	padding-top: 96px;
	padding-bottom: 96px;
}

@media (min-width: 768px) {
	.ksa-pad-md {
		padding-top: 80px;
		padding-bottom: 80px;
	}

	.ksa-pad-lg {
		padding-top: 112px;
		padding-bottom: 112px;
	}
}

/* 12-column editorial grid */
.ksa-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

@media (min-width: 768px) {
	.ksa-grid {
		grid-template-columns: repeat(12, 1fr);
	}

	.ksa-grid > .col-3 { grid-column: span 3; }
	.ksa-grid > .col-4 { grid-column: span 4; }
	.ksa-grid > .col-5 { grid-column: span 5; }
	.ksa-grid > .col-7 { grid-column: span 7; }
	.ksa-grid > .col-8 { grid-column: span 8; }
	.ksa-grid > .col-9 { grid-column: span 9; }
}

/* ==========================================================================
   4. Buttons & links
   ========================================================================== */

.btn-primary {
	display: inline-block;
	padding: 17px 24px;
	background: var(--ink);
	border: 1px solid var(--ink);
	color: var(--bg);
	font-size: 14px;
	font-weight: 500;
	font-family: var(--sans);
	letter-spacing: 0.02em;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
	background: var(--secondary);
	border-color: var(--secondary);
	color: var(--bg);
}

.btn-primary:active {
	transform: translateY(1px);
}

.btn-primary--sm {
	padding: 10px 16px;
	font-size: 13px;
}

.btn-ghost {
	display: inline-block;
	padding: 12px 20px;
	background: transparent;
	border: 1px solid var(--ink);
	color: var(--ink);
	font-size: 13px;
	font-weight: 500;
	font-family: var(--sans);
	letter-spacing: 0.02em;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
	background: var(--ink);
	color: var(--bg);
}

.link-underline,
.ksa-menu a,
.ksa-footer-nav a {
	position: relative;
	display: inline-block;
	font-weight: 500;
}

.link-underline::after,
.ksa-menu a::after,
.ksa-footer-nav a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease;
}

.link-underline:hover::after,
.ksa-menu a:hover::after,
.ksa-footer-nav a:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.ksa-header {
	border-bottom: 1px solid var(--rule);
	background: var(--bg);
}

.ksa-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.ksa-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.ksa-brand .custom-logo-link {
	display: inline-flex;
}

.ksa-brand .custom-logo {
	width: 22px;
	height: 22px;
}

.geo-mark svg {
	display: block;
}

.ksa-wordmark {
	font-size: 17px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.ksa-menu {
	display: none;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
}

@media (min-width: 768px) {
	.ksa-menu {
		display: flex;
	}
}

/* ==========================================================================
   6. Hero (front page)
   ========================================================================== */

.ksa-hero {
	border-bottom: 1px solid var(--rule);
}

.ksa-hero__inner {
	padding-top: 96px;
	padding-bottom: 96px;
}

@media (min-width: 768px) {
	.ksa-hero__inner {
		padding-top: 128px;
		padding-bottom: 128px;
	}
}

.ksa-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ksa-hero h1 {
	margin: 32px 0 0;
	max-width: 48rem;
	font-size: clamp(40px, 7.5vw, 68px);
	line-height: 1.02;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.ksa-hero h1 em {
	font-style: italic;
	font-weight: 400;
}

.ksa-hero__cta {
	margin-top: 48px;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.ksa-hero__curriculum-link {
	font-size: 14px;
}

.ksa-hero__mark {
	margin-top: 96px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.ksa-hero__meta {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.ksa-hero__meta .rule-line {
	display: inline-block;
	width: 64px;
	height: 1px;
	background: var(--ink);
}

.ksa-hero__svg {
	display: none;
}

@media (min-width: 768px) {
	.ksa-hero__svg {
		display: block;
	}
}

/* Interior page hero */
.ksa-hero-sm .ksa-wrap {
	padding-top: 80px;
	padding-bottom: 80px;
}

@media (min-width: 768px) {
	.ksa-hero-sm .ksa-wrap {
		padding-top: 112px;
		padding-bottom: 112px;
	}
}

/* ==========================================================================
   7. Trust strip
   ========================================================================== */

.ksa-trust {
	text-align: center;
}

.ksa-trust__grid {
	margin-top: 40px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 32px;
	align-items: center;
}

.ksa-trust__item {
	margin: 0;
	font-size: 16px;
	font-weight: 300;
	color: var(--muted);
}

@media (max-width: 767px) {
	.ksa-trust__grid > *:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 768px) {
	.ksa-trust__grid {
		grid-template-columns: repeat(5, 1fr);
		gap: 48px;
	}

	.ksa-trust__item {
		font-size: 18px;
	}
}

/* ==========================================================================
   8. Course grid & cards
   ========================================================================== */

.ksa-courses__head {
	margin-bottom: 64px;
	max-width: 42rem;
}

.course-grid {
	display: grid;
	grid-template-columns: 1fr;
	border-top: 1px solid var(--rule);
	border-left: 1px solid var(--rule);
}

@media (min-width: 768px) {
	.course-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.course-card {
	display: flex;
	flex-direction: column;
	padding: 32px;
	border-right: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}

@media (min-width: 768px) {
	.course-card {
		padding: 40px;
	}
}

.course-card--alt {
	background: var(--bg-surface);
}

.course-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}

.course-card__title {
	margin: 12px 0 0;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -0.01em;
}

.course-card__title a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

@media (min-width: 768px) {
	.course-card__title {
		font-size: 30px;
	}
}

.course-card__promise {
	margin: 16px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--muted);
}

.course-card__outcomes {
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.course-card__outcomes li {
	display: flex;
	gap: 12px;
	font-size: 14.5px;
	line-height: 1.6;
}

.course-card__outcomes li + li {
	margin-top: 12px;
}

.course-card__outcomes .num,
.outcome-list .num {
	color: var(--accent-ink);
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.course-card__meta {
	margin: 28px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 24px;
}

.course-card__meta dd {
	margin: 4px 0 0;
	font-size: 14px;
}

.course-card__cta {
	margin-top: auto;
	padding-top: 40px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.course-card__more {
	font-size: 14px;
}

/* ==========================================================================
   9. POV / manifesto
   ========================================================================== */

.ksa-sec-sub {
	margin-top: 8px;
}

.ksa-pov__body {
	margin-top: 40px;
	max-width: 42rem;
}

.ksa-pov__body p {
	margin: 0;
	font-size: 16px;
	line-height: 1.75;
	color: #1a1a1a;
}

.ksa-pov__body p + p {
	margin-top: 24px;
}

/* ==========================================================================
   10. Profiles grid
   ========================================================================== */

.profiles-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	border-top: 1px solid var(--rule);
	border-left: 1px solid var(--rule);
}

@media (min-width: 768px) {
	.profiles-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.profile-cell {
	padding: 32px;
	border-right: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}

.profile-cell .profile-icon {
	display: block;
	margin-bottom: 24px;
}

.profile-cell h3 {
	margin: 8px 0 0;
	font-size: 18px;
	font-weight: 400;
	letter-spacing: -0.01em;
}

.profile-cell .profile-note {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--muted);
}

/* ==========================================================================
   11. Waitlist & forms
   ========================================================================== */

.ksa-waitlist {
	background: var(--bg-deep);
	border-bottom: 1px solid var(--rule);
}

.ksa-waitlist__heading {
	margin-top: 16px;
}

.ksa-waitlist__note {
	margin: 24px 0 0;
	max-width: 24rem;
	font-size: 15px;
	line-height: 1.65;
	color: var(--muted);
}

.ksa-form > * + * {
	margin-top: 32px;
}

.ksa-field label {
	display: block;
	margin-bottom: 4px;
}

.input-field {
	display: block;
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--ink);
	border-radius: 0;
	padding: 14px 0;
	font-size: 16px;
	font-family: var(--sans);
	color: var(--ink);
	outline: none;
	transition: border-color 0.2s ease;
}

.input-field:focus {
	border-bottom-color: var(--accent);
}

.input-field::placeholder {
	color: var(--muted);
}

.select-field {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230A0A0A' stroke-width='1.2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right center;
	-webkit-appearance: none;
	appearance: none;
	padding-right: 32px;
}

.ksa-form__row {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 8px;
}

.ksa-form__row .btn-primary {
	align-self: flex-start;
}

@media (min-width: 640px) {
	.ksa-form__row {
		flex-direction: row;
		align-items: center;
		gap: 24px;
	}
}

.ksa-form__micro {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}

/* Honeypot — hidden from humans, irresistible to bots. */
.ksa-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ==========================================================================
   12. FAQ
   ========================================================================== */

.ksa-faq__heading {
	margin-top: 8px;
}

.ksa-faq-item {
	border-top: 1px solid var(--rule);
}

.ksa-faq-item:last-child {
	border-bottom: 1px solid var(--rule);
}

.ksa-faq-item summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 0;
	cursor: pointer;
	list-style: none;
}

.ksa-faq-item summary::-webkit-details-marker {
	display: none;
}

.ksa-faq-q {
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: -0.01em;
}

@media (min-width: 768px) {
	.ksa-faq-q {
		font-size: 21px;
	}
}

.ksa-faq-item .plus {
	flex-shrink: 0;
	margin-top: 4px;
	font-size: 20px;
	font-weight: 300;
	color: var(--accent-ink);
	transition: transform 0.3s ease;
}

.ksa-faq-item[open] .plus {
	transform: rotate(45deg);
}

.ksa-faq-item .answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease, padding 0.35s ease;
}

.ksa-faq-item[open] .answer {
	max-height: 320px;
	padding-top: 12px;
	padding-bottom: 28px;
}

.ksa-faq-item .answer p {
	margin: 0;
	max-width: 38rem;
	font-size: 15px;
	line-height: 1.7;
	color: #1a1a1a;
}

/* ==========================================================================
   13. Toast
   ========================================================================== */

.toast {
	position: fixed;
	bottom: 32px;
	left: 50%;
	transform: translateX(-50%) translateY(80px);
	background: var(--ink);
	color: var(--bg);
	padding: 14px 22px;
	font-size: 14px;
	letter-spacing: 0.01em;
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.3s ease;
	z-index: 3000;
	border-radius: 2px;
	pointer-events: none;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.toast--error {
	background: #7A2E2E;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.ksa-footer {
	padding: 56px 0;
}

.ksa-footer__row {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

@media (min-width: 768px) {
	.ksa-footer__row {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

.ksa-footer__tagline {
	margin: 12px 0 0;
	max-width: 20rem;
	font-size: 13px;
	color: var(--muted);
}

.ksa-footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
}

.ksa-footer__legal {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-size: 12px;
	color: var(--muted);
}

@media (min-width: 640px) {
	.ksa-footer__legal {
		flex-direction: row;
		justify-content: space-between;
	}
}

/* ==========================================================================
   15. Prose (page / post / course content)
   ========================================================================== */

.ksa-prose {
	max-width: 44rem;
	color: #1a1a1a;
	font-size: 17px;
	line-height: 1.75;
}

.ksa-prose > *:first-child {
	margin-top: 0;
}

.ksa-prose p {
	margin: 1.25em 0;
}

.ksa-prose h2 {
	font-family: var(--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	font-size: 28px;
	line-height: 1.2;
	margin: 1.6em 0 0.6em;
}

.ksa-prose h3 {
	font-family: var(--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	font-size: 22px;
	line-height: 1.25;
	margin: 1.5em 0 0.5em;
}

.ksa-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--accent-ink);
}

.ksa-prose ul,
.ksa-prose ol {
	padding-left: 1.4em;
	margin: 1.25em 0;
}

.ksa-prose li + li {
	margin-top: 0.5em;
}

.ksa-prose blockquote {
	margin: 1.6em 0;
	padding-left: 24px;
	border-left: 2px solid var(--accent);
	font-family: var(--serif);
	font-size: 20px;
	line-height: 1.5;
	color: var(--ink);
}

.ksa-prose code {
	background: var(--bg-deep);
	padding: 2px 6px;
	font-size: 0.9em;
}

.ksa-prose img {
	border: 1px solid var(--rule);
}

/* ==========================================================================
   16. Single course
   ========================================================================== */

.course-meta-row {
	margin: 48px 0 0;
	padding-top: 32px;
	border-top: 1px solid var(--rule);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

@media (min-width: 768px) {
	.course-meta-row {
		grid-template-columns: repeat(4, 1fr);
	}
}

.course-meta-row dd {
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 500;
}

.status-pill {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--ink);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 500;
}

.status-pill--enrolling {
	background: var(--secondary);
	border-color: var(--secondary);
	color: var(--bg);
}

.status-pill--closed {
	border-color: var(--muted);
	color: var(--muted);
}

.outcome-list {
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
	max-width: 44rem;
}

.outcome-list li {
	display: flex;
	gap: 16px;
	padding: 20px 0;
	border-top: 1px solid var(--rule);
	font-size: 16px;
	line-height: 1.6;
}

/* ==========================================================================
   17. Blog / archive lists & pagination
   ========================================================================== */

.post-row {
	display: block;
	padding: 40px 0;
	border-bottom: 1px solid var(--rule);
}

.post-row h2 {
	margin: 8px 0 0;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: -0.01em;
	transition: color 0.2s ease;
}

.post-row:hover h2 {
	color: var(--accent-ink);
}

.post-row p {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 15px;
	max-width: 40rem;
}

.ksa-pagination {
	display: flex;
	gap: 16px;
	justify-content: space-between;
	padding: 40px 0;
	font-size: 14px;
	font-weight: 500;
}

/* ==========================================================================
   18. Motion
   ========================================================================== */

@keyframes ksaFadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-up {
	animation: ksaFadeUp 0.8s ease forwards;
	opacity: 0;
}

.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.fade-up {
		opacity: 1;
	}
}

/* ==========================================================================
   19. Blog — listing rows, pagination, single post, search, 404
   ========================================================================== */

.post-list {
	border-top: 1px solid var(--rule);
}

.post-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	padding: 40px 0;
	border-bottom: 1px solid var(--rule);
}

@media (min-width: 768px) {
	.post-row {
		grid-template-columns: 260px 1fr;
		gap: 40px;
		align-items: start;
	}
}

.post-row__media {
	display: block;
}

.post-row__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 1px solid var(--rule);
}

.post-row__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.post-row__cats a {
	color: var(--accent-ink);
}

.post-row__cats a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.post-row__title {
	margin: 12px 0 0;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -0.01em;
}

@media (min-width: 768px) {
	.post-row__title {
		font-size: 28px;
	}
}

.post-row__title a {
	transition: color 0.2s ease;
}

.post-row__title a:hover {
	color: var(--accent-ink);
}

.post-row__excerpt {
	margin: 12px 0 0;
	max-width: 40rem;
	font-size: 15px;
	line-height: 1.65;
	color: var(--muted);
}

.post-row__more {
	display: inline-block;
	margin-top: 16px;
	font-size: 14px;
}

/* Numbered pagination */
.ksa-pagenums {
	margin-top: 48px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ksa-pagenums .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--rule);
	font-size: 14px;
	font-weight: 500;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ksa-pagenums .page-numbers:hover {
	border-color: var(--ink);
}

.ksa-pagenums .page-numbers.current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--bg);
}

.ksa-pagenums .page-numbers.dots {
	border-color: transparent;
	min-width: 24px;
	padding: 0;
}

/* Single post */
.post-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.post-hero__thumb {
	margin-top: 40px;
}

.post-hero__thumb img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	border: 1px solid var(--rule);
}

.post-tags {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.post-tags a {
	display: inline-block;
	padding: 5px 12px;
	border: 1px solid var(--rule);
	color: var(--muted);
	transition: border-color 0.2s ease, color 0.2s ease;
}

.post-tags a:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 640px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}

	.post-nav__item--next {
		text-align: right;
	}
}

.post-nav__item {
	display: block;
}

.post-nav__title {
	display: block;
	margin-top: 8px;
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	transition: color 0.2s ease;
}

.post-nav__item:hover .post-nav__title {
	color: var(--accent-ink);
}

/* Search form */
.ksa-searchform {
	margin-top: 32px;
	display: flex;
	align-items: flex-end;
	gap: 16px;
	max-width: 30rem;
}

.ksa-searchform .input-field {
	flex: 1;
}

/* Comments */
.ksa-comments {
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid var(--rule);
	max-width: 44rem;
}

.ksa-comments__title {
	margin: 0 0 24px;
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 400;
	letter-spacing: -0.01em;
}

.ksa-comments .comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ksa-comments .comment-list ol {
	list-style: none;
	padding-left: 24px;
}

.ksa-comments .comment-body {
	padding: 24px 0;
	border-top: 1px solid var(--rule);
}

.ksa-comments .comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	font-weight: 500;
}

.ksa-comments .comment-author img {
	border-radius: 50%;
}

.ksa-comments .comment-metadata {
	margin-top: 4px;
	font-size: 12px;
	color: var(--muted);
}

.ksa-comments .comment-content {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.7;
}

.ksa-comments .reply {
	margin-top: 8px;
	font-size: 13px;
	font-weight: 500;
}

.ksa-comments .comment-respond {
	margin-top: 40px;
}

.ksa-comments .comment-reply-title {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 400;
	letter-spacing: -0.01em;
}

.ksa-comments label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.ksa-comments input[type="text"],
.ksa-comments input[type="email"],
.ksa-comments input[type="url"],
.ksa-comments textarea {
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--ink);
	border-radius: 0;
	padding: 12px 0;
	font-family: var(--sans);
	font-size: 16px;
	color: var(--ink);
	outline: none;
}

.ksa-comments textarea {
	border: 1px solid var(--ink);
	padding: 12px;
}

.ksa-comments .form-submit input[type="submit"] {
	display: inline-block;
	padding: 17px 24px;
	background: var(--ink);
	border: 1px solid var(--ink);
	color: var(--bg);
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1;
	cursor: pointer;
}

.ksa-comments .form-submit input[type="submit"]:hover {
	background: var(--secondary);
	border-color: var(--secondary);
}

/* 404 */
.ksa-404__code {
	font-family: var(--serif);
	font-size: clamp(64px, 14vw, 140px);
	line-height: 1;
	font-weight: 300;
	color: var(--accent);
	letter-spacing: -0.03em;
}

/* ==========================================================================
   20. WordPress core alignment & caption classes
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0 24px 24px 0;
}

.alignright {
	float: right;
	margin: 0 0 24px 24px;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.ksa-prose figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted);
}

.sticky .post-row__title::after {
	content: ' ★';
	color: var(--accent);
}

.gallery-caption {
	font-size: 13px;
	color: var(--muted);
}
