/* ==========================================================================
   Keystone Blog — main stylesheet
   Colors and fonts come from CSS variables printed by inc/customizer.php.
   ========================================================================== */

:root {
	--k-navy: #0f2b46;
	--k-blue: #1f6fb2;
	--k-green: #6cb33f;
	--k-orange: #f28c28;
	--k-ink: #1d2733;
	--k-mist: #f3f6f9;
	--k-line: #dde3ea;
	--k-muted: #5b6776;
	--k-white: #ffffff;

	--k-font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--k-font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--k-article-size: 17px;

	--k-radius-sm: 4px;
	--k-radius: 8px;
	--k-container: 1240px;
	--k-gap: 40px;
	--k-sidebar: 320px;
	--k-header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
	margin: 0;
	font-family: var(--k-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--k-ink);
	background: var(--k-white);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--k-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--k-orange); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--k-font-head);
	color: var(--k-navy);
	line-height: 1.3;
	font-weight: 600;
	margin: 0 0 .6em;
}
p { margin: 0 0 1.1em; }

.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: 12px; top: -60px; z-index: 1000;
	background: var(--k-navy); color: #fff; padding: 10px 16px; border-radius: var(--k-radius-sm);
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--k-container); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 24px; border-radius: var(--k-radius-sm); border: 2px solid transparent;
	font-family: var(--k-font-head); font-weight: 600; font-size: 15px; line-height: 1.2;
	text-decoration: none; transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-cta { background: var(--k-green); color: #fff; }
.btn-cta:hover { background: color-mix(in srgb, var(--k-green) 85%, #000); color: #fff; }
.btn-outline { border-color: var(--k-blue); color: var(--k-blue); background: transparent; }
.btn-outline:hover { background: var(--k-blue); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--k-navy); color: #cfd9e4; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 16px; }
.topbar a { color: #cfd9e4; }
.topbar a:hover { color: #fff; }
.topbar__email { display: inline-flex; align-items: center; gap: 6px; }
.topbar__email .icon { width: 16px; height: 16px; }
.topbar__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.topbar__nav li { position: relative; }
.topbar__nav .sub-menu {
	display: none; position: absolute; right: 0; top: 100%; z-index: 60; min-width: 160px;
	background: #fff; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm);
	padding: 6px 0; flex-direction: column; gap: 0; box-shadow: 0 8px 24px rgba(15, 43, 70, .12);
}
.topbar__nav .sub-menu a { display: block; padding: 6px 14px; color: var(--k-ink); }
.topbar__nav li:hover > .sub-menu, .topbar__nav li:focus-within > .sub-menu { display: flex; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--k-line); position: relative; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--k-header-h); gap: 24px; }
.site-brand img { max-height: 52px; width: auto; }
.site-title { font-family: var(--k-font-head); font-weight: 700; font-size: 22px; color: var(--k-navy); }
.site-title:hover { text-decoration: none; }

.primary-nav { display: flex; align-items: center; gap: 24px; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li > a {
	display: block; padding: 26px 14px; font-family: var(--k-font-head); font-weight: 500;
	font-size: 15px; color: var(--k-navy);
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a { color: var(--k-blue); text-decoration: none; }
.primary-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 3px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: 10px 0; position: absolute; left: 0; top: 100%;
	min-width: 260px; background: #fff; border: 1px solid var(--k-line); border-top: 3px solid var(--k-blue);
	border-radius: 0 0 var(--k-radius) var(--k-radius); box-shadow: 0 14px 32px rgba(15, 43, 70, .14);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: 9px 20px; color: var(--k-ink); font-size: 14.5px; }
.primary-nav .sub-menu a:hover { background: var(--k-mist); color: var(--k-blue); text-decoration: none; }
.primary-nav .sub-menu .sub-menu { left: 100%; top: -10px; border-top-width: 1px; border-radius: var(--k-radius); }

.nav-toggle {
	display: none; background: none; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm);
	padding: 8px; color: var(--k-navy);
}

/* ---------- Notice bar ---------- */
.notice-bar { background: color-mix(in srgb, var(--k-orange) 10%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--k-orange) 35%, #fff); }
.notice-bar__inner { display: flex; align-items: flex-start; gap: 14px; padding-top: 14px; padding-bottom: 14px; font-size: 14.5px; }
.notice-bar__inner > .icon { flex: 0 0 24px; width: 24px; height: 24px; color: var(--k-orange); margin-top: 2px; }
.notice-bar__text { flex: 1; }
.notice-bar__text p { margin: 0 0 .35em; }
.notice-bar__text p:last-child { margin: 0; }
.notice-bar__text a { font-weight: 600; }
.notice-bar__close { background: none; border: 0; padding: 4px; color: var(--k-muted); }
.notice-bar__close:hover { color: var(--k-ink); }
.notice-bar.is-hidden { display: none; }

/* ---------- Layout ---------- */
.site-content { padding: 40px 0 72px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--k-sidebar); gap: var(--k-gap); align-items: start; }
.layout--page { grid-template-columns: minmax(0, 860px); justify-content: center; }
.layout__main { min-width: 0; }

.page-header { margin-bottom: 28px; }
.page-title { font-size: clamp(26px, 3vw, 34px); font-weight: 700; margin-bottom: .3em; }
.archive-description { color: var(--k-muted); max-width: 70ch; }
.archive-description p:last-child { margin: 0; }
.empty-state { padding: 32px; background: var(--k-mist); border-radius: var(--k-radius); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 13.5px; color: var(--k-muted); margin-bottom: 16px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "\00bb"; margin: 0 8px; color: var(--k-muted); }
.breadcrumbs a { color: var(--k-blue); }

/* ---------- Post list / cards ---------- */
.post-list { display: flex; flex-direction: column; gap: 28px; }
.post-list:empty { display: none; }
.post-list + .newsletter--band { margin-top: 36px; }
.newsletter--band + .post-list { margin-top: 36px; }

.card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--k-line); }
.post-list > .card:last-child { border-bottom: 0; padding-bottom: 0; }
.card__media { display: block; border-radius: var(--k-radius); overflow: hidden; background: var(--k-mist); aspect-ratio: 2 / 1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--k-navy), var(--k-blue)); opacity: .12; }
.card__title { font-size: 20px; margin: 0 0 6px; line-height: 1.35; }
.card__title a { color: var(--k-navy); }
.card__title a:hover { color: var(--k-blue); text-decoration: none; }
.card__meta { font-size: 13.5px; color: var(--k-muted); margin: 0 0 10px; }
.card__excerpt { margin: 0; color: #3b4654; font-size: 15px; }

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

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.sidebar__sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; }
.admin-bar .sidebar__sticky { top: 56px; }
.widget { font-size: 15px; }
.widget-title {
	font-size: 17px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--k-line); position: relative;
}
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 2px; background: var(--k-blue); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget-recent li, .widget-cats li, .widget_nav_menu li, .widget_recent_entries li, .widget_categories li {
	padding: 9px 0; border-bottom: 1px dashed var(--k-line);
}
.widget-recent li:last-child, .widget-cats li:last-child { border-bottom: 0; }
.widget-recent a, .widget-cats a { color: var(--k-ink); }
.widget-recent a:hover, .widget-cats a:hover, .widget-cats .current-cat > a { color: var(--k-blue); }
.widget-banner img { border-radius: var(--k-radius); width: 100%; }

