/* =========================================================
   கவிக்கூடு — design system v2 "ஏட்டுத்தாள்"
   Warm literary paper · mesh-gradient hero · grain texture
   Dark "நிலவு" reading mode with gold accents
   ========================================================= */

:root {
	color-scheme: light;

	/* paper */
	--kk-bg:        #f8f3e6;
	--kk-surface:   #fffdf6;
	--kk-surface-2: #f3ecda;
	--kk-chip:      #efe6d1;
	--kk-chip-hov:  #e7dcc0;

	/* hairlines */
	--kk-line:      rgba(94, 62, 37, .12);
	--kk-line-2:    rgba(94, 62, 37, .18);

	/* ink */
	--kk-ink:       #2b2115;
	--kk-ink-2:     #57452f;
	--kk-muted:     #7a6750;
	--kk-faint:     #a68d6e;
	--kk-faint-2:   #8f7350;

	/* accents */
	--kk-green:     #2e7d18;
	--kk-green-2:   #4f9a28;
	--kk-green-3:   #1d5410;
	--kk-on-green:  #fdf8ee;
	--kk-terra:     #b5502f;
	--kk-gold:      #a9822f;
	--kk-gold-soft: #c9a06b;
	--kk-danger:    #c0392b;
	--kk-dark:      #26190e;

	/* warm layered shadows (hue-tinted, never gray) */
	--kk-shadow-1: 0 1px 2px rgba(93, 53, 32, .05), 0 4px 10px rgba(93, 53, 32, .05);
	--kk-shadow-2: 0 2px 4px rgba(93, 53, 32, .06), 0 8px 18px rgba(93, 53, 32, .07), 0 22px 44px -18px rgba(93, 53, 32, .16);
	--kk-shadow-3: 0 4px 10px rgba(93, 53, 32, .08), 0 16px 40px -12px rgba(93, 53, 32, .22);

	--kk-badge-bg:  #ecd9a8;
	--kk-badge-ink: #6d5210;

	--kk-glass:     rgba(255, 252, 243, .78);

	--kk-grain-opacity: .05;
	--kk-grain-blend: multiply;

	--kk-radius:    14px;
	--kk-radius-sm: 10px;
	--kk-radius-lg: 20px;

	--kk-ease: cubic-bezier(.22, 1, .36, 1);

	--kk-ui:    'Hind Madurai', 'Noto Sans Tamil', 'Tamil Sangam MN', Latha, system-ui, sans-serif;
	--kk-serif: 'Noto Serif Tamil', 'Tamil Sangam MN', Latha, Georgia, serif;
	--kk-disp:  'Arima Madurai', 'Noto Serif Tamil', Georgia, serif;

	--kk-wrap: 1140px;
}

/* ---------- நிலவு (dark) ---------- */

:root[data-theme='dark'] {
	color-scheme: dark;

	--kk-bg:        #191510;
	--kk-surface:   #231d15;
	--kk-surface-2: #131009;
	--kk-chip:      #2d2618;
	--kk-chip-hov:  #3a3120;

	--kk-line:      rgba(236, 228, 212, .10);
	--kk-line-2:    rgba(236, 228, 212, .16);

	--kk-ink:       #ece4d4;
	--kk-ink-2:     #d3c8b0;
	--kk-muted:     #b3a992;
	--kk-faint:     #8a8070;
	--kk-faint-2:   #9c9078;

	--kk-green:     #7cc95e;
	--kk-green-2:   #98d97e;
	--kk-green-3:   #a9e491;
	--kk-on-green:  #17240e;
	--kk-terra:     #e0906c;
	--kk-gold:      #d4a574;
	--kk-gold-soft: #d4a574;
	--kk-danger:    #e0705f;

	--kk-shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .25);
	--kk-shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .35);
	--kk-shadow-3: 0 4px 10px rgba(0, 0, 0, .45), 0 18px 44px rgba(0, 0, 0, .4);

	--kk-badge-bg:  rgba(212, 165, 116, .16);
	--kk-badge-ink: #d9b384;

	--kk-glass:     rgba(25, 21, 16, .78);

	--kk-grain-opacity: .035;
	--kk-grain-blend: soft-light;
}

/* ---------- reset & base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--kk-bg);
	color: var(--kk-ink);
	font-family: var(--kk-ui);
	font-size: 15.5px;
	line-height: 1.75;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	transition: background-color .3s ease, color .3s ease;
}

/* paper grain — inline SVG turbulence, fixed, non-interactive */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 80;
	pointer-events: none;
	opacity: var(--kk-grain-opacity);
	mix-blend-mode: var(--kk-grain-blend);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

:root[data-theme='dark'] img:not(.kk-no-dim) { filter: brightness(.88) contrast(1.04); }

a { color: var(--kk-green); text-decoration: none; }
a:hover,
a:focus { color: var(--kk-green-3); }

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

h1, h2, h3, h4 { font-family: var(--kk-serif); line-height: 1.5; margin: 0 0 .5em; text-wrap: balance; }

::selection { background: rgba(201, 160, 107, .35); }

:focus-visible { outline: 2px solid var(--kk-green); outline-offset: 2px; }

.kk-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.kk-skip:focus {
	position: fixed; top: 8px; left: 8px; z-index: 999;
	background: var(--kk-green); color: var(--kk-on-green);
	padding: 10px 18px; border-radius: 999px; clip: auto;
	width: auto; height: auto;
}

/* underline-draw links inside prose */
.kk-page a:not(.kk-btn),
.kk-comment-text a {
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0% 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size .3s var(--kk-ease);
}
.kk-page a:not(.kk-btn):hover,
.kk-comment-text a:hover { background-size: 100% 1px; }

/* ---------- layout ---------- */

.kk-wrap {
	width: 100%;
	max-width: var(--kk-wrap);
	margin: 0 auto;
	padding: 0 24px;
}

.kk-wrap--narrow { max-width: 920px; }
.kk-wrap--form   { max-width: 780px; }

.kk-main { flex: 1 0 auto; padding-bottom: 48px; }

.kk-cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	padding: 26px 0 40px;
}

.kk-col-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.kk-sidebar {
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	top: 76px;
	align-self: start;
	max-height: calc(100vh - 96px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--kk-line-2) transparent;
	padding-bottom: 2px;
}

