/*
 * Hindukush — article, pages, comments, 404.
 */

.hk-article { padding-top: 26px; }
.hk-article__grid {
	display: grid;
	grid-template-columns: 320px minmax(0, 800px);
	justify-content: space-between;
	gap: 56px;
	align-items: start;
}
.hk-article__main { min-width: 0; grid-column: 2; grid-row: 1; }
.hk-article__head .hk-label { display: inline-block; margin-top: 14px; font-size: 14px; }
.hk-article__title {
	margin-top: 6px;
	font-size: clamp(25px, 1.4vw + 17px, 37px);
	line-height: 1.6;
	letter-spacing: 0;
}
.hk-article__lede {
	margin-top: 12px;
	color: var(--hk-text);
	font-family: var(--hk-naskh);
	font-size: 20px;
	line-height: 1.9;
}
.hk-article__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: 18px;
	padding: 12px 0;
	border-top: 1px solid var(--hk-line);
	border-bottom: 1px solid var(--hk-line);
}
.hk-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	color: var(--hk-muted);
	font-size: 13.5px;
	line-height: 1.7;
}
.hk-article__meta > * + *::before { content: "·"; margin-inline: 8px; }
.hk-article__by { color: var(--hk-ink); font-weight: 700; }

/* Share */
.hk-share { display: flex; align-items: center; gap: 6px; }
.hk-share__btn {
	position: relative;
	border-radius: var(--hk-r);
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--hk-line-2);
	background: #fff;
	color: var(--hk-navy);
	transition: background-color .15s, border-color .15s, color .15s;
}
.hk-share__btn .hk-i-ok { display: none; }
.hk-share__btn.is-copied { border-color: var(--hk-navy); }
.hk-share__btn.is-copied .hk-i-ok { display: block; }
.hk-share__btn.is-copied .hk-i-link { display: none; }
.hk-toast {
	position: absolute;
	bottom: calc(100% + 8px);
	inset-inline-end: 0;
	padding: 4px 10px;
	background: var(--hk-ink);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity .2s var(--hk-ease), transform .2s var(--hk-ease);
}
.hk-toast:empty { display: none; }
.is-copied .hk-toast { opacity: 1; transform: none; }
@media (hover: hover) {
	.hk-share__btn:hover { background: var(--hk-navy); border-color: var(--hk-navy); color: #fff; }
}

/* Lead image */
.hk-article__figure { margin-top: 22px; }
.hk-article__zoom {
	width: 100%;
	padding: 0;
	border: 0;
	cursor: zoom-in;
}
.hk-article__zoomhint {
	position: absolute;
	border-radius: 6px;
	bottom: 12px;
	inset-inline-end: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	background: rgba(1, 23, 57, .85);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.6;
	opacity: 0;
	transition: opacity .2s var(--hk-ease);
}
.hk-article__zoom:focus-visible .hk-article__zoomhint { opacity: 1; }
@media (hover: hover) {
	.hk-article__zoom:hover .hk-article__zoomhint { opacity: 1; }
}
@media (hover: none) {
	.hk-article__zoomhint { opacity: 1; }
}
.hk-article__figure figcaption {
	padding: 8px 0 10px;
	border-bottom: 1px solid var(--hk-line);
	color: var(--hk-muted);
	font-size: 13px;
	line-height: 1.7;
}

/* Body text */
.hk-content {
	margin-top: 26px;
	color: #1d2637;
	font-family: var(--hk-naskh);
	font-size: 19.5px;
	line-height: 2.05;
}
.hk-content > * { margin-bottom: 1.15em; }
.hk-content > :last-child { margin-bottom: 0; }
.hk-content p { margin-top: 0; }
.hk-content h2, .hk-content h3, .hk-content h4 {
	margin: 1.6em 0 .55em;
	font-family: var(--hk-kufi);
	line-height: 1.6;
}
.hk-content h2 { font-size: 23px; }
.hk-content h3 { font-size: 20px; }
.hk-content h4 { font-size: 18px; }
.hk-content a {
	color: var(--hk-indigo);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .35em;
	text-decoration-color: rgba(26, 35, 107, .4);
	transition: text-decoration-color .15s;
}
.hk-content a:hover { text-decoration-color: currentColor; }
.hk-content strong, .hk-content b { font-weight: 700; color: var(--hk-ink); }
.hk-content ul, .hk-content ol { padding-inline-start: 1.5em; }
.hk-content ul { list-style: disc; }
.hk-content ol { list-style: persian; }
.hk-content li { margin-bottom: .35em; }
.hk-content li::marker { color: var(--hk-muted); }
.hk-content blockquote {
	margin: 1.6em 0;
	padding: 2px 22px;
	border-inline-start: 3px solid var(--hk-orange);
	color: var(--hk-ink);
	font-size: 21px;
}
.hk-content blockquote p:last-child { margin-bottom: 0; }
.hk-content blockquote cite { display: block; margin-top: 8px; color: var(--hk-muted); font-family: var(--hk-kufi); font-size: 13.5px; font-style: normal; }
.hk-content figure { margin-inline: 0; }
.hk-content img { height: auto; }
.hk-content figcaption, .hk-content .wp-element-caption, .hk-content .wp-caption-text {
	margin-top: 8px;
	color: var(--hk-muted);
	font-family: var(--hk-kufi);
	font-size: 13px;
	line-height: 1.7;
}
.hk-content .wp-block-video video, .hk-content video { width: 100%; background: #000; }
.hk-content iframe { max-width: 100%; border: 0; }
.hk-content .wp-block-embed__wrapper { position: relative; }
.hk-content .wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.hk-content .wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.hk-content hr { height: 0; margin: 2em 0; border: 0; border-top: 1px solid var(--hk-line); }
.hk-content table { width: 100%; border-collapse: collapse; font-family: var(--hk-kufi); font-size: 15px; line-height: 1.7; }
.hk-content th, .hk-content td { padding: 8px 12px; border: 1px solid var(--hk-line); text-align: start; }
.hk-content th { background: var(--hk-wash); color: var(--hk-ink); }
.hk-content .wp-block-table { overflow-x: auto; }
.hk-content .alignleft { float: left; margin: .3em 0 1em 1.5em; }
.hk-content .alignright { float: right; margin: .3em 1.5em 1em 0; }
.hk-content .aligncenter { margin-inline: auto; }
.hk-content .alignwide, .hk-content .alignfull { max-width: 100%; }
.hk-content::after { content: ""; display: table; clear: both; }
.hk-content .wp-block-image img { margin-inline: auto; }
.hk-content .wp-block-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hk-content .wp-block-pullquote { margin: 1.8em 0; padding: 20px 0; border-top: 2px solid var(--hk-ink); border-bottom: 1px solid var(--hk-line); text-align: start; }
.hk-content .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; }
.hk-pagelinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; font-family: var(--hk-kufi); font-size: 14px; }

