/*
Theme Name: Przyspiesz Redakcja
Description: Motyw redakcyjny dla Przyspieszkomputer.pl, z przewodnikiem po objawach i szablonami poradników.
Version: 1.1.5
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: przyspiesz-redakcja
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

:root {
	color-scheme: light;
	--paper: #f7f7fb;
	--surface: #fff;
	--ink: #14182d;
	--muted: #4e556d;
	--brand: #303b87;
	--brand-dark: #222a65;
	--line: #dce0ed;
	--line-dark: #4d579a;
	--soft: #edf0fb;
	--accent: #cdd7ff;
	--shell: 1200px;
	--copy: 760px;
	--masthead-height: 82px;
	--masthead-scrolled-height: 64px;
	--toolbar-height: 0px;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-synthesis: none;
}

:root:has(body.admin-bar) { --toolbar-height: 32px; }
@media (max-width: 782px) {
	:root:has(body.admin-bar) { --toolbar-height: 46px; }
}
@media (max-width: 600px) {
	:root:has(body.admin-bar) { --toolbar-height: 0px; }
}

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

body {
	margin: 0;
	min-width: 280px;
	background: var(--paper);
	color: var(--ink);
	font-size: 16px;
	line-height: 1.6;
}

h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; overflow-wrap: anywhere; }

a {
	color: var(--brand);
	text-underline-offset: .18em;
	text-decoration-thickness: .08em;
}

a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #5466cf; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }

img { display: block; max-inline-size: 100%; block-size: auto; }
iframe, video, embed, object { max-inline-size: 100%; }
input, textarea, select, button { font: inherit; }
button, summary { cursor: pointer; }

.screen-reader-text {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

.skip-link {
	position: fixed;
	z-index: 20;
	top: 12px;
	inset-inline-start: 12px;
	transform: translateY(calc(-100% - 16px));
	clip-path: inset(50%);
	background: var(--surface);
	padding: .7rem 1rem;
	font-weight: 750;
}

.skip-link:focus { transform: none; clip-path: none; }

#main-content, #main-content [id] {
	scroll-margin-block-start: calc(var(--masthead-height) + var(--toolbar-height) + 1.2rem);
}

.pk-shell {
	width: min(var(--shell), calc(100% - 72px));
	margin-inline: auto;
}

.site-header {
	position: sticky;
	z-index: 12;
	inset-block-start: var(--toolbar-height);
	background: var(--surface);
	border-block-end: 1px solid var(--line);
}

.site-header.is-scrolled {
	margin-block-end: calc(var(--masthead-height) - var(--masthead-scrolled-height));
	background: #fafaff;
	box-shadow: 0 4px 16px rgb(25 33 70 / 9%);
}

.masthead {
	position: relative;
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr) max-content;
	gap: clamp(1rem, 4vw, 3.5rem);
	align-items: center;
	min-height: var(--masthead-height);
}

.site-header.is-scrolled .masthead { min-height: var(--masthead-scrolled-height); }

.site-brand {
	display: flex;
	align-items: center;
	padding-block: .55rem;
}

.custom-logo-link {
	display: block;
	border-radius: 3px;
	overflow: hidden;
	line-height: 0;
}

.custom-logo {
	width: auto;
	height: 52px;
	max-width: 180px;
	object-fit: contain;
}

.site-header.is-scrolled .site-brand { padding-block: .3rem; }
.site-header.is-scrolled .custom-logo { height: 38px; }

.brand-fallback {
	font-size: 1.02rem;
	font-weight: 850;
	letter-spacing: -.04em;
	color: var(--brand-dark);
	text-decoration: none;
}

.topic-menu, .topic-menu .sub-menu, .footer-menu, .symptoms ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.topic-menu {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .35rem clamp(.5rem, 2vw, 1.9rem);
}

.topic-menu li { position: relative; }

.topic-menu a {
	display: block;
	padding: .68rem .2rem;
	color: var(--ink);
	font-size: .88rem;
	line-height: 1.3;
	text-decoration: none;
	font-weight: 690;
}

.topic-menu a:hover, .topic-menu a[aria-current] { color: var(--brand); text-decoration: underline; }

.topic-menu .sub-menu {
	display: none;
	position: absolute;
	z-index: 4;
	top: 100%;
	left: 0;
	min-width: 12rem;
	padding: .4rem .7rem;
	border: 1px solid var(--line);
	background: var(--surface);
}

.topic-menu li:hover > .sub-menu,
.topic-menu li:focus-within > .sub-menu { display: block; }

.header-tools {
	display: flex;
	align-items: center;
	gap: .45rem;
}

.mobile-menu { display: none; }

.header-tools summary {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	min-height: 44px;
	padding: .45rem .8rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--brand-dark);
	font-size: .875rem;
	font-weight: 720;
	list-style: none;
}

.header-tools summary::-webkit-details-marker { display: none; }
.header-tools summary:hover, .header-tools details[open] summary { background: var(--soft); }

.menu-icon {
	position: relative;
	flex: none;
	width: 14px;
	height: 12px;
	border-block: 1.5px solid currentColor;
}

.menu-icon::after {
	position: absolute;
	inset: 50% 0 auto;
	border-top: 1.5px solid currentColor;
	transform: translateY(-50%);
	content: "";
}

.search-icon {
	position: relative;
	display: block;
	width: 13px;
	height: 13px;
	margin-inline-end: 2px;
	border: 1.6px solid currentColor;
	border-radius: 50%;
}

.search-icon::after {
	position: absolute;
	right: -4px;
	bottom: -3px;
	width: 5px;
	height: 1.6px;
	transform: rotate(47deg);
	background: currentColor;
	content: "";
}

.search-panel, .mobile-menu-panel {
	position: absolute;
	z-index: 6;
	top: calc(100% + 1px);
	inset-inline-end: 0;
	width: min(400px, 100%);
	padding: .8rem;
	border: 1px solid var(--line);
	background: var(--surface);
	box-shadow: 0 8px 22px rgb(25 33 70 / 9%);
}

.mobile-menu-panel {
	max-height: min(70vh, 28rem);
	overflow-y: auto;
	padding: .3rem .8rem;
}

.search-form {
	display: flex;
	align-items: stretch;
	gap: .4rem;
	max-width: 36rem;
}

.search-form input {
	width: 100%;
	min-width: 0;
	padding: .65rem .85rem;
	border: 1px solid #aeb5cd;
	border-radius: 3px;
	color: var(--ink);
	background: var(--surface);
}

.pk-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .8em;
	min-height: 46px;
	padding: .65rem 1.05rem;
	border: 1px solid transparent;
	border-radius: 3px;
	background: var(--brand);
	color: #fff;
	font-size: .92rem;
	font-weight: 735;
	line-height: 1.35;
	text-decoration: none;
}

.pk-button:hover { background: var(--brand-dark); text-decoration: none; }
.pk-button span { font-size: 1.16em; }

.site-main { min-block-size: 57vh; padding-block-end: clamp(3.5rem, 8vw, 6.75rem); }

.home-intro {
	display: grid;
	grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 5.5rem);
	padding-block: clamp(2.7rem, 7vw, 5.4rem) clamp(2.1rem, 5.3vw, 4.15rem);
}

.home-intro-copy:only-child { grid-column: 1 / -1; }

.section-label {
	display: flex;
	align-items: center;
	gap: .6em;
	margin-block-end: 1.05rem;
	color: var(--brand);
	font-size: .73rem;
	font-weight: 800;
	letter-spacing: .105em;
	text-transform: uppercase;
}

.section-label span { width: 1.65rem; height: 2px; background: currentColor; }

.home-intro h1 {
	max-width: 12ch;
	font-size: clamp(3rem, 5.15vw, 5rem);
	font-weight: 820;
	line-height: 1.01;
	letter-spacing: -.048em;
	word-spacing: .038em;
	text-wrap: balance;
}

.home-lead {
	max-width: 43ch;
	margin-block-start: 1.25rem;
	color: var(--muted);
	font-size: clamp(1rem, 1.5vw, 1.16rem);
	line-height: 1.58;
}

.home-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .65rem 1.2rem;
	margin-block-start: 1.6rem;
}

.hub-link { font-size: .92rem; font-weight: 720; }

.symptoms {
	position: relative;
	overflow: hidden;
	padding: 1.35rem clamp(1.05rem, 2.3vw, 1.85rem) .95rem;
	border-top: 4px solid #6977c5;
	border-radius: 3px;
	background: var(--brand-dark);
	color: #fff;
}

.symptoms h2 {
	margin-block-end: .8rem;
	font-size: clamp(1.24rem, 2vw, 1.54rem);
	font-weight: 785;
	letter-spacing: -.027em;
}

.symptoms li { border-block-start: 1px solid var(--line-dark); }

.symptoms a {
	display: grid;
	grid-template-columns: 1.3rem minmax(0, 1fr) auto;
	align-items: center;
	gap: .75rem;
	min-height: 53px;
	padding: .62rem .18rem;
	color: #fff;
	font-size: .91rem;
	font-weight: 650;
	line-height: 1.3;
	text-decoration: none;
}

.symptoms a:hover { background: #303b87; }
.symptoms a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.row-arrow { color: var(--accent); font-size: 1.1em; }

.symptom-icon {
	position: relative;
	justify-self: center;
	width: 13px;
	height: 13px;
	color: var(--accent);
	border: 1.5px solid currentColor;
	border-radius: 2px;
}

.symptom-icon::after { position: absolute; content: ""; }
.icon-start { border-radius: 50%; }
.icon-start::after { width: 1.5px; height: 6px; left: 4px; top: -3px; background: currentColor; }
.icon-disk::after { width: 5px; height: 1px; inset: auto 2px 2px auto; background: currentColor; }
.icon-browser::after { inset: 2px 0 auto; border-top: 1px solid currentColor; }
.icon-heat { width: 7px; height: 14px; border-radius: 8px; }
.icon-heat::after { width: 3px; height: 5px; left: .5px; bottom: 1px; border-radius: 9px; background: currentColor; }

.section-heading {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-block-end: 1.05rem;
}

.section-heading::after { flex: 1; height: 1px; background: var(--line); content: ""; }

.section-heading h2 {
	font-size: clamp(1.35rem, 2.3vw, 1.85rem);
	letter-spacing: -.034em;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.3vw, 1.4rem);
}

.post-grid > .pk-category-description {
	grid-column: 1 / -1;
	justify-self: center;
	inline-size: 100%;
	max-inline-size: var(--copy);
}

.publication-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: var(--surface);
}

.card-image { position: relative; flex: none; aspect-ratio: 16 / 8.3; background: var(--soft); }
.card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.05rem 1.15rem 1.15rem;
}

.card-topic {
	display: inline-block;
	color: var(--brand);
	font-size: .7rem;
	font-weight: 820;
	letter-spacing: .05em;
	line-height: 1.25;
	text-decoration: none;
	text-transform: uppercase;
}

.card-topic:hover { text-decoration: underline; }
.card-title { margin: .45rem 0 .55rem; font-size: clamp(1.05rem, 1.55vw, 1.28rem); letter-spacing: -.025em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); text-decoration: underline; }

.card-excerpt {
	margin-block-end: .65rem;
	color: var(--muted);
	font-size: .875rem;
	line-height: 1.55;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .85rem;
	color: var(--muted);
	font-size: .8rem;
}

.entry-meta a { color: inherit; font-weight: 650; }
.card-text .entry-meta { margin-block-start: auto; padding-block-start: .35rem; font-size: .74rem; }

.pagination, .comments-pagination { margin-block-start: 1.8rem; }
.pagination .nav-links, .comments-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 42px;
	padding: .35rem .6rem;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--surface);
	color: var(--brand-dark);
	font-size: .86rem;
	font-weight: 680;
	text-decoration: none;
}

.page-numbers.current, .page-numbers:is(a):hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-numbers.dots { border-color: transparent; background: transparent; }

.listing-header { padding-block: clamp(2.1rem, 5.5vw, 4rem) 1.5rem; }
.listing-header h1, .article-header h1 {
	font-size: clamp(2.15rem, 4.2vw, 3.5rem);
	font-weight: 810;
	line-height: 1.07;
	letter-spacing: -.043em;
	word-spacing: .024em;
}

.listing-header p { max-width: 58ch; margin-block: .85rem; color: var(--muted); }
.listing-header .search-form { margin-block-start: 1rem; }
.empty-message { margin-block: .8rem; }

.hub-header {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.6rem, 5vw, 4rem);
	padding-block-end: clamp(2rem, 4.5vw, 3rem);
}

.hub-header .pk-button { margin-block-start: .35rem; }

.reading-layout { padding-block-start: clamp(1.6rem, 4vw, 3.25rem); }
.breadcrumbs, .article-header, .entry-content, .comments-area {
	width: min(var(--copy), 100%);
	margin-inline: auto;
}

.breadcrumbs {
	margin-block-end: 1.1rem;
	color: var(--muted);
	font-size: .78rem;
	overflow-wrap: anywhere;
}

.breadcrumbs > span { margin-inline: .35rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.article-header h1 { margin-block: .35rem 1rem; }
.article-header .entry-meta { margin-block-end: 1.35rem; }
.article-image { width: min(992px, 100%); margin: 0 auto clamp(1.25rem, 4vw, 2.5rem); }
.article-image img {
	margin-inline: auto;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: min(66vh, 42rem);
}

.entry-content {
	color: #242941;
	font-size: clamp(1rem, 1.55vw, 1.12rem);
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.entry-content > * + * { margin-block-start: 1.05em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
	margin-block: 1.48em .45em;
	color: var(--ink);
	letter-spacing: -.025em;
}

.entry-content h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.entry-content h3 { font-size: clamp(1.23rem, 2.5vw, 1.62rem); }

.entry-content [data-pkred-toc-label] {
	margin: 0;
	color: var(--ink);
	font-size: 1.3rem;
	font-weight: 750;
	line-height: 1.25;
}

.pkred-entry-toc {
	margin-block-end: 1.35rem;
	border: 1px solid var(--line);
	border-inline-start: 3px solid var(--brand);
	border-radius: 3px;
	background: var(--surface);
	color: var(--ink);
}

.pkred-entry-toc summary {
	padding: .72rem .95rem;
	color: var(--brand-dark);
	font-size: .94rem;
	font-weight: 770;
}

.pkred-entry-toc summary:hover { background: var(--soft); }
.pkred-entry-toc summary:focus-visible { outline-offset: -3px; }

.entry-content .pkred-entry-toc ol {
	margin: 0 .95rem .85rem;
	padding: .45rem 0 0 1.45rem;
	border-top: 1px solid var(--line);
	font-size: .92rem;
	line-height: 1.5;
}

.pkred-entry-toc li a { display: inline-block; padding-block: .17rem; }
.pkred-entry-toc .pkred-toc-subsection { margin-inline-start: 1.18rem; }

.entry-content ul, .entry-content ol { padding-inline-start: 1.55em; }
.entry-content li + li { margin-block-start: .27em; }
.entry-content figure { max-width: 100%; }
.entry-content figcaption { color: var(--muted); font-size: .78em; }

.entry-content :is(.wp-block-table, .pkred-table-scroll) {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto !important; /* Some legacy table-only boxes set inline overflow: hidden. */
	overscroll-behavior-inline: contain;
}