/* ---------- header (warm glass) ---------- */

.kk-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 28px;
	border-bottom: 1px solid var(--kk-line);
	background: var(--kk-glass);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	position: sticky;
	top: 0;
	z-index: 90;
	transition: box-shadow .3s ease, background-color .3s ease;
}
@supports not (backdrop-filter: blur(1px)) {
	.kk-header { background: var(--kk-surface); }
}
.kk-header.is-scrolled { box-shadow: var(--kk-shadow-1); }

.kk-logo { display: flex; align-items: center; gap: 10px; flex: none; }
.kk-logo img { height: 42px; width: auto; transition: filter .3s ease; }

/* monochrome warm-cream logo in dark mode so the dark wordmark stays visible */
:root[data-theme='dark'] .kk-logo img,
:root[data-theme='dark'] .kk-auth img {
	filter: brightness(0) invert(.92) sepia(.35) saturate(1.6) hue-rotate(-12deg);
}

.kk-nav {
	display: flex;
	gap: 20px;
	align-items: center;
	margin: 0 auto;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--kk-ink-2);
	white-space: nowrap;
}

.kk-nav a { color: var(--kk-ink-2); padding-bottom: 2px; position: relative; }
.kk-nav a::after,
.kk-navdrop > button::after {
	content: '';
	position: absolute;
	left: 0; right: 100%;
	bottom: -2px;
	height: 2px;
	background: var(--kk-green);
	transition: right .25s var(--kk-ease);
}
.kk-nav a:hover::after,
.kk-nav a.is-active::after { right: 0; }
.kk-nav a:hover { color: var(--kk-green); }
.kk-nav .is-active { color: var(--kk-green); }

.kk-navdrop { position: relative; }
.kk-navdrop > button {
	background: none;
	border: 0;
	padding: 0 0 2px;
	cursor: pointer;
	font-weight: 500;
	color: var(--kk-ink-2);
	position: relative;
}
.kk-navdrop > button:hover::after,
.kk-navdrop.is-open > button::after { right: 0; }
.kk-navdrop > button:hover { color: var(--kk-green); }

.kk-navdrop-panel {
	position: absolute;
	top: 34px;
	left: -12px;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius);
	box-shadow: var(--kk-shadow-3);
	padding: 10px;
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
	width: 310px;
	z-index: 95;
}
.kk-navdrop.is-open .kk-navdrop-panel { display: grid; animation: kk-pop .18s var(--kk-ease); }
.kk-navdrop-panel a {
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	color: var(--kk-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.kk-navdrop-panel a::after { content: none; }
.kk-navdrop-panel a:hover { background: var(--kk-chip); }

@keyframes kk-pop {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

.kk-header-actions { display: flex; gap: 10px; align-items: center; flex: none; }

.kk-login-link {
	color: var(--kk-green);
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
}

/* theme toggle */
.kk-theme-toggle {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--kk-line-2);
	background: var(--kk-surface);
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 15px;
	line-height: 1;
	padding: 0;
	transition: transform .25s var(--kk-ease), background-color .2s ease;
}
.kk-theme-toggle:hover { transform: rotate(15deg) scale(1.06); background: var(--kk-chip); }
.kk-theme-toggle .kk-tt-sun { display: none; }
.kk-theme-toggle .kk-tt-moon { display: block; }
:root[data-theme='dark'] .kk-theme-toggle .kk-tt-sun { display: block; }
:root[data-theme='dark'] .kk-theme-toggle .kk-tt-moon { display: none; }

.kk-avatar {
	border-radius: 50%;
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 700;
	flex: none;
	line-height: 1;
	overflow: hidden;
	text-align: center;
}
.kk-avatar--28 { width: 28px; height: 28px; font-size: 12px; }
.kk-avatar--32 { width: 32px; height: 32px; font-size: 13px; }
.kk-avatar--36 { width: 36px; height: 36px; font-size: 14px; }
.kk-avatar--38 { width: 38px; height: 38px; font-size: 14px; }
.kk-avatar--88 { width: 88px; height: 88px; font-size: 32px; font-weight: 800; }

.kk-burger {
	display: none;
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	color: var(--kk-green);
	cursor: pointer;
	padding: 4px;
}

/* ---------- buttons & chips ---------- */

.kk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--kk-green);
	border: 1px solid var(--kk-green);
	color: var(--kk-on-green);
	border-radius: 999px;
	padding: 9px 20px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease, transform .2s var(--kk-ease), box-shadow .2s ease;
}
.kk-btn:hover {
	background: var(--kk-green-3);
	border-color: var(--kk-green-3);
	color: var(--kk-on-green);
	transform: translateY(-1px);
	box-shadow: var(--kk-shadow-1);
}
:root[data-theme='dark'] .kk-btn:hover { background: var(--kk-green-2); border-color: var(--kk-green-2); }

.kk-btn--ghost {
	background: none;
	border: 1px solid var(--kk-gold-soft);
	color: var(--kk-green);
}
.kk-btn--ghost:hover { background: var(--kk-chip); color: var(--kk-green-3); box-shadow: none; }

.kk-btn--light {
	background: var(--kk-surface);
	border-color: var(--kk-surface);
	color: #2e7d18;
}
.kk-btn--light:hover { background: #fff; border-color: #fff; color: #1d5410; }
:root[data-theme='dark'] .kk-btn--light { background: #ece4d4; border-color: #ece4d4; color: #17240e; }

.kk-btn--sm { padding: 5px 14px; font-size: 12px; }
.kk-btn--block { width: 100%; }
.kk-btn[disabled],
.kk-btn.is-disabled { background: var(--kk-faint); border-color: var(--kk-faint); color: var(--kk-bg); cursor: not-allowed; transform: none; box-shadow: none; }

.kk-btn.is-on { background: var(--kk-green); border-color: var(--kk-green); color: var(--kk-on-green); }

.kk-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.kk-chip {
	background: var(--kk-chip);
	color: var(--kk-ink);
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13.5px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease, transform .2s var(--kk-ease);
}
.kk-chip:hover { background: var(--kk-chip-hov); color: var(--kk-ink); transform: translateY(-1px); }
.kk-chip.is-active,
.kk-chip.is-active:hover { background: var(--kk-green); color: var(--kk-on-green); font-weight: 500; }

.kk-tag {
	background: var(--kk-chip);
	color: var(--kk-gold);
	border-radius: 999px;
	padding: 2px 10px;
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: .02em;
}

.kk-badge {
	font-size: 11.5px;
	background: var(--kk-badge-bg);
	color: var(--kk-badge-ink);
	border-radius: 999px;
	padding: 2px 9px;
	font-weight: 600;
	white-space: nowrap;
	display: inline-block;
	vertical-align: middle;
}

/* ---------- cards & panels ---------- */

.kk-card,
.kk-panel {
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius);
	box-shadow: var(--kk-shadow-1);
}
.kk-card { padding: 22px 24px; }
.kk-panel { padding: 18px 20px; border-radius: var(--kk-radius); }

.kk-panel-title {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .06em;
	color: var(--kk-green);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.kk-panel-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--kk-line-2), transparent);
}

