/* ==========================================================================
   Single — style pojedynczego artykułu (ładowane tylko na is_single()).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Okruszki
   -------------------------------------------------------------------------- */
.ws-breadcrumbs {
	background: var(--ws-surface);
	border-bottom: 1px solid var(--ws-line-soft);
}

.ws-breadcrumbs__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ws-space-2);
	padding-block: var(--ws-space-3);
	font-size: var(--ws-text-xs);
	color: var(--ws-muted);
}

.ws-breadcrumbs__link { color: var(--ws-muted); }
.ws-breadcrumbs__link:hover,
.ws-breadcrumbs__link:focus { color: var(--ws-accent); }
.ws-breadcrumbs__sep { opacity: 0.5; }
.ws-breadcrumbs__current { color: var(--ws-ink); }

/* --------------------------------------------------------------------------
   2. Nagłówek artykułu
   -------------------------------------------------------------------------- */
.ws-article-head {
	background: var(--ws-paper);
	border-bottom: 1px solid var(--ws-line);
}

.ws-article-head__inner {
	max-width: 820px;
	margin-inline: auto;
	padding: var(--ws-space-8) var(--ws-space-5) var(--ws-space-7);
}

.ws-article-head__title {
	font-size: var(--ws-text-4xl);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: var(--ws-space-4) 0;
	text-wrap: balance;
}

.ws-article-head__lead {
	font-size: var(--ws-text-xl);
	line-height: 1.55;
	color: var(--ws-ink-soft);
	margin: 0;
	max-width: 720px;
}

/* Byline */
.ws-byline {
	display: flex;
	align-items: center;
	gap: var(--ws-space-4);
	flex-wrap: wrap;
	margin-top: var(--ws-space-6);
	padding-top: var(--ws-space-5);
	border-top: 1px solid var(--ws-line);
}

.ws-byline__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.ws-byline__meta { display: flex; flex-direction: column; }

.ws-byline__author {
	font-weight: 700;
	font-size: var(--ws-text-sm);
	color: var(--ws-ink);
}

.ws-byline__role {
	font-size: var(--ws-text-xs);
	color: var(--ws-muted);
}

.ws-byline__divider {
	width: 1px;
	height: 30px;
	background: var(--ws-line);
}

.ws-byline__pub {
	font-size: var(--ws-text-sm);
	color: var(--ws-muted);
}

.ws-byline__dot { margin-inline: var(--ws-space-1); }

/* --------------------------------------------------------------------------
   3. Hero
   -------------------------------------------------------------------------- */
.ws-hero {
	max-width: var(--ws-container-wide);
	margin-inline: auto;
	padding: var(--ws-space-7) var(--ws-space-5) 0;
}

.ws-hero__figure { margin: 0; }

.ws-hero__media {
	aspect-ratio: 16 / 8;
	border-radius: var(--ws-radius);
	overflow: hidden;
	background: var(--ws-paper);
}

.ws-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.ws-hero__caption {
	font-size: var(--ws-text-xs);
	color: var(--ws-muted);
	margin-top: var(--ws-space-3);
}

/* --------------------------------------------------------------------------
   4. Układ dwukolumnowy
   -------------------------------------------------------------------------- */
.ws-article-grid {
	max-width: var(--ws-container-wide);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 56px;
	align-items: start;
	padding-block: var(--ws-space-7) var(--ws-space-8);
}

/* --------------------------------------------------------------------------
   5. Tagi i box autora
   (Typografia treści, wzorce i komentarze są w content.css — wspólne dla
   artykułu i strony statycznej.)
   -------------------------------------------------------------------------- */
.ws-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ws-space-2);
	margin-top: var(--ws-space-6);
	max-width: 720px;
}

.ws-tag {
	font-size: var(--ws-text-xs);
	color: var(--ws-ink-soft);
	background: var(--ws-surface);
	border: 1px solid var(--ws-line);
	border-radius: var(--ws-radius);
	padding: var(--ws-space-2) var(--ws-space-3);
}

.ws-tag:hover,
.ws-tag:focus { color: var(--ws-accent); border-color: var(--ws-accent); }

.ws-author-bio {
	display: flex;
	gap: var(--ws-space-5);
	margin-top: var(--ws-space-7);
	padding: var(--ws-space-6);
	background: var(--ws-paper);
	border: 1px solid var(--ws-line);
	border-radius: var(--ws-radius);
	max-width: 720px;
}

.ws-author-bio__avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ws-author-bio__name {
	display: block;
	font-family: var(--ws-font-head);
	font-size: var(--ws-text-lg);
	font-weight: 700;
	color: var(--ws-ink);
	margin: var(--ws-space-2) 0;
}

.ws-author-bio__role {
	font-size: var(--ws-text-sm);
	color: var(--ws-muted);
	margin: 0 0 var(--ws-space-2);
}

.ws-author-bio__text {
	font-size: var(--ws-text-sm);
	line-height: 1.6;
	color: var(--ws-ink-soft);
	margin: 0;
}

