/*
 * Single blog post (single-post.php), from docs/preview/inspiracje_szablon.png
 * (762 px wide; measured at 1440 px, 2026-10-28).
 *
 * Header: breadcrumbs, category, title, excerpt and links in a narrower
 * column (68rem, text from x = 176 at 1440; preview 178), the featured
 * image across the page container below them (preview 1298 × 461, so
 * 2.8 : 1). Tablets and phones get a taller crop of the image (2 : 1 and
 * 3 : 2), so it does not turn into a strip. The title, its line and the
 * excerpt sit closer together than in the Kontakt and Inspiracje intros,
 * as in the preview.
 */

.hf-post-header
{
	padding-top: var(--hf-space-l);
}

.hf-post-header__inner
{
	width: min(100% - 2 * var(--hf-gutter), 68rem);
	margin-inline: auto;
}

/* Breadcrumbs: Strona główna / Inspiracje / title, the last one not a link. */
.hf-breadcrumbs
{
	margin-bottom: var(--hf-space-l);
	font-size: var(--hf-text-s);
	line-height: 1.5;
}

.hf-breadcrumbs__list
{
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hf-breadcrumbs__item + .hf-breadcrumbs__item::before
{
	margin-inline: 0.6em;
	color: var(--hf-color-line);
	/* The slash is drawn, not read out. */
	content: "/" / "";
}

/* Padding with an equal negative margin: a touch target about 44 px high
   (17 px before, 2026-11-02) that moves nothing on the page. */
.hf-breadcrumbs a
{
	display: inline-block;
	margin-block: -0.85rem;
	padding-block: 0.85rem;
	color: var(--hf-color-text);
	text-decoration: none;
	transition: color var(--hf-transition);
}

.hf-breadcrumbs a:hover
{
	color: var(--hf-color-primary-hover);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.hf-post-header__eyebrow
{
	margin-bottom: var(--hf-space-s);
}

/* The size of the other subpage headings (Kontakt, Inspiracje). */
.hf-post-header__title
{
	margin: 0 0 var(--hf-space-s);
	font-size: var(--hf-text-page-title);
	text-wrap: balance;
}

.hf-post-header__title.hf-title-rule::after
{
	margin-top: var(--hf-space-xs);
}

.hf-post-header__lead
{
	margin: 0;
	font-size: var(--hf-text-l);
	line-height: 1.45;
	text-wrap: pretty;
}

/* „Wróć do inspiracji” | „Kopiuj link” */
.hf-post-actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--hf-space-xs) 0;
	margin-top: var(--hf-space-m);
}

/* The links next to the title and „Kopiuj link” under the text: 16 px on
   phones, so both header links fit on one line from 360 px. */
.hf-post-actions,
.hf-post-footer .hf-copy-link
{
	font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
}

.hf-post-actions__back
{
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.25em 0;
	color: var(--hf-color-heading);
	text-decoration: none;
	transition: color var(--hf-transition);
}

.hf-post-actions__back:hover
{
	color: var(--hf-color-primary-hover);
}

.hf-post-actions__icon
{
	flex: none;
	width: 1.15em;
	height: 1.15em;
	stroke-width: 3.5;
}

.hf-post-actions__label
{
	text-decoration: underline;
	text-decoration-color: var(--hf-color-line);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

/* The divider shows only with the button (it waits for the script). */
.hf-post-actions .hf-copy-link:has(> .hf-copy-link__button:not([hidden]))
{
	margin-left: 1em;
	padding-left: 1em;
	border-left: 1px solid var(--hf-color-card-border);
}

/* Narrowest phones: the links one under the other, without the divider. */
@media (max-width: 22.49em)
{
	.hf-post-actions
	{
		flex-direction: column;
		align-items: flex-start;
	}

	.hf-post-actions .hf-copy-link:has(> .hf-copy-link__button:not([hidden]))
	{
		margin-left: 0;
		padding-left: 0;
		border-left: 0;
	}
}

.hf-post-header__media
{
	margin-top: var(--hf-space-l);
	margin-bottom: 0;
}

.hf-post-header__image
{
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	border-radius: var(--hf-radius-m);
	object-fit: cover;
}

@media (min-width: 40em)
{
	.hf-post-header__image
	{
		aspect-ratio: 2 / 1;
	}
}

@media (min-width: 64em)
{
	.hf-post-header__image
	{
		aspect-ratio: 2.8 / 1;
	}
}

/*
 * Body: the spis treści beside the text (preview: list 312 px, gap 49 px,
 * text column 941 px within the page container at 1440; the text is
 * narrower since 2026-10-29, --hf-text-measure, with free space on the
 * right). The list stays in view while the text scrolls. Below 64em the
 * list stands above the text. Without a spis treści the text stands under
 * the title column.
 */
.hf-post-body
{
	padding-block: var(--hf-space-l) var(--hf-space-section-block);
}

.hf-post-body__inner
{
	width: min(100% - 2 * var(--hf-gutter), 68rem);
	margin-inline: auto;
}

.hf-post-body--toc .hf-post-body__inner
{
	width: min(100% - 2 * var(--hf-gutter), var(--hf-container-max));
}

.hf-post-body__content
{
	max-width: var(--hf-text-measure);
}

@media (min-width: 64em)
{
	/* No row gap: the footer under the text keeps its own margin. */
	.hf-post-body--toc .hf-post-body__inner
	{
		display: grid;
		grid-template-columns: minmax(0, 19.5rem) minmax(0, 1fr);
		align-items: start;
		gap: 0 3rem;
	}

	.hf-post-body--toc .hf-post-footer
	{
		grid-column: 2;
	}

	.hf-post-body--toc .hf-toc
	{
		position: sticky;
		/* Below the sticky site header (compact: up to 4.5rem high). */
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 6rem);
		max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 7rem);
		overflow-y: auto;
	}
}