/* sidebar: haiku spotlight */
.kk-haiku-text {
	font-family: var(--kk-serif);
	font-size: 14.5px;
	line-height: 1.9;
	white-space: pre-line;
	overflow-wrap: anywhere;
	color: var(--kk-ink);
	margin: 2px 0 12px;
}
.kk-haiku-text a { color: inherit; }
.kk-haiku-text a:hover { color: var(--kk-green); }
.kk-haiku-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 12.5px;
	color: var(--kk-faint);
	flex-wrap: wrap;
}
.kk-haiku-foot .kk-haiku-more { white-space: nowrap; }

/* sidebar: the print collection */
.kk-book {
	display: flex;
	gap: 14px;
	align-items: stretch;
}
.kk-book-cover {
	flex: none;
	width: 74px;
	border-radius: 6px;
	background: linear-gradient(160deg, var(--kk-terra) 0%, #8a4a2e 60%, #5f3320 100%);
	color: #f8ecdd;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px 7px;
	font-family: var(--kk-serif);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.7;
	box-shadow: inset 2px 0 0 rgba(255, 255, 255, .18), var(--kk-shadow-1);
}
.kk-book-body { min-width: 0; }
.kk-book-title { font-family: var(--kk-serif); font-weight: 700; font-size: 14px; line-height: 1.6; margin: 0 0 4px; }
.kk-book-meta { font-size: 12px; color: var(--kk-faint); line-height: 1.7; margin: 0 0 10px; }
.kk-book-body .kk-btn { font-size: 12.5px; padding: 7px 14px; }

/* ---------- section headers (flanking rules) ---------- */

.kk-section-title {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--kk-ui);
	font-weight: 700;
	font-size: 15px;
	color: var(--kk-ink-2);
	margin: 30px 0 14px;
}
.kk-section-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--kk-line-2), transparent);
}

/* ornamental divider — ❖ with flanking hairlines */
.kk-ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--kk-gold);
	margin: 20px auto;
}
.kk-ornament::before,
.kk-ornament::after {
	content: '';
	width: 56px;
	height: 1px;
	background: currentColor;
	opacity: .45;
}
.kk-ornament .kk-diamond {
	width: 7px;
	height: 7px;
	background: currentColor;
	transform: rotate(45deg);
	opacity: .75;
}

/* ---------- hero (mesh gradient + grain + ghost ornament) ---------- */

.kk-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	margin-top: 20px;
	border-radius: var(--kk-radius-lg);
	padding: 54px 44px 48px;
	color: #f6ecd9;
	background:
		radial-gradient(52% 74% at 10% 12%, rgba(181, 80, 47, .28), transparent 58%),
		radial-gradient(44% 60% at 90% 8%, rgba(212, 165, 116, .14), transparent 60%),
		radial-gradient(78% 110% at 50% 118%, rgba(63, 138, 41, .62), transparent 60%),
		radial-gradient(40% 52% at 82% 78%, rgba(124, 201, 94, .18), transparent 60%),
		linear-gradient(165deg, #201812, #1c2410);
	box-shadow: var(--kk-shadow-2);
}

/* film grain on the hero */
.kk-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: .1;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* giant ghost quote mark, slowly drifting */
.kk-hero::before {
	content: '\201C';
	position: absolute;
	top: -.22em;
	right: -.04em;
	z-index: -1;
	font-family: Georgia, serif;
	font-size: clamp(11rem, 26vw, 21rem);
	line-height: 1;
	color: #fff;
	opacity: .05;
	pointer-events: none;
	animation: kk-drift 20s ease-in-out infinite alternate;
}

@keyframes kk-drift {
	from { transform: translate3d(0, 0, 0) rotate(0deg); }
	to   { transform: translate3d(-1.6rem, 1.1rem, 0) rotate(4deg); }
}

.kk-hero-kicker {
	font-size: 11px;
	letter-spacing: .38em;
	font-weight: 600;
	opacity: .8;
	text-transform: uppercase;
	color: #e8cf9e;
}

.kk-hero-poem {
	font-family: var(--kk-serif);
	font-size: clamp(21px, 3.2vw, 30px);
	line-height: 1.95;
	font-weight: 600;
	max-width: 640px;
	margin: 20px auto 0;
	white-space: pre-line;
	text-wrap: balance;
	color: #faf3e3;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

.kk-hero-meta { font-size: 13.5px; opacity: .85; margin-top: 18px; }
.kk-hero-meta a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(232, 207, 158, .6); }

.kk-hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.kk-hero .kk-btn {
	background: rgba(250, 243, 227, .12);
	border-color: rgba(250, 243, 227, .4);
	color: #faf3e3;
}
.kk-hero .kk-btn:hover { background: rgba(250, 243, 227, .24); color: #fff; box-shadow: none; }

/* ---------- stats strip ---------- */

.kk-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin-top: 18px;
}
.kk-stat {
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius);
	padding: 14px 10px;
	text-align: center;
	box-shadow: var(--kk-shadow-1);
}
.kk-stat b {
	display: block;
	font-family: 'Catamaran', var(--kk-ui);
	font-size: 22px;
	line-height: 1.3;
	color: var(--kk-green);
}
.kk-stat span { font-size: 12px; color: var(--kk-muted); }

/* ---------- challenge / prompt strips ---------- */