.search-form { display: flex; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); overflow: hidden; background: #fff; }
.search-form:focus-within { border-color: var(--k-blue); }
.search-field { flex: 1; min-width: 0; border: 0; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--k-ink); background: transparent; }
.search-field:focus { outline: none; }
.search-submit { border: 0; background: var(--k-navy); color: #fff; padding: 0 16px; }
.search-submit:hover { background: var(--k-blue); }

/* Recent posts with thumbnails */
.widget-recent-thumbs li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--k-line); }
.widget-recent-thumbs li:last-child { border-bottom: 0; }
.rt-thumb img { border-radius: var(--k-radius-sm); width: 84px; height: 56px; object-fit: cover; }
.rt-title { display: block; color: var(--k-ink); font-weight: 600; font-size: 14px; line-height: 1.4; }
.rt-title:hover { color: var(--k-blue); }
.widget-recent-thumbs time { font-size: 12.5px; color: var(--k-muted); }

/* ---------- Table of contents ---------- */
.widget-toc { background: var(--k-mist); border: 1px solid var(--k-line); border-radius: var(--k-radius); padding: 20px 20px 14px; max-height: calc(100vh - 80px); overflow: auto; }
.widget-toc .widget-title { border-bottom-color: #cfd8e2; }
.toc-list { list-style: none; counter-reset: toc; margin: 0; padding: 0; font-size: 14.5px; }
.toc-list li { counter-increment: toc; margin: 0; }
.toc-list a {
	display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 7px 8px 7px 0; color: var(--k-ink);
	border-left: 3px solid transparent; padding-left: 10px; margin-left: -10px; line-height: 1.45;
}
.toc-list a::before { content: counter(toc) "."; color: var(--k-muted); font-weight: 600; }
.toc-list a:hover { color: var(--k-blue); text-decoration: none; }
.toc-list a.is-active { color: var(--k-blue); border-left-color: var(--k-blue); font-weight: 600; }
.toc-list a.is-active::before { color: var(--k-blue); }
.toc-list .toc-l3 a { padding-left: 32px; font-size: 13.5px; }

/* ---------- Newsletter ---------- */
.newsletter { border-radius: var(--k-radius); }
.newsletter__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--k-green); color: #fff; display: grid; place-items: center; }
.newsletter__icon .icon { width: 22px; height: 22px; }
.newsletter__title { font-size: 19px; margin: 0 0 4px; }
.newsletter__text { margin: 0; color: var(--k-muted); font-size: 14.5px; }
.newsletter__form form { display: flex; gap: 8px; }
.newsletter__form input[type="email"] {
	flex: 1; min-width: 0; padding: 12px 14px; font: inherit; font-size: 15px;
	border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); background: #fff; color: var(--k-ink);
}
.newsletter__form input[type="email"]:focus { outline: none; border-color: var(--k-blue); }
.newsletter__privacy { font-size: 12.5px; color: var(--k-muted); margin: 8px 0 0; }
.hp-field { position: absolute; left: -9999px; }