/* Spis treści „W tym artykule” */
.hf-toc
{
	margin-bottom: var(--hf-space-l);
	padding: clamp(1.25rem, 0.9rem + 1vw, 2rem) clamp(1.25rem, 0.9rem + 1vw, 2rem) clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem);
	border-radius: var(--hf-radius-s);
	background: var(--hf-color-band);
}

.hf-toc__title
{
	display: block;
	margin: 0 0 var(--hf-space-xs);
	color: var(--hf-color-heading);
	font-family: var(--hf-font-display);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	line-height: 1.3;
}

.hf-toc__title::after
{
	display: block;
	width: 2rem;
	height: 2px;
	margin-top: var(--hf-space-s);
	background: var(--hf-color-primary);
	content: "";
}

/* The heading opens the list on phones and tablets (a details element);
   beside the text the list stays open (assets/js/toc.js) and the heading
   is no control. */
.hf-toc__summary
{
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--hf-space-s);
	cursor: pointer;
	list-style: none;
}

.hf-toc__summary::-webkit-details-marker
{
	display: none;
}

.hf-toc__chevron
{
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	color: var(--hf-color-icon);
	transition: transform var(--hf-transition);
}

.hf-toc__details[open] .hf-toc__chevron
{
	transform: rotate(180deg);
}

@media (min-width: 64em)
{
	.hf-toc__summary
	{
		cursor: auto;
	}

	.hf-toc__chevron
	{
		display: none;
	}
}

.hf-toc__list
{
	margin: 0;
	padding: 0;
	list-style: none;
}

.hf-toc__item + .hf-toc__item
{
	border-top: 1px solid color-mix(in srgb, var(--hf-color-line) 20%, var(--hf-color-band));
}

.hf-toc__link
{
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	padding-block: 0.8rem;
	color: var(--hf-color-text);
	/* About 0.86 of the text size, as in the preview: 21 px at 1440. */
	font-size: clamp(1rem, 0.9rem + 0.45vw, 1.3125rem);
	line-height: 1.4;
	text-decoration: none;
	transition: color var(--hf-transition);
}

.hf-toc__link:hover
{
	color: var(--hf-color-primary-hover);
}

.hf-toc__link:hover .hf-toc__label
{
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.hf-toc__number
{
	font-variant-numeric: tabular-nums;
}

/* The questions heading has no number: its label stays in the text column. */
.hf-toc__label
{
	grid-column: 2;
}

/*
 * Footer under the text (I8.3): the tags on the left, „Kopiuj link” on the
 * right, as wide as the text column. Preview at 1440: chips 102 × 43 px
 * with 18 px text, 13 px apart, 23 px under the last block; its text runs
 * about 15–20% larger than ours, so 15 px text in 37 px chips. The status
 * after a copy stands left of the button, so the button stays put. Below
 * 40em „Kopiuj link” goes under the tags.
 */
.hf-post-footer
{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--hf-space-s);
	max-width: var(--hf-text-measure);
	margin-top: var(--hf-space-m);
}

@media (min-width: 40em)
{
	.hf-post-footer
	{
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--hf-space-s) var(--hf-space-m);
	}

	.hf-post-footer .hf-copy-link
	{
		flex-direction: row-reverse;
		margin-left: auto;
	}
}

.hf-post-tags
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hf-post-tags__item
{
	padding: 0.5rem 1.25rem;
	border-radius: var(--hf-radius-s);
	background: var(--hf-color-band-strong);
	color: var(--hf-color-heading);
	font-size: var(--hf-text-s);
	line-height: 1.4;
}