.kk-challenge-strip {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 18px;
	background: linear-gradient(100deg, #2e7d18, #4f9a28);
	border-radius: var(--kk-radius);
	padding: 18px 26px;
	color: #fdf8ee;
	flex-wrap: wrap;
	position: relative;
	overflow: hidden;
	box-shadow: var(--kk-shadow-1);
}
.kk-challenge-strip::after {
	content: '🏆';
	position: absolute;
	right: -10px;
	bottom: -26px;
	font-size: 92px;
	opacity: .12;
	pointer-events: none;
}
.kk-challenge-strip .kk-cs-icon { font-size: 30px; line-height: 1; }
.kk-challenge-strip .kk-cs-body { flex: 1; min-width: 200px; }
.kk-challenge-strip .kk-cs-title { font-weight: 700; font-size: 15.5px; }
.kk-challenge-strip .kk-cs-word {
	background: rgba(255, 255, 255, .18);
	border-radius: 6px;
	padding: 2px 10px;
}
.kk-challenge-strip .kk-cs-sub { font-size: 13px; opacity: .85; margin-top: 3px; }
.kk-challenge-strip .kk-btn--light { color: #2e7d18; }

/* daily prompt (when no challenge is running) */
.kk-prompt-strip {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-top: 18px;
	background: var(--kk-surface);
	border: 1px dashed var(--kk-gold-soft);
	border-radius: var(--kk-radius);
	padding: 14px 22px;
	flex-wrap: wrap;
}
.kk-prompt-strip .kk-ps-icon { font-size: 24px; }
.kk-prompt-strip .kk-ps-body { flex: 1; min-width: 180px; font-size: 13.5px; color: var(--kk-muted); }
.kk-prompt-strip .kk-ps-word {
	font-family: var(--kk-serif);
	font-weight: 700;
	font-size: 16px;
	color: var(--kk-terra);
}

/* ---------- feed ---------- */

.kk-feed-head {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.kk-feed-title {
	font-weight: 700;
	font-size: 16px;
	color: var(--kk-ink-2);
	flex: 1;
	min-width: 160px;
	font-family: var(--kk-ui);
	margin: 0;
}

.kk-search {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--kk-line-2);
	border-radius: 999px;
	padding: 4px 6px 4px 14px;
	background: var(--kk-surface);
	width: 250px;
	max-width: 100%;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.kk-search:focus-within { border-color: var(--kk-gold-soft); box-shadow: var(--kk-shadow-1); }
.kk-search input {
	border: 0;
	background: none;
	outline: none;
	font-size: 13px;
	width: 100%;
	padding: 4px 0;
	color: var(--kk-ink);
}
.kk-search button {
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 4px 6px;
}

.kk-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
}
.kk-grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* poem card — editorial text card with accent-bar + lift hover */
.kk-poem-card {
	position: relative;
	overflow: hidden;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 13px;
	box-shadow: var(--kk-shadow-1);
	transition: transform .3s var(--kk-ease), box-shadow .3s ease, border-color .3s ease;
}
.kk-poem-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 24px;
	right: 24px;
	height: 2px;
	background: linear-gradient(90deg, var(--kk-terra), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s var(--kk-ease);
}
.kk-poem-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--kk-shadow-2);
	border-color: var(--kk-gold-soft);
}
.kk-poem-card:hover::before { transform: scaleX(1); }

/* the first card of the home grid becomes the featured tile */
.kk-grid--featured > .kk-poem-card:first-child { grid-column: span 2; }
.kk-grid--featured > .kk-poem-card:first-child .kk-poem-text { font-size: 16px; }

.kk-poem-card-top {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11.5px;
	color: var(--kk-faint);
}
.kk-poem-card-top .kk-time { margin-left: auto; white-space: nowrap; }

.kk-poem-title {
	font-family: var(--kk-serif);
	font-size: 15.5px;
	font-weight: 700;
	margin: 0;
	line-height: 1.6;
}
.kk-poem-title a { color: var(--kk-ink); transition: color .2s ease; }
.kk-poem-title a:hover { color: var(--kk-terra); }

.kk-poem-text {
	font-family: var(--kk-serif);
	font-size: 14.5px;
	line-height: 1.85;
	white-space: pre-line;
	overflow-wrap: anywhere;
	flex: 1;
	color: var(--kk-ink);
}
.kk-poem-text a { color: var(--kk-ink); }
.kk-poem-text a:hover { color: var(--kk-green); }

.kk-poem-more { font-size: 13px; font-family: var(--kk-ui); margin-top: 10px; position: relative; z-index: 1; }
.kk-poem-more a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid var(--kk-line-2);
	border-radius: 999px;
	background: var(--kk-chip);
	color: var(--kk-ink-2);
	font-weight: 600;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.kk-poem-more a:hover { background: var(--kk-green); border-color: var(--kk-green); color: var(--kk-on-green); }
.kk-poem-more .kk-arr { transition: transform .25s var(--kk-ease); display: inline-block; }
.kk-poem-card:hover .kk-arr { transform: translateX(4px); }

/* long poems — the preview fades out into the card, so a truncated poem
   reads differently from one shown in full */
.kk-poem-card--long .kk-poem-text { position: relative; max-height: 240px; overflow: hidden; }
.kk-poem-card--long .kk-poem-text::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 72px;
	background: linear-gradient(180deg, transparent, var(--kk-surface));
	pointer-events: none;
}
.kk-poem-card--long .kk-poem-title a::after { content: ' ✦'; color: var(--kk-gold); font-size: .8em; }

.kk-poem-card-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 13px;
	border-top: 1px solid var(--kk-line);
}
.kk-poem-card-foot .kk-poet-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--kk-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kk-actions {
	margin-left: auto;
	display: flex;
	gap: 14px;
	font-size: 14px;
	color: var(--kk-muted);
	flex: none;
	align-items: center;
}

.kk-act {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--kk-muted);
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	line-height: 1.4;
	transition: color .2s ease, transform .2s var(--kk-ease);
}
.kk-act > span[aria-hidden] { font-size: 16px; line-height: 1; }
.kk-act:hover { color: var(--kk-ink); transform: scale(1.08); }
.kk-act.is-on { color: var(--kk-danger); font-weight: 700; }
.kk-act--save.is-on { color: var(--kk-green); font-weight: 600; }
.kk-act.is-busy { opacity: .5; pointer-events: none; }