@media (max-width: 599px) {
	.hk-content { font-size: 18.5px; line-height: 2; }
	.hk-content blockquote { font-size: 19.5px; padding-inline-start: 16px; }
	.hk-content .alignleft, .hk-content .alignright { float: none; margin: 0 0 1em; }
}

/* Tags */
.hk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--hk-line); }
.hk-tags a {
	display: inline-block;
	border-radius: 999px;
	padding: 5px 12px;
	border: 1px solid var(--hk-line-2);
	color: var(--hk-text);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.7;
	transition: border-color .15s, color .15s;
}
@media (hover: hover) {
	.hk-tags a:hover { border-color: var(--hk-navy); color: var(--hk-indigo); }
}

/* Side column */
.hk-article__side { display: grid; gap: 40px; min-width: 0; padding-top: 6px; grid-column: 1; grid-row: 1; align-content: start; }

/* Related */
.hk-related {
	margin-top: 64px;
	margin-bottom: -64px;
	padding: 36px 0 48px;
	background: var(--hk-wash);
	border-top: 1px solid var(--hk-line);
}

@media (max-width: 1099px) {
	.hk-article__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
	.hk-article__main, .hk-article__side { grid-column: auto; grid-row: auto; }
	.hk-article__main { max-width: 800px; }
	.hk-article__side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
}
@media (max-width: 639px) {
	.hk-article { padding-top: 16px; }
	.hk-article__side { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.hk-article__lede { font-size: 18.5px; }
	.hk-article__bar { gap: 10px; }
	.hk-article__figure { margin-inline: calc(var(--hk-gutter) * -1); }
	.hk-article__figure figcaption { padding-inline: var(--hk-gutter); }
	.hk-related { padding: 28px 0 36px; margin-top: 48px; }
}

/* Lightbox */
.hk-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
}
.hk-lightbox[open] { display: grid; place-items: center; animation: hk-fade .2s var(--hk-ease); }
.hk-lightbox::backdrop { background: rgba(1, 10, 26, .94); }
.hk-lightbox__img { width: auto; max-width: min(94vw, 1400px); max-height: 88vh; max-height: 88dvh; object-fit: contain; }
.hk-lightbox form { position: fixed; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 12px; }
.hk-lightbox__close { color: #fff; background: rgba(255, 255, 255, .08); }
@media (hover: hover) {
	.hk-lightbox__close:hover { background: rgba(255, 255, 255, .18); }
}

/* Comments */
.hk-comments { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--hk-ink); }
.hk-comments__title { font-size: 20px; }
.hk-comments__list { margin-top: 16px; }
.hk-comments__list .comment { padding: 16px 0; border-bottom: 1px solid var(--hk-line); }
.hk-comments__list .children { margin-top: 12px; padding-inline-start: 22px; border-inline-start: 1px solid var(--hk-line-2); }
.hk-comments__list .children .comment:last-child { border-bottom: 0; padding-bottom: 0; }
.hk-comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13px; color: var(--hk-muted); }
.hk-comment__author { color: var(--hk-ink); font-size: 14.5px; font-weight: 700; }
.hk-comment__time { color: var(--hk-muted); }
.hk-comment__wait { margin-top: 4px; color: var(--hk-indigo); font-size: 13px; }
.hk-comment__text { margin-top: 4px; font-family: var(--hk-naskh); font-size: 17px; line-height: 1.95; }
.hk-comment__text p { margin: 0 0 .6em; }
.hk-comment__text p:last-child { margin-bottom: 0; }
.hk-comment__reply { margin-top: 4px; }
.hk-comment__reply a { color: var(--hk-indigo); font-size: 13px; font-weight: 600; }
@media (hover: hover) {
	.hk-comment__time:hover, .hk-comment__reply a:hover { text-decoration: underline; text-underline-offset: .35em; }
}
.hk-comments .comment-respond { margin-top: 0; }
.hk-comments .comment-reply-title { font-size: 20px; }
.hk-comments__list + .comment-respond, .hk-comments .navigation + .comment-respond { margin-top: 32px; }
.hk-comments .comment-reply-title small { margin-inline-start: 10px; font-size: 13px; font-weight: 600; }
.hk-comments .comment-reply-title small a { color: var(--hk-indigo); }
.hk-comments .comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 12px; }
.hk-comments .comment-form > p { margin: 0; }
.hk-comments .comment-notes, .hk-comments .comment-form-comment, .hk-comments .comment-form-cookies-consent, .hk-comments .form-submit, .hk-comments .logged-in-as { grid-column: 1 / -1; }
.hk-comments .comment-notes, .hk-comments .logged-in-as { color: var(--hk-muted); font-size: 13.5px; }
.hk-comments label { display: block; margin-bottom: 6px; color: var(--hk-ink); font-size: 13.5px; font-weight: 600; }
.hk-comments input[type="text"], .hk-comments input[type="email"], .hk-comments textarea { width: 100%; }
.hk-comments .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.hk-comments .comment-form-cookies-consent label { margin: 0; font-weight: 500; color: var(--hk-text); }
.hk-comments .comment-form-cookies-consent input { margin-top: 6px; }
@media (max-width: 599px) {
	.hk-comments .comment-form { grid-template-columns: minmax(0, 1fr); }
}

