/*
Theme Name: Kahani
Theme URI: https://example.com/kahani
Author: Your Name
Author URI: https://example.com
Description: A text-first storytelling theme for long reading in Hindi and English. Infinite-scroll story feed, sticky contrast header, sidebar with view-based Popular Stories, responsive ad slot after the story title, dark mode, adjustable text size and full Customizer control.
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: kahani
Tags: blog, news, one-column, two-columns, right-sidebar, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, sticky-post, threaded-comments, translation-ready, rtl-language-support
*/

/* ==========================================================================
   1. Tokens (overridden from the Customizer via inline CSS)
   ========================================================================== */
:root {
	--k-accent: #8A2D2D;
	--k-accent-text: #8A2D2D;
	--k-header-bg: #8A2D2D;
	--k-header-text: #ffffff;
	--k-progress: #F2C46D;
	--k-bg: #F7F3EA;
	--k-card: #FFFDF8;
	--k-ink: #2A2723;
	--k-muted: #5E5850;
	--k-line: #E6DED0;
	--k-font-serif: "Literata", "Noto Serif Devanagari", Georgia, "Nirmala UI", "Mangal", serif;
	--k-font-sans: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", "Nirmala UI", sans-serif;
	--k-story-size: 20px;
	--k-story-lh: 1.85;
	--k-wrap: 1180px;
	--k-radius: 12px;
	--k-header-h: 80px;
	color-scheme: light;
}

html[data-theme="dark"] {
	--k-bg: #161513;
	--k-card: #1F1D1A;
	--k-ink: #E8E2D6;
	--k-muted: #ABA395;
	--k-line: #2E2B27;
	--k-accent-text: var(--k-accent-dark, #E59A8B);
	color-scheme: dark;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--k-header-h) + 16px); }

body {
	margin: 0;
	background: var(--k-bg);
	color: var(--k-ink);
	font-family: var(--k-font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color .2s ease, color .2s ease;
}

img, video, iframe, embed, object { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--k-accent-text); outline-offset: 2px; }
.k-header :focus-visible { outline-color: var(--k-header-text); }

button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { font-family: var(--k-font-serif); font-weight: 500; line-height: 1.2; margin: 0 0 .6em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--k-card); color: var(--k-ink); clip: auto !important; clip-path: none;
	display: block; height: auto; width: auto; left: 8px; top: 8px; padding: 12px 18px; z-index: 100000;
	border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.k-label {
	font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}

.k-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 44px; padding: 0 22px; border-radius: 8px; border: 0;
	background: var(--k-accent); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
}
.k-btn:hover { filter: brightness(1.08); text-decoration: none; }
.k-btn--ghost { background: var(--k-card); color: var(--k-ink); border: 1px solid var(--k-line); border-radius: 22px; font-weight: 500; }

.k-input, .k-sidebar input[type="search"], .k-sidebar input[type="email"], .k-sidebar input[type="text"],
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea,
.k-search-panel input[type="search"], .search-form input[type="search"] {
	width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 8px;
	border: 1px solid var(--k-line); background: var(--k-bg); color: var(--k-ink); font-size: 15px;
}

/* ==========================================================================
   3. Header (sticky, contrast)
   ========================================================================== */
.k-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--k-header-bg); color: var(--k-header-text);
	box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.admin-bar .k-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .k-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .k-header { top: 0; } }