@keyframes kk-heart {
	0% { transform: scale(1); }
	40% { transform: scale(1.35); }
	100% { transform: scale(1); }
}
.kk-act.kk-just-liked { animation: kk-heart .4s var(--kk-ease); }

.kk-empty {
	background: var(--kk-surface);
	border: 1px dashed var(--kk-line-2);
	border-radius: var(--kk-radius);
	padding: 36px;
	text-align: center;
	color: var(--kk-faint);
	font-size: 14px;
}

/* ---------- scroll reveal (JS adds the classes; no-JS shows everything) ---------- */

.kk-reveal { opacity: 0; transform: translateY(18px); }
.kk-reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease, transform .6s var(--kk-ease);
}

/* ---------- pagination ---------- */

.kk-pagination { margin-top: 10px; }
.kk-pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}
.kk-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	color: var(--kk-ink-2);
	font-size: 13.5px;
	transition: border-color .2s ease, transform .2s var(--kk-ease);
}
.kk-pagination .page-numbers:hover { border-color: var(--kk-gold-soft); color: var(--kk-green); transform: translateY(-1px); }
.kk-pagination .page-numbers.current {
	background: var(--kk-green);
	border-color: var(--kk-green);
	color: var(--kk-on-green);
	font-weight: 700;
}

/* ---------- sidebar widgets ---------- */

.kk-rank-list { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.55; }
.kk-rank-list .kk-rank-row { display: flex; align-items: center; gap: 9px; }
.kk-rank-list b.kk-rank-num { color: var(--kk-gold-soft); flex: none; font-family: 'Catamaran', var(--kk-ui); }
.kk-rank-list .kk-rank-score { margin-left: auto; color: var(--kk-faint); flex: none; }
.kk-rank-list a { color: var(--kk-ink); }
.kk-rank-list a:hover { color: var(--kk-green); }

/* ---------- single poem — the sacred page ---------- */

.kk-back { margin: 20px 0 0; font-size: 13.5px; color: var(--kk-faint-2); display: inline-block; }

.kk-poem-single {
	position: relative;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-lg);
	padding: 44px 48px;
	margin-top: 14px;
	text-align: center;
	box-shadow: var(--kk-shadow-1);
	overflow: hidden;
}
.kk-poem-single::before {
	content: '\201C';
	position: absolute;
	top: -.16em;
	left: .02em;
	font-family: Georgia, serif;
	font-size: 11rem;
	line-height: 1;
	color: var(--kk-terra);
	opacity: .07;
	pointer-events: none;
}

.kk-poem-single .kk-kicker {
	font-size: 11.5px;
	letter-spacing: .28em;
	color: var(--kk-faint);
	font-weight: 600;
	margin-bottom: 14px;
	text-transform: uppercase;
}
.kk-poem-single h1 {
	font-family: var(--kk-serif);
	font-size: clamp(20px, 2.6vw, 24px);
	font-weight: 700;
	margin: 0;
	color: var(--kk-ink);
}

.kk-poem-body {
	font-family: var(--kk-serif);
	font-size: clamp(16px, 1.8vw, 18px);
	line-height: 2;
	font-weight: 500;
	color: var(--kk-ink);
	overflow-wrap: anywhere;
	max-width: 620px;
	margin: 0 auto;
}
.kk-poem-body p { margin: 0 0 1.3em; }
.kk-poem-body p:last-child { margin-bottom: 0; }
.kk-poem-body a { text-decoration: underline; text-underline-offset: 3px; }

/* reading meta row (views · lines · minutes) */
.kk-read-meta {
	display: flex;
	gap: 18px;
	justify-content: center;
	margin-top: 18px;
	font-size: 12px;
	color: var(--kk-faint);
	flex-wrap: wrap;
}

.kk-byline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 22px;
	flex-wrap: wrap;
}
.kk-byline-text { text-align: left; }
.kk-byline-name { font-weight: 600; font-size: 14px; }
.kk-byline-time { font-size: 12px; color: var(--kk-faint); }

.kk-single-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 22px;
	flex-wrap: wrap;
}

/* share card */
.kk-share {
	margin-top: 20px;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-lg);
	padding: 24px;
	display: none;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
	box-shadow: var(--kk-shadow-1);
}
.kk-share.is-open { display: flex; animation: kk-pop .25s var(--kk-ease); }
.kk-share canvas {
	width: 250px;
	height: 250px;
	border-radius: var(--kk-radius);
	background: linear-gradient(160deg, #241a10, #2e7d18);
	flex: none;
	box-shadow: var(--kk-shadow-2);
}
.kk-share-body { flex: 1; min-width: 220px; }
.kk-share-body h3 { font-family: var(--kk-ui); font-weight: 700; font-size: 15px; color: var(--kk-green); margin: 0; }
.kk-share-body p { font-size: 13px; color: var(--kk-muted); margin: 6px 0 0; line-height: 1.6; }
.kk-share-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- comments ---------- */

.kk-comments {
	margin-top: 24px;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-lg);
	padding: 26px 30px;
	box-shadow: var(--kk-shadow-1);
}
.kk-comments-title { font-weight: 700; font-size: 15px; color: var(--kk-green); font-family: var(--kk-ui); margin: 0 0 16px; }
.kk-comment-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kk-comment-list ol.children { list-style: none; margin: 14px 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kk-comment { display: flex; gap: 10px; }
.kk-comment-body { background: var(--kk-bg); border-radius: var(--kk-radius); padding: 10px 16px; flex: 1; min-width: 0; }
.kk-comment-name { font-size: 13px; font-weight: 600; }
.kk-comment-name span { font-weight: 400; color: var(--kk-faint); font-size: 11.5px; }
.kk-comment-text { font-size: 13.5px; margin-top: 3px; line-height: 1.65; }
.kk-comment-text p { margin: 0 0 .6em; }
.kk-comment-text p:last-child { margin-bottom: 0; }
.kk-comment-reply { font-size: 12px; margin-top: 4px; }
.kk-comment-pending { font-size: 12px; color: var(--kk-badge-ink); background: var(--kk-badge-bg); border-radius: 999px; padding: 1px 10px; display: inline-block; }

.kk-comments .comment-respond { margin-top: 18px; }
.kk-comments .comment-reply-title { font-family: var(--kk-ui); font-size: 14px; font-weight: 700; color: var(--kk-ink-2); margin: 0 0 10px; }
.kk-comments .comment-form { display: flex; flex-direction: column; gap: 10px; }
.kk-comments .comment-form p { margin: 0; }
.kk-comments .comment-form label { font-size: 13px; color: var(--kk-muted); display: block; margin-bottom: 4px; }
.kk-comments .comment-form-comment textarea,
.kk-comments .comment-form input[type="text"],
.kk-comments .comment-form input[type="email"],
.kk-comments .comment-form input[type="url"] {
	width: 100%;
	border: 1px solid var(--kk-line-2);
	border-radius: var(--kk-radius-sm);
	padding: 10px 16px;
	font-size: 13.5px;
	background: var(--kk-bg);
	color: var(--kk-ink);
	outline: none;
	resize: vertical;
	transition: border-color .2s ease;
}
.kk-comments .comment-form textarea:focus,
.kk-comments .comment-form input:focus { border-color: var(--kk-gold-soft); }
.kk-comments .comment-form .form-submit input[type="submit"],
.kk-comments .comment-form .form-submit .submit {
	background: var(--kk-green);
	border: 1px solid var(--kk-green);
	color: var(--kk-on-green);
	border-radius: 999px;
	padding: 9px 22px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.kk-comments .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--kk-muted); }
