:root {
	--fngo-text: #202124;
	--fngo-background: #ffffff;
	--fngo-primary: #174c3c;
	--fngo-accent: #c98224;
	--fngo-muted: #f3f5f4;
	--fngo-border: #dfe4e1;

	--fngo-content: 760px;
	--fngo-wide: 1200px;
}

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

html {
	font-size: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--fngo-background);
	color: var(--fngo-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.65;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--fngo-primary);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration-thickness: 0.14em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--fngo-accent);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	top: 0;
	left: -9999px;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: var(--fngo-text);
	color: #fff;
}

.skip-link:focus {
	top: 1rem;
	left: 1rem;
}

.site-header {
	border-bottom: 1px solid var(--fngo-border);
}

.site-header__inner,
.site-footer__inner {
	width: min(100% - 2rem, var(--fngo-wide));
	margin-inline: auto;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 72px;
}

.site-title {
	color: var(--fngo-text);
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}

.primary-menu,
.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu a,
.footer-menu a {
	text-decoration: none;
}

.site-main {
	padding-block: 3rem;
}

.content-container {
	width: min(100% - 2rem, var(--fngo-content));
	margin-inline: auto;
}

.entry {
	margin-bottom: 3rem;
}

.entry-title {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.2;
}

.entry-title a {
	color: var(--fngo-text);
	text-decoration: none;
}

.entry-summary > :first-child {
	margin-top: 0;
}

.site-footer {
	margin-top: 4rem;
	padding-block: 2rem;
	border-top: 1px solid var(--fngo-border);
}

@media (max-width: 700px) {
	.site-header__inner {
		align-items: flex-start;
		flex-direction: column;
		padding-block: 1rem;
	}

	.primary-menu {
		gap: 0.75rem 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Single article */

.single-entry__header {
	margin-bottom: 2.5rem;
}

.single-entry__title {
	margin: 0 0 1.25rem;
	font-size: clamp(2rem, 6vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.single-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-bottom: 2rem;
	color: #5f6368;
	font-size: 0.875rem;
}

.single-entry__featured-image {
	margin: 2rem 0;
}

.single-entry__featured-image img {
	display: block;
	width: 100%;
	height: auto;
}

.single-entry__content {
	font-size: 1.0625rem;
}

.single-entry__content > :first-child {
	margin-top: 0;
}

.single-entry__content h2 {
	margin-top: 2.75rem;
	margin-bottom: 1rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.2;
}

.single-entry__content h3 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	font-size: 1.375rem;
	line-height: 1.3;
}

.single-entry__content p,
.single-entry__content ul,
.single-entry__content ol,
.single-entry__content blockquote {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

.single-entry__content li + li {
	margin-top: 0.5rem;
}

/* Breadcrumbs */

.breadcrumbs {
	margin-bottom: 1.5rem;
	color: #5f6368;
	font-size: 0.875rem;
	line-height: 1.5;
}

.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.breadcrumbs__item {
	display: flex;
	align-items: center;
}

.breadcrumbs__item + .breadcrumbs__item::before {
	margin-inline: 0.5rem;
	color: #8a8f8c;
	content: "›";
}

.breadcrumbs a {
	color: var(--fngo-primary);
}

.breadcrumbs__item--current {
	color: #5f6368;
}

/* Article lead */

.single-entry__lead {
	margin-bottom: 1.5rem;
	color: var(--fngo-text);
	font-size: 1.25rem;
	line-height: 1.55;
}

.single-entry__lead > :first-child {
	margin-top: 0;
}

.single-entry__lead > :last-child {
	margin-bottom: 0;
}


/* Article TOC */
/* Finansowanie NGO — article table of contents */
.article-toc {
    margin: 0 0 2.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--fngo-border);
    border-left: 4px solid var(--fngo-primary);
    border-radius: 0.5rem;
    background: var(--fngo-muted);
    overflow-wrap: anywhere;
}

.article-toc__title {
    margin: 0 0 1.125rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--fngo-border);
    color: var(--fngo-text);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
}

.article-toc__list,
.article-toc__sublist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-toc__list {
    counter-reset: toc-section;
}

.article-toc__item {
    position: relative;
    padding-left: 2.5rem;
    counter-increment: toc-section;
}

.article-toc__item + .article-toc__item {
    margin-top: 0.875rem;
}

.article-toc__item::before {
    position: absolute;
    top: 0.125rem;
    left: 0;
    content: counter(toc-section, decimal-leading-zero);
    color: var(--fngo-primary);
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.article-toc a {
    color: var(--fngo-primary);
    text-decoration: none;
    line-height: 1.5;
}

.article-toc__item > a {
    font-weight: 650;
}

.article-toc a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.article-toc a:focus-visible {
    text-decoration: underline;
    outline: 3px solid var(--fngo-accent);
    outline-offset: 3px;
}

.article-toc__sublist {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--fngo-border);
}

.article-toc__sublist li + li {
    margin-top: 0.375rem;
}

.article-toc__sublist a {
    display: inline-block;
    font-size: 0.9375rem;
    font-weight: 400;
}

.single-entry__content h2[id],
.single-entry__content h3[id] {
    scroll-margin-top: 1.5rem;
}

@media (max-width: 700px) {
    .article-toc {
        margin-bottom: 2rem;
        padding: 1.125rem 1rem;
    }

    .article-toc__title {
        font-size: 1.125rem;
    }

    .article-toc__item {
        padding-left: 2rem;
    }

    .article-toc__sublist {
        padding-left: 0.75rem;
    }
}

/* NGO checklist — scoped to the article checklist only */

.single-entry__content ul.fngo-checklist {
    list-style: none;
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--fngo-muted);
    border: 1px solid var(--fngo-border);
    border-left: 4px solid var(--fngo-primary);
    border-radius: 0.375rem;
}

.single-entry__content .fngo-checklist > li {
    list-style: none;
    margin: 0;
    padding: 0.625rem 0;
    line-height: 1.55;
}

.single-entry__content .fngo-checklist > li + li {
    margin-top: 0;
    border-top: 1px solid var(--fngo-border);
}

@media (max-width: 700px) {
    .single-entry__content ul.fngo-checklist {
        padding: 0.75rem 1rem;
    }
}

/* NGO article comparison table */

.single-entry__content figure.wp-block-table {
    max-width: 100%;
    margin: 0 0 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--fngo-border);
    border-radius: 0.375rem;
}

.single-entry__content figure.wp-block-table table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.single-entry__content figure.wp-block-table th,
.single-entry__content figure.wp-block-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid var(--fngo-border);
    overflow-wrap: normal;
}

.single-entry__content figure.wp-block-table thead th {
    background: var(--fngo-primary);
    color: #ffffff;
    font-weight: 650;
}

.single-entry__content figure.wp-block-table tbody tr:nth-child(even) {
    background: var(--fngo-muted);
}

.single-entry__content figure.wp-block-table tbody tr:last-child td {
    border-bottom: 0;
}

.single-entry__content figure.wp-block-table tbody td:first-child {
    font-weight: 650;
    color: var(--fngo-primary);
}

@media (max-width: 700px) {
    .single-entry__content figure.wp-block-table table {
        min-width: 760px;
    }

    .single-entry__content figure.wp-block-table th,
    .single-entry__content figure.wp-block-table td {
        padding: 0.75rem;
    }
}

/* Comparison table: fit desktop, scroll on narrow screens */

@media (min-width: 701px) {
    .single-entry__content figure.wp-block-table table {
        min-width: 0;
        table-layout: auto;
    }
}