.newsletter--widget { background: var(--k-navy); color: #dbe4ee; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.newsletter--widget .newsletter__title { color: #fff; }
.newsletter--widget .newsletter__text, .newsletter--widget .newsletter__privacy { color: #b9c7d6; }
.newsletter--widget .newsletter__form form { flex-direction: column; }
.newsletter--widget input[type="email"] { border-color: transparent; }

.newsletter--band {
	display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: center;
	background: var(--k-mist); border: 1px solid var(--k-line); border-left: 4px solid var(--k-green); padding: 26px 28px;
}
.layout--single .newsletter--band { margin-top: 48px; }
.newsletter--setup { padding: 16px; border: 2px dashed var(--k-orange); background: #fff; font-size: 14px; }
.newsletter--setup p { margin: 0; }

/* ==========================================================================
   Single article
   ========================================================================== */
.article__header { margin-bottom: 22px; }
.article__title { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; line-height: 1.25; margin-bottom: 12px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--k-muted); margin: 0; }
.article__reading::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; vertical-align: middle; margin-right: 20px; margin-left: -10px; }
.article__hero { margin: 0 0 32px; }
.article__hero img { width: 100%; border-radius: var(--k-radius); }

/* ---------- Entry content: long-form typography ---------- */
.entry-content { font-size: var(--k-article-size); line-height: 1.75; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 1.55em; margin: 1.8em 0 .6em; padding-top: .2em; }
.entry-content h3 { font-size: 1.25em; margin: 1.6em 0 .5em; }
.entry-content h4 { font-size: 1.08em; margin: 1.4em 0 .4em; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--k-blue) 35%, transparent); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--k-blue); }
.entry-content strong { color: #0e1823; font-weight: 700; }
.entry-content img { border-radius: var(--k-radius); }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { font-size: 14px; color: var(--k-muted); text-align: center; margin-top: 8px; }
.entry-content hr { border: 0; border-top: 1px solid var(--k-line); margin: 2.4em 0; }

/* Bullet lists: blue check markers */
.entry-content ul { list-style: none; padding-left: 0; margin: 0 0 1.3em; }
.entry-content ul li { position: relative; padding-left: 32px; margin-bottom: .55em; }
.entry-content ul li::before {
	content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%;
	background: var(--k-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.entry-content ul ul { margin: .55em 0 0; }
.entry-content ul ul li::before { width: 8px; height: 8px; top: .7em; left: 6px; background: var(--k-blue); }

/* Numbered lists: filled circle numbers */
.entry-content ol { list-style: none; counter-reset: ol; padding-left: 0; margin: 0 0 1.3em; }
.entry-content ol > li { counter-increment: ol; position: relative; padding-left: 38px; margin-bottom: .65em; }
.entry-content ol > li::before {
	content: counter(ol); position: absolute; left: 0; top: .15em; width: 26px; height: 26px; border-radius: 50%;
	background: var(--k-navy); color: #fff; font-family: var(--k-font-head); font-size: 13px; font-weight: 600;
	display: grid; place-items: center; line-height: 1;
}
.entry-content ol ol > li::before { background: var(--k-mist); color: var(--k-navy); border: 1px solid var(--k-line); }

/* Tables: navy header row, bordered cells, striped body */
.table-scroll, .entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.8em 0; border: 1px solid var(--k-line); border-radius: var(--k-radius); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.55; margin: 0; min-width: 560px; }
.entry-content .wp-block-table table { border: 0; }
.entry-content th, .entry-content td { padding: 13px 16px; text-align: left; vertical-align: top; border: 1px solid var(--k-line); }
.entry-content tr > :first-child { border-left: 0; }
.entry-content tr > :last-child { border-right: 0; }
.entry-content tbody tr:last-child > * { border-bottom: 0; }
.entry-content thead th, .entry-content thead td,
.entry-content table:not(:has(thead)) tr:first-child > * {
	background: var(--k-navy); color: #fff; font-family: var(--k-font-head); font-weight: 600; font-size: .95em; border-color: rgba(255, 255, 255, .14); border-top: 0;
}
.entry-content thead strong, .entry-content table:not(:has(thead)) tr:first-child strong { color: #fff; }
.entry-content tbody tr:nth-child(even) > * { background: var(--k-mist); }
.entry-content table:not(:has(thead)) tbody tr:nth-child(even) > * { background: transparent; }
.entry-content table:not(:has(thead)) tbody tr:nth-child(odd):not(:first-child) > * { background: var(--k-mist); }
.entry-content tbody td:first-child { font-weight: 600; color: var(--k-navy); }
.entry-content table ul li { padding-left: 22px; }
.entry-content table ul li::before { width: 14px; height: 14px; background-size: 9px; top: .35em; }

/* Blockquote */
.entry-content blockquote { margin: 1.8em 0; padding: 18px 24px; border-left: 4px solid var(--k-blue); background: var(--k-mist); border-radius: 0 var(--k-radius) var(--k-radius) 0; font-style: italic; }
.entry-content blockquote p:last-child { margin: 0; }

/* Code */
.entry-content code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .88em; background: var(--k-mist); border: 1px solid var(--k-line); padding: .1em .4em; border-radius: 3px; }
.entry-content pre { background: #0d1b2a; color: #e3ebf3; padding: 18px 20px; border-radius: var(--k-radius); overflow-x: auto; font-size: 14.5px; line-height: 1.6; margin: 1.6em 0; }
.entry-content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* "Recommended:" callout */
.entry-content .recommended {
	background: color-mix(in srgb, var(--k-orange) 8%, #fff); border-left: 4px solid var(--k-orange);
	padding: 14px 18px; border-radius: 0 var(--k-radius-sm) var(--k-radius-sm) 0; font-size: .95em; margin: 1.6em 0;
}
.entry-content .recommended strong { color: var(--k-orange); margin-right: 4px; }
.entry-content .recommended a { font-weight: 600; text-decoration: none; }
.entry-content .recommended a:hover { text-decoration: underline; }

/* Notes */
.note { border: 1px solid var(--k-line); border-left-width: 4px; border-radius: var(--k-radius-sm); padding: 16px 20px; margin: 1.6em 0; background: #fff; font-size: .95em; }
.note p:last-child { margin: 0; }
.note__title { font-family: var(--k-font-head); font-weight: 600; margin-bottom: .3em; color: var(--k-navy); }
.note--info { border-left-color: var(--k-blue); background: color-mix(in srgb, var(--k-blue) 5%, #fff); }
.note--tip { border-left-color: var(--k-green); background: color-mix(in srgb, var(--k-green) 7%, #fff); }
.note--warning { border-left-color: var(--k-orange); background: color-mix(in srgb, var(--k-orange) 8%, #fff); }

/* ---------- CTA box ---------- */
.cta-box {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center;
	margin: 44px 0 36px; padding: 26px 28px; border: 1px solid var(--k-line); border-radius: var(--k-radius);
	background: linear-gradient(0deg, var(--k-mist), var(--k-mist)); position: relative; overflow: hidden;
}
.cta-box::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--k-green); }
.cta-box:not(:has(.cta-box__icon)) { grid-template-columns: minmax(0, 1fr) auto; }
.cta-box__icon { width: 72px; height: 72px; border-radius: var(--k-radius); background: #fff; border: 1px solid var(--k-line); display: grid; place-items: center; padding: 10px; }
.cta-box__icon img { max-height: 100%; width: auto; border-radius: 0; }
.cta-box__title { font-size: 20px; margin: 0 0 6px; }
.cta-box__text { margin: 0; color: #3b4654; font-size: 15px; line-height: 1.6; }
.cta-box .btn { white-space: nowrap; text-decoration: none; }
.entry-content .cta-box { font-size: 16px; }
.entry-content .cta-box .btn { color: #fff; }

/* ---------- Related, terms, author ---------- */
.related-posts { margin: 0 0 32px; }
.related-posts h3 { font-size: 19px; margin-bottom: 12px; }
.related-posts ol { list-style: decimal; padding-left: 22px; margin: 0; }
.related-posts li { margin-bottom: 8px; padding-left: 4px; }
.related-posts li::marker { color: var(--k-muted); font-weight: 600; }
.related-posts a { color: var(--k-ink); font-weight: 500; }
.related-posts a:hover { color: var(--k-blue); }

.article__footer { border-top: 1px solid var(--k-line); padding-top: 20px; font-size: 14.5px; color: var(--k-muted); }
.article__footer p { margin: 0 0 6px; }
.article__terms span { color: var(--k-ink); font-weight: 600; margin-right: 4px; }

.author-box { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; margin-top: 28px; padding: 24px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: #fff; }
.author-box__avatar img { border-radius: 50%; width: 96px; height: 96px; }
.author-box__name { font-size: 19px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.author-box__name a { color: var(--k-navy); }
.author-box__social { color: var(--k-blue) !important; display: inline-flex; }
.author-box__social .icon { width: 18px; height: 18px; }
.author-box p { margin: 0; font-size: 15px; color: #3b4654; }

/* ---------- Post navigation ---------- */
.post-navigation { margin-top: 40px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; padding: 18px 20px; border: 1px solid var(--k-line); border-radius: var(--k-radius); height: 100%; }
.post-navigation a:hover { border-color: var(--k-blue); text-decoration: none; }
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-next:only-child { grid-column: 2; }
.nav-label { display: block; font-size: 13px; color: var(--k-muted); margin-bottom: 4px; }
.nav-title { display: block; font-family: var(--k-font-head); font-weight: 600; color: var(--k-navy); line-height: 1.4; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 44px; }
.comments-title, .comment-reply-title { font-size: 22px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--k-line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-meta a { color: var(--k-muted); font-size: 13px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--k-blue); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }
.comment-form .submit { border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--k-navy); color: #b9c7d6; font-size: 14.5px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 36px; padding-top: 56px; padding-bottom: 44px; }
.footer-col__title { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.site-footer a { color: #b9c7d6; }
.site-footer a:hover { color: #fff; }
.footer-col address { font-style: normal; margin-bottom: 12px; line-height: 1.6; }
.social-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 10px; }
.social-links a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; }
.social-links a:hover { background: var(--k-blue); }
.social-links .icon { width: 17px; height: 17px; }
.footer-payment { margin-top: 18px; }
.footer-payment img { max-width: 220px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; font-size: 13.5px; }
.copyright { margin: 0; }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 40px 0; }
.error-404 .search-form { max-width: 460px; margin: 24px auto; }

/* ---------- WordPress core classes ---------- */
.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: var(--k-muted); text-align: center; }
.sticky .card__title a::after { content: " (Pinned)"; font-size: .7em; color: var(--k-orange); font-weight: 500; }
.bypostauthor > .comment-body .fn::after { content: " (Author)"; color: var(--k-blue); font-weight: 500; font-size: .85em; }
.wp-block-button__link { background: var(--k-green); color: #fff; border-radius: var(--k-radius-sm); font-family: var(--k-font-head); font-weight: 600; text-decoration: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
	:root { --k-sidebar: 280px; --k-gap: 32px; }
	.card { grid-template-columns: 240px minmax(0, 1fr); }
	.newsletter--band { grid-template-columns: auto minmax(0, 1fr); }
	.newsletter--band .newsletter__form { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar__sticky { position: static; }
	.widget-toc { max-height: none; }
	/* On mobile the TOC moves above the article via JS; hide its sidebar copy. */
	.sidebar--single .widget-toc.is-moved { display: none; }

	.nav-toggle { display: inline-flex; }
	.primary-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
		border-bottom: 1px solid var(--k-line); box-shadow: 0 16px 32px rgba(15, 43, 70, .12);
		flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; max-height: calc(100vh - 120px); overflow-y: auto;
	}
	.primary-nav.is-open { display: flex; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu > li > a { padding: 14px 0; border-bottom: 1px solid var(--k-line); }
	.primary-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
		padding: 0 0 0 14px; min-width: 0; display: none;
	}
	.primary-nav li.is-expanded > .sub-menu { display: block; }
	.primary-nav .sub-menu a { padding: 11px 0; border-bottom: 1px dashed var(--k-line); }
	.primary-nav .menu-item-has-children > a::after { float: right; margin-top: 8px; }
	.header-btn { margin-top: 16px; }
}

@media (max-width: 680px) {
	.site-content { padding: 24px 0 56px; }
	.topbar__email span { display: none; }
	.topbar__nav ul { gap: 14px; }
	.card { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.card__title { font-size: 18px; }
	.newsletter--band { grid-template-columns: minmax(0, 1fr); padding: 22px; }
	.newsletter__form form { flex-direction: column; }
	.cta-box, .cta-box:not(:has(.cta-box__icon)) { grid-template-columns: minmax(0, 1fr); text-align: left; padding: 22px; }
	.cta-box .btn { justify-self: start; }
	.author-box { grid-template-columns: minmax(0, 1fr); }
	.post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
	.post-navigation .nav-next { text-align: left; }
	.post-navigation .nav-next:only-child { grid-column: 1; }
	.alignleft, .alignright { float: none; margin: 1em 0; }
	.entry-content { font-size: calc(var(--k-article-size) - 1px); }
}

/* Mobile TOC (inserted above the content by JS) */
.toc-mobile { margin: 0 0 28px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-mist); }
.toc-mobile summary { cursor: pointer; padding: 14px 18px; font-family: var(--k-font-head); font-weight: 600; color: var(--k-navy); list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 20px; line-height: 1; }
.toc-mobile[open] summary::after { content: "\2212"; }
.toc-mobile .toc-list { padding: 0 18px 14px; }
@media (min-width: 961px) { .toc-mobile { display: none; } }

@media print {
	.topbar, .site-header, .notice-bar, .sidebar, .site-footer, .newsletter, .post-navigation, .comments-area, .cta-box { display: none !important; }
	.layout { display: block; }
}