.kk-comments .comment-form-cookies-consent label { margin: 0; }
.kk-comments .logged-in-as,
.kk-comments .comment-notes { font-size: 12.5px; color: var(--kk-faint); }

/* ---------- forms ---------- */

.kk-field { display: block; margin-top: 14px; }
.kk-label { font-size: 13px; font-weight: 600; color: var(--kk-ink-2); display: block; margin-bottom: 6px; }
.kk-input,
.kk-textarea,
.kk-select {
	width: 100%;
	border: 1px solid var(--kk-line-2);
	border-radius: var(--kk-radius-sm);
	padding: 12px 16px;
	font-size: 14.5px;
	background: var(--kk-bg);
	color: var(--kk-ink);
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.kk-input:focus,
.kk-textarea:focus,
.kk-select:focus { border-color: var(--kk-gold-soft); box-shadow: var(--kk-shadow-1); }
.kk-textarea {
	font-family: var(--kk-serif);
	font-size: 18px;
	line-height: 1.95;
	resize: vertical;
	min-height: 230px;
}
.kk-hint { font-size: 12.5px; color: var(--kk-faint); margin-top: 6px; }

.kk-radio-chip { position: relative; display: inline-flex; }
.kk-radio-chip input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.kk-radio-chip span {
	background: var(--kk-chip);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13.5px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease;
}
.kk-radio-chip input:checked + span { background: var(--kk-green); color: var(--kk-on-green); font-weight: 500; }
.kk-radio-chip input:focus-visible + span { outline: 2px solid var(--kk-green); outline-offset: 2px; }

.kk-notice {
	border-radius: var(--kk-radius-sm);
	padding: 14px 20px;
	font-size: 13.5px;
	line-height: 1.7;
	margin-top: 16px;
	border: 1px solid var(--kk-line);
	background: var(--kk-surface-2);
	color: var(--kk-muted);
}
.kk-notice--ok    { background: rgba(79, 154, 40, .1); border-color: rgba(79, 154, 40, .3); color: var(--kk-green); }
.kk-notice--warn  { background: rgba(201, 160, 107, .12); border-color: rgba(201, 160, 107, .35); color: var(--kk-badge-ink); }
.kk-notice--error { background: rgba(192, 57, 43, .08); border-color: rgba(192, 57, 43, .28); color: var(--kk-danger); }
.kk-notice ul { margin: 6px 0 0; padding-left: 20px; }

.kk-rules {
	margin-top: 16px;
	background: var(--kk-surface-2);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-sm);
	padding: 14px 20px;
	font-size: 12.5px;
	color: var(--kk-muted);
	line-height: 1.8;
}

/* ---------- auth ---------- */

