/*
Theme Name: Karunakaran
Theme URI: https://skarunakaran.com/
Author: Sayanthan
Description: Minimal Tamil literary theme for Sivarasa Karunakaran. Designed to work with Karunakaran Core, Karunakaran Books and Karunakaran Media.
Version: 1.3.4
Text Domain: karunakaran
Requires at least: 6.4
Requires PHP: 7.4
*/

:root{
  --kk-bg:#fff;
  --kk-text:#191919;
  --kk-muted:#77736e;
  --kk-border:#e7e3de;
  --kk-accent:#9b6b22;
  --kk-soft:#f7f5f1;
  --kk-radius:10px;
  --kk-site:1440px;
  --kk-reading:760px;
  --kk-body-size:18px;
  --kk-body-size-mobile:17px;
  --kk-title-size:50px;
  --kk-title-size-mobile:32px;
  --kk-card-title-size:24px;
  --kk-card-title-size-mobile:22px;
  --kk-section-size:28px;
  --kk-section-size-mobile:24px;
  --kk-menu-size:15px;
  --kk-menu-size-mobile:15px;
  --kk-excerpt-size:16px;
  --kk-excerpt-size-mobile:16px;
  --kk-body-lh:1.85;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--kk-bg);color:var(--kk-text);font-family:var(--kk-body-font,'Pavanam',sans-serif);font-size:var(--kk-body-size);line-height:var(--kk-body-lh);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
a:hover{color:var(--kk-accent)}
img{max-width:100%;height:auto;display:block}
.kk-shell{width:min(calc(100% - 48px),var(--kk-site));margin-inline:auto}
.kk-site-header{border-bottom:1px solid var(--kk-border);background:rgba(255,255,255,.96);position:relative;z-index:20}
.kk-header-inner{min-height:76px;display:flex;align-items:center;gap:24px}
.kk-brand{font-family:var(--kk-heading-font,'Pavanam',sans-serif);font-weight:700;font-size:30px;letter-spacing:-.02em;margin-right:auto;white-space:nowrap}
.kk-brand-wrap{margin-right:auto;display:flex;align-items:center;min-width:0}
.kk-brand-wrap .custom-logo-link{display:flex;align-items:center;line-height:0}
.kk-brand-wrap .custom-logo{display:block;width:auto;height:auto;max-height:50px;max-width:260px;object-fit:contain}
.kk-nav{margin-left:auto}
.kk-nav ul{list-style:none;display:flex;align-items:center;gap:28px;margin:0;padding:0;font-size:var(--kk-menu-size)}
.kk-header-actions{display:flex;gap:6px;align-items:center;margin-left:2px}
.kk-icon-btn{width:42px;height:42px;border:0;background:transparent;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--kk-text)}
.kk-icon-btn:hover{background:var(--kk-soft)}
.kk-mobile-menu-btn{display:none}
.kk-mobile-menu{display:none}
.kk-search-panel{display:none;border-top:1px solid var(--kk-border);padding:16px 0}
.kk-search-panel.is-open{display:block}
.kk-search-form{display:flex;gap:10px}
.kk-search-form input{flex:1;border:1px solid var(--kk-border);border-radius:8px;padding:12px 14px;font:inherit}
.kk-search-form button{border:0;background:var(--kk-text);color:#fff;border-radius:8px;padding:0 18px;font:inherit;cursor:pointer}

.kk-hero{padding:0;border-bottom:1px solid var(--kk-border);background:#fff;overflow:hidden}
.kk-hero-picture{display:block;width:100%}
.kk-hero-picture img{display:block;width:100%;height:var(--kk-hero-h);object-fit:cover;object-position:var(--kk-hero-x) var(--kk-hero-y)}
.kk-hero-placeholder{min-height:340px;display:grid;place-items:center;background:var(--kk-soft);color:var(--kk-muted);font-size:14px}


.kk-section{padding:54px 0;border-top:1px solid var(--kk-border)}
.kk-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:26px}
.kk-section-title{font-family:var(--kk-heading-font);font-size:var(--kk-section-size);line-height:1.25;margin:0}
.kk-section-link{font-size:14px;color:var(--kk-muted)}
.kk-latest-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.kk-post-card{border:1px solid var(--kk-border);border-radius:var(--kk-radius);padding:22px;min-height:286px;display:flex;flex-direction:column;background:#fff}
.kk-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;color:var(--kk-muted);font-size:13px;line-height:1.4}
.kk-meta-sep{opacity:.5}
.kk-post-card h3{font-family:var(--kk-heading-font);font-size:var(--kk-card-title-size);line-height:1.45;margin:18px 0 12px;letter-spacing:-.01em}
.kk-excerpt{font-size:var(--kk-excerpt-size);line-height:1.75;color:#56524f;margin:0 0 18px;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.kk-read-more{margin-top:auto;font-size:14px;font-weight:600}

.kk-home-feature-row{padding-top:30px;padding-bottom:28px}
.kk-home-feature-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.95fr) minmax(0,1.97fr);gap:0;align-items:start}
.kk-home-selected,.kk-home-interview,.kk-home-books{min-width:0;padding:0 24px}
.kk-home-selected{padding-left:0}
.kk-home-books{padding-right:0}
.kk-home-interview,.kk-home-books{border-left:1px solid var(--kk-border)}
.kk-home-feature-grid .kk-section-head{margin-bottom:12px}
.kk-home-feature-grid .kk-section-title{font-size:20px}
.kk-selected-list{display:grid;border-top:0}
.kk-selected-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:start;padding:12px 0;border-bottom:1px solid var(--kk-border)}
.kk-selected-item:first-child{border-top:0}
.kk-selected-item h3{font-family:var(--kk-heading-font);font-size:15px;line-height:1.55;margin:0;font-weight:500}
.kk-selected-item time{font-size:11px;color:var(--kk-muted);white-space:nowrap;padding-top:2px}
.kk-mini-more{display:block;text-align:right;margin-top:13px;font-size:13px}