.entry-content .pkred-table-scroll:focus-visible { outline-offset: 2px; }
.entry-content .wp-block-table table { width: 100%; }
.entry-content .pkred-table-scroll > table { max-width: none; overflow-wrap: normal; hyphens: auto; }
.entry-content table { max-width: 100%; border-collapse: collapse; font-size: .9em; }
.entry-content :is(th, td) { padding: .55em .7em; border: 1px solid #b9c0d8; text-align: start; }
.entry-content th { background: var(--soft); color: var(--brand-dark); }

.entry-content blockquote {
	margin-inline: 0;
	padding: .35em 0 .35em 1em;
	border-inline-start: 3px solid var(--brand);
}

.entry-content pre { overflow: auto; padding: .85em; background: var(--soft); }
.entry-content :not(pre) > code { padding: .08em .24em; background: var(--soft); }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content :is(.alignwide, .alignfull) { max-width: 100%; }

.entry-content + *, .archive-description, .home-content, .related-posts, .comments-area { margin-block-start: clamp(2.2rem, 5vw, 4.3rem); }

.home-description, .category-description {
	padding: clamp(1.05rem, 4vw, 2rem);
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--surface);
}

.home-description #home-description-heading { margin-block: 0 .45rem; }
.description-details { margin-block-start: .9rem; }
.description-details > summary {
	width: fit-content;
	min-height: 44px;
	padding: .35rem .7rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--brand-dark);
	font-weight: 720;
}