.kk-auth-wrap { display: grid; place-items: center; padding: 44px 24px; }
.kk-auth {
	width: 100%;
	max-width: 410px;
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-lg);
	padding: 34px 36px;
	box-shadow: var(--kk-shadow-2);
}
.kk-auth img { height: 60px; margin: 0 auto; width: auto; }
.kk-auth-sub { text-align: center; font-size: 13px; color: var(--kk-faint); margin-top: 4px; }
.kk-auth-tabs { display: flex; background: var(--kk-surface-2); border-radius: 999px; padding: 4px; margin-top: 22px; }
.kk-auth-tabs a {
	flex: 1;
	text-align: center;
	color: var(--kk-faint-2);
	border-radius: 999px;
	padding: 9px 0;
	font-size: 13.5px;
	font-weight: 600;
	transition: color .2s ease;
}
.kk-auth-tabs a.is-active { background: var(--kk-green); color: var(--kk-on-green); font-weight: 700; }
.kk-auth .kk-input { margin-top: 12px; }
.kk-auth-legal { font-size: 11.5px; color: var(--kk-faint); text-align: center; margin-top: 16px; line-height: 1.6; }
.kk-auth-alt { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.kk-auth-alt::before,
.kk-auth-alt::after { content: ''; flex: 1; height: 1px; background: var(--kk-line); }
.kk-auth-alt span { font-size: 12px; color: var(--kk-faint); }

/* ---------- profile ---------- */

.kk-profile-cover {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(60% 100% at 18% 0%, rgba(181, 80, 47, .4), transparent 60%),
		radial-gradient(50% 90% at 85% 20%, rgba(124, 201, 94, .2), transparent 60%),
		linear-gradient(140deg, #241a10, #2e7d18);
	border-radius: var(--kk-radius-lg) var(--kk-radius-lg) 0 0;
	height: 130px;
	margin-top: 18px;
}
.kk-profile-cover::after {
	content: '❝';
	position: absolute;
	right: 24px;
	top: -12px;
	font-size: 110px;
	color: #fff;
	opacity: .07;
}
.kk-profile-card {
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: 0 0 var(--kk-radius-lg) var(--kk-radius-lg);
	border-top: 0;
	padding: 0 30px 24px;
	position: relative;
	box-shadow: var(--kk-shadow-1);
}
.kk-profile-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.kk-profile-head .kk-avatar--88 { border: 4px solid var(--kk-surface); margin-top: -30px; box-shadow: var(--kk-shadow-1); }
.kk-profile-id { flex: 1; padding-top: 14px; min-width: 200px; }
.kk-profile-name { font-family: var(--kk-serif); font-weight: 700; font-size: 21px; color: var(--kk-ink); margin: 0; }
.kk-profile-tagline { font-size: 13.5px; color: var(--kk-muted); margin-top: 4px; }
.kk-profile-stats {
	display: flex;
	gap: 34px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--kk-line);
	font-size: 13.5px;
	color: var(--kk-muted);
	flex-wrap: wrap;
}
.kk-profile-stats b { font-size: 18px; color: var(--kk-ink); font-family: 'Catamaran', var(--kk-ui); }

/* ---------- challenges ---------- */

.kk-page-head { text-align: center; margin-top: 34px; }
.kk-page-head h1 { font-family: var(--kk-serif); font-weight: 800; font-size: clamp(24px, 3vw, 30px); color: var(--kk-green); margin: 0; }
.kk-page-head p { font-size: 14px; color: var(--kk-muted); margin: 8px 0 0; }

.kk-challenge-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(50% 90% at 90% 10%, rgba(250, 243, 227, .14), transparent 55%),
		linear-gradient(100deg, #2e7d18, #4f9a28);
	border-radius: var(--kk-radius-lg);
	padding: 28px 32px;
	color: #fdf8ee;
	margin-top: 26px;
	box-shadow: var(--kk-shadow-2);
}
.kk-challenge-hero::after {
	content: '🏆';
	position: absolute;
	right: -14px;
	bottom: -30px;
	font-size: 130px;
	opacity: .1;
	pointer-events: none;
}
.kk-challenge-hero .kk-ch-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kk-challenge-hero .kk-ch-main { flex: 1; min-width: 220px; }
.kk-challenge-hero .kk-ch-kicker { font-size: 12px; letter-spacing: 2px; opacity: .8; font-weight: 600; }
.kk-challenge-hero .kk-ch-word { font-family: var(--kk-serif); font-size: 26px; font-weight: 700; margin-top: 6px; }
.kk-challenge-hero .kk-ch-rules { font-size: 13px; opacity: .85; margin-top: 6px; }
.kk-challenge-hero .kk-ch-count { text-align: center; }
.kk-challenge-hero .kk-ch-count b { font-size: 28px; font-weight: 800; display: block; font-family: 'Catamaran', var(--kk-ui); }
.kk-challenge-hero .kk-ch-count span { font-size: 12px; opacity: .8; }
.kk-challenge-hero .kk-btn--light { color: #2e7d18; }

/* ---------- poets directory ---------- */

.kk-poet-card {
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius);
	padding: 20px 22px;
	display: flex;
	align-items: center;
	gap: 14px;
	box-shadow: var(--kk-shadow-1);
	transition: transform .3s var(--kk-ease), box-shadow .3s ease, border-color .3s ease;
}
.kk-poet-card:hover { transform: translateY(-4px); border-color: var(--kk-gold-soft); box-shadow: var(--kk-shadow-2); }
.kk-poet-card .kk-poet-meta { min-width: 0; }
.kk-poet-card .kk-poet-name { font-weight: 700; font-size: 15px; color: var(--kk-ink); }
.kk-poet-card .kk-poet-sub { font-size: 12.5px; color: var(--kk-faint); }

/* ---------- ads (empty until enabled in the Customizer) ---------- */

.kk-ad { margin: 18px 0; }
.kk-ad-label {
	display: block;
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--kk-faint);
	text-align: center;
	margin-bottom: 4px;
}
.kk-ad ins { display: block; }
.kk-ad--sidebar { margin-top: 0; }

.kk-ad-ph {
	display: grid;
	place-items: center;
	border: 2px dashed #7fae7f;
	border-radius: var(--kk-radius-sm);
	background: repeating-linear-gradient(45deg, #f3f7f0, #f3f7f0 12px, #eef4ea 12px, #eef4ea 24px);
	font-family: ui-monospace, Menlo, monospace;
	font-size: 12px;
	color: #57804f;
	text-align: center;
	padding: 8px;
}

/* ---------- footer ---------- */

.kk-footer {
	margin-top: auto;
	border-top: 1px solid var(--kk-line);
	background: var(--kk-surface-2);
	padding: 34px 40px 26px;
}
.kk-footer-ornament { margin: 0 auto 26px; }
.kk-footer-inner {
	max-width: var(--kk-wrap);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: 36px 48px;
	align-items: start;
}
.kk-footer-brand img { height: 44px; }
.kk-footer-brand p { font-size: 13px; color: var(--kk-faint-2); margin: 12px 0 0; max-width: 340px; line-height: 1.8; }
.kk-footer-brand .kk-footer-tagline {
	font-family: var(--kk-serif);
	font-size: 15px;
	font-weight: 600;
	color: var(--kk-ink-2);
	margin-top: 14px;
}
.kk-footer-head {
	font-family: var(--kk-ui);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--kk-gold-soft);
	margin: 4px 0 14px;
}
.kk-footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 13.5px; }
.kk-footer-col a {
	color: var(--kk-faint-2);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: color .2s ease, transform .2s var(--kk-ease);
}
.kk-footer-col a:hover { color: var(--kk-green); transform: translateX(3px); }
.kk-footer-bottom {
	max-width: var(--kk-wrap);
	margin: 30px auto 0;
	padding-top: 16px;
	border-top: 1px solid var(--kk-line);
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: var(--kk-faint-2);
}

@media (max-width: 760px) {
	.kk-footer-inner { grid-template-columns: 1fr 1fr; }
	.kk-footer-brand { grid-column: 1 / -1; }
	.kk-footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- mobile bottom nav ---------- */

.kk-bottomnav { display: none; }

/* ---------- back to top ---------- */

.kk-top-btn {
	position: fixed;
	right: 20px;
	bottom: 24px;
	z-index: 85;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--kk-line-2);
	background: var(--kk-surface);
	color: var(--kk-green);
	font-size: 17px;
	cursor: pointer;
	display: grid;
	place-items: center;
	box-shadow: var(--kk-shadow-2);
	opacity: 0;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity .3s ease, transform .3s var(--kk-ease);
}
.kk-top-btn.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.kk-top-btn:hover { color: var(--kk-green-3); transform: translateY(-2px); }

