/* =========================================================
   Piąte Kąty – style główne
   ========================================================= */

:root {
	--paper: #FBF7F1;
	--paper-2: #F3ECE1;
	--card: #FFFFFF;
	--ink: #1F2430;
	--ink-2: #4A5060;
	--muted: #7A7F8C;
	--line: #E6DED1;
	--accent: #E0603F;
	--cat: var(--accent);
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(31, 36, 48, .05), 0 8px 24px -12px rgba(31, 36, 48, .18);
	--shadow-hover: 0 2px 4px rgba(31, 36, 48, .06), 0 18px 40px -16px rgba(31, 36, 48, .28);
	--font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--container: 1240px;
	--narrow: 760px;
	--wide: 1080px;
	color-scheme: light;
}

[data-theme="dark"] {
	--paper: #14171F;
	--paper-2: #1B1F29;
	--card: #1E2330;
	--ink: #F1ECE4;
	--ink-2: #C5C1BA;
	--muted: #8E929D;
	--line: #2C3240;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
	--shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .8);
	color-scheme: dark;
}

/* ---------- Reset / baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	transition: background-color .25s, color .25s;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 12px; top: 12px; z-index: 1000; padding: 10px 16px;
	background: var(--ink); color: var(--paper); border-radius: 8px;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: calc(var(--narrow) + 48px); }
.container.wide { max-width: calc(var(--wide) + 48px); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .8em 1.4em; border: 0; border-radius: 999px;
	background: var(--ink); color: var(--paper);
	font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
	transition: transform .15s, background-color .2s;
}
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* ---------- Pasek postępu ---------- */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 200; background: transparent; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--cat); transition: width .1s linear; }
.cat-none.read-progress span { background: var(--accent); }

/* ---------- Nagłówek ---------- */
.topbar { border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.topbar-inner { display: flex; gap: 20px; align-items: center; min-height: 36px; }
.topbar-date::first-letter { text-transform: uppercase; }
.topbar-tagline { margin-right: auto; }
.topbar-tagline::before { content: "•"; margin-right: 20px; opacity: .5; }
.social-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.social-nav a { text-decoration: none; }

.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1; }
.brand-mark { flex: none; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-mark { transform: translateY(-2px) rotate(-6deg); }
.custom-logo { max-height: 56px; width: auto; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
	display: block; padding: 8px 14px; border-radius: 999px;
	font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--ink-2);
	transition: background-color .2s, color .2s;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current-cat > a {
	background: var(--paper-2); color: var(--ink);
}
.main-nav li[class*="cat-"] > a::before {
	content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
	background: var(--cat); margin-right: 8px; vertical-align: 1px;
}
.main-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-hover);
	flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { border-radius: 8px; }

.header-actions { display: flex; gap: 6px; align-items: center; }
.main-nav + .header-actions { margin-left: 0; }
.icon-btn {
	width: 42px; height: 42px; display: grid; place-items: center;
	border: 1px solid var(--line); border-radius: 50%; background: var(--card); cursor: pointer; color: var(--ink);
	transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--ink); transform: rotate(-8deg); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }
.burger { display: grid; gap: 4px; width: 18px; }
.burger span { height: 2px; background: currentColor; border-radius: 2px; transition: .25s; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.search-overlay { border-top: 1px solid var(--line); padding: 20px 0; background: var(--paper); }
.search-form { display: flex; gap: 10px; }
.search-field {
	flex: 1; min-width: 0; padding: .85em 1.2em; border: 1px solid var(--line); border-radius: 999px;
	background: var(--card); font-size: 1rem;
}
.search-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }

@media (max-width: 960px) {
	.topbar-tagline { display: none; }
	.menu-toggle { display: grid; }
	.header-actions { margin-left: auto; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0; margin: 0;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 12px 24px 20px; display: none;
	}
	.menu-open .main-nav { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { padding: 12px 14px; font-size: 1.05rem; }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; }
}

/* ---------- Plakietki kategorii ---------- */
.cat-badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--cat); text-decoration: none;
}
.cat-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }
.cat-badge:hover { color: var(--ink); }

