/*
Theme Name: Puthiya Kural Publications
Theme URI: https://puthiyakural.ca
Author: Puthiya Kural Publications
Description: Tamil book & magazine publishing theme for புதிய குரல் பதிப்பகம் (Puthiya Kural Publications, Canada — since 2023). Includes books & magazines with a free mobile-friendly PDF reader, free author & reader signup, front-end book uploads, special author pages, Amazon & Google Books links, publishing & marketing services page, newsletter and enquiry inbox.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
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: puthiyakural
Tags: custom-menu, custom-logo, featured-images, translation-ready, two-columns, blog, e-commerce
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--navy: #0f1f33;
	--navy-2: #17304d;
	--red: #c8102e;
	--red-d: #a20c24;
	--gold: #f2a71b;
	--gold-d: #d98c06;
	--cream: #fbf8f3;
	--paper: #ffffff;
	--line: #e7e2da;
	--muted: #6b6f76;
	--ink: #16181c;
	--soft: #f4f1ec;
	--radius: 10px;
	--shadow: 0 10px 30px rgba(15, 31, 51, .10);
	--shadow-sm: 0 3px 10px rgba(15, 31, 51, .10);
	--font: "Noto Sans Tamil", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Noto Serif Tamil", "Noto Sans Tamil", Georgia, serif;
	--wrap: 1220px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.75;
	color: var(--ink);
	background: var(--paper);
	overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-d); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; color: var(--navy); font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; z-index: 1000; top: 8px; left: 8px;
	background: var(--paper); padding: 8px 14px; border-radius: 6px; box-shadow: var(--shadow);
}
.pk-container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.pk-center { text-align: center; }
.pk-small { font-size: .875rem; color: var(--muted); }
.pk-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.pk-icon { flex: none; vertical-align: middle; }
.pk-main, .pk-footer { overflow-x: clip; }
[hidden] { display: none !important; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.pk-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .62em 1.3em; border-radius: 999px; border: 2px solid transparent;
	font-weight: 600; font-size: .95rem; line-height: 1.3; cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
	text-align: center;
}
.pk-btn:hover { transform: translateY(-1px); }
.pk-btn--red { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(200, 16, 46, .25); }
.pk-btn--red:hover { background: var(--red-d); color: #fff; }
.pk-btn--navy { background: var(--navy); color: #fff; border-radius: 8px; }
.pk-btn--navy:hover { background: var(--navy-2); color: #fff; }
.pk-btn--gold { background: var(--gold); color: var(--navy); }
.pk-btn--gold:hover { background: var(--gold-d); color: var(--navy); }
.pk-btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; background: rgba(255, 255, 255, .06); }
.pk-btn--ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pk-btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.pk-btn--outline:hover { background: var(--navy); color: #fff; }
.pk-btn--sm { padding: .35em 1.1em; font-size: .85rem; border-radius: 6px; }
.pk-btn--lg { padding: .8em 1.6em; font-size: 1rem; }
.pk-btn--block { display: flex; width: 100%; }
.pk-btn[disabled] { opacity: .6; cursor: wait; }
.pk-more { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; color: var(--navy); font-size: .9rem; }
.pk-more:hover { color: var(--red); }

/* ==========================================================================
   Top bar & header
   ========================================================================== */