.kk-interview{display:grid;grid-template-columns:132px minmax(0,1fr);gap:18px;align-items:center;background:transparent;padding:0;border-radius:0}
.kk-interview img{width:132px;height:132px;aspect-ratio:1/1;object-fit:cover;border-radius:4px}
.kk-interview h3{font-family:var(--kk-heading-font);font-size:20px;line-height:1.5;margin:7px 0 8px}
.kk-interview-by{font-size:12px;color:var(--kk-muted);margin-bottom:8px}
.kk-interview .kk-read-more{font-size:13px}

.kk-books-wrap{overflow:hidden}
.kk-home-books .kk-section-head{align-items:center}
.kk-home-books .kk-section-link{font-size:12px}
.kk-books{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.kk-book{width:88px;flex:0 0 88px;text-align:center}
.kk-book-cover{aspect-ratio:2/3;background:var(--kk-soft);overflow:hidden;border-radius:4px;margin-bottom:8px}
.kk-book-cover img{width:100%;height:100%;object-fit:cover}
.kk-book h3{font-family:var(--kk-heading-font);font-size:12px;line-height:1.4;margin:0;white-space:normal}
.kk-book-meta{font-size:11px;color:var(--kk-muted);margin-top:3px}
.kk-book-dots{display:none}

.kk-site-footer{border-top:1px solid var(--kk-border);padding:34px 0 90px;color:var(--kk-muted);font-size:13px}
.kk-footer-inner{display:flex;justify-content:space-between;gap:24px;align-items:center}
.kk-socials{display:flex;gap:10px}
.kk-socials a{width:38px;height:38px;border:1px solid var(--kk-border);border-radius:50%;display:grid;place-items:center;color:var(--kk-text)}

/* Single */
.kk-single{padding:54px 0 90px}
.kk-reading{width:min(calc(100% - 48px),var(--kk-reading));margin-inline:auto}
.kk-single-head{text-align:left;margin-bottom:28px}
.kk-single-title{font-family:var(--kk-heading-font);font-size:var(--kk-title-size);line-height:1.3;letter-spacing:-.025em;margin:14px 0 14px}
.kk-featured{width:min(calc(100% - 48px),980px);margin:0 auto 42px;aspect-ratio:3/2;overflow:hidden;border-radius:var(--kk-radius);background:var(--kk-soft)}
.kk-featured img{width:100%;height:100%;object-fit:cover;}
.kk-content{font-size:var(--kk-body-size);line-height:var(--kk-body-lh)}
.kk-content p{margin:0 0 1.55em}
.kk-content h2,.kk-content h3,.kk-content h4{font-family:var(--kk-heading-font);line-height:1.4;margin:1.7em 0 .75em}
.kk-content blockquote{margin:2em 0;padding:5px 0 5px 24px;border-left:3px solid var(--kk-text);font-family:var(--kk-heading-font);font-size:1.15em}
.kk-content img{border-radius:var(--kk-radius);margin-block:30px}
.kk-share{margin-top:48px;padding-top:26px;border-top:1px solid var(--kk-border);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.kk-share-label{font-size:13px;color:var(--kk-muted);margin-right:6px}
.kk-share-btn{height:42px;min-width:42px;padding:0 13px;border:1px solid var(--kk-border);border-radius:999px;background:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px;font:inherit;font-size:13px;cursor:pointer}
.kk-share-btn svg{width:18px;height:18px}
.kk-copy-status{font-size:12px;color:var(--kk-muted)}
.kk-reading-progress{position:fixed;top:0;left:0;height:2px;width:0;background:var(--kk-accent);z-index:9999;display:none}
body.kk-progress-on .kk-reading-progress{display:block}

/* Archives */
.kk-page-head{padding:48px 0 24px}
.kk-page-title{font-family:var(--kk-heading-font);font-size:42px;margin:0}
.kk-archive-list{border-top:1px solid var(--kk-border);margin-bottom:70px}
.kk-archive-item{display:grid;grid-template-columns:150px 1fr;gap:24px;padding:26px 0;border-bottom:1px solid var(--kk-border)}
.kk-archive-item h2{font-family:var(--kk-heading-font);font-size:26px;line-height:1.4;margin:0 0 8px}
.kk-archive-item p{margin:0;color:#56524f;font-size:15px}
.kk-empty{padding:60px 0 100px;color:var(--kk-muted)}

.kk-mobile-bottom{display:none}

@media(max-width:900px){
  body{font-size:var(--kk-body-size-mobile)}
  .kk-shell,.kk-reading{width:min(calc(100% - 32px),var(--kk-site))}
  .kk-header-inner{min-height:62px;display:grid;grid-template-columns:44px 1fr 44px;gap:6px}
  .kk-brand{justify-self:center;font-size:22px;white-space:nowrap}
  .kk-brand-wrap{justify-self:center;margin-right:0;max-width:100%;overflow:hidden}
  .kk-brand-wrap .custom-logo{max-height:38px;max-width:190px}
  .kk-nav{display:none}
  .kk-mobile-menu-btn{display:grid;justify-self:start}
  .kk-header-actions{justify-self:end}
  .kk-hero{padding:0;border-bottom:1px solid var(--kk-border)}
  .kk-hero-picture img{width:100%;height:var(--kk-hero-h-m);object-fit:cover;object-position:var(--kk-hero-x-m) var(--kk-hero-y-m)}
  .kk-section{padding:38px 0}
  .kk-section-title{font-size:var(--kk-section-size-mobile)}
  .kk-latest-grid{grid-template-columns:1fr;gap:14px}
  .kk-post-card{min-height:0;padding:20px}
  .kk-post-card h3{font-size:var(--kk-card-title-size-mobile);margin:13px 0 9px}
  .kk-excerpt{font-size:var(--kk-excerpt-size-mobile);-webkit-line-clamp:4}
  .kk-home-feature-grid{grid-template-columns:1fr;gap:0}
  .kk-home-selected,.kk-home-interview,.kk-home-books{padding-left:0;padding-right:0}
  .kk-home-selected{padding-bottom:28px}
  .kk-home-interview{border-left:0;border-top:1px solid var(--kk-border);padding-top:28px;padding-bottom:28px}
  .kk-home-books{grid-column:auto;border-left:0;border-top:1px solid var(--kk-border);padding:28px 0 0;margin-top:0}
  .kk-home-feature-grid .kk-section-title{font-size:20px}
  .kk-selected-item{gap:8px;padding:12px 0}
  .kk-selected-item h3{font-size:14px;line-height:1.5}
  .kk-interview{grid-template-columns:78px 1fr;gap:12px}
  .kk-interview img{width:78px;height:78px}
  .kk-interview h3{font-size:16px;margin:4px 0 6px}
  .kk-books{justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:12px;scrollbar-width:none;gap:18px}
  .kk-books::-webkit-scrollbar{display:none}
  .kk-book{width:31vw;flex:0 0 31vw;max-width:150px;scroll-snap-align:start}
  .kk-book-dots{display:flex;justify-content:center;gap:7px;margin-top:14px}
  .kk-book-dot{width:6px;height:6px;border-radius:50%;background:#d3cec8}
  .kk-book-dot.is-active{background:var(--kk-text)}
  .kk-footer-inner{display:block;text-align:center}
  .kk-socials{justify-content:center;margin-top:18px}
  .kk-site-footer{padding-bottom:94px}
  .kk-single{padding:38px 0 90px}
  .kk-single-title{font-size:var(--kk-title-size-mobile)}
  .kk-featured{width:calc(100% - 32px);margin-bottom:30px;border-radius:var(--kk-radius)}
  .kk-content{font-size:var(--kk-body-size-mobile)}
  .kk-share-btn span{display:none}
  .kk-share-btn{padding:0;width:44px}
  .kk-page-title{font-size:32px}
  .kk-archive-item{grid-template-columns:1fr;gap:7px}
  .kk-mobile-bottom{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:rgba(255,255,255,.97);border-top:1px solid var(--kk-border);padding-bottom:env(safe-area-inset-bottom)}
  .kk-mobile-bottom a{min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;color:var(--kk-muted)}
  .kk-mobile-bottom svg{width:20px;height:20px}
  .kk-mobile-bottom a.is-active,.kk-mobile-bottom a:hover{color:var(--kk-text)}
  .kk-mobile-menu{display:none;position:absolute;top:62px;left:0;right:0;background:#fff;border-bottom:1px solid var(--kk-border);padding:8px 16px 18px}
  .kk-mobile-menu.is-open{display:block}
  .kk-mobile-menu ul{list-style:none;margin:0;padding:0}
  .kk-mobile-menu a{display:block;padding:12px 4px;border-bottom:1px solid var(--kk-border);font-size:var(--kk-menu-size-mobile)}
}

@media(max-width:430px){
  .kk-home-feature-grid{grid-template-columns:1fr}
  .kk-home-selected,.kk-home-interview,.kk-home-books{padding-left:0;padding-right:0}
  .kk-home-feature-grid .kk-section-title{font-size:19px}
  .kk-selected-item{grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .kk-selected-item h3{font-size:14px}
  .kk-interview{grid-template-columns:86px minmax(0,1fr);gap:14px;align-items:start}
  .kk-interview img{width:86px;height:86px}
  .kk-interview h3{font-size:16px;line-height:1.5;margin:3px 0 6px}
  .kk-interview .kk-meta,.kk-interview-by{font-size:10px}
  .kk-interview .kk-read-more{font-size:12px}
}

/* v1.1.2 — widen recent interview and compact books */
@media (min-width: 1025px){
  .kk-home-feature-grid{
    grid-template-columns:minmax(0,24fr) minmax(0,34fr) minmax(0,42fr);
  }
  .kk-home-selected{padding-right:18px}
  .kk-home-interview{padding-left:22px;padding-right:22px}
  .kk-home-books{padding-left:18px}
  .kk-interview{grid-template-columns:118px minmax(0,1fr);gap:18px;align-items:start}
  .kk-interview img{width:118px;height:118px}
  .kk-interview h3{font-size:18px;line-height:1.42;margin:5px 0 7px;overflow-wrap:anywhere}
  .kk-books{justify-content:flex-start;gap:10px}
  .kk-book{width:82px;flex-basis:82px}
}
.kk-book-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  padding:8px;
  text-align:center;
  font-family:var(--kk-heading-font);
  font-size:11px;
  line-height:1.45;
  color:var(--kk-muted);
  background:linear-gradient(180deg,#f8f6f2 0%,#f1eee8 100%);
}


/* v1.1.4 — fix actual desktop shell width and give the interview more room */
@media (min-width:1025px){
  .kk-home-feature-grid{grid-template-columns:minmax(0,24fr) minmax(0,38fr) minmax(0,38fr)}
  .kk-home-selected{padding-right:18px}
  .kk-home-interview{padding-left:24px;padding-right:24px}
  .kk-home-books{padding-left:18px}
  .kk-interview{grid-template-columns:118px minmax(0,1fr);gap:20px}
  .kk-interview h3{font-size:18px;line-height:1.42;overflow-wrap:normal;word-break:normal}
  .kk-books{justify-content:flex-start;gap:12px}
  .kk-book{width:78px;flex:0 0 78px}
}


/* v1.1.7 — latest pagination, metadata order, reading-time footer, books alignment */
.kk-card-footer{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:16px}
.kk-card-footer .kk-read-more{margin-top:0}
.kk-card-reading{margin-left:auto;text-align:right;color:var(--kk-muted);font-size:12px;white-space:nowrap}
.kk-home-pagination{display:flex;justify-content:center;align-items:center;gap:7px;margin-top:28px;flex-wrap:wrap}
.kk-home-pagination .page-numbers{min-width:34px;height:34px;padding:0 10px;border:1px solid var(--kk-border);border-radius:5px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;background:#fff}
.kk-home-pagination .page-numbers.current{background:var(--kk-text);border-color:var(--kk-text);color:#fff}
.kk-home-pagination .prev,.kk-home-pagination .next{min-width:auto;padding-inline:14px}
@media (min-width:1025px){
  .kk-home-books .kk-section-head{justify-content:flex-end;position:relative}
  .kk-home-books .kk-section-title{margin-right:auto}
  .kk-books{justify-content:flex-end;gap:18px}
  .kk-book{width:82px;flex:0 0 82px}
}
@media (max-width:720px){
  .kk-card-footer{margin-top:14px}
  .kk-card-reading{font-size:11px}
  .kk-home-pagination{margin-top:20px;gap:5px}
  .kk-home-pagination .page-numbers{min-width:31px;height:31px;padding:0 8px;font-size:12px}
}

/* v1.1.9 — corrected equal editorial grid and centered five-book row */
.kk-home-feature-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  align-items:stretch;
}
.kk-home-selected,
.kk-home-interview,
.kk-home-story{
  width:100%;
  min-width:0;
  padding:0 28px;
}
.kk-home-selected{padding-left:0;}
.kk-home-story{padding-right:0;}
.kk-home-interview,
.kk-home-story{border-left:1px solid var(--kk-border);}
.kk-home-feature-grid .kk-section-head{margin-bottom:16px;}
.kk-home-feature-grid .kk-section-title{font-size:21px;}
.kk-home-editorial-feature .kk-interview{
  display:grid;
  grid-template-columns:116px minmax(0,1fr);
  gap:20px;
  align-items:start;
  width:100%;
}
.kk-home-editorial-feature .kk-interview img{
  width:116px;
  height:116px;
  object-fit:cover;
  border-radius:4px;
}
.kk-home-editorial-feature .kk-interview-copy{min-width:0;}
.kk-home-editorial-feature .kk-interview h3{
  font-size:18px;
  line-height:1.42;
  margin:4px 0 7px;
  overflow-wrap:normal;
  word-break:normal;
}
.kk-feature-excerpt{
  font-size:13px;
  line-height:1.65;
  color:var(--kk-muted);
  margin:0 0 8px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.kk-empty-feature{color:var(--kk-muted);font-size:13px;line-height:1.7;margin:0 0 12px;}
.kk-home-story .kk-mini-more,
.kk-home-interview .kk-mini-more{margin-top:14px;}

.kk-home-books-section .kk-section-head{margin-bottom:28px;}
.kk-home-books-section .kk-books-wrap{width:100%;overflow:visible;}
.kk-home-books-section .kk-books{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:clamp(28px,4.2vw,68px);
  overflow:visible;
}
.kk-home-books-section .kk-book{
  width:150px;
  flex:0 0 150px;
  text-align:center;
}
.kk-home-books-section .kk-book-cover{
  width:100%;
  aspect-ratio:2/3;
}
.kk-home-books-section .kk-book h3{font-size:14px;line-height:1.45;margin-top:10px;}
.kk-home-books-section .kk-book-meta{font-size:12px;}

@media (max-width:1024px){
  .kk-home-feature-grid{grid-template-columns:1fr;}
  .kk-home-selected,
  .kk-home-interview,
  .kk-home-story{padding-left:0;padding-right:0;}
  .kk-home-selected{padding-bottom:28px;}
  .kk-home-interview,
  .kk-home-story{border-left:0;border-top:1px solid var(--kk-border);padding-top:28px;padding-bottom:28px;}
  .kk-home-story{padding-bottom:0;}
  .kk-home-editorial-feature .kk-interview{grid-template-columns:96px minmax(0,1fr);gap:16px;}
  .kk-home-editorial-feature .kk-interview img{width:96px;height:96px;}
  .kk-home-books-section .kk-books-wrap{overflow:hidden;}
  .kk-home-books-section .kk-books{
    justify-content:flex-start;
    gap:18px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    padding-bottom:12px;
    scrollbar-width:none;
  }
  .kk-home-books-section .kk-book{width:132px;flex:0 0 132px;scroll-snap-align:start;}
  .kk-home-books-section .kk-books::-webkit-scrollbar{display:none;}
}

@media (max-width:560px){
  .kk-home-editorial-feature .kk-interview{grid-template-columns:82px minmax(0,1fr);gap:13px;}
  .kk-home-editorial-feature .kk-interview img{width:82px;height:82px;}
  .kk-home-editorial-feature .kk-interview h3{font-size:16px;line-height:1.48;}
  .kk-feature-excerpt{-webkit-line-clamp:2;}
}


/* v1.2.0 — feature-row typography controls + centered Books heading */
.kk-home-feature-grid .kk-section-title{
  font-size:var(--kk-feature-heading-d);
}
.kk-home-feature-grid .kk-selected-item h3,
.kk-home-editorial-feature .kk-interview h3{
  font-size:var(--kk-feature-title-d);
}
.kk-home-feature-grid .kk-feature-excerpt,
.kk-home-feature-grid .kk-empty-feature{
  font-size:var(--kk-feature-excerpt-d);
}
.kk-home-feature-grid .kk-meta,
.kk-home-feature-grid .kk-interview-by,
.kk-home-feature-grid .kk-selected-item time{
  font-size:var(--kk-feature-meta-d);
}
.kk-home-feature-grid .kk-read-more,
.kk-home-feature-grid .kk-mini-more,
.kk-home-feature-grid .kk-section-link{
  font-size:var(--kk-feature-link-d);
}

.kk-home-books-section .kk-section-head{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  width:100%;
  position:relative;
}
.kk-home-books-section .kk-section-title{
  grid-column:2;
  justify-self:center;
  margin:0;
  text-align:center;
}
.kk-home-books-section .kk-section-link{
  grid-column:3;
  justify-self:end;
}

@media (max-width:1024px){
  .kk-home-feature-grid .kk-section-title{font-size:var(--kk-feature-heading-m);}
  .kk-home-feature-grid .kk-selected-item h3,
  .kk-home-editorial-feature .kk-interview h3{font-size:var(--kk-feature-title-m);}
  .kk-home-feature-grid .kk-feature-excerpt,
  .kk-home-feature-grid .kk-empty-feature{font-size:var(--kk-feature-excerpt-m);}
  .kk-home-feature-grid .kk-meta,
  .kk-home-feature-grid .kk-interview-by,
  .kk-home-feature-grid .kk-selected-item time{font-size:var(--kk-feature-meta-m);}
  .kk-home-feature-grid .kk-read-more,
  .kk-home-feature-grid .kk-mini-more,
  .kk-home-feature-grid .kk-section-link{font-size:var(--kk-feature-link-m);}
}

@media (max-width:560px){
  .kk-home-books-section .kk-section-head{
    grid-template-columns:1fr auto 1fr;
  }
  .kk-home-books-section .kk-section-title{grid-column:2;}
  .kk-home-books-section .kk-section-link{grid-column:3;font-size:12px;}
}

/* v1.2.1 — mobile viewport width hardening (iOS/Safari) */
@media (max-width:900px){
  html, body{
    width:100%;
    max-width:100%;
    min-width:100%;
    margin:0;
    overflow-x:hidden;
  }
  .kk-site-header,
  .kk-hero,
  main,
  .kk-site-footer{
    width:100%;
    max-width:none;
  }
  .kk-shell,
  .kk-reading{
    width:100%;
    max-width:none;
    margin-left:0;
    margin-right:0;
    padding-left:16px;
    padding-right:16px;
  }
  .kk-hero-picture,
  .kk-hero-picture img{
    width:100%;
    max-width:none;
  }
  .kk-mobile-bottom{
    width:100%;
    max-width:none;
  }
  .kk-latest-grid,
  .kk-post-card,
  .kk-home-feature-grid,
  .kk-home-books-section{
    width:100%;
    max-width:100%;
    min-width:0;
  }
}


/* v1.2.2 — simplified mobile bottom navigation */
@media (max-width: 820px){
  .kk-mobile-bottom{grid-template-columns:repeat(3,minmax(0,1fr));}
  .kk-mobile-bottom a{min-width:0;}
}


/* v1.2.3 — editable homepage labels + feature date in heading row */
.kk-feature-head-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;}
.kk-feature-head-row .kk-section-title{margin:0;min-width:0;}
.kk-feature-head-date{margin-left:auto;white-space:nowrap;color:var(--kk-muted);font-size:var(--kk-feature-meta-d);font-weight:400;line-height:1.2;}
@media (max-width:720px){
  .kk-feature-head-row{gap:12px;}
  .kk-feature-head-date{font-size:var(--kk-feature-meta-m);}
}

/* v1.2.4 — latest interview/story feature logic; exclude them from latest; book archive labels */

/* v1.2.5 — books archive and reliable archive link */
.kk-books-archive{padding:48px 0 72px}
.kk-books-archive-head{text-align:center;margin-bottom:36px}
.kk-books-archive-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:36px 28px;align-items:start}
.kk-book-archive-card{text-align:center;min-width:0}
.kk-book-archive-cover{display:block;aspect-ratio:2/3;max-width:180px;margin:0 auto 14px;overflow:hidden;border-radius:8px;background:#f3efe9}
.kk-book-archive-cover img{width:100%;height:100%;object-fit:cover;display:block}
.kk-book-fallback{height:100%;display:flex;align-items:center;justify-content:center;padding:16px;color:#6f675f;font-size:14px;line-height:1.5}
.kk-book-archive-card h2{font-size:18px;line-height:1.45;margin:0 0 6px}
.kk-book-archive-card h2 a{text-decoration:none;color:inherit}
.kk-book-archive-meta{font-size:13px;color:#7a746e}
.kk-books-pagination{margin-top:42px;text-align:center}
@media (max-width:900px){.kk-books-archive-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 18px}}
@media (max-width:600px){.kk-books-archive{padding:30px 0 96px}.kk-books-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}.kk-book-archive-cover{max-width:150px}.kk-book-archive-card h2{font-size:16px}}

/* v1.2.7 — newsletter, comments, seven-book desktop row */
.kk-home-newsletter-section{padding-top:24px;padding-bottom:24px}
.kc-newsletter-card{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:28px 32px;border:1px solid var(--kk-border);border-radius:10px;background:#fff}
.kc-newsletter-copy{min-width:0}
.kc-newsletter-copy h2{font-family:var(--kk-heading-font);font-size:clamp(22px,2vw,30px);line-height:1.3;margin:0 0 6px}
.kc-newsletter-copy p{margin:0;color:var(--kk-muted);font-size:15px;line-height:1.6}
.kc-newsletter-status{margin-top:7px!important;color:var(--kk-text)!important;font-weight:600}
.kc-newsletter-form{display:flex;align-items:stretch;gap:10px;flex:0 1 520px;min-width:340px}
.kc-newsletter-form input[type="email"]{width:100%;min-width:0;border:1px solid var(--kk-border);border-radius:7px;padding:12px 14px;background:#fff;color:var(--kk-text);font:inherit}
.kc-newsletter-form button{border:0;border-radius:7px;padding:12px 20px;background:var(--kk-accent);color:#fff;font-family:var(--kk-heading-font);font-weight:600;white-space:nowrap;cursor:pointer}
.kk-single-newsletter{width:min(calc(100% - 32px),var(--kk-reading));margin:36px auto 0}
.kk-newsletter-single{display:block}
.kk-newsletter-single .kc-newsletter-form{margin-top:18px;min-width:0;max-width:none}

.kk-comments-wrap{width:min(calc(100% - 32px),var(--kk-reading));margin:42px auto 80px}
.kk-comments{border-top:1px solid var(--kk-border);padding-top:32px}
.kk-comments h2,.kk-comments .comment-reply-title{font-family:var(--kk-heading-font);font-size:24px;line-height:1.35;margin:0 0 24px}
.kk-comment-list{list-style:none;margin:0 0 36px;padding:0}
.kk-comment-list li.comment{padding:20px 0;border-bottom:1px solid var(--kk-border)}
.kk-comment-list .comment-body{position:relative}
.kk-comment-list .comment-author{display:flex;align-items:center;gap:10px;font-weight:600}
.kk-comment-list .avatar{border-radius:50%}
.kk-comment-list .comment-meta{font-size:12px;color:var(--kk-muted);margin:5px 0 12px}
.kk-comment-list .comment-content{font-size:var(--kk-body-size);line-height:1.75}
.kk-comment-list .reply a{font-size:13px;text-decoration:none}
.kk-comments .comment-form p{margin:0 0 15px}
.kk-comments label{display:block;font-weight:600;margin-bottom:6px}
.kk-comments input[type="text"],.kk-comments input[type="email"],.kk-comments input[type="url"],.kk-comments textarea{width:100%;box-sizing:border-box;border:1px solid var(--kk-border);border-radius:7px;background:#fff;padding:12px 14px;font:inherit;color:var(--kk-text)}
.kk-comments .submit{border:0;border-radius:7px;background:var(--kk-accent);color:#fff;padding:12px 20px;font:inherit;font-weight:600;cursor:pointer}

@media (min-width:1025px){
  .kk-home-books-section .kk-books-seven{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(18px,2.1vw,38px);align-items:start;justify-content:stretch}
  .kk-home-books-section .kk-books-seven .kk-book{width:auto;max-width:150px;min-width:0;justify-self:center}
}
@media (max-width:1024px){
  .kk-home-books-section .kk-books-seven{display:flex}
  .kc-newsletter-card{align-items:stretch;flex-direction:column;padding:24px}
  .kc-newsletter-form{flex-basis:auto;width:100%;min-width:0}
}
@media (max-width:600px){
  .kc-newsletter-card{padding:20px 18px;border-radius:9px}
  .kc-newsletter-copy h2{font-size:22px}
  .kc-newsletter-form{display:grid;grid-template-columns:1fr}
  .kc-newsletter-form button{width:100%}
  .kk-single-newsletter{margin-top:28px}
  .kk-comments-wrap{margin-top:34px;margin-bottom:110px}
  .kk-comments h2,.kk-comments .comment-reply-title{font-size:21px}
  .kk-comment-list .comment-content{font-size:var(--kk-body-size-mobile)}
}

/* v1.3.0 — curated videos, gallery and Tamil Wiki profile */
.kk-home-video-section,.kk-home-gallery-section{border-top:1px solid var(--kk-border)}
.kk-home-video-section .kk-section-head,.kk-home-gallery-section .kk-section-head{margin-bottom:24px}
.kk-home-video-card{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:36px;align-items:center}
.kk-video-thumb{position:relative;display:block;overflow:hidden;border-radius:10px;background:#eee;aspect-ratio:16/9}
.kk-video-thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.kk-video-thumb:hover img{transform:scale(1.015)}
.kk-video-play{position:absolute;left:50%;top:50%;width:58px;height:58px;transform:translate(-50%,-50%);color:#161616;filter:drop-shadow(0 2px 10px rgba(0,0,0,.2))}
.kk-video-play svg{display:block;width:100%;height:100%}
.kk-home-video-copy h3{font-family:var(--kk-heading-font);font-size:clamp(24px,2.3vw,34px);line-height:1.35;margin:6px 0 12px}.kk-home-video-copy h3 a{text-decoration:none;color:inherit}
.kk-home-video-copy p{font-size:var(--kk-excerpt-size);line-height:1.75;color:var(--kk-muted);margin:0 0 18px}.kk-media-meta{font-size:12px;color:var(--kk-muted)}
.kk-home-gallery-intro{display:flex;justify-content:space-between;align-items:end;margin-bottom:14px}.kk-home-gallery-intro h3{font-size:18px;margin:0 0 2px}.kk-home-gallery-intro h3 a{text-decoration:none;color:inherit}.kk-home-gallery-intro span{font-size:12px;color:var(--kk-muted)}
.kk-home-gallery-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.kk-home-gallery-strip a{display:block;aspect-ratio:4/3;overflow:hidden;border-radius:8px;background:#eee}.kk-home-gallery-strip img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}.kk-home-gallery-strip a:hover img{transform:scale(1.02)}.kk-home-gallery-strip .kk-gallery-cover-only{grid-column:span 2}
.kk-footer-copy{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.kk-wiki-link{font-size:13px;color:var(--kk-muted);text-decoration:none}.kk-wiki-link:hover{color:var(--kk-text)}

.kk-media-archive{padding:48px 0 80px}.kk-media-archive-head{text-align:center;max-width:780px;margin:0 auto 38px}.kk-media-archive-head h1{font-family:var(--kk-heading-font);font-size:clamp(32px,4vw,52px);line-height:1.25;margin:0 0 10px}.kk-media-archive-head p,.kk-gallery-description{color:var(--kk-muted);line-height:1.75}
.kk-video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:36px 24px}.kk-video-archive-card h2,.kk-gallery-album-card h2{font-size:20px;line-height:1.45;margin:9px 0 7px}.kk-video-archive-card h2 a,.kk-gallery-album-card h2 a{text-decoration:none;color:inherit}.kk-video-archive-card p,.kk-gallery-album-card p{font-size:14px;line-height:1.7;color:var(--kk-muted);margin:0}.kk-video-archive-card .kk-media-meta{margin-top:10px}
.kk-media-single{padding:44px 0 84px}.kk-video-embed{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:10px;background:#000;margin:26px 0 30px}.kk-video-embed iframe{position:absolute;inset:0;width:100%;height:100%}
.kk-gallery-albums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:38px 26px}.kk-gallery-album-cover{display:block;aspect-ratio:4/3;overflow:hidden;border-radius:9px;background:#eee}.kk-gallery-album-cover img{width:100%;height:100%;object-fit:cover;display:block}.kk-gallery-single{padding-top:0}.kk-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.kk-gallery-grid figure{margin:0}.kk-gallery-open{display:block;border:0;padding:0;background:none;width:100%;aspect-ratio:4/3;overflow:hidden;border-radius:8px;cursor:zoom-in}.kk-gallery-open img{width:100%;height:100%;object-fit:cover;display:block}.kk-gallery-grid figcaption{font-size:12px;line-height:1.55;color:var(--kk-muted);padding-top:6px}
.kk-gallery-dialog{width:min(1100px,94vw);max-height:92vh;border:0;padding:0;background:#111;color:#fff;border-radius:10px;overflow:hidden}.kk-gallery-dialog::backdrop{background:rgba(0,0,0,.82)}.kk-gallery-dialog img{display:block;max-width:100%;max-height:82vh;margin:auto;object-fit:contain}.kk-gallery-dialog p{margin:0;padding:10px 50px 12px;text-align:center;font-size:13px}.kk-gallery-close{position:absolute;right:10px;top:7px;z-index:2;width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.62);color:#fff;font-size:28px;line-height:1;cursor:pointer}
@media(max-width:900px){.kk-home-video-card{grid-template-columns:1fr;gap:20px}.kk-home-gallery-strip{display:flex;overflow-x:auto;gap:10px;scroll-snap-type:x mandatory;scrollbar-width:none}.kk-home-gallery-strip::-webkit-scrollbar{display:none}.kk-home-gallery-strip a{flex:0 0 62%;scroll-snap-align:start}.kk-video-grid,.kk-gallery-albums{grid-template-columns:repeat(2,minmax(0,1fr))}.kk-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.kk-home-video-section,.kk-home-gallery-section{padding-top:30px;padding-bottom:30px}.kk-video-play{width:50px;height:50px}.kk-home-video-copy h3{font-size:22px}.kk-video-grid,.kk-gallery-albums{grid-template-columns:1fr}.kk-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kk-media-archive{padding:32px 0 110px}.kk-media-single{padding-bottom:110px}.kk-footer-copy{gap:8px;align-items:flex-start;flex-direction:column}}

/* v1.3.0 — four-video desktop row, mobile swipe; single-cover gallery; AJAX lightbox */
.kk-home-video-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.kk-home-video-grid .kk-home-video-card{display:block;min-width:0}
.kk-home-video-grid .kk-video-thumb{width:100%;aspect-ratio:16/9;border-radius:8px}
.kk-home-video-grid .kk-video-play{width:46px;height:46px}
.kk-home-video-grid .kk-home-video-copy{padding-top:10px}
.kk-home-video-grid .kk-home-video-copy h3{font-size:18px;line-height:1.48;margin:5px 0 0}
.kk-home-video-grid .kk-media-meta{font-size:11px}
.kk-home-gallery-cover-card{max-width:720px}
.kk-home-gallery-cover-card h3{font-family:var(--kk-heading-font);font-size:20px;line-height:1.45;margin:0 0 3px}
.kk-home-gallery-cover-card h3 a{text-decoration:none;color:inherit}
.kk-home-gallery-cover{display:block;margin-top:13px;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:9px;background:#eee}
.kk-home-gallery-cover img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
@media (hover:hover) and (pointer:fine){.kk-home-gallery-cover:hover img{transform:scale(1.012)}}
.kk-gallery-dialog{position:relative;width:min(1180px,94vw);max-height:92vh;padding:0 54px;background:#111;color:#fff;border:0;border-radius:10px;overflow:hidden}
.kk-gallery-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:240px;max-height:82vh}
.kk-gallery-dialog img{display:block;max-width:100%;max-height:80vh;margin:auto;object-fit:contain}
.kk-gallery-loading{position:absolute;inset:auto;z-index:1;font-size:13px;color:#ddd}
.kk-gallery-prev,.kk-gallery-next{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:44px;height:56px;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:42px;line-height:1;cursor:pointer;border-radius:7px}
.kk-gallery-prev{left:6px}.kk-gallery-next{right:6px}
.kk-gallery-prev:disabled,.kk-gallery-next:disabled{opacity:.3;cursor:default}
.kk-gallery-dialog-info{display:flex;align-items:flex-start;justify-content:center;gap:16px;min-height:42px;padding:9px 10px 13px;font-size:13px;color:#eee}
.kk-gallery-dialog-info p{margin:0;padding:0;text-align:center;line-height:1.5}
.kk-gallery-dialog-info span{white-space:nowrap;color:#aaa}
@media(max-width:1024px) and (min-width:601px){.kk-home-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 18px}}
@media(max-width:600px){
  .kk-home-video-grid{display:flex;grid-template-columns:none;overflow-x:auto;gap:14px;scroll-snap-type:x mandatory;scrollbar-width:none;margin-right:-16px;padding-right:16px;padding-bottom:4px}
  .kk-home-video-grid::-webkit-scrollbar{display:none}
  .kk-home-video-grid .kk-home-video-card{flex:0 0 82%;scroll-snap-align:start}
  .kk-home-video-grid .kk-home-video-copy h3{font-size:17px}
  .kk-home-gallery-cover-card{max-width:none}
  .kk-home-gallery-cover{aspect-ratio:4/3}
  .kk-gallery-dialog{width:96vw;padding:0 40px;border-radius:8px}
  .kk-gallery-prev,.kk-gallery-next{width:36px;height:50px;font-size:34px}
  .kk-gallery-dialog-info{font-size:12px;gap:8px;flex-direction:column;align-items:center}
}

/* v1.3.3 — left aligned books heading + icon-only latest pagination */
.kk-home-books-section .kk-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.kk-home-books-section .kk-section-title{
  margin:0;
  text-align:left;
  justify-self:auto;
}
.kk-home-books-section .kk-section-link{
  margin-left:auto;
  justify-self:auto;
}
.kk-latest-pagination .prev.page-numbers,
.kk-latest-pagination .next.page-numbers{
  font-size:0;
  line-height:1;
}
.kk-latest-pagination .prev.page-numbers::before,
.kk-latest-pagination .next.page-numbers::before{
  font-size:18px;
  line-height:1;
}
.kk-latest-pagination .prev.page-numbers::before{content:'←';}
.kk-latest-pagination .next.page-numbers::before{content:'→';}
@media (max-width:560px){
  .kk-home-books-section .kk-section-head{display:flex;}
  .kk-home-books-section .kk-section-title{margin:0;text-align:left;}
  .kk-home-books-section .kk-section-link{margin-left:auto;font-size:12px;}
}

/* v1.3.4 — robust homepage latest-post pagination */
.kk-home-pagination .page-numbers.disabled{opacity:.32;cursor:default;pointer-events:none}