/* ---------- Meta ---------- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .85rem; color: var(--muted); }
.post-meta > * + *::before { content: "·"; margin-right: 14px; opacity: .6; }
.post-meta .meta-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.post-meta .meta-author a { text-decoration: none; }
.meta-avatar { border-radius: 50%; }

/* ---------- Wyróżniony wpis ---------- */
.hero-post {
	display: grid; grid-template-columns: 1.35fr 1fr; gap: 0;
	background: var(--card); border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow);
	margin-bottom: 64px; position: relative;
}
.hero-post::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--cat); z-index: 2; }
.hero-post .thumb { border-radius: 0; aspect-ratio: auto; min-height: 420px; height: 100%; }
.hero-post-body { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.hero-post-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pin { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.hero-post-title { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 16px; }
.hero-post-title a { text-decoration: none; background-image: linear-gradient(var(--cat), var(--cat)); background-size: 0 3px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s; }
.hero-post-title a:hover { color: inherit; background-size: 100% 3px; }
.hero-post-excerpt { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 24px; }
@media (max-width: 860px) {
	.hero-post { grid-template-columns: 1fr; }
	.hero-post .thumb { min-height: 0; aspect-ratio: 16/10; }
	.hero-post-body { padding: 28px 24px 32px; }
}

/* ---------- Miniatury ---------- */
.thumb {
	display: block; position: relative; overflow: hidden; border-radius: var(--radius);
	aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--cat) 14%, var(--paper-2));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
a.thumb:hover img { transform: scale(1.04); }
.thumb-placeholder {
	position: absolute; inset: 0; display: grid; place-items: center; color: var(--cat);
	background:
		radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--cat) 35%, transparent) 0 18%, transparent 19%),
		radial-gradient(circle at 50% 50%, transparent 0 34%, color-mix(in srgb, var(--cat) 22%, transparent) 34.5% 35.5%, transparent 36%),
		color-mix(in srgb, var(--cat) 12%, var(--paper-2));
}
.thumb-placeholder .pk-icon { width: 30%; max-width: 72px; height: auto; stroke-width: 1.3; }

/* ---------- Sekcje ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.section-title { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; display: flex; align-items: center; gap: 12px; }
.section-sub { margin: 0; color: var(--muted); }
.section-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--cat); color: #fff; }
.section-icon .pk-icon { width: 22px; height: 22px; }
.more-link { font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--cat); white-space: nowrap; }
.more-link:hover { color: var(--ink); }

/* Tematy */
.topics { margin-bottom: 72px; }
.topics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.topic {
	position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 18px 18px;
	background: var(--card); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow);
	overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.topic::after { content: ""; position: absolute; width: 120px; height: 120px; right: -50px; bottom: -50px; border-radius: 50%; border: 2px solid var(--cat); opacity: .25; transition: transform .4s; }
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--ink); }
.topic:hover::after { transform: scale(1.4); }
.topic-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--cat) 15%, transparent); color: var(--cat); margin-bottom: 10px; }
.topic-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; }
.topic-count { font-size: .8rem; color: var(--muted); }
@media (max-width: 1080px) { .topics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }

/* Siatki */
.latest { margin-bottom: 72px; }
.grid { display: grid; gap: 36px 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Karta */
.card { display: flex; flex-direction: column; gap: 16px; }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 1.3rem; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--cat); }
.card-excerpt { color: var(--ink-2); font-size: .97rem; margin: 0 0 4px; }
.card.sticky .thumb { outline: 3px solid var(--cat); outline-offset: 3px; }

/* Karta – lista */
.card-list { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-list:last-child { border-bottom: 0; }
.card-list .thumb { aspect-ratio: 1; border-radius: 12px; }
.card-list .card-title { font-size: 1.08rem; margin-bottom: 6px; }
.card-list .post-meta { font-size: .8rem; }
.list .card-list { grid-template-columns: 140px 1fr; }

/* Sekcja kategorii */
.cat-section { margin-bottom: 72px; }
.cat-section .section-head { border-bottom-color: var(--cat); }
.cat-section-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; }
.cat-lead .card-title { font-size: 1.6rem; }
@media (max-width: 860px) { .cat-section-grid { grid-template-columns: 1fr; gap: 12px; } }

