/* ==========================================================================
   KalimHub — main stylesheet (mobile-first, no web fonts, no frameworks)
   ========================================================================== */

:root {
	--navy: #12304f;
	--navy-2: #1d4e89;
	--teal: #0b7a75;
	--teal-2: #2bb3a6;
	--ink: #1c2733;
	--text: #2b3644;
	--muted: #5b6776;
	--line: #e3e9f0;
	--soft: #f4f7fb;
	--soft-2: #eef3f8;
	--bg: #ffffff;
	--accent: var(--navy-2);
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(18, 48, 79, .06), 0 4px 16px rgba(18, 48, 79, .06);
	--shadow-hover: 0 2px 4px rgba(18, 48, 79, .08), 0 10px 28px rgba(18, 48, 79, .10);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--font-read: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--container: 1200px;
	--gutter: 16px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--teal); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
	z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 800px; }
.muted { color: var(--muted); }
.lead { font-size: 1.125rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: .75em; }

/* ---------- Icons ---------- */
.kh-icon { flex-shrink: 0; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: 999px; border: 2px solid transparent;
	font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Chips / tags ---------- */
.chip {
	display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600;
	color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff);
	border: 1px solid color-mix(in srgb, var(--accent) 22%, #fff);
	text-decoration: none; line-height: 1.5;
}
a.chip:hover { color: #fff; background: var(--accent); }
.chip-muted { --accent: #5b6776; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--soft-2); color: var(--muted); white-space: nowrap; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.header-top {
	display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "search search";
	align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px;
}
.brand { grid-area: brand; min-width: 0; }
.header-search { grid-area: search; }
.menu-toggle { grid-area: toggle; }
.utility-nav { display: none; }

.text-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-text { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.logo-text span { color: var(--teal); }
.custom-logo-link img { max-height: 44px; width: auto; }

.search-form {
	position: relative; display: flex; align-items: center; background: var(--soft);
	border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 14px; transition: border-color .15s, box-shadow .15s;
}
.search-form:focus-within { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29, 78, 137, .14); background: #fff; }
.search-form .kh-icon { color: var(--muted); }
.search-field { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 10px; font-size: .95rem; outline: none; }
.search-field::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-submit {
	border: 0; background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 16px;
	font-weight: 600; font-size: .9rem; cursor: pointer;
}
.search-submit:hover { background: var(--navy-2); }

.menu-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline; }

/* Mobile menu drawer */
.header-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.header-nav.is-open { display: block; }
.primary-nav ul, .utility-nav ul, .utility-nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a, .utility-nav-mobile a {
	display: block; padding: 12px 4px; text-decoration: none; color: var(--ink); font-weight: 600;
	border-bottom: 1px solid var(--line);
}
.primary-nav .sub-menu a { padding-left: 20px; font-weight: 500; color: var(--muted); }
.primary-nav .current-menu-item > a, .primary-nav .current-category-ancestor > a,
.primary-nav .current-menu-ancestor > a, .primary-nav .current-post-ancestor > a { color: var(--teal); }
.utility-nav-mobile { padding-bottom: 12px; }
.utility-nav-mobile a { color: var(--muted); }

@media (min-width: 900px) {
	.header-top { grid-template-columns: auto minmax(260px, 560px) 1fr auto; grid-template-areas: "brand search utility toggle"; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
	.utility-nav { display: block; grid-area: utility; justify-self: end; }
	.utility-nav ul { display: flex; gap: 4px; margin-right: -12px; }
	.utility-nav a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; border-radius: 8px; }
	.utility-nav a:hover, .utility-nav .current-menu-item > a { background: var(--soft); color: var(--navy); }
	.utility-nav-mobile { display: none; }
}

@media (min-width: 1200px) {
	.menu-toggle { display: none; }
	.header-top { grid-template-areas: "brand search utility"; grid-template-columns: auto minmax(280px, 560px) 1fr; }
	.header-nav { display: block; border-top: 1px solid var(--line); }
	.primary-nav > ul { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 2px; overflow-x: auto; scrollbar-width: none; }
	.primary-nav > ul::-webkit-scrollbar { display: none; }
	.primary-nav > ul > li { position: relative; flex-shrink: 0; }
	.primary-nav > ul > li > a {
		padding: 12px 7px; border: 0; font-size: .9rem; font-weight: 600; color: var(--text);
		border-bottom: 3px solid transparent; white-space: nowrap;
	}
	.primary-nav > ul > li:first-child > a { padding-left: 0; }
	.primary-nav > ul > li:last-child > a { padding-right: 0; }
	.primary-nav > ul > li > a:hover { color: var(--navy); border-bottom-color: var(--line); }
	.primary-nav > ul > .current-menu-item > a, .primary-nav > ul > .current-category-ancestor > a,
	.primary-nav > ul > .current-menu-ancestor > a, .primary-nav > ul > .current-post-ancestor > a { color: var(--navy); border-bottom-color: var(--teal-2); }
	.primary-nav .sub-menu {
		display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff;
		border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-hover); padding: 6px;
	}
	.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
	.primary-nav .sub-menu a { border: 0; padding: 9px 12px; border-radius: 6px; color: var(--text); }
	.primary-nav .sub-menu a:hover { background: var(--soft); }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; color: #a7b2be; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--navy-2); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 48px 0; }
.section-tight { padding: 28px 0 56px; }
.section-alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 26px; max-width: 720px; }
.section-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: .3em; }
.section-head p { color: var(--muted); margin: 0; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; max-width: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--navy-2); white-space: nowrap; }
.link-arrow:hover .kh-icon { transform: translateX(2px); }
@media (min-width: 900px) { .section { padding: 72px 0; } }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #f7fafd 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 44px; align-items: center; }
.hero-title { font-size: clamp(2rem, 1.35rem + 2.9vw, 3.25rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: .4em; max-width: 19ch; }
.hero-text { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--muted); max-width: 54ch; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-topics { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; }
.hero-topics a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.hero-topics a:hover { border-color: var(--navy-2); color: var(--navy-2); }
.hero-topics-label { color: var(--muted); font-weight: 600; }
.hero-visual { display: none; }
.hero-art { width: 100%; height: auto; }
@media (min-width: 900px) {
	.hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; padding-top: 72px; padding-bottom: 80px; }
	.hero-visual { display: block; }
}