/* ---------- toast ---------- */

.kk-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translate(-50%, 20px);
	z-index: 120;
	background: var(--kk-ink);
	color: var(--kk-bg);
	border-radius: 999px;
	padding: 10px 22px;
	font-size: 13px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease, transform .3s var(--kk-ease);
	box-shadow: var(--kk-shadow-3);
}
.kk-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- page content ---------- */

.kk-page {
	background: var(--kk-surface);
	border: 1px solid var(--kk-line);
	border-radius: var(--kk-radius-lg);
	padding: 34px 38px;
	margin-top: 22px;
	box-shadow: var(--kk-shadow-1);
}
.kk-page h1 { font-size: 24px; color: var(--kk-green); }
.kk-page h2 { font-size: 19px; margin-top: 1.4em; }
.kk-page h3 { font-size: 16px; margin-top: 1.2em; }
.kk-page p, .kk-page li { font-size: 14.5px; line-height: 1.9; color: var(--kk-ink); }
.kk-page ul, .kk-page ol { padding-left: 22px; }
.kk-page img { border-radius: var(--kk-radius-sm); margin: 1em 0; }
.kk-page blockquote {
	position: relative;
	margin: 1.2em 0;
	padding: 6px 0 6px 20px;
	border-left: 3px solid var(--kk-gold-soft);
	color: var(--kk-muted);
	font-family: var(--kk-serif);
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
	.kk-grid--featured > .kk-poem-card:first-child { grid-column: auto; }
	.kk-grid--featured > .kk-poem-card:first-child .kk-poem-text { font-size: 15px; }
}

/* tablet: tighten the header so nav + actions fit without a burger */
@media (max-width: 1040px) and (min-width: 769px) {
	.kk-header { padding: 10px 16px; }
	.kk-nav { gap: 12px; font-size: 13px; }
	.kk-logo img { height: 36px; }
	.kk-header-actions { gap: 8px; }
	.kk-header .kk-btn { padding: 8px 14px; }
	.kk-login-link { display: none; }
}

@media (max-width: 900px) {
	.kk-cols { grid-template-columns: minmax(0, 1fr); }
	.kk-sidebar { order: 2; position: static; max-height: none; overflow: visible; }
	.kk-poem-single { padding: 32px 24px; }
	.kk-comments { padding: 20px 18px; }
	.kk-profile-card { padding: 0 20px 20px; }
	.kk-page { padding: 26px 22px; }
	.kk-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.kk-header { padding: 10px 16px; gap: 8px; }
	.kk-burger { display: block; }
	.kk-nav {
		position: fixed;
		inset: 60px 0 auto 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		background: var(--kk-surface);
		border-bottom: 1px solid var(--kk-line-2);
		box-shadow: var(--kk-shadow-2);
		padding: 12px 20px 18px;
		margin: 0;
		display: none;
		white-space: normal;
		max-height: calc(100vh - 60px);
		overflow-y: auto;
		z-index: 95;
	}
	.kk-nav.is-open { display: flex; }
	.kk-nav a::after { content: none; }
	.kk-nav > a,
	.kk-navdrop > button { padding: 8px 0; font-size: 15px; }
	.kk-navdrop { width: 100%; }
	.kk-navdrop > button::after { content: none; }
	.kk-navdrop-panel {
		position: static;
		box-shadow: none;
		border: 0;
		padding: 0 0 6px 12px;
		width: auto;
		background: none;
	}
	.kk-logo { margin-right: auto; min-width: 0; }
	.kk-logo img { height: 34px; }
	.kk-header-actions { gap: 8px; }
	.kk-header .kk-btn { padding: 8px 14px; }
	.kk-header .kk-btn span.kk-btn-label { display: none; }

	.kk-feed-head { flex-direction: column; align-items: stretch; gap: 10px; }
	.kk-feed-title { min-width: 0; }
	.kk-search { width: 100%; }

	.kk-hero { padding: 38px 24px 34px; }
	.kk-wrap { padding: 0 16px; }

	.kk-footer { padding: 24px 20px 84px; }

	.kk-top-btn { bottom: 128px; }
	.kk-toast { bottom: 130px; }

	.kk-bottomnav {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 92;
		justify-content: space-around;
		background: var(--kk-glass);
		-webkit-backdrop-filter: blur(14px) saturate(160%);
		backdrop-filter: blur(14px) saturate(160%);
		border-top: 1px solid var(--kk-line-2);
		padding: 8px 0 6px;
		font-size: 11px;
		color: var(--kk-faint-2);
		text-align: center;
	}
	@supports not (backdrop-filter: blur(1px)) {
		.kk-bottomnav { background: var(--kk-surface); }
	}
	.kk-bottomnav a { color: var(--kk-faint-2); display: block; line-height: 1.4; }
	.kk-bottomnav a.is-active { color: var(--kk-green); font-weight: 600; }
	.kk-bottomnav .kk-bn-ico { font-size: 15px; display: block; }
}

@media (max-width: 520px) {
	.kk-bottomnav { font-size: 10.5px; }
	.kk-login-link { display: none; }
	.kk-poem-single { padding: 26px 16px; }
	.kk-profile-stats { gap: 18px; }
	.kk-auth { padding: 24px 20px; }
	.kk-challenge-hero { padding: 20px 18px; }
	.kk-stats { gap: 8px; }
	.kk-stat b { font-size: 18px; }
	.kk-hero-poem { font-size: 20px; }
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after { animation: none !important; transition-duration: .01ms !important; }
	.kk-reveal { opacity: 1; transform: none; }
}

@media print {
	.kk-header, .kk-footer, .kk-sidebar, .kk-single-actions, .kk-comments,
	.kk-ad, .kk-bottomnav, .kk-top-btn, .kk-read-tools, .kk-share { display: none !important; }
	body { background: #fff; }
	body::before { display: none; }
}