.k-header__inner {
	max-width: var(--k-wrap); margin: 0 auto; padding: 14px 24px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.k-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.k-brand .custom-logo { max-height: 48px; width: auto; display: block; }
.k-site-title {
	margin: 0; font-family: var(--k-font-serif); font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.k-site-title a:hover { text-decoration: none; }
.k-tagline { margin: 2px 0 0; font-size: 12px; opacity: .85; }

.k-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.k-nav a { display: inline-block; padding: 8px 0; font-size: 14px; font-weight: 500; }
.k-nav .current-menu-item > a, .k-nav .current_page_item > a, .k-nav .current-menu-ancestor > a {
	text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.k-nav li { position: relative; }
.k-nav .sub-menu {
	position: absolute; top: 100%; left: -16px; min-width: 200px; display: none; flex-direction: column; gap: 0;
	background: var(--k-header-bg); padding: 8px 16px; border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.k-nav li:hover > .sub-menu, .k-nav li:focus-within > .sub-menu { display: flex; }

.k-actions { display: flex; gap: 8px; flex: none; }
.k-icon-btn {
	width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255,255,255,.4);
	background: transparent; color: var(--k-header-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.k-icon-btn:hover { background: rgba(255,255,255,.12); }
.k-icon-btn svg { width: 18px; height: 18px; }
.k-menu-toggle { display: none; border-color: transparent; }

.k-icon-sun { display: none; }
html[data-theme="dark"] .k-icon-sun { display: block; }
html[data-theme="dark"] .k-icon-moon { display: none; }

.k-progress { height: 3px; background: rgba(255,255,255,.2); }
.k-progress__bar { height: 3px; width: 0; background: var(--k-progress); transition: width .1s linear; }

/* Search panel */
.k-search-panel { background: var(--k-header-bg); border-top: 1px solid rgba(255,255,255,.15); }
.k-search-panel[hidden] { display: none; }
.k-search-panel form { max-width: 720px; margin: 0 auto; padding: 16px 24px; display: flex; gap: 8px; }
.k-search-panel input[type="search"] { background: #fff; color: #2A2723; border: 0; }
.k-search-panel .k-btn { background: rgba(255,255,255,.18); }

@media (max-width: 900px) {
	.k-header__inner { padding: 8px 12px; }
	.k-nav--primary { display: none; }
	.k-menu-toggle { display: inline-flex; }
	.k-site-title { font-size: 22px; }
	.k-tagline { display: none; }
	.k-brand { flex: 1; justify-content: center; order: 2; }
	.k-menu-toggle { order: 1; }
	.k-actions { order: 3; }
	.k-actions .k-icon-btn { border-color: transparent; }
	.k-actions .k-theme-toggle { display: none; }
}

/* Drawer (mobile menu + sidebar extras) */
.k-drawer { position: fixed; inset: 0; z-index: 100; }
.k-drawer[hidden] { display: none; }
.k-drawer__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.k-drawer__panel {
	position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 360px); overflow-y: auto;
	background: var(--k-bg); color: var(--k-ink); padding: 16px 20px 32px; box-shadow: 4px 0 24px rgba(0,0,0,.2);
	display: flex; flex-direction: column; gap: 28px;
}
.k-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.k-drawer__head .k-icon-btn { color: var(--k-ink); border-color: var(--k-line); }
.k-drawer .k-nav ul { flex-direction: column; gap: 0; }
.k-drawer .k-nav a { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--k-line); }
.k-drawer .k-nav .sub-menu { position: static; display: flex; background: none; box-shadow: none; padding: 0 0 0 16px; }
.k-drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.k-drawer-row .k-icon-btn { color: var(--k-ink); border-color: var(--k-line); }
body.k-drawer-open { overflow: hidden; }

/* ==========================================================================
   4. Layout
   ========================================================================== */
.k-site { min-height: 100vh; display: flex; flex-direction: column; }
.k-content { flex: 1 0 auto; width: 100%; }
.k-wrap { max-width: var(--k-wrap); margin: 0 auto; padding: 40px 24px 64px; }
.k-layout { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.k-main { flex: 999 1 560px; min-width: 0; }
.k-sidebar { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 36px; }
.k-sidebar--sticky { position: sticky; top: calc(var(--k-header-h) + 24px); }
.k-layout--no-sidebar .k-main { max-width: 760px; margin: 0 auto; }

@media (max-width: 900px) {
	.k-wrap { padding: 24px 20px 40px; }
	.k-layout { gap: 36px; }
	.k-sidebar { max-width: none; flex-basis: 100%; }
	.k-sidebar--sticky { position: static; }
	/* Infinite feeds: sidebar would never be reached, it lives in the drawer instead */
	.k-is-feed .k-sidebar { display: none; }
}

/* ==========================================================================
   5. Feed / cards
   ========================================================================== */
.k-archive-head { padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--k-line); }
.k-archive-head h1 { font-size: 40px; margin: 6px 0 8px; letter-spacing: -.01em; }
.k-archive-head .k-label { color: var(--k-accent-text); }
.k-archive-head p { margin: 0; color: var(--k-muted); font-family: var(--k-font-serif); font-size: 18px; }

.k-featured { padding-bottom: 36px; border-bottom: 1px solid var(--k-line); }
.k-featured .k-label { color: var(--k-accent-text); display: block; margin-bottom: 8px; }
.k-featured__title { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; }
.k-featured__excerpt { font-family: var(--k-font-serif); font-size: clamp(18px, 2.2vw, 21px); line-height: 1.65; color: var(--k-muted); margin: 0 0 20px; }

.k-card { padding: 32px 0; border-bottom: 1px solid var(--k-line); display: flex; flex-direction: column; gap: 10px; }
.k-card__genre { color: var(--k-accent-text); }
.k-card__title { font-size: clamp(24px, 3vw, 30px); line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.k-card__excerpt { font-family: var(--k-font-serif); font-size: 18px; line-height: 1.7; color: var(--k-muted); margin: 0; }
.k-card__excerpt p { margin: 0; }
.k-card--anim { animation: k-fade .45s ease both; }
@keyframes k-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.k-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--k-muted); }
.k-meta__author { font-weight: 600; color: var(--k-ink); }

.k-thumb { display: block; margin-bottom: 8px; border-radius: 10px; overflow: hidden; }
.k-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.k-loader { padding: 40px 0 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.k-loader__hint { font-size: 12px; color: var(--k-muted); }
.k-loader__end { font-family: var(--k-font-serif); font-style: italic; font-size: 18px; color: var(--k-muted); }
.k-spin { width: 16px; height: 16px; }
.is-loading .k-spin { animation: k-rotate 1s linear infinite; }
@keyframes k-rotate { to { transform: rotate(360deg); } }
.k-has-js .k-pagination { display: none; }
.k-has-js .k-pagination--always { display: block; }
.k-archive-desc { color: var(--k-muted); font-family: var(--k-font-serif); font-size: 18px; }
.k-archive-desc p { margin: 0; }
.k-muted { color: var(--k-muted); }

.k-pagination { margin-top: 32px; }
.k-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.k-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--k-line); border-radius: 8px; }
.k-pagination .current { background: var(--k-accent); color: #fff; border-color: var(--k-accent); }

.k-none { padding: 48px 0; }
.k-none h1 { font-size: 36px; }
.k-none p { color: var(--k-muted); }

/* ==========================================================================
   6. Single story
   ========================================================================== */
.k-story { max-width: 700px; }
.k-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--k-muted); margin-bottom: 20px; }
.k-breadcrumb a:last-child { color: var(--k-accent-text); font-weight: 600; }
.k-story__title { font-size: clamp(34px, 5.4vw, 52px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.k-story__subtitle { font-family: var(--k-font-serif); font-style: italic; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.55; color: var(--k-muted); margin: 0 0 24px; }
.k-story__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--k-line); border-bottom: 1px solid var(--k-line); }
.k-textsize { margin-left: auto; display: flex; gap: 8px; }
.k-textsize button {
	min-width: 44px; height: 36px; border-radius: 6px; border: 1px solid var(--k-line); background: transparent;
	color: var(--k-ink); font-weight: 600; font-size: 13px; cursor: pointer;
}
.k-textsize button:hover { border-color: var(--k-muted); }

.k-ad { margin: 28px 0 0; display: flex; justify-content: center; width: 100%; overflow: hidden; min-height: 50px; }
.k-ad > * { max-width: 100%; }
.k-ad--empty { display: none; }

.k-story__content {
	font-family: var(--k-font-serif); font-size: var(--k-story-size); line-height: var(--k-story-lh);
	padding-top: 28px; overflow-wrap: break-word;
}
.k-story__content > * { margin: 0 0 1.2em; }
.k-story__content :lang(hi), .k-story__content.is-hindi { line-height: calc(var(--k-story-lh) + .05); }
.k-story__content h2 { font-size: 1.5em; margin-top: 1.6em; }
.k-story__content h3 { font-size: 1.25em; margin-top: 1.4em; }
.k-story__content a { color: var(--k-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.k-story__content blockquote, .k-story__content .wp-block-quote, .k-story__content .wp-block-pullquote {
	margin: 1.8em 0; padding: 0; border: 0; text-align: center; font-style: italic; font-size: 1.35em; line-height: 1.45;
}
.k-story__content blockquote p { margin: 0 0 .4em; }
.k-story__content blockquote cite { display: block; font-size: .6em; font-style: normal; color: var(--k-muted); }
.k-story__content hr, .k-story__content .wp-block-separator {
	border: 0; height: auto; text-align: center; margin: 2em 0; background: none;
}
.k-story__content hr::before, .k-story__content .wp-block-separator::before { content: "\2726  \2726  \2726"; color: var(--k-muted); letter-spacing: .6em; font-size: .8em; }
.k-story__content img { border-radius: 8px; }
.k-story__content figcaption { font-family: var(--k-font-sans); font-size: 13px; color: var(--k-muted); text-align: center; margin-top: 8px; }
.k-story__content ul, .k-story__content ol { padding-left: 1.4em; }
.k-story__content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.k-story__content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.k-story__content .aligncenter { margin-left: auto; margin-right: auto; display: block; }
.k-story__content::after { content: ""; display: table; clear: both; }
.k-dropcap > p:first-of-type::first-letter {
	float: left; font-size: 3.8em; line-height: .85; padding: .1em .12em 0 0; font-weight: 600; color: var(--k-accent-text);
}

.page-links { font-family: var(--k-font-sans); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.k-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.k-chip, .tagcloud a, .wp-block-tag-cloud a {
	display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--k-line);
	font-size: 13px !important; line-height: 1.2; color: var(--k-ink);
}
.k-chip:hover, .tagcloud a:hover { border-color: var(--k-accent-text); color: var(--k-accent-text); text-decoration: none; }
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.k-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; font-size: 13px; color: var(--k-muted); }
.k-share a, .k-share button {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px;
	border: 1px solid var(--k-line); background: transparent; color: var(--k-ink); font-size: 13px; cursor: pointer;
}
.k-share a:hover, .k-share button:hover { border-color: var(--k-muted); text-decoration: none; }

.k-author { margin-top: 40px; padding: 24px; border-radius: var(--k-radius); background: var(--k-card); border: 1px solid var(--k-line); display: flex; gap: 16px; align-items: flex-start; }
.k-author img { border-radius: 50%; flex: none; }
.k-author__name { margin: 0 0 4px; font-weight: 600; }
.k-author__bio { margin: 0; font-size: 14px; line-height: 1.6; color: var(--k-muted); }

.k-postnav { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.k-postnav a { padding: 18px; border-radius: var(--k-radius); border: 1px solid var(--k-line); display: flex; flex-direction: column; gap: 6px; height: 100%; }
.k-postnav a:hover { border-color: var(--k-accent-text); text-decoration: none; }
.k-postnav__dir { font-size: 12px; color: var(--k-muted); }
.k-postnav__title { font-family: var(--k-font-serif); font-size: 18px; font-weight: 500; line-height: 1.35; }
.k-postnav__next { text-align: right; grid-column: 2; }
@media (max-width: 600px) {
	.k-postnav { grid-template-columns: 1fr; }
	.k-postnav__next { grid-column: auto; }
}

/* Pages */
.k-page__title { font-size: clamp(32px, 5vw, 46px); letter-spacing: -.02em; margin: 0 0 24px; }

/* ==========================================================================
   7. Comments
   ========================================================================== */
.k-comments { margin-top: 48px; }
.k-comments__title { font-size: 26px; }
.k-comment-list, .k-comment-list .children { list-style: none; margin: 0; padding: 0; }
.k-comment-list .children { padding-left: 24px; border-left: 2px solid var(--k-line); margin-top: 16px; }
.k-comment-list > li { padding: 18px 0; border-bottom: 1px solid var(--k-line); }
.comment-body { font-size: 15px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12px; color: var(--k-muted); margin: 2px 0 8px; }
.comment-content { font-family: var(--k-font-serif); font-size: 17px; line-height: 1.65; }
.comment-content p { margin: 0 0 .6em; }
.reply a { font-size: 13px; color: var(--k-accent-text); font-weight: 600; }
.comment-respond { margin-top: 24px; }
.comment-reply-title { font-size: 22px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; }
.comment-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.comment-form p { margin: 0; }
.comment-form .form-submit input, .k-submit {
	min-height: 44px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--k-accent); color: #fff; font-weight: 600; cursor: pointer;
}
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* ==========================================================================
   8. Sidebar & widgets
   ========================================================================== */
.widget { margin: 0; font-size: 15px; }
.widget-title, .k-sidebar .wp-block-heading {
	margin: 0 0 16px; font-family: var(--k-font-sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 6px 0; }
.widget select { width: 100%; min-height: 44px; border-radius: 8px; border: 1px solid var(--k-line); background: var(--k-bg); padding: 0 10px; }
.k-box { padding: 24px; border-radius: var(--k-radius); background: var(--k-card); border: 1px solid var(--k-line); }
.k-box .widget-title { font-family: var(--k-font-serif); font-size: 20px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-bottom: 8px; }
.k-box p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--k-muted); }
.k-box p:last-child { margin-bottom: 0; }

.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-form .search-submit { min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--k-accent); color: #fff; font-weight: 600; cursor: pointer; }

.k-popular { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; counter-reset: k-pop; }
.widget .k-popular li { padding: 0; display: flex; gap: 14px; align-items: flex-start; }
.k-popular__n { font-family: var(--k-font-serif); font-size: 28px; line-height: 1; color: var(--k-accent-text); min-width: 26px; }
.k-popular__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-popular__title { font-family: var(--k-font-serif); font-size: 17px; font-weight: 500; line-height: 1.4; }
.k-popular__meta { font-size: 12px; color: var(--k-muted); }

.k-newsletter { display: flex; flex-direction: column; gap: 10px; }
.k-newsletter label { font-size: 13px; font-weight: 500; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.k-footer { border-top: 1px solid var(--k-line); }
.k-footer__widgets { max-width: var(--k-wrap); margin: 0 auto; padding: 40px 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.k-footer__bar { max-width: var(--k-wrap); margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--k-muted); }
.k-footer__bar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }

.k-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 22px; border: 0;
	background: var(--k-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.k-top.is-visible { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   10. WordPress core classes
   ========================================================================== */
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 13px; color: var(--k-muted); }
.sticky .k-card__genre::after { content: " · Pinned"; }
.bypostauthor > .comment-body .fn::after { content: " ✦"; color: var(--k-accent-text); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.k-header, .k-sidebar, .k-ad, .k-share, .k-postnav, .k-comments, .k-footer, .k-top, .k-textsize { display: none !important; }
	body { background: #fff; color: #000; }
	.k-main { flex-basis: 100%; }
}