/* Paginacja */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center;
	border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; background: var(--card);
}
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Archiwa ---------- */
.archive-header { padding: 48px 0 40px; margin-bottom: 48px; background: color-mix(in srgb, var(--cat) 10%, var(--paper)); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.archive-header::after { content: ""; position: absolute; width: 360px; height: 360px; right: -100px; top: -140px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--cat) 45%, transparent); }
.archive-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--cat); color: #fff; margin-bottom: 16px; }
.archive-title { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 8px; }
.archive-desc { color: var(--ink-2); max-width: 60ch; font-size: 1.08rem; }
.archive-desc p:last-child { margin: 0; }
.search-inline { max-width: 620px; margin-top: 20px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { text-decoration: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; margin-bottom: 80px; }
.no-sidebar .layout { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1020px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* Panel boczny / widgety */
.sidebar .widget { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.widget-title { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
.widget .search-form { flex-direction: column; }

/* ---------- Pojedynczy wpis ---------- */
.entry-header { padding-top: 48px; margin-bottom: 32px; }
.entry-title { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -.025em; margin: 14px 0 18px; }
.entry-lead { font-size: 1.25rem; color: var(--ink-2); font-family: var(--font-serif); line-height: 1.5; }
.entry-hero { margin: 0 auto 48px; }
.entry-hero img { width: 100%; border-radius: calc(var(--radius) + 4px); }
.entry-hero figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; text-align: center; }
.single-page .entry-header { padding-top: 56px; }

.entry-content { font-size: 1.12rem; line-height: 1.78; }
.entry-content > * { margin-block: 0 1.3em; }
.entry-content h2 { font-size: 1.9rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.45rem; margin-top: 1.6em; }
.entry-content a { color: var(--cat); text-decoration-thickness: 2px; }
.cat-none .entry-content a, .single-page .entry-content a { color: var(--accent); }
.entry-content a:hover { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--cat); font-weight: 700; }
.entry-content blockquote, .wp-block-quote {
	margin-inline: 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--cat);
	font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.5; color: var(--ink);
}
.wp-block-quote cite, .entry-content blockquote cite { display: block; font-family: var(--font-sans); font-size: .85rem; color: var(--muted); font-style: normal; margin-top: 8px; }
.wp-block-pullquote { border-block: 3px solid var(--cat); padding: 32px 0; text-align: center; }
.wp-block-pullquote blockquote { border: 0; padding: 0; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figcaption, .wp-element-caption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content pre, .entry-content code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .9em; }
.entry-content code { background: var(--paper-2); padding: .15em .4em; border-radius: 6px; }
.entry-content pre { background: #1F2430; color: #F1ECE4; padding: 20px 24px; border-radius: var(--radius-sm); overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { font-weight: 700; background: var(--paper-2); }
.entry-content hr { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }
.entry-content .alignwide { margin-inline: calc((var(--narrow) - var(--wide)) / 2); max-width: var(--wide); width: auto; }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
@media (max-width: 1130px) { .entry-content .alignwide { margin-inline: 0; } }
.alignleft { float: left; margin: .3em 1.6em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.6em; }
.aligncenter { margin-inline: auto; }
.wp-block-button__link { border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; }
.entry-content .wp-block-button__link { color: var(--paper); text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--cat); color: #fff; }
.has-drop-cap:not(:focus)::first-letter { font-family: var(--font-serif); font-size: 4.4em; line-height: .8; margin: .06em .1em 0 0; color: var(--cat); font-weight: 700; }

/* Paleta edytora */
.has-ink-color { color: #1F2430; } .has-ink-background-color { background-color: #1F2430; }
.has-paper-color { color: #FBF7F1; } .has-paper-background-color { background-color: #FBF7F1; }
.has-rodzina-color { color: #E0603F; } .has-rodzina-background-color { background-color: #E0603F; }
.has-dom-color { color: #C48A1C; } .has-dom-background-color { background-color: #C48A1C; }
.has-technologia-color { color: #2F6FDE; } .has-technologia-background-color { background-color: #2F6FDE; }
.has-budownictwo-color { color: #8A5A44; } .has-budownictwo-background-color { background-color: #8A5A44; }
.has-sport-color { color: #2E9E5B; } .has-sport-background-color { background-color: #2E9E5B; }
.has-inne-color { color: #7A5AC8; } .has-inne-background-color { background-color: #7A5AC8; }

/* Stopka wpisu */
.entry-footer { margin-top: 48px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tags a { font-size: .85rem; padding: 6px 14px; border-radius: 999px; background: var(--paper-2); text-decoration: none; color: var(--ink-2); }
.tags a::before { content: "#"; opacity: .5; }
.tags a:hover { background: var(--cat); color: #fff; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 0; border-block: 1px solid var(--line); margin-bottom: 32px; }
.share-label { font-weight: 700; font-size: .85rem; margin-right: 6px; }
.share-btn { font-size: .85rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--cat); color: var(--cat); }

.author-box { display: grid; grid-template-columns: 88px 1fr; gap: 22px; padding: 28px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); margin-bottom: 32px; }
.author-box img { border-radius: 50%; }
.author-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 2px; }
.author-name { font-size: 1.35rem; margin-bottom: 6px; }
.author-name a { text-decoration: none; }
.author-box p:last-child { margin: 0; color: var(--ink-2); font-size: .97rem; }
@media (max-width: 560px) { .author-box { grid-template-columns: 1fr; } }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 64px; }
.post-nav a { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-family: var(--font-serif); font-weight: 600; line-height: 1.3; transition: border-color .2s; }
.post-nav a:hover { border-color: var(--cat); color: var(--ink); }
.post-nav span { display: block; font-family: var(--font-sans); font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.post-nav-next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { grid-column: auto; } }

.related { margin-bottom: 72px; }
.related .section-head { border-bottom-color: var(--cat); }

/* Komentarze */
.comments { margin-bottom: 80px; }
.comments .section-title { margin-bottom: 24px; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { padding-left: 32px; border-left: 2px solid var(--line); margin-left: 24px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; color: var(--muted); margin: 4px 0 10px 60px; }
.comment-metadata a { text-decoration: none; }
.comment-content { margin-left: 60px; }
.reply { margin-left: 60px; font-size: .85rem; font-weight: 600; }
.comment-respond { margin-top: 40px; padding: 32px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.comment-reply-title { font-size: 1.5rem; }
.comment-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .8em 1em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
}
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: start; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }

/* 404 i pusty stan */
.error-404, .empty-state { text-align: center; padding-block: 72px 56px; }
.e404-mark { display: flex; justify-content: center; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: clamp(5rem, 14vw, 9rem); font-weight: 700; line-height: 1; margin-bottom: 24px; }
.e404-mark .brand-mark { width: 1em; height: 1em; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-404 h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.error-404 p, .empty-state p { color: var(--ink-2); }
.error-404 .search-form { max-width: 520px; margin: 28px auto; }
.empty-state .brand-mark { width: 72px; height: 72px; margin: 0 auto 16px; }
.empty-state .search-form { max-width: 520px; margin: 24px auto 0; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 64px 0 28px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--ink-2); margin-top: 14px; max-width: 36ch; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-topics ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.footer-topics a { text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; }
.footer-topics a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); font-size: .87rem; color: var(--muted); }
.footer-bottom p { margin: 0 auto 0 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a, .to-top { text-decoration: none; }
@media (max-width: 860px) {
	.footer-top { grid-template-columns: 1fr; }
	.footer-widgets { grid-template-columns: 1fr; }
	.footer-topics ul { grid-template-columns: repeat(2, 1fr); }
}

/* WordPress – wymagane klasy */
.sticky {}
.bypostauthor > .comment-body .fn::after { content: " ✦"; color: var(--accent); }
.gallery-caption {}
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.page-links { margin: 2em 0; display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* Drobne poprawki mobilne */
.brand-name { white-space: nowrap; }
@media (max-width: 560px) {
	.container { padding-inline: 18px; }
	.brand-name { font-size: 1.3rem; }
	.brand-mark { width: 34px; height: 34px; }
	.header-inner { gap: 12px; min-height: 64px; }
	.icon-btn { width: 38px; height: 38px; }
	.section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
	.topbar { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

.btn-lg { padding: 1em 1.7em; font-size: 1rem; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-accent:hover { background: #fff; color: #14171F; }
.btn-ghost { background: transparent; color: #F6F1E9; box-shadow: inset 0 0 0 1.5px rgba(246, 241, 233, .35); }
.btn-ghost:hover { background: rgba(246, 241, 233, .1); color: #fff; box-shadow: inset 0 0 0 1.5px #F6F1E9; }

.hero {
	--h-ink: #F6F1E9;
	position: relative; isolation: isolate; overflow: hidden;
	background: #14171F; color: var(--h-ink);
	padding: 88px 0 110px; margin-bottom: 72px;
}
[data-theme="dark"] .hero { background: #0C0E13; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.g1 { width: 520px; height: 520px; background: var(--accent); left: -160px; top: -200px; }
.g2 { width: 460px; height: 460px; background: #2F6FDE; right: -120px; top: 20%; animation-delay: -6s; opacity: .45; }
.g3 { width: 380px; height: 380px; background: #2E9E5B; left: 35%; bottom: -260px; animation-delay: -12s; opacity: .35; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.hero-penta { position: absolute; width: 640px; height: 640px; right: -140px; top: -120px; fill: none; stroke: rgba(246, 241, 233, .09); stroke-width: .6; animation: slowspin 90s linear infinite; }
.hero-penta.p2 { width: 300px; height: 300px; left: -80px; right: auto; top: auto; bottom: -90px; stroke: rgba(246, 241, 233, .12); animation-direction: reverse; animation-duration: 70s; }
@keyframes slowspin { to { transform: rotate(360deg); } }
.hero-grain { position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1px); background-size: 4px 4px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }

.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }

.hero-kicker {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px;
	padding: 7px 16px 7px 12px; border-radius: 999px;
	background: rgba(246, 241, 233, .08); box-shadow: inset 0 0 0 1px rgba(246, 241, 233, .14);
	font-size: .82rem; font-weight: 600; letter-spacing: .02em;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-title {
	font-size: clamp(2.9rem, 7.2vw, 6.2rem); line-height: .98; letter-spacing: -.035em; font-weight: 700;
	color: var(--h-ink); margin: 0 0 22px; max-width: 11ch;
}
.hero-topics {
	font-family: var(--font-serif); font-size: clamp(1.35rem, 2.6vw, 2.05rem); line-height: 1.3; font-weight: 600;
	margin: 0 0 26px; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .55em;
}
.ht { position: relative; color: var(--cat); white-space: nowrap; }
.ht::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: 3px; border-radius: 3px; background: var(--cat);
	transform: scaleX(0); transform-origin: left; animation: ht-line 10s cubic-bezier(.2, .8, .2, 1) infinite; animation-delay: calc(var(--i) * 2s);
}
.ht:not(:last-of-type)::before { content: "·"; position: absolute; right: -.42em; color: rgba(246, 241, 233, .35); }
@keyframes ht-line { 0% { transform: scaleX(0); } 6%, 18% { transform: scaleX(1); } 24%, 100% { transform: scaleX(0); transform-origin: right; } }
.hero .cat-dom.ht { color: #E5AE45; } .hero .cat-dom.ht::after { background: #E5AE45; }
.hero .cat-budownictwo.ht { color: #C9967B; } .hero .cat-budownictwo.ht::after { background: #C9967B; }
.ht-rest { color: rgba(246, 241, 233, .6); font-style: italic; font-weight: 500; }
.hero-text { font-size: 1.15rem; color: rgba(246, 241, 233, .74); max-width: 46ch; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.hero-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
	font-size: .86rem; font-weight: 600; text-decoration: none; color: var(--h-ink);
	background: rgba(246, 241, 233, .06); box-shadow: inset 0 0 0 1px rgba(246, 241, 233, .14);
	transition: background-color .2s, transform .2s, box-shadow .2s;
}
.chip .pk-icon { width: 18px; height: 18px; color: var(--cat); }
.chip:hover { background: var(--cat); color: #fff; box-shadow: none; transform: translateY(-2px); }
.chip:hover .pk-icon { color: #fff; }

/* Stos wyróżnionych wpisów */
.hero-stack { position: relative; padding: 0 0 70px 40px; }
.hero-feature { position: relative; transform: rotate(1.6deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hero-feature::before {
	content: ""; position: absolute; inset: 0; border-radius: 28px; background: var(--cat);
	transform: rotate(-5deg) translate(-14px, 14px); opacity: .9; z-index: -1; transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.hero-stack:hover .hero-feature { transform: rotate(0); }
.hero-stack:hover .hero-feature::before { transform: rotate(-7deg) translate(-22px, 20px); }
.hero-feature-link { position: relative; display: block; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.4; color: #fff; text-decoration: none; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.hero-feature-link:hover { color: #fff; }
.hero-feature-media { position: absolute; inset: 0; background: color-mix(in srgb, var(--cat) 30%, #222); }
.hero-feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.hero-feature-link:hover img { transform: scale(1.05); }
.hero-feature-media .thumb-placeholder .pk-icon { max-width: 120px; }
.hero-feature-body {
	position: absolute; inset: auto 0 0 0; padding: 120px 30px 30px; display: flex; flex-direction: column; gap: 12px;
	background: linear-gradient(to top, rgba(10, 12, 18, .92) 0%, rgba(10, 12, 18, .6) 55%, transparent 100%);
}
.hero-feature-top { display: flex; gap: 8px; }
.cat-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--cat); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pill-light { background: #fff; color: #14171F; }
.hero-feature-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }
.hero-feature-meta { font-size: .85rem; opacity: .75; }

.hero-mini { position: absolute; z-index: 2; width: min(300px, 70%); animation: float 6s ease-in-out infinite; }
.hero-mini a {
	display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px 16px 12px 12px;
	background: var(--card); color: var(--ink); border-radius: 18px; text-decoration: none;
	box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); border-left: 4px solid var(--cat); transition: transform .3s;
}
.hero-mini a:hover { transform: translateY(-4px) scale(1.02); color: var(--ink); }
.hero-mini-thumb { position: relative; display: block; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--cat) 15%, var(--paper-2)); }
.hero-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-mini-thumb .pk-icon { width: 28px; }
.hero-mini-cat { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cat); margin-bottom: 2px; }
.hero-mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-serif); font-weight: 600; font-size: .98rem; line-height: 1.25; }
.hero-mini-1 { left: -10px; bottom: 0; }
.hero-mini-2 { right: -24px; top: 34px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.hero-scroll { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(246, 241, 233, .3); }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--h-ink); animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Wejście elementów */
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.hero-copy > :nth-child(6) { animation-delay: .4s; }
.hero-stack { animation: rise 1s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 1020px) {
	.hero { padding: 64px 0 96px; }
	.hero-inner { grid-template-columns: 1fr; gap: 56px; }
	.hero-stack { max-width: 560px; padding-left: 20px; }
	.hero-feature-link { aspect-ratio: 4 / 3.4; }
	.hero-mini-2 { right: -8px; }
}
@media (max-width: 560px) {
	.hero { padding: 44px 0 80px; margin-bottom: 48px; }
	.hero-title { max-width: none; }
	.hero-ctas .btn { flex: 1; }
	.hero-stack { padding: 0 0 0 8px; }
	.hero-feature-link { aspect-ratio: 4 / 4.2; border-radius: 22px; }
	.hero-feature::before { border-radius: 22px; }
	.hero-feature-body { padding: 90px 20px 22px; }
	.hero-mini { position: relative; inset: auto; width: 100%; margin-top: 14px; animation: none; }
	.hero-mini-1 { margin-top: 34px; }
	.hero-scroll { display: none; }
}
/* Poprawki hero */
.chip { padding: 6px 12px 6px 9px; font-size: .82rem; gap: 6px; }
.chip .pk-icon { width: 16px; height: 16px; }
.hero-chips { gap: 7px; }
.hero-inner { grid-template-columns: 1.15fr .95fr; gap: 56px; }
@media (max-width: 1020px) { .hero-inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hero-ctas { flex-direction: column; } .hero-ctas .btn { width: 100%; white-space: nowrap; } }

/* Ramka „Nasza rada” we wpisach */
.entry-content .pk-tip {
	position: relative; padding: 20px 22px 20px 58px; border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--cat) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--cat) 30%, transparent);
	font-size: 1rem; line-height: 1.6;
}
.entry-content .pk-tip::before {
	content: "!"; position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 50%;
	display: grid; place-items: center; background: var(--cat); color: #fff; font-weight: 700; font-size: .9rem;
}
.entry-content .pk-tip strong { color: var(--cat); }
.cat-none .entry-content .pk-tip { --cat: var(--accent); }

/* Linki prawne w stopce */
.legal-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-nav a { text-decoration: none; }
.legal-nav a:hover { text-decoration: underline; }
.entry-content mark { background: #FFF1B8; color: #1F2430; padding: .1em .3em; border-radius: 4px; }