.pk-topbar { background: var(--navy); color: #cfd6df; font-size: .78rem; }
.pk-topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 16px; }
.pk-topbar a { color: #e9edf2; }
.pk-topbar a:hover { color: var(--gold); }
.pk-topbar-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.pk-topbar-menu li + li::before { content: "|"; margin: 0 .6em; opacity: .4; }
.pk-topbar-right { display: flex; align-items: center; gap: 16px; }
.pk-topbar-link { display: inline-flex; align-items: center; gap: 4px; }
.pk-topbar-cta { background: var(--red); color: #fff !important; padding: 3px 10px; border-radius: 4px; font-weight: 600; }
.pk-topbar-cta:hover { background: var(--red-d); }

.pk-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.pk-social a { display: inline-grid; place-items: center; color: inherit; }
.pk-social--footer a, .pk-social--color a, .pk-social--light a {
	width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff;
}
.pk-social--color a { background: var(--navy); }
.pk-social--color li:nth-child(2) a { background: var(--red); }
.pk-social--color li:nth-child(4) a { background: #d6246e; }
.pk-social--footer a:hover, .pk-social--color a:hover, .pk-social--light a:hover { background: var(--gold); color: var(--navy); }

.pk-header {
	background: var(--cream); border-bottom: 1px solid var(--line);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .pk-header { top: 32px; }
.pk-header-inner { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.pk-brand { flex: none; }
.pk-logo { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.pk-logo:hover { color: var(--ink); }
.pk-logo-mark { width: 64px; height: auto; }
.pk-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.pk-logo-name { font-family: var(--font-head); font-weight: 800; font-size: 2.15rem; letter-spacing: -.01em; }
.pk-logo-name .w1 { color: var(--red); }
.pk-logo-name .w2 { color: var(--ink); }
.pk-logo-tag { font-size: .72rem; font-weight: 600; margin-top: 4px; color: var(--ink); }
.pk-logo.is-light .pk-logo-name .w2, .pk-logo.is-light .pk-logo-tag { color: #fff; }
.custom-logo { max-height: 80px; width: auto; }

.pk-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pk-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.pk-menu > li { position: relative; }
.pk-menu a {
	display: block; padding: .5em .85em; color: var(--ink); font-weight: 600; font-size: .9rem;
	border-radius: 4px; white-space: nowrap;
}
.pk-menu a:hover { color: var(--red); }
.pk-menu > .current-menu-item > a, .pk-menu > .current_page_item > a, .pk-menu > .current-menu-ancestor > a {
	background: var(--red); color: #fff;
}
.pk-menu .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg);
}
.pk-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 210px;
	background: #fff; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; z-index: 60;
}
.pk-menu li:hover > .sub-menu, .pk-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.pk-menu .sub-menu a { font-weight: 500; }
.pk-sub-toggle { display: none; }
.pk-nav-extra { display: none; }
.pk-nav-toggle, .pk-search-toggle {
	background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); border-radius: 8px;
}
.pk-search-toggle:hover, .pk-nav-toggle:hover { background: var(--soft); }
.pk-nav-toggle { display: none; }
.pk-nav-toggle .i-close, .pk-nav-open .pk-nav-toggle .i-open { display: none; }
.pk-nav-open .pk-nav-toggle .i-close { display: inline; }
.pk-search-panel { background: #fff; border-top: 1px solid var(--line); padding: 16px 0; }
.pk-search-form { display: flex; gap: 8px; }
.pk-search-form input { flex: 1; padding: .7em 1em; border: 1px solid var(--line); border-radius: 999px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.pk-hero {
	position: relative; color: #fff; overflow: hidden;
	background:
		radial-gradient(ellipse at 78% 30%, rgba(255, 196, 110, .35), transparent 55%),
		radial-gradient(ellipse at 10% 90%, rgba(120, 50, 10, .55), transparent 60%),
		repeating-linear-gradient(90deg, rgba(0, 0, 0, .0) 0 38px, rgba(0, 0, 0, .18) 38px 41px, rgba(255, 200, 140, .05) 41px 70px),
		linear-gradient(180deg, #2a1709 0%, #3d2410 45%, #1b0f07 100%);
}
.pk-hero.has-photo { background: #1b0f07 var(--hero) center / cover no-repeat; }
.pk-hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(10, 6, 3, .88) 0%, rgba(10, 6, 3, .55) 45%, rgba(10, 6, 3, .1) 100%);
}
.pk-hero::after { /* desk edge */
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
	background: linear-gradient(180deg, #5a3416, #2e1a0b); opacity: .7;
}
.pk-hero.has-photo::after { display: none; }
.pk-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px; min-height: 420px; padding-top: 48px; padding-bottom: 48px; }
.pk-hero h1 { color: #fff; margin: 0 0 18px; font-weight: 700; }
.pk-hero h1 span { display: block; }
.pk-hero .l1, .pk-hero .l2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.3; font-weight: 600; }
.pk-hero .l3 { color: var(--gold); font-size: clamp(2.1rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.2; text-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.pk-hero p { font-size: 1.05rem; max-width: 30em; color: #f3ece2; }
.pk-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pk-hero-art { position: relative; height: 340px; }
.pk-hero.has-photo .pk-hero-art { visibility: hidden; }
.pk-stack { position: absolute; left: 4%; bottom: 40px; width: 72%; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.pk-spine {
	position: relative; display: flex; align-items: center; height: 46px; padding: 0 22px 0 30px;
	color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
	border-radius: 4px 6px 6px 4px; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .25), inset 0 3px 0 rgba(255, 255, 255, .12), 0 6px 10px rgba(0, 0, 0, .35);
	transition: transform .25s;
}
.pk-spine::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: rgba(255, 255, 255, .85); border-radius: 4px 0 0 4px; box-shadow: inset -3px 0 4px rgba(0, 0, 0, .25); background-image: repeating-linear-gradient(180deg, #f4efe4 0 2px, #d9d0bf 2px 3px); }
.pk-spine::after { content: ""; position: absolute; right: 14px; top: 12px; bottom: 12px; width: 10px; border-left: 2px solid rgba(242, 167, 27, .8); border-right: 2px solid rgba(242, 167, 27, .8); }
.pk-spine span { position: relative; }
.pk-spine:hover { transform: translateX(10px); color: #fff; }
.pk-spine:nth-child(1) { margin-left: 4%; width: 92%; }
.pk-spine:nth-child(2) { margin-left: 1%; width: 95%; }
.pk-spine:nth-child(3) { margin-left: 3%; width: 93%; }
.pk-spine:nth-child(4) { margin-left: 0; width: 97%; }
.pk-spine:nth-child(5) { margin-left: 2%; width: 96%; }
.pk-spine--red { background: linear-gradient(180deg, #d52037, #9c0d22); }
.pk-spine--navy { background: linear-gradient(180deg, #1f4570, #12294a); }
.pk-spine--green { background: linear-gradient(180deg, #3e7a2e, #24501a); }
.pk-spine--orange { background: linear-gradient(180deg, #e2861b, #b55f08); }
.pk-spine--brown { background: linear-gradient(180deg, #4a3a30, #2b201a); }
.pk-mug {
	position: absolute; right: 2%; bottom: 70px; width: 132px; height: 150px; z-index: 1;
	background: linear-gradient(90deg, #e9e4dc, #fffdf9 40%, #e2dbd0); border-radius: 8px 8px 18px 18px;
	box-shadow: 0 14px 24px rgba(0, 0, 0, .45); display: grid; place-items: center;
	color: var(--navy); font-family: var(--font-head); font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.35;
}
.pk-mug::after { content: ""; position: absolute; right: -34px; top: 28px; width: 40px; height: 64px; border: 10px solid #ece6dd; border-left: 0; border-radius: 0 34px 34px 0; }
.pk-openbook {
	position: absolute; right: 0; bottom: 0; width: 60%; height: 70px; z-index: 3;
	background: linear-gradient(100deg, #f7f0e1 0 48%, #d8cdb7 49.5%, #f7f0e1 51% 100%);
	border-radius: 50% 50% 6px 6px / 30px 30px 6px 6px;
	box-shadow: 0 -2px 0 #e5dccb inset, 0 12px 22px rgba(0, 0, 0, .5);
	transform: perspective(400px) rotateX(38deg);
}

/* ==========================================================================
   Feature strip
   ========================================================================== */
.pk-features { background: var(--soft); border-bottom: 1px solid var(--line); }
.pk-features-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pk-feature { display: flex; align-items: center; gap: 14px; padding: 26px 18px; color: var(--ink); border-left: 1px solid var(--line); transition: background .2s; }
.pk-feature:first-child { border-left: 0; }
.pk-feature:hover { background: #fff; color: var(--ink); }
.pk-feature-icon { color: var(--navy); }
.pk-feature strong { display: block; font-size: .95rem; }
.pk-feature small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }

/* ==========================================================================
   Sections
   ========================================================================== */
.pk-section { padding: 56px 0; }
.pk-section--tight { padding: 40px 0; }
.pk-section--alt { background: var(--soft); }
.pk-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.pk-section-title { position: relative; font-size: 1.55rem; margin: 0; padding-bottom: 12px; }
.pk-section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--red); border-radius: 2px; }
.pk-see-more { font-size: .8rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pk-see-more .pk-icon { color: var(--red); }
.pk-eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: .4em; }
.pk-empty { padding: 30px; background: var(--soft); border-radius: var(--radius); text-align: center; color: var(--muted); }

.pk-split { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 48px; }
.pk-split-side { border-left: 1px solid var(--line); padding-left: 40px; }
.pk-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pk-split--news { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }

/* Book cards */
.pk-grid { display: grid; gap: 28px 24px; }
.pk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pk-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pk-grid--compact { gap: 20px 18px; }
.pk-book-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pk-book-cover { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 12px; background: var(--soft); transition: transform .25s, box-shadow .25s; }
.pk-book-cover:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(15, 31, 51, .22); }
.pk-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.pk-badge { position: absolute; bottom: 8px; right: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.3); background: var(--gold); color: var(--navy); font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; }
.pk-cover-gen {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14% 10% 10%;
	background: linear-gradient(160deg, var(--c1), color-mix(in srgb, var(--c1) 70%, #000));
	color: var(--c2); font-family: var(--font-head); text-align: center;
}
.pk-cover-gen::before { content: ""; position: absolute; inset: 6%; border: 1px solid color-mix(in srgb, var(--c2) 50%, transparent); }
.pk-cover-gen .t { font-size: 1.15em; font-weight: 800; line-height: 1.3; }
.pk-cover-gen .a { font-size: .75em; color: #fff; opacity: .9; }
.pk-cover-gen .p { font-size: .7em; opacity: .8; }
.pk-book-genre { font-size: .75rem; color: var(--muted); margin: 0 0 2px; }
.pk-book-title { font-family: var(--font); font-size: .95rem; font-weight: 700; line-height: 1.45; margin: 0 0 2px; }
.pk-book-title a { color: var(--ink); }
.pk-book-title a:hover { color: var(--red); }
.pk-book-author { font-size: .8rem; color: var(--muted); margin: 0 0 10px; }
.pk-book-card .pk-btn { margin-top: auto; }
.pk-book-card--compact .pk-book-cover { margin-bottom: 10px; }
.pk-book-card--compact .pk-book-title { font-size: .86rem; }
.pk-book-card--compact .pk-more { font-size: .8rem; margin-top: auto; }

/* Carousel */
.pk-carousel { position: relative; }
.pk-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 10px; }
.pk-carousel-track::-webkit-scrollbar { display: none; }
.pk-carousel-track > * { scroll-snap-align: start; }
.pk-carousel-btn {
	position: absolute; top: 34%; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.pk-carousel-btn.prev { left: -20px; }
.pk-carousel-btn.next { right: -20px; }
.pk-carousel-btn:disabled { opacity: 0; pointer-events: none; }

/* Magazines fan */
.pk-mag-fan { position: relative; height: 300px; margin: 6px 0 14px; }
.pk-mag-cover { position: absolute; top: 10px; width: 52%; aspect-ratio: 3 / 4; border-radius: 3px; overflow: hidden; box-shadow: 0 12px 26px rgba(0, 0, 0, .3); background: var(--soft); transition: transform .3s; }
.pk-mag-cover img { width: 100%; height: 100%; object-fit: cover; }
.pk-mag-0 { left: 18%; z-index: 3; transform: rotate(-4deg); width: 58%; }
.pk-mag-1 { left: 44%; z-index: 2; transform: rotate(5deg); top: 22px; }
.pk-mag-2 { left: 2%; z-index: 1; transform: rotate(-12deg); top: 30px; }
.pk-mag-cover:hover { transform: rotate(0) translateY(-6px); z-index: 4; }
.pk-mag-placeholder .pk-cover-gen .t { font-size: 1.4em; }
.pk-mag-topics { text-align: center; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }

/* About card */
.pk-about-card {
	position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding: 30px; border-radius: var(--radius);
	background: linear-gradient(90deg, #fbf6ee 55%, #ece3d4); box-shadow: var(--shadow); overflow: hidden;
}
.pk-about-card.has-photo { background: linear-gradient(90deg, #fbf6ee 50%, rgba(251, 246, 238, .15) 75%), var(--about) right center / cover no-repeat; }
.pk-about-text p { font-size: .92rem; margin: 16px 0 20px; }
.pk-about-quote { align-self: end; margin: 0; font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--navy); line-height: 1.5; }

/* Author band */
.pk-author-band { background: linear-gradient(120deg, var(--navy) 0%, #1c3a5e 100%); color: #e8edf3; position: relative; overflow: hidden; }
.pk-author-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(242, 167, 27, .12); }
.pk-author-band-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.pk-author-band h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); }
.pk-author-band .pk-eyebrow { color: var(--gold); }
.pk-author-band-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pk-checks { list-style: none; padding: 0; margin: 0 0 1em; }
.pk-checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.pk-checks .pk-icon { color: var(--gold); margin-top: 5px; }

.pk-authors-row { display: flex; gap: 26px; flex-wrap: wrap; }
.pk-author-chip { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: .88rem; width: 110px; text-align: center; }
.pk-avatar { border-radius: 50%; object-fit: cover; aspect-ratio: 1; }
.pk-avatar--initial { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--gold)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 2rem; }

/* Newsletter + contact */
.pk-newsletter {
	display: flex; gap: 22px; align-items: flex-start; padding: 30px; border-radius: var(--radius); color: #fff;
	background: linear-gradient(90deg, var(--navy) 55%, rgba(15, 31, 51, .85)), linear-gradient(135deg, #3d2410, #1b0f07);
}
.pk-newsletter h2 { color: #fff; font-size: 1.3rem; }
.pk-newsletter p { color: #cfd6df; font-size: .88rem; }
.pk-newsletter-icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--red); color: #fff; }
.pk-newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.pk-newsletter-form input { flex: 1 1 220px; min-width: 0; padding: .7em 1em; border-radius: 6px; border: 0; color: var(--ink); }
.pk-newsletter-form .pk-btn { border-radius: 6px; }
.pk-contact-card { padding: 28px; border-radius: var(--radius); background: var(--soft); }
.pk-contact-card h2 { font-size: 1.15rem; }
.pk-contact-card ul, .pk-contact-list { list-style: none; padding: 0; margin: 0 0 16px; }
.pk-contact-card li, .pk-contact-list li { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .9rem; word-break: break-word; }
.pk-contact-card a, .pk-contact-list a { color: var(--ink); }
.pk-contact-list--lg li { font-size: 1.05rem; margin-bottom: 14px; }

/* Notices */
.pk-notice { padding: 12px 16px; border-radius: 8px; margin: 0 0 18px; font-weight: 600; font-size: .92rem; }
.pk-notice--ok { background: #e6f5ea; color: #1d6b35; border: 1px solid #b9e2c4; }
.pk-notice--err { background: #fdecee; color: #a20c24; border: 1px solid #f5c2ca; }

/* ==========================================================================
   Footer
   ========================================================================== */
.pk-footer { background: var(--navy); color: #c9d1db; margin-top: 40px; }
.pk-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.pk-footer h3 { color: #fff; font-family: var(--font); font-size: .95rem; margin-bottom: 14px; }
.pk-footer ul { list-style: none; padding: 0; margin: 0; }
.pk-footer li { margin-bottom: 6px; font-size: .88rem; }
.pk-footer a { color: #c9d1db; }
.pk-footer a:hover { color: var(--gold); }
.pk-footer-col + .pk-footer-col { border-left: 1px solid rgba(255, 255, 255, .1); padding-left: 28px; }
.pk-footer .pk-logo-name { font-size: 1.7rem; white-space: nowrap; }
.pk-footer .pk-logo-mark { width: 48px; }
.pk-footer-en { font-size: .82rem; margin-top: 14px; }
.pk-footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.pk-footer-contact .pk-icon { margin-top: 5px; }
.pk-footer-contact .pk-social { margin-top: 14px; }
.pk-footer-slogan { align-self: center; font-family: var(--font-head); color: #fff; font-size: 1.25rem; font-weight: 700; line-height: 1.5; transform: rotate(-4deg); }
.pk-footer-slogan p { margin: 0; }
.pk-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }
.pk-footer-bottom-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.pk-footer-bottom p { margin: 0; }
.pk-footer-bottom a + a { margin-left: 16px; }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.pk-page-hero {
	background: linear-gradient(120deg, var(--navy), #22426a); color: #e5ebf2; padding: 46px 0 40px;
	position: relative; overflow: hidden;
}
.pk-page-hero::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 167, 27, .25), transparent 70%); }
.pk-page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .3em; }
.pk-page-hero p { max-width: 46em; margin: 0; }
.pk-page-hero .pk-eyebrow { color: var(--gold); }
.pk-page-hero .pk-btn { margin-top: 20px; }
.pk-page-hero--signup, .pk-page-hero--services { background: linear-gradient(120deg, #2a1709, #4a2a10 60%, #6b3c12); }

.pk-crumbs { font-size: .8rem; color: var(--muted); padding-top: 18px; padding-bottom: 6px; }
.pk-crumbs a { color: var(--muted); }
.pk-crumbs a:hover { color: var(--red); }

.pk-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.pk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pk-chip { padding: .35em .95em; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .85rem; font-weight: 600; border: 1px solid var(--line); }
.pk-chip small { color: var(--muted); font-weight: 500; }
.pk-chip:hover { border-color: var(--red); color: var(--red); }
.pk-chip.is-active { background: var(--red); color: #fff; border-color: var(--red); }
.pk-chip.is-active small { color: #fde; }
.pk-inline-search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; min-width: 240px; }
.pk-inline-search input { border: 0; padding: .55em 1em; flex: 1; min-width: 0; outline: none; }
.pk-inline-search button { border: 0; background: var(--navy); color: #fff; padding: 0 16px; cursor: pointer; }

/* Single book */
.pk-book-single { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; padding-top: 20px; padding-bottom: 40px; }
.pk-book-media { position: sticky; top: 120px; align-self: start; }
.pk-book-media-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; box-shadow: 0 22px 44px rgba(15, 31, 51, .28); }
.pk-book-media-cover img { width: 100%; height: 100%; object-fit: cover; }
.pk-book-media-cover .pk-cover-gen { font-size: 1.5rem; }
.pk-read-box { margin-top: 20px; display: grid; gap: 10px; }
.pk-lock { font-size: .88rem; background: #fff7e6; border: 1px solid #f6dca4; padding: 10px 12px; border-radius: 8px; margin: 0; }
.pk-book-heading { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: .15em; }
.pk-book-sub { font-size: 1.1rem; color: var(--muted); margin-bottom: .6em; }
.pk-book-by { font-size: 1rem; }
.pk-book-by a { font-weight: 700; }
.pk-price { font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.pk-stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 24px; }
.pk-store { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 8px; font-weight: 700; color: #fff; line-height: 1.2; font-size: .95rem; transition: transform .2s; }
.pk-store small { display: block; font-size: .68rem; font-weight: 500; opacity: .85; }
.pk-store:hover { transform: translateY(-2px); color: #fff; }
.pk-store--amazon { background: #131921; }
.pk-store--amazon .pk-icon { color: #ff9900; }
.pk-store--google { background: #1a73e8; }
.pk-store--other { background: var(--red); }
.pk-prose { font-size: 1.02rem; }
.pk-prose h2 { font-size: 1.4rem; margin-top: 1.4em; }
.pk-prose img { border-radius: 8px; height: auto; }
.pk-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); font-family: var(--font-head); font-size: 1.2rem; color: var(--navy); }
.pk-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); margin: 28px 0; overflow: hidden; }
.pk-details div { padding: 12px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0 -1px -1px 0; }
.pk-details dt { font-size: .75rem; color: var(--muted); }
.pk-details dd { margin: 0; font-weight: 600; }
.pk-share { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.pk-share a { font-weight: 600; color: var(--navy); }
.pk-author-mini { display: flex; gap: 24px; align-items: center; background: var(--soft); border-radius: var(--radius); padding: 26px; max-width: calc(var(--wrap) - 48px); }
.pk-author-mini h2 { font-size: 1.3rem; margin: 0 0 6px; }
.pk-author-mini h2 a { color: var(--navy); }
.pk-author-mini p { margin-bottom: 8px; font-size: .92rem; }

/* Author page */
.pk-author-hero { background: linear-gradient(120deg, var(--navy), #22426a 70%, #2b4f7a); color: #dfe6ee; padding: 50px 0; }
.pk-author-hero-inner { display: flex; gap: 40px; align-items: center; }
.pk-author-photo .pk-avatar { width: 180px; height: 180px; border: 6px solid rgba(255, 255, 255, .15); box-shadow: 0 16px 30px rgba(0, 0, 0, .35); }
.pk-author-meta h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.pk-author-meta .pk-eyebrow { color: var(--gold); }
.pk-author-en { font-size: 1.1rem; margin: 0 0 4px; opacity: .85; }
.pk-author-loc { display: flex; align-items: center; gap: 6px; font-size: .9rem; margin: 0 0 12px; }
.pk-author-stats { list-style: none; padding: 0; margin: 0 0 10px; display: flex; gap: 26px; }
.pk-author-stats strong { color: #fff; font-size: 1.4rem; margin-right: 4px; }
.pk-author-meta .pk-stores { margin: 10px 0 14px; }
.pk-author-bio { max-width: 820px; padding-top: 40px; }
.pk-author-bio .pk-prose { margin-top: 18px; }
.pk-own-note { text-align: center; padding-bottom: 20px; }

.pk-author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.pk-author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: .2s; }
.pk-author-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.pk-author-card .pk-avatar { width: 112px; height: 112px; margin-bottom: 8px; }
.pk-author-card small { color: var(--muted); }
.pk-author-count { font-size: .78rem; font-weight: 700; color: var(--red); background: #fdecee; padding: 2px 10px; border-radius: 999px; }

/* Cards & forms */
.pk-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 2px 0 rgba(15, 31, 51, .03); margin-bottom: 26px; scroll-margin-top: 130px; }
.pk-card h2 { font-size: 1.35rem; }
.pk-card h2 small { font-family: var(--font); font-size: .8rem; color: var(--muted); font-weight: 500; }
.pk-card--navy { background: var(--navy); color: #dfe6ee; border: 0; }
.pk-card--navy h3 { color: #fff; }
.pk-card--gold { background: linear-gradient(120deg, #fff6e2, #fde7b7); border-color: #f6dca4; }
.pk-signup-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.pk-form p { margin: 0 0 16px; }
.pk-form label, .login-username label, .login-password label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.pk-form input:not([type=checkbox]):not([type=radio]):not([type=file]), .pk-form select, .pk-form textarea,
#loginform input[type=text], #loginform input[type=password] {
	width: 100%; padding: .7em .9em; border: 1px solid #d8d2c8; border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.pk-form input:focus, .pk-form select:focus, .pk-form textarea:focus, #loginform input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 31, 51, .1); outline: none; }
#loginform p { margin: 0 0 16px; }
#loginform .login-remember label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
#loginform .button-primary, #wp-submit { background: var(--navy); color: #fff; border: 0; padding: .75em 1.6em; border-radius: 8px; font-weight: 600; cursor: pointer; width: 100%; }
#wp-submit:hover { background: var(--navy-2); }
.pk-check label, .pk-checkrow label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .88rem; }
.pk-check input, .pk-checkrow input { margin-top: .4em; }
.pk-checkrow { display: grid; gap: 10px; margin-bottom: 16px; }
.pk-form--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.pk-form--grid .span-2 { grid-column: 1 / -1; }
.pk-fieldset { border: 1px dashed #d8d2c8; border-radius: 10px; padding: 14px 16px 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pk-fieldset legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.pk-fieldset label { display: flex !important; align-items: center; gap: 6px; }
.pk-seg { border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-seg label { position: relative; margin: 0; }
.pk-seg input { position: absolute; opacity: 0; }
.pk-seg span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 10px; font-weight: 700; cursor: pointer; transition: .2s; }
.pk-seg input:checked + span { border-color: var(--red); background: #fdecee; color: var(--red); }
.pk-seg input:focus-visible + span { outline: 3px solid var(--gold); }
.pk-file { margin-bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pk-file > label { font-weight: 600; font-size: .88rem; margin: 0; }
.pk-file-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: .6em 1.1em; border: 2px dashed #c9c1b4; border-radius: 10px; font-weight: 600; font-size: .9rem; cursor: pointer; background: var(--soft); }
.pk-file-btn:hover, .pk-file-btn:focus-within { border-color: var(--navy); }
.pk-file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pk-file-name, .pk-file-current { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; word-break: break-all; }
.pk-file--photo { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; }
.pk-file--photo .pk-avatar { width: 88px; height: 88px; }

/* Dashboard */
.pk-page-hero--dash { padding: 30px 0; }
.pk-dash-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pk-dash-head .pk-avatar { width: 72px; height: 72px; }
.pk-dash-head h1 { margin: 0; font-size: 1.8rem; }
.pk-dash-head .pk-eyebrow { margin: 0; }
.pk-dash-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.pk-dash-actions .pk-btn { margin: 0; }
.pk-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; position: sticky; top: 100px; z-index: 5; background: var(--paper); padding: 8px 0; }
.pk-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: .5em 1em; border-radius: 999px; background: var(--soft); color: var(--navy); font-weight: 600; font-size: .9rem; }
.pk-tabs a:hover { background: var(--navy); color: #fff; }
.pk-mybooks { list-style: none; padding: 0; margin: 0; }
.pk-mybooks li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pk-mybooks li:last-child { border-bottom: 0; }
.pk-mybooks-cover { position: relative; flex: none; width: 52px; aspect-ratio: 2 / 3; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-sm); font-size: .4rem; }
.pk-mybooks-cover img { width: 100%; height: 100%; object-fit: cover; }
.pk-mybooks-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-mybooks-info small { color: var(--muted); }
.pk-mybooks-act { display: flex; gap: 14px; font-weight: 600; font-size: .9rem; }
.pk-status { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin: 2px 0; }
.pk-status--publish { background: #e6f5ea; color: #1d6b35; }
.pk-status--pending { background: #fff4d6; color: #8a5a00; }
.pk-status--draft { background: var(--soft); color: var(--muted); }

/* Services */
.pk-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pk-svc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; transition: .2s; }
.pk-svc:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.pk-svc h3 { font-size: 1.1rem; margin: 14px 0 8px; }
.pk-svc h3 small { display: block; font-family: var(--font); font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.pk-svc p { font-size: .92rem; margin: 0; color: #3d4148; }
.pk-svc-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #fdecee; color: var(--red); }
.pk-svc-icon--gold { background: #fff2d6; color: var(--gold-d); }
.pk-packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.pk-package { position: relative; display: flex; flex-direction: column; padding: 30px 26px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.pk-package.is-hot { border: 2px solid var(--red); box-shadow: 0 18px 40px rgba(200, 16, 46, .14); }
.pk-package-flag { position: absolute; top: -13px; right: 22px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.pk-package h3 { font-size: 1.35rem; margin: 0; }
.pk-package-en { color: var(--muted); font-weight: 600; font-size: .85rem; margin: 0 0 10px; }
.pk-package-desc { font-size: .9rem; }
.pk-package .pk-checks { flex: 1; font-size: .92rem; }
.pk-package .pk-checks .pk-icon { color: var(--red); }
.pk-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.pk-steps li { counter-increment: s; background: #fff; border-radius: 14px; padding: 22px 18px; border: 1px solid var(--line); }
.pk-steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 10px; }
.pk-steps strong { display: block; font-family: var(--font-head); color: var(--navy); }
.pk-steps span { font-size: .86rem; color: #3d4148; }
.pk-enquiry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; align-items: start; }
.pk-enquiry > div:first-child p { margin-top: 16px; }

/* About */
.pk-about-page { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 48px; }
.pk-lead { font-size: 1.2rem; font-family: var(--font-head); color: var(--navy); }
.pk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-self: start; }
.pk-stats div { background: var(--soft); border-radius: 14px; padding: 20px; text-align: center; }
.pk-stats strong { display: block; font-size: 2rem; color: var(--red); font-family: var(--font-head); line-height: 1.2; }
.pk-stats span { font-size: .85rem; font-weight: 600; }
.pk-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pk-values > div { background: #fff; border-radius: 14px; padding: 26px; }
.pk-values h3 { margin-top: 14px; }

/* Blog */
.pk-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.pk-post-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.pk-post-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pk-post-body { padding: 20px; }
.pk-post-body h2 { font-size: 1.15rem; }
.pk-post-body h2 a { color: var(--navy); }
.pk-post-meta { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.pk-article { max-width: 820px; padding-top: 30px; padding-bottom: 40px; }
.pk-article-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.pk-article-img img { border-radius: 12px; width: 100%; }
.pk-article-img { margin: 0 0 26px; }
.pk-postnav { display: flex; justify-content: space-between; gap: 20px; margin: 30px 0; font-weight: 600; }
.pk-comments-wrap { max-width: 820px; padding-bottom: 30px; }
.pk-comment-list { padding-left: 1.2em; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: .6em .8em; border: 1px solid #d8d2c8; border-radius: 8px; }
.pk-404 { padding: 90px 24px; }
.pk-404-num { font-size: 6rem; font-weight: 800; color: var(--red); font-family: var(--font-head); line-height: 1; }

/* Pagination */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; background: var(--soft); color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--red); color: #fff; }

/* WP core alignment */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .82rem; color: var(--muted); }

/* ==========================================================================
   PDF reader
   ========================================================================== */
.pk-reader-body { background: #2b2f36; margin: 0; overflow: hidden; }
.pk-reader { position: fixed; inset: 0; display: flex; flex-direction: column; background: #2b2f36; color: #fff; }
.admin-bar .pk-reader { top: 32px; }
.pk-reader-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--navy); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); z-index: 2; }
.pk-reader-back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; flex: none; }
.pk-reader-back:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pk-reader-title { flex: 1; min-width: 0; line-height: 1.3; }
.pk-reader-title strong, .pk-reader-title small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-reader-title small { opacity: .7; font-size: .75rem; }
.pk-reader-tools { display: flex; gap: 2px; flex: none; }
.pk-reader-tools button, .pk-reader-tools a, .pk-reader-nav button {
	display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer;
}
.pk-reader-tools button:hover, .pk-reader-tools a:hover, .pk-reader-nav button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.pk-reader-progress { height: 3px; background: rgba(255, 255, 255, .1); }
.pk-reader-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s; }
.pk-reader-pages { position: relative; flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px 0 24px; outline: none; overscroll-behavior: contain; }
.pk-page { position: relative; margin: 0 auto 14px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.pk-page canvas { display: block; width: 100% !important; height: 100% !important; position: relative; z-index: 1; }
.pk-page-num { position: absolute; inset: 0; display: grid; place-items: center; color: #bbb; font-size: 1.4rem; font-weight: 700; }
.pk-reader-status { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 60px 20px; color: #ccd; text-align: center; }
.pk-spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--gold); border-radius: 50%; animation: pkspin .8s linear infinite; }
@keyframes pkspin { to { transform: rotate(360deg); } }
.pk-reader-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 12px; padding-bottom: max(6px, env(safe-area-inset-bottom)); background: var(--navy); }
.pk-reader-pagebox { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.pk-reader-pagebox input { width: 64px; text-align: center; padding: 6px; border-radius: 6px; border: 0; color: var(--ink); -moz-appearance: textfield; }
.pk-reader-pagebox input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pk-reader-locked { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; gap: 10px; }
.pk-reader-locked h1 { color: #fff; font-size: 1.6rem; }
.pk-reader-locked .pk-icon { color: var(--gold); }
.pk-reader.is-full { z-index: 99999; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media all { /* compact desktop header */
	.pk-header-inner { gap: 14px; }
	.pk-menu { gap: 0; }
	.pk-menu a { padding: .45em .55em; font-size: .84rem; }
	.pk-logo-mark { width: 54px; }
	.pk-logo-name { font-size: 1.85rem; }
	.pk-logo-tag { font-size: .64rem; }
}
@media (max-width: 1180px) {
	.pk-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
	.pk-footer-slogan { display: none; }
	.pk-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
	.pk-nav-toggle { display: block; order: 3; }
	.pk-search-toggle { order: 2; margin-left: auto; }
	.pk-header-inner { min-height: 76px; gap: 8px; }
	.pk-logo-tag { display: block; }
	.pk-nav {
		position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); z-index: 100;
		flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
		background: #fff; padding: 80px 18px 24px; overflow-y: auto; box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
		transform: translateX(105%); visibility: hidden; transition: transform .28s ease, visibility 0s .28s;
	}
	.pk-nav-open .pk-nav { transform: none; visibility: visible; transition: transform .28s ease; }
	.pk-nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 31, 51, .45); z-index: 90; }
	.pk-nav-open .pk-header { z-index: 120; }
	.pk-nav-open { overflow: hidden; }
	.pk-nav-open .pk-nav-toggle { position: fixed; top: 16px; right: 16px; z-index: 110; background: var(--soft); }
	.pk-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.pk-menu > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); }
	.pk-menu > li > a { flex: 1; padding: .85em .6em; font-size: 1rem; }
	.pk-menu .menu-item-has-children > a::after { display: none; }
	.pk-sub-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
	.pk-menu .is-open .pk-sub-toggle svg { transform: rotate(180deg); }
	.pk-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; width: 100%; padding: 0 0 8px 12px; display: none; }
	.pk-menu .is-open > .sub-menu { display: block; }
	.pk-nav-extra { display: block; padding-top: 20px; }
	.pk-nav-extra .pk-btn { width: 100%; }
	.pk-tabs { top: 76px; }
}

@media (max-width: 1024px) {
	.pk-hero-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; padding-bottom: 0; }
	.pk-hero-art { height: 290px; max-width: 560px; width: 100%; margin: 0 auto; }
	.pk-features-grid { grid-template-columns: repeat(2, 1fr); }
	.pk-feature:nth-child(3) { border-left: 0; }
	.pk-feature:nth-child(n+3) { border-top: 1px solid var(--line); }
	.pk-split, .pk-split--even, .pk-split--news { grid-template-columns: 1fr; gap: 40px; }
	.pk-split-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 36px; }
	.pk-mag-fan { max-width: 380px; margin-left: auto; margin-right: auto; }
	.pk-author-band-inner { grid-template-columns: 1fr; }
	.pk-svc-grid, .pk-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pk-book-single { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; }
	.pk-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pk-tabs { top: 76px; }
	.pk-carousel-track { grid-auto-columns: calc((100% - 48px) / 3); }
}

@media (max-width: 782px) {
	.admin-bar .pk-header { top: 0; }
	.admin-bar .pk-reader { top: 46px; }
	.pk-container { padding: 0 16px; }
	.pk-topbar-menu, .pk-topbar .pk-social--top { display: none; }
	.pk-topbar-inner { justify-content: flex-end; }
	.pk-header { position: sticky; }
	.pk-logo-mark { width: 46px; }
	.pk-logo-name { font-size: 1.55rem; }
	.pk-logo-tag { font-size: .6rem; max-width: 220px; }
	.pk-section { padding: 40px 0; }
	.pk-section--tight { padding: 30px 0; }
	.pk-section-title { font-size: 1.3rem; }
	.pk-carousel-track { grid-auto-columns: 46%; gap: 16px; }
	.pk-carousel-btn { display: none; }
	.pk-grid--4, .pk-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
	.pk-about-card { grid-template-columns: 1fr; padding: 24px; }
	.pk-about-quote { font-size: 1.05rem; }
	.pk-newsletter { flex-direction: column; padding: 24px; }
	.pk-newsletter-icon { width: 52px; height: 52px; }
	.pk-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
	.pk-footer-brand, .pk-footer-contact { grid-column: 1 / -1; }
	.pk-footer-col + .pk-footer-col { border-left: 0; padding-left: 0; }
	.pk-footer-bottom-inner { flex-direction: column; gap: 6px; }
	.pk-book-single { grid-template-columns: 1fr; gap: 26px; }
	.pk-book-media { position: static; max-width: 280px; width: 100%; margin: 0 auto; }
	.pk-book-info { text-align: left; }
	.pk-author-hero-inner { flex-direction: column; text-align: center; gap: 22px; }
	.pk-author-photo .pk-avatar { width: 140px; height: 140px; }
	.pk-author-stats, .pk-author-meta .pk-stores, .pk-author-meta .pk-social, .pk-author-loc { justify-content: center; }
	.pk-author-mini { flex-direction: column; text-align: center; padding: 22px; }
	.pk-signup-grid, .pk-enquiry, .pk-about-page { grid-template-columns: 1fr; }
	.pk-card { padding: 22px 18px; }
	.pk-form--grid, .pk-fieldset { grid-template-columns: 1fr; }
	.pk-svc-grid, .pk-packages, .pk-values, .pk-post-grid { grid-template-columns: 1fr; }
	.pk-steps { grid-template-columns: 1fr 1fr; }
	.pk-filter-bar { flex-direction: column; align-items: stretch; }
	.pk-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
	.pk-chip { white-space: nowrap; }
	.pk-inline-search { min-width: 0; }
	.pk-mybooks li { flex-wrap: wrap; }
	.pk-mybooks-act { width: 100%; padding-left: 68px; }
	.pk-dash-actions { margin-left: 0; width: 100%; }
	.pk-tabs { overflow-x: auto; flex-wrap: nowrap; }
	.pk-tabs a { white-space: nowrap; }
	.pk-hide-xs { display: none !important; }
	.pk-reader-tools button, .pk-reader-tools a { width: 36px; }
	.pk-hero-art { height: 250px; }
	.pk-spine { height: 38px; font-size: .92rem; }
	.pk-mug { width: 100px; height: 116px; font-size: .62rem; bottom: 60px; }
	.pk-mug::after { right: -26px; width: 30px; height: 50px; border-width: 8px; top: 22px; }
}

@media (max-width: 420px) {
	.pk-logo-tag { display: none; }
	.pk-topbar-link { display: none; }
	.pk-features-grid { grid-template-columns: 1fr; }
	.pk-feature { border-left: 0 !important; border-top: 1px solid var(--line); padding: 16px 4px; }
	.pk-feature:first-child { border-top: 0; }
	.pk-hero-actions .pk-btn { width: 100%; }
	.pk-carousel-track { grid-auto-columns: 62%; }
	.pk-stack { width: 80%; }
	.pk-mug { display: none; }
	.pk-steps { grid-template-columns: 1fr; }
}

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

/* ==========================================================================
   v1.1 — layout fix, footer logo, பதிவுகள், Helping Hands
   ========================================================================== */

/* Sections that are also containers keep their side gutter (fixes related
   books on single book pages and the books / posts archives touching edges). */
.pk-container.pk-section { padding-left: 24px; padding-right: 24px; }

/* Footer: slogan now lives under the logo; optional custom logo + posts column */
.pk-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
.pk-footer-grid.has-posts { grid-template-columns: 1.45fr 1fr 1fr 1.25fr 1.2fr; }
.pk-footer-logo { display: inline-block; max-width: 100%; }
.pk-footer-logo img { display: block; max-width: 100%; height: auto; }
.pk-footer-brand .pk-footer-slogan { display: block; transform: rotate(-3deg); font-size: 1.05rem; margin: 18px 0 6px; }
.pk-footer-brand .pk-footer-slogan svg { width: 120px; }
.pk-footer-helpbadge { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 12px; border: 1px solid rgba(242, 167, 27, .35); border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pk-footer-helpbadge:hover { border-color: var(--gold); background: rgba(242, 167, 27, .08); }
.pk-footer-helpbadge strong { display: block; color: #fff; font-size: .85rem; }
.pk-footer-helpbadge small { display: block; font-size: .74rem; line-height: 1.45; }
.pk-footer-help { color: var(--gold) !important; }
.pk-footer-posts li { display: flex; flex-direction: column; margin-bottom: 11px; line-height: 1.45; }
.pk-footer-posts a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-footer-posts small { font-size: .72rem; opacity: .65; margin-top: 2px; }
.pk-footer-more { display: inline-block; margin-top: 4px; font-size: .82rem; font-weight: 600; color: var(--gold) !important; }

/* Post cards */
.pk-post-thumb { display: block; }
.pk-post-thumb.is-empty { aspect-ratio: 16 / 7; display: grid; place-items: center; background: linear-gradient(120deg, var(--navy), #1c3a5e); color: var(--gold); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.pk-post-card .pk-post-body { display: flex; flex-direction: column; flex: 1; }
.pk-post-title { font-size: 1.12rem; margin: 2px 0 8px; line-height: 1.45; }
.pk-post-title a { color: var(--navy); }
.pk-post-title a:hover { color: var(--red); }
.pk-post-excerpt { color: var(--muted); font-size: .92rem; margin: 0 0 12px; flex: 1; }
.pk-post-cat { color: var(--red); font-weight: 700; }
.pk-home-posts .pk-ptabs { margin: -8px 0 22px; }
.pk-ptabs .pk-chip { cursor: pointer; font-family: inherit; }
.pk-post-tabs { flex-wrap: wrap; }

/* Helping Hands — homepage band */
.pk-help-band { background: linear-gradient(120deg, #fff6e2, #fde7b7); border-top: 1px solid #f6dca4; border-bottom: 1px solid #f6dca4; }
.pk-help-band-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.pk-help-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .3em; }
.pk-help-band p { margin: 0 0 .4em; max-width: 46em; }
.pk-help-band-en { color: var(--muted); font-size: .9rem; }
.pk-help-band-actions { display: flex; flex-direction: column; gap: 10px; }
.pk-help-band-mark .pk-help-icon circle:first-child { fill: #fff; }

/* Helping Hands — page */
.pk-help-hero { background: linear-gradient(120deg, #0f1f33 0%, #1c3a5e 60%, #4a1d26 100%); }
.pk-help-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; position: relative; z-index: 1; }
.pk-help-hero-en { font-size: 1.1rem; color: #fff; margin-bottom: .8em !important; }
.pk-help-hero-mark { opacity: .95; }
.pk-help-who { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pk-checks--dark li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.pk-checks--dark .pk-icon { color: var(--red); }
.pk-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pk-help-card { background: #fff; border-radius: 14px; padding: 26px; border: 1px solid var(--line); }
.pk-help-card h3 { margin: 14px 0 8px; font-size: 1.12rem; }
.pk-help-card h3 small { display: block; font-family: var(--font); font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.pk-help-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.pk-help-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; counter-reset: none; }
.pk-help-steps li { position: relative; padding: 22px; border-top: 3px solid var(--red); background: var(--soft); border-radius: 0 0 12px 12px; }
.pk-help-steps h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.pk-help-steps p { margin: 0; font-size: .92rem; color: var(--muted); }
.pk-help-step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; }
.pk-help-safety { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 16px 18px; font-size: .9rem; }
.pk-help-safety ul { margin: 8px 0 0; padding-left: 1.2em; }
.pk-help-safety li { margin-bottom: 6px; }
.pk-help-types { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 6px; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.pk-help-types legend { font-weight: 600; font-size: .88rem; padding: 0 6px; }
.pk-form .pk-help-types label, .pk-form .pk-help-checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-bottom: 8px; }
.pk-help-types input, .pk-help-checks input { margin-top: 5px; flex: none; }
.pk-topbar-help { color: var(--gold) !important; font-weight: 600; }

@media (max-width: 1180px) {
	.pk-footer-grid, .pk-footer-grid.has-posts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.pk-footer-grid.has-posts .pk-footer-brand { grid-column: 1 / -1; }
	.pk-footer-grid.has-posts .pk-footer-col:nth-child(2) { border-left: 0; padding-left: 0; }
	.pk-footer-brand .pk-footer-slogan { display: block; }
	.pk-help-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.pk-help-band-inner { grid-template-columns: auto minmax(0, 1fr); }
	.pk-help-band-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
	.pk-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pk-help-who { grid-template-columns: 1fr; gap: 20px; }
	.pk-help-hero-mark svg { width: 140px; height: 140px; }
}
@media (max-width: 782px) {
	.pk-container.pk-section { padding-left: 16px; padding-right: 16px; }
	.pk-footer-grid, .pk-footer-grid.has-posts { grid-template-columns: 1fr 1fr; }
	.pk-footer-postscol { grid-column: 1 / -1; }
	.pk-help-band-inner { grid-template-columns: 1fr; }
	.pk-help-band-mark { display: none; }
	.pk-help-band-actions .pk-btn { flex: 1 1 100%; }
	.pk-help-hero-inner { grid-template-columns: 1fr; }
	.pk-help-hero-mark { display: none; }
	.pk-help-grid, .pk-help-steps, .pk-help-types { grid-template-columns: 1fr; }
	.pk-home-posts .pk-ptabs { margin-top: 0; }
}
/* Desktop header with the extra "பதிவுகள்" item: keep everything on one row. */
@media (min-width: 1201px) and (max-width: 1360px) {
	.pk-header-inner { gap: 10px; }
	.pk-menu a { padding: .45em .4em; font-size: .8rem; }
	.pk-logo-mark { width: 48px; }
	.pk-logo-name { font-size: 1.65rem; }
}