/* Static pages */
.hk-page .hk-content { max-width: 800px; margin-top: 0; }

/* 404 */
.hk-pagehead--nf { padding: 40px 0 44px; text-align: center; }
.hk-pagehead--nf .hk-pagehead__desc { margin-inline: auto; }
.hk-pagehead--nf .hk-pagehead__search { margin-inline: auto; }
.hk-nf__code { color: var(--hk-indigo); font-size: 64px; font-weight: 800; line-height: 1.2; }

/* ===== Refined article page ============================================= */
/* Reading progress (CSS scroll timeline; no script, absent in older browsers) */
.hk-progress { display: none; }
@supports (animation-timeline: scroll()) {
	.hk-progress {
		display: block;
		position: fixed;
		top: var(--hk-bar);
		inset-inline: 0;
		z-index: 60;
		height: 3px;
		background: var(--hk-orange);
		transform-origin: right center;
		transform: scaleX(0);
		animation: hk-progress linear both;
		animation-timeline: scroll(root);
	}
	@keyframes hk-progress { to { transform: scaleX(1); } }
}

.hk-article__title { font-weight: 900; line-height: 1.55; }
.hk-article__head .hk-label { padding: 2px 12px; border-radius: 999px; background: #eef0fa; font-size: 13px; }
.hk-article__lede {
	margin-top: 14px;
	padding: 14px 18px;
	border-inline-start: 4px solid var(--hk-orange);
	border-radius: 0 var(--hk-r) var(--hk-r) 0;
	background: var(--hk-wash);
	color: var(--hk-ink);
	font-size: 19px;
	line-height: 1.9;
}
.hk-article__bar { padding: 14px 0; }
.hk-byline { display: flex; align-items: center; gap: 12px; }
.hk-avatar--lg { width: 44px; height: 44px; margin: 0; font-size: 19px; }
.hk-article__by { color: var(--hk-ink); font-size: 15px; font-weight: 700; line-height: 1.5; }
.hk-article__meta > * + *::before { content: "·"; margin-inline: 8px; }
.hk-article__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hk-fontsize { display: flex; border: 1px solid var(--hk-line-2); border-radius: var(--hk-r); overflow: hidden; }
.hk-fontsize__btn {
	display: inline-flex;
	align-items: baseline;
	gap: 1px;
	height: 36px;
	padding: 0 10px;
	border: 0;
	background: #fff;
	color: var(--hk-navy);
	font-size: 16px;
	font-weight: 700;
	transition: background-color .2s, color .2s;
}
.hk-fontsize__btn + .hk-fontsize__btn { border-inline-start: 1px solid var(--hk-line-2); font-size: 19px; }
.hk-fontsize__btn small { font-size: 12px; }
.hk-fontsize__btn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) {
	.hk-fontsize__btn:not(:disabled):hover { background: var(--hk-navy); color: #fff; }
}
.hk-article__figure .hk-media { border-radius: 12px; }

/* Body: comfortable line length and adjustable size */
.hk-content { --hk-fs: 19px; max-width: 740px; font-size: var(--hk-fs); line-height: 2; transition: font-size .15s; }
.hk-content > p:first-of-type { color: var(--hk-ink); }
.hk-content img { border-radius: var(--hk-r); }
.hk-content blockquote { border-radius: 0 var(--hk-r) var(--hk-r) 0; background: var(--hk-wash); padding: 14px 22px; }

/* Share again at the end, then previous / next */
.hk-endshare {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 740px;
	margin-top: 32px;
	padding: 16px 20px;
	border-radius: 12px;
	background: var(--hk-navy);
}
.hk-endshare__label { color: #fff; font-size: 16px; font-weight: 700; }
.hk-endshare .hk-share__btn { border-color: rgba(255, 255, 255, .2); background: transparent; color: #fff; }
@media (hover: hover) {
	.hk-endshare .hk-share__btn:hover { background: var(--hk-orange); border-color: var(--hk-orange); color: var(--hk-navy); }
}
.hk-postnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 740px; margin-top: 18px; }
.hk-postnav__item {
	display: grid;
	gap: 6px;
	padding: 16px 18px;
	border: 1px solid var(--hk-line);
	border-radius: 12px;
	transition: border-color .2s, transform .2s var(--hk-ease), box-shadow .2s;
}
.hk-postnav__item.is-prev { grid-column: 2; text-align: end; }
.hk-postnav__item.is-next { grid-column: 1; }
.hk-postnav__dir { display: inline-flex; align-items: center; gap: 6px; color: var(--hk-muted); font-size: 13px; }
.hk-postnav__item.is-prev .hk-postnav__dir { justify-content: flex-end; }
.hk-postnav__title { color: var(--hk-ink); font-size: 15px; font-weight: 700; line-height: 1.7; }
@media (hover: hover) {
	.hk-postnav__item:hover { border-color: var(--hk-navy); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(1, 23, 57, .08); }
}
.hk-tags { max-width: 740px; }
.hk-tags::before { content: "ټګونه:"; align-self: center; margin-inline-end: 4px; color: var(--hk-muted); font-size: 13.5px; }

/* Side column: framed boxes; the last one follows while reading */
@media (min-width: 1100px) {
	.hk-article__side > :last-child { position: sticky; top: calc(var(--hk-bar) + var(--hk-sticky) + 20px); }
}
.hk-related .hk-card__media .hk-media { border-radius: var(--hk-r); }
@media (max-width: 599px) {
	.hk-article__tools { width: 100%; justify-content: space-between; }
	.hk-postnav { grid-template-columns: minmax(0, 1fr); }
	.hk-postnav__item.is-prev, .hk-postnav__item.is-next { grid-column: auto; }
	.hk-article__figure .hk-media { border-radius: 0; }
}
.hk-comments, .hk-article__head { max-width: 740px; }
.hk-article__figure { max-width: 800px; }