/* ---------- Topic cards ---------- */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.topic-card {
	position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.topic-card:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.topic-card h3 { font-size: 1.08rem; margin: 8px 0 0; }
.topic-card h3 a { color: var(--ink); text-decoration: none; }
.topic-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.topic-card p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.topic-count { font-size: .8rem; font-weight: 600; color: var(--accent); margin-top: 6px; }
.topic-icon {
	display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px;
	color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff);
}
.topic-icon-lg { width: 60px; height: 60px; border-radius: 14px; }
@media (min-width: 560px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .topic-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

/* ---------- Article cards ---------- */
.card-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.card-grid-ad { grid-column: 1 / -1; }
.card-grid-resources { margin-bottom: 26px; }

.card {
	position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--soft-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--accent);
	background:
		radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 14%, transparent) 0 22%, transparent 23%),
		radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--accent) 10%, transparent) 0 28%, transparent 29%),
		color-mix(in srgb, var(--accent) 6%, #fff);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-top { margin-bottom: 10px; min-height: 26px; }
.card-title { font-size: 1.14rem; line-height: 1.35; margin: 0 0 8px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--navy-2); }
.card-excerpt { color: var(--muted); font-size: .94rem; margin: 0 0 14px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.read-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--navy-2); text-decoration: none; white-space: nowrap; }
.read-more:hover { color: var(--teal); }