/* --------------------------------------------------------------------------
   9. Sidebar
   -------------------------------------------------------------------------- */
.ws-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--ws-space-5);
	position: sticky;
	top: calc(var(--ws-header-height) + var(--ws-space-4));
	align-self: start;
}

/* Spis treści */
.ws-toc {
	background: var(--ws-surface);
	border: 1px solid var(--ws-line);
	border-radius: var(--ws-radius);
	padding: var(--ws-space-5);
}

.ws-toc__title {
	font-size: var(--ws-text-xs);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ws-ink);
	padding-bottom: var(--ws-space-3);
	margin-bottom: var(--ws-space-3);
	border-bottom: 2px solid var(--ws-ink);
}

.ws-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: ws-toc;
}

.ws-toc__item { counter-increment: ws-toc; }

.ws-toc__link {
	display: flex;
	gap: var(--ws-space-3);
	padding: var(--ws-space-3) 0;
	font-size: var(--ws-text-sm);
	line-height: 1.4;
	color: var(--ws-ink-soft);
	border-top: 1px solid var(--ws-line-soft);
}

.ws-toc__item:first-child .ws-toc__link { border-top: 0; }

.ws-toc__link::before {
	content: counter(ws-toc, decimal-leading-zero);
	font-family: var(--ws-font-head);
	font-weight: 700;
	font-size: var(--ws-text-xs);
	color: var(--ws-accent);
	flex-shrink: 0;
}

.ws-toc__link:hover,
.ws-toc__link:focus,
.ws-toc__link.is-active { color: var(--ws-accent); }

/* Newsletter */
.ws-newsletter {
	background: var(--ws-ink);
	color: var(--ws-on-dark);
	border-radius: var(--ws-radius);
	padding: var(--ws-space-6);
}

.ws-newsletter__title {
	font-size: var(--ws-text-xl);
	line-height: 1.2;
	color: var(--ws-on-dark);
	margin: var(--ws-space-3) 0;
}

.ws-newsletter__text {
	font-size: var(--ws-text-sm);
	color: var(--ws-on-dark-soft);
	margin: 0 0 var(--ws-space-4);
}

.ws-newsletter__form { display: flex; flex-direction: column; gap: var(--ws-space-2); }

.ws-newsletter__input {
	width: 100%;
	padding: var(--ws-space-3) var(--ws-space-4);
	border: 0;
	border-radius: var(--ws-radius);
	background: #fff;
	font: inherit;
	font-size: var(--ws-text-sm);
	color: var(--ws-ink);
}

.ws-newsletter__btn { width: 100%; }

/* Najczęściej czytane */
.ws-most-read {
	background: var(--ws-surface);
	border: 1px solid var(--ws-line);
	border-radius: var(--ws-radius);
	padding: var(--ws-space-5);
}

.ws-most-read__title {
	font-size: var(--ws-text-xs);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ws-ink);
	padding-bottom: var(--ws-space-3);
	margin-bottom: var(--ws-space-2);
	border-bottom: 2px solid var(--ws-ink);
}

.ws-most-read__list { list-style: none; margin: 0; padding: 0; }

.ws-most-read__item {
	display: grid;
	grid-template-columns: 26px 1fr;
	gap: var(--ws-space-3);
	padding: var(--ws-space-3) 0;
	border-top: 1px solid var(--ws-line-soft);
}

.ws-most-read__item:first-child { border-top: 0; }

.ws-most-read__num {
	font-family: var(--ws-font-head);
	font-size: var(--ws-text-lg);
	font-weight: 700;
	color: var(--ws-accent);
}

.ws-most-read__item a {
	font-family: var(--ws-font-head);
	font-size: var(--ws-text-sm);
	font-weight: 600;
	line-height: 1.35;
	color: var(--ws-ink);
}

.ws-most-read__item a:hover,
.ws-most-read__item a:focus { color: var(--ws-accent); }

/* --------------------------------------------------------------------------
   10. „Dalej w temacie"
   -------------------------------------------------------------------------- */
.ws-related {
	background: var(--ws-surface);
	border-top: 1px solid var(--ws-line);
}

.ws-related .ws-container { padding-block: var(--ws-space-8); }

.ws-related__head {
	padding-bottom: var(--ws-space-4);
	margin-bottom: var(--ws-space-6);
	border-bottom: 1px solid var(--ws-ink);
}

.ws-related__title { font-size: var(--ws-text-3xl); margin: 0; }

/* --------------------------------------------------------------------------
   11. Responsywność
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.ws-article-grid {
		grid-template-columns: 1fr;
		gap: var(--ws-space-7);
	}

	.ws-sidebar {
		position: static;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--ws-space-5);
	}

	.ws-toc { display: none; }
}

@media (max-width: 640px) {
	.ws-article-head__inner { padding-block: var(--ws-space-7) var(--ws-space-6); }
	.ws-article-head__title { font-size: var(--ws-text-3xl); }
	.ws-sidebar { grid-template-columns: 1fr; }
	.ws-author-bio { flex-direction: column; }
}