.description-details > summary:hover { background: var(--soft); }
.description-details:not([open]) .description-collapse,
.description-details[open] .description-expand { display: none; }
.description-body { margin-block-start: 1.2rem; }

.comments-area .comment-list { padding-inline-start: 1.25rem; }
.comment-list .avatar { float: inline-start; margin-inline-end: .55rem; }
.comment-list article { padding-block: .8rem; border-block-end: 1px solid var(--line); }
.comment-list .comment-content { clear: both; padding-block-start: .35rem; }
.comment-form :is(input:not([type="checkbox"]), textarea) { display: block; max-width: 100%; }
.comment-form p { margin-block: .7rem; }

.site-footer { border-top: 1px solid var(--line); background: var(--soft); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1.8rem; }
.footer-brand a { color: var(--brand-dark); font-weight: 820; text-decoration: none; }
.footer-brand p, .footer-menu a { color: var(--muted); font-size: .84rem; }
.footer-menu { display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; }
.footer-tools { display: flex; justify-content: flex-end; }

.back-to-top {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	box-shadow: 0 3px 14px rgb(25 33 70 / 22%);
	font-size: 1.4rem;
	line-height: 1;
	text-decoration: none;
}

.back-to-top.is-floating {
	position: fixed;
	z-index: 11;
	right: calc(1rem + env(safe-area-inset-right, 0px));
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.back-to-top:not(.is-floating) { margin-block-end: 1rem; }
.back-to-top:hover { background: var(--brand-dark); }
.back-to-top[hidden] { display: none; }

@media (max-width: 959px) {
	:root { --masthead-scrolled-height: var(--masthead-height); }
	.pk-shell { width: min(var(--shell), calc(100% - 48px)); }
	.masthead { gap: .3rem 1.35rem; }
	.topic-menu { gap: .1rem .9rem; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	:root { --masthead-height: 66px; --masthead-scrolled-height: 54px; }
	.pk-shell { width: calc(100% - 36px); }
	.masthead { grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
	.site-brand .custom-logo-link { min-width: 0; }
	.site-brand .custom-logo { height: 46px; max-width: 100%; }
	.site-brand .brand-fallback { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.header-tools summary { gap: .45rem; padding-inline: .65rem; }
	.site-navigation { display: none; }
	.mobile-menu { display: block; }
	.mobile-menu-panel .topic-menu { display: block; }
	.mobile-menu-panel .topic-menu > li + li { border-top: 1px solid var(--line); }
	.mobile-menu-panel .topic-menu a { display: flex; align-items: center; min-block-size: 44px; padding: .65rem .3rem; }
	.mobile-menu-panel .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 .25rem .9rem; border: 0; }
	.mobile-menu-panel .sub-menu a { color: var(--muted); font-size: .8rem; }
	.home-intro, .hub-header { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
	.home-intro { padding-block-start: 2.25rem; }
	.home-intro h1 { max-width: 14ch; }
	.symptoms { padding-block: .9rem .55rem; }
}

@media (max-width: 539px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); }
	.card-image { aspect-ratio: 16 / 7.4; }
	.home-intro h1 { font-size: clamp(2.45rem, 11vw, 3.25rem); }
}