/* ---------- Resources ---------- */
.resource-types { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .resource-types { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .resource-types { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.resource-type { display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.resource-type > div { flex: 1; min-width: 0; }
.resource-type h3 { font-size: 1rem; margin: 2px 0 4px; }
.resource-type h3 a { color: var(--ink); text-decoration: none; }
.resource-type p { font-size: .9rem; color: var(--muted); margin: 0; }
.rt-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 10px; background: var(--soft-2); color: var(--navy); flex-shrink: 0; }
.resource-download { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Services ---------- */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.service-card h3 { font-size: 1.08rem; margin: 12px 0 6px; }
.service-card h3 a { color: var(--ink); text-decoration: none; }
.service-card h3 a::after { content: ""; position: absolute; inset: 0; }
.service-card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter-band { background: var(--navy); color: #dbe6f2; padding: 44px 0; }
.newsletter-band h2 { color: #fff; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.85rem); margin-bottom: .3em; }
.newsletter-band p { margin: 0; }
.nl-grid { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .nl-grid { grid-template-columns: 1fr 1fr; gap: 48px; } .newsletter-band { padding: 56px 0; } }
.nl-form { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-form input[type="email"] {
	flex: 1 1 220px; min-width: 0; padding: 12px 18px; border-radius: 999px; border: 1px solid #c9d5e2; background: #fff; color: var(--ink);
}
.newsletter-band .btn-primary { background: var(--teal-2); color: #06302d; }
.newsletter-band .btn-primary:hover { background: #fff; color: var(--navy); }
.nl-small { font-size: .82rem; opacity: .8; margin-top: 10px !important; }
.form-msg { padding: 10px 14px; border-radius: 8px; font-size: .92rem; margin: 12px 0 0; }
.form-msg.ok { background: #e6f6ee; color: #135c35; }
.form-msg.err { background: #fdecec; color: #8a1f1f; }

/* ---------- About (home) ---------- */
.about-grid { display: grid; gap: 32px; align-items: start; }
.about-grid h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.principles li { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.principles h3 { font-size: 1rem; margin: 2px 0 4px; }
.principles p { margin: 0; color: var(--muted); font-size: .93rem; }
.p-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 10px; background: #e3f4f2; color: var(--teal); flex-shrink: 0; }

.empty-state { text-align: center; padding: 44px 20px; border: 1px dashed #c9d5e2; border-radius: var(--radius); background: #fff; color: var(--muted); }
.empty-state .kh-icon { color: var(--navy-2); margin-bottom: 10px; }
.empty-state p { max-width: 520px; margin: 0 auto 16px; }
.empty-state .search-form { max-width: 520px; margin: 0 auto; }

/* ==========================================================================
   Archive header
   ========================================================================== */
.archive-header { background: var(--soft); border-bottom: 1px solid var(--line); padding: 26px 0 30px; }
.archive-head-row { display: flex; align-items: center; gap: 16px; }
.archive-head-row img { border-radius: 50%; }
.archive-title { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); margin: 0; }
.archive-desc { color: var(--muted); max-width: 760px; margin-top: 12px; font-size: 1.05rem; }
.archive-desc p:last-child { margin-bottom: 0; }
.subtopics { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.subtopics .chip { font-size: .85rem; padding: 6px 14px; }
.subtopics-center { justify-content: center; }
.search-page-form { max-width: 560px; margin-top: 16px; }
.author-job { color: var(--muted); margin: 4px 0 0; }

/* Pagination */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px; justify-content: center;
	border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff;
}
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--navy-2); color: var(--navy-2); }

/* ==========================================================================
   Article
   ========================================================================== */
.article-header { padding: 0 0 4px; }
.article-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.article-title { font-size: clamp(1.85rem, 1.35rem + 2.2vw, 2.75rem); line-height: 1.16; letter-spacing: -.022em; margin-bottom: .45em; }
.article-dek { font-size: 1.16rem; color: var(--muted); margin-bottom: 1.1em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .9rem; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.post-meta .meta-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.post-meta .meta-author img { border-radius: 50%; width: 32px; height: 32px; }
.post-meta .meta-author a { color: var(--ink); text-decoration: none; }
.post-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.article-figure { margin: 24px 0 28px; }
.article-figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: center; }

.article-layout { max-width: 808px; padding-top: 24px; padding-bottom: 48px; }
.article-main { min-width: 0; }
.article-aside { display: none; }
@media (min-width: 1140px) {
	.article-layout.has-aside { max-width: 1140px; display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 60px; justify-content: center; }
	.article-layout.has-aside .toc-inline { display: none; }
	.article-aside { display: block; }
	.aside-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; max-height: calc(100vh - 48px); overflow-y: auto; }
	.article-aside { padding-top: 40px; }
}

/* Table of contents */
.toc { font-size: .92rem; }
.toc-inline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 14px 18px; margin-bottom: 26px; }
.toc-inline summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.toc-inline .toc-list { margin-top: 10px; }
.toc-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0; }
.toc-list a { display: block; padding: 5px 0 5px 12px; color: var(--text); text-decoration: none; border-left: 2px solid var(--line); line-height: 1.4; }
.toc-list a:hover { color: var(--navy-2); border-left-color: var(--navy-2); }
.toc-list a.is-active { color: var(--navy); font-weight: 600; border-left-color: var(--teal-2); }
.toc-list .toc-l3 a { padding-left: 24px; font-size: .88rem; color: var(--muted); }
.widget { font-size: .93rem; }
.widget-title { font-weight: 700; color: var(--ink); }

/* ---------- Entry content typography ---------- */
.entry-content { font-family: var(--font-read); font-size: 1.08rem; line-height: 1.78; color: var(--text); overflow-wrap: break-word; }
@media (min-width: 768px) { .entry-content { font-size: 1.125rem; } }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2 { font-size: clamp(1.45rem, 1.25rem + .8vw, 1.75rem); margin-top: 2em; margin-bottom: .6em; scroll-margin-top: 20px; }
.entry-content h3 { font-size: clamp(1.18rem, 1.1rem + .4vw, 1.32rem); margin-top: 1.6em; margin-bottom: .5em; scroll-margin-top: 20px; }
.entry-content h4 { font-size: 1.08rem; margin-top: 1.4em; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a { color: var(--navy-2); text-decoration: underline; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--teal); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--teal); }
.entry-content strong { color: var(--ink); }
.entry-content blockquote, .entry-content .wp-block-quote {
	margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--teal-2); color: var(--ink); font-size: 1.12em;
}
.entry-content blockquote cite { display: block; font-size: .85rem; color: var(--muted); font-style: normal; margin-top: 6px; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: .86rem; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content code { font-family: var(--mono); font-size: .88em; background: var(--soft-2); padding: 2px 6px; border-radius: 4px; }
.entry-content pre { font-family: var(--mono); font-size: .9rem; background: #0f2236; color: #e3edf7; padding: 18px; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.6; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--soft-2); color: var(--ink); font-weight: 700; }
.entry-content .wp-block-table.kh-apa table { border: 0; }
.entry-content .kh-apa th, .entry-content .kh-apa td { border: 0; border-bottom: 1px solid var(--line); }
.entry-content .kh-apa thead th { background: none; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.entry-content .kh-apa tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
.entry-content .kh-apa figcaption { text-align: left; font-style: italic; }
.entry-content .wp-block-button__link { background: var(--navy); color: #fff; border-radius: 999px; padding: 11px 22px; text-decoration: none; font-weight: 600; font-size: 1rem; }
.entry-content .wp-block-button__link:hover { background: var(--navy-2); color: #fff; }
.entry-content .wp-block-embed iframe { width: 100%; }

/* Content boxes (block patterns) */
.entry-content .kh-box { border-radius: var(--radius); padding: 18px 22px; border: 1px solid var(--line); background: var(--soft); }
.entry-content .kh-box > :last-child { margin-bottom: 0; }
.entry-content .kh-box .box-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: .5em; color: var(--navy-2); }
.entry-content .kh-takeaways { background: #eef6ff; border-color: #cfe0f3; }
.entry-content .kh-definition { background: #fff; border-left: 4px solid var(--navy-2); }
.entry-content .kh-example { background: #eaf7f5; border-color: #c4e7e2; }
.entry-content .kh-example .box-label { color: var(--teal); }
.entry-content .kh-tip { background: #fff8eb; border-color: #f3dfb5; }
.entry-content .kh-tip .box-label { color: #8a5300; }
.entry-content .kh-faq { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; margin-bottom: 10px; background: #fff; }
.entry-content .kh-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ink); list-style-position: outside; }
.entry-content .kh-faq > :not(summary) { padding: 0 18px; }
.entry-content .kh-faq[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.entry-content .kh-references { font-size: .92rem; color: var(--muted); }
.entry-content .kh-references li { padding-left: .2em; }

.kh-cta { border-radius: var(--radius); padding: 22px 24px; background: var(--navy); color: #dbe6f2; margin: 1.5em 0; }
.kh-cta .kh-cta-title { color: #fff; font-weight: 700; font-size: 1.2rem; margin-bottom: .3em; }
.kh-cta .btn-primary, .kh-cta .wp-block-button__link { background: var(--teal-2); color: #06302d; }
.kh-cta .btn-primary:hover, .kh-cta .wp-block-button__link:hover { background: #fff; color: var(--navy); }
.disclosure { font-size: .9rem !important; line-height: 1.6 !important; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--muted); }

/* Ads — reserved space, clearly labelled, never dominant */
.ad-slot { margin: 2em 0; padding: 10px 0; text-align: center; min-height: 120px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #8a96a3; margin-bottom: 6px; }
.ad-sidebar { border: 0; min-height: 250px; }

/* Tags, share, author */
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; }
.tags-label { font-weight: 600; color: var(--ink); font-size: .92rem; }
.tag { font-size: .86rem; padding: 4px 12px; background: var(--soft-2); border-radius: 999px; text-decoration: none; color: var(--text); }
.tag:hover { background: var(--navy); color: #fff; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 28px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-label { margin: 0; font-weight: 600; color: var(--ink); font-size: .92rem; }
.share-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.share-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; text-decoration: none;
}
.share-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.copy-status { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: .75rem; white-space: nowrap; background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 4px; }
.copy-status:empty { display: none; }

.author-box { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); margin: 28px 0; }
.author-box img { border-radius: 50%; width: 72px; height: 72px; flex-shrink: 0; }
.author-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; font-weight: 700; }
.author-name { font-size: 1.15rem; font-weight: 700; margin: 2px 0 2px; }
.author-name a { color: var(--ink); text-decoration: none; }
.author-box .author-job { font-size: .92rem; margin: 0 0 8px; }
.author-bio { font-size: .95rem; margin: 0 0 10px; }
.author-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; }
.author-links a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 600; }

.post-nav { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; }
.post-nav-link:hover { border-color: var(--navy-2); }
.post-nav-link.next { text-align: right; align-items: flex-end; }
.post-nav-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.post-nav-title { color: var(--ink); font-weight: 700; line-height: 1.35; }

.related h2 { font-size: 1.6rem; margin-bottom: 24px; }
.page-links { margin-top: 24px; font-weight: 600; }

/* ==========================================================================
   Pages
   ========================================================================== */
.page-header { padding: 26px 0 8px; }
.page-header-band { background: var(--soft); border-bottom: 1px solid var(--line); padding: 26px 0 32px; margin-bottom: 36px; }
.page-title { font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.6rem); letter-spacing: -.02em; margin-bottom: .3em; }
.page-intro { font-size: 1.12rem; color: var(--muted); max-width: 680px; margin: 0; }
.page-article .entry-content { padding-bottom: 56px; }
.page-article > .container-narrow > .entry-content { padding-top: 20px; }

.about-layout { display: grid; gap: 32px; padding-bottom: 56px; }
.about-layout .entry-content { padding-bottom: 0; max-width: 760px; }
@media (min-width: 960px) { .about-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; } }
.founder-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; background: #fff; box-shadow: var(--shadow); }
@media (min-width: 960px) { .founder-card { position: sticky; top: 24px; } }
.founder-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.founder-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); font-weight: 700; margin: 0; }
.founder-name { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 4px 0; }
.founder-job { color: var(--muted); font-size: .92rem; }
.founder-card .author-links { justify-content: center; margin-bottom: 18px; }

.contact-layout { display: grid; gap: 32px; padding-bottom: 56px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; } }
.contact-layout .entry-content { padding-bottom: 8px; }
.contact-aside { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--soft); align-self: start; }
.contact-aside h2 { font-size: 1.1rem; }
.contact-aside .footer-social a { color: var(--navy); border-color: var(--line); }
.contact-form .field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .contact-form .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .95rem; }
.contact-form input, .contact-form select, .contact-form textarea,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid #c9d5e2; border-radius: 10px; background: #fff;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus, .comment-form textarea:focus { border-color: var(--navy-2); outline: 3px solid rgba(29, 78, 137, .14); }

.error-404 { text-align: center; }
.error-404 .search-form { max-width: 520px; margin: 24px auto; }
.error-404 .subtopics { justify-content: center; margin-bottom: 28px; }

/* Comments */
.comments-wrap { padding-bottom: 56px; padding-top: 32px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-author img { border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 8px; }
.comment-meta { font-size: .85rem; color: var(--muted); }
.comment-reply-title { font-size: 1.3rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #0e2640; color: #b8c7d8; padding-top: 48px; font-size: .94rem; }
.site-footer a { color: #dbe6f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 36px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; } }
.footer-logo .logo-text { color: #fff; }
.footer-logo .logo-text span { color: var(--teal-2); }
.footer-about p { margin-top: 12px; max-width: 360px; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 12px; font-size: .95rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-social { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 8px; }
.footer-social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; }
.footer-newsletter .nl-form input[type="email"] { border-color: transparent; }
.footer-newsletter .btn-primary { background: var(--teal-2); color: #06302d; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .kh-icon { vertical-align: -2px; }

/* WordPress core alignment helpers */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignwide { margin-left: auto; margin-right: auto; }
@media (min-width: 900px) { .entry-content .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; } }
.wp-caption-text { font-size: .86rem; color: var(--muted); }
.sticky .card-title::before { content: "★ "; color: var(--teal); }

@media print {
	.site-header, .site-footer, .share, .article-aside, .toc, .newsletter-band, .related, .ad-slot, .post-nav, .comments-wrap { display: none !important; }
	.entry-content { font-size: 12pt; }
	a { color: #000; }
}

/* Compact topic cards on small phones */
@media (max-width: 559px) {
	.topic-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 14px 16px; }
	.topic-card .topic-icon { width: 42px; height: 42px; }
	.topic-card h3 { margin: 0; flex: 1; font-size: 1.02rem; }
	.topic-card p { display: none; }
	.topic-card .topic-count { flex-basis: 100%; margin: 0 0 0 56px; }
}
