* {
	box-sizing: border-box;
}

:root {
	--bg: #f7f3ea;
	--surface: #ffffff;
	--surface-2: #efe7d8;
	--text: #25221d;
	--muted: #6f675d;
	--line: #ddd0bd;
	--primary: #7b4e2c;
	--primary-strong: #563419;
	--shadow: 0 18px 50px rgba(48, 34, 21, .13);
}

html[data-theme="dark"] {
	--bg: #282d36;
	--surface: #333946;
	--surface-2: #252a33;
	--text: #f1ede5;
	--muted: #c8bdae;
	--line: #49505e;
	--primary: #d0a06d;
	--primary-strong: #efc28c;
	--shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

body {
	margin: 0;
	/*font-family: Georgia, "Times New Roman", serif;*/
	font-family: "Poppins", 'Open Sans', "Helvetica Neue",Helvetica,Arial,sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

.photo-gallery-block {
	font-family: "Poppins", 'Open Sans', "Helvetica Neue",Helvetica,Arial,sans-serif;
}

main {
	font-family: Georgia, "Times New Roman", serif;
}

.theme-toggle .fa-sun
{
    color: #f0ad4e;
}

.theme-toggle .fa-moon {
    color: #33648d;
}

html[data-theme="dark"] .theme-toggle .fa-moon {
    color: #417eb3;
}

.theme-toggle .fa-sun
{
    color: #f0ad4e;
}

.hero-home .hero-content {
	padding: clamp(24px, 5vw, 42px);
}

.hero-lead {
	font-size: clamp(18px, 2.8vw, 22px);
	line-height: 1.55;
	color: var(--muted);
}

.home-action-grid,
.router-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 28px;
	font-family: "Poppins", 'Open Sans', "Helvetica Neue",Helvetica,Arial,sans-serif;
}

.home-action,
.router-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;	
	gap: 6px;
	min-height: 132px;
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: var(--surface-2);
	color: var(--text);
	text-decoration: none;
}

.home-action i,
.router-card i {
	font-size: 32px;
	color: var(--primary);
}

.home-action strong,
.router-card strong {
	font-size: 18px;
	line-height: 1.25;
}

.home-action span,
.router-card span {
	font-size: 14px;
	line-height: 1.35;
	color: var(--muted);
}

.home-action.primary,
.router-card.primary {
	background: var(--primary);
	color: var(--surface);
	border-color: var(--primary);
}

.home-action.primary i,
.home-action.primary span,
.router-card.primary i,
.router-card.primary span {
	color: var(--surface);
}

@media (max-width: 700px) {
	.hero {
		margin-top: 16px;
		padding: 16px;
	}

	.hero-photo-card {
		display: none;
	}

	.home-action-grid,
	.router-grid {
		grid-template-columns: 1fr;
	}

	.home-action,
	.router-card {
		min-height: auto;
		padding: 18px;
	}

	.hero-stats {
		grid-template-columns: 1fr;
	}
}

.evtz-family-tree {
	font-family: "Poppins", 'Open Sans', "Helvetica Neue",Helvetica,Arial,sans-serif;
}

a {
	color: var(--primary);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.site-nav {
	max-width: 1180px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 18px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--text);
	min-width: 230px;
}

.brand-logo {
    height: 69px;
}

.brand-mark {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--primary);
	color: var(--surface);
	font-weight: 700;
	font-size: 22px;
}

.brand strong,
.brand small {
	display: block;
}

.brand small {
	color: var(--muted);
	font-size: 12px;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.nav-links a,
.lang-switcher a,
.theme-toggle,
.nav-toggle {
	border: 1px solid transparent;
	background: transparent;
	color: var(--text);
	text-decoration: none;
	border-radius: 20px;
	padding: 8px 10px;
	font: inherit;
	cursor: pointer;
	text-align: center;
}

.lang-switcher a {
	padding: 4px 4px;
}

.lang-switcher a .lang-flag {
	width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: grayscale(30%) saturate(70%);
    opacity: .75;
    transition: filter .2s ease, opacity .2s ease, transform .2s ease, box-shadow .2s ease;
	border: 1px solid var(--line);
}

footer .lang-switcher a .lang-flag {
	border-color: #1d1a17;
}


.lang-switcher a.is-active .lang-flag {
    filter: grayscale(0) saturate(110%);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--primary);
}

footer .lang-switcher a.is-active .lang-flag {
    box-shadow: 0 0 0 2px #1d1a17, 0 0 0 5px var(--primary);
}

.lang-switcher a:hover .lang-flag {
    filter: grayscale(0) saturate(90%);
    opacity: 1;
    transform: scale(1.05);
}
.nav-links a.is-active,
.nav-links a:hover,
.theme-toggle:hover {
	background: var(--surface-2);
	border-color: var(--line);
}

.nav-tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lang-switcher {
	display: flex;
	gap: 2px;
}

.nav-toggle {
	display: none;
}

.hero {
	max-width: 1180px;
	margin: 34px auto 0;
	padding: 50px 20px;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
	gap: 28px;
	align-items: center;
}

.hero-content,
.hero-photo-card,
.section,
.info-card,
.photo-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 28px;
	box-shadow: var(--shadow);
}

.hero-content {
	padding: 42px;
}

.hero-blazon {
	max-width: 100%
}

h1,
h2,
h3 {
	line-height: 1.18;
	margin-top: 0;
}

h1 {
	font-size: clamp(24px, 7vw, 48px);
	margin-bottom: 16px;
}

h2 {
	font-size: clamp(16px, 4vw, 32px);
}

.hero-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 24px;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid var(--line);
}

.button.primary {
	background: var(--primary);
	color: var(--surface);
	border-color: var(--primary);
}

.button.ghost {
	background: var(--surface-2);
	color: var(--text);
}

.hero-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-top: 28px;
}

.hero-stats div {
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--surface-2);
}

.hero-stats strong,
.hero-stats span {
	display: block;
}

.hero-stats span {
	font-size: 13px;
	color: var(--muted);
}

.hero-photo-card {
	overflow: hidden;
	margin: 0;
}

.hero-photo-card img,
.photo-card img {
	width: 100%;
	display: block;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.hero-photo-card figcaption,
.photo-card figcaption {
	padding: 14px 18px;
	color: var(--muted);
}

.section {
	max-width: 1180px;
	margin: 28px auto;
	padding: 34px;
}

.prose {
	font-size: 18px;
}

.prose h1,
.prose h2,
.prose h3 {
	margin-top: 24px;
}

.prose code {
	background: var(--surface-2);
	padding: 2px 6px;
	border-radius: 6px;
}

.section-heading {
	margin-bottom: 20px;
}

.hero-stats {
	grid-template-columns: 1fr;
}

.timeline {
	position: relative;
	display: block;
	max-width: 920px;
	margin: 0 auto;
	padding: 24px 0;
}

.timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 4px;
	background: var(--primary);
	transform: translateX(-50%);
	border-radius: 999px;
	opacity: .45;
}

.timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 110px 1fr;
	align-items: center;
	gap: 18px;
	margin: 0 0 28px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.timeline-item > span {
	grid-column: 2;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	min-height: 62px;
	margin: 0 auto;
	background: var(--surface);
	border: 3px solid var(--primary);
	border-radius: 14px;
	box-shadow: 6px 6px 0 var(--surface-2);
	color: var(--primary);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
}

.timeline-item > div {
	position: relative;
	background: var(--surface);
	border: 2px solid var(--line);
	border-radius: 18px;
	padding: 18px 20px;
	box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) > div {
	grid-column: 1;
	grid-row: 1;
	text-align: right;
}

.timeline-item:nth-child(even) > div {
	grid-column: 3;
	grid-row: 1;
	text-align: left;
}

.timeline-item > div::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 18px;
	height: 18px;
	background: var(--surface);
	border: 2px solid var(--line);
	transform: translateY(-50%) rotate(45deg);
}

.timeline-item:nth-child(odd) > div::after {
	right: -11px;
	border-left: 0;
	border-bottom: 0;
}

.timeline-item:nth-child(even) > div::after {
	left: -11px;
	border-right: 0;
	border-top: 0;
}

.timeline-item h3 {
	margin: 0 0 8px;
	font-size: 1.05rem;
}

.timeline-item p:empty {
	display: none;
}

.timeline-item small {
	display: block;
	margin-top: 10px;
	color: var(--muted);
	font-size: .85rem;
}

@media (max-width: 900px) {
	.timeline::before {
		left: 36px;
		transform: none;
	}

	.timeline-item {
		grid-template-columns: 72px 1fr;
		gap: 14px;
	}

	.timeline-item > span {
		grid-column: 1;
		width: 68px;
		min-height: 52px;
		font-size: 16px;
	}

	.timeline-item > div,
	.timeline-item:nth-child(odd) > div,
	.timeline-item:nth-child(even) > div {
		grid-column: 2;
		grid-row: 1;
		text-align: left;
	}

	.timeline-item > div::after,
	.timeline-item:nth-child(odd) > div::after,
	.timeline-item:nth-child(even) > div::after {
		left: -11px;
		right: auto;
		border: 2px solid var(--line);
		border-right: 0;
		border-top: 0;
	}
}
.cards-grid,
.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 18px;
}

.info-card
{
	display: flex;
	flex-direction: column;

	padding: 22px;
	box-shadow: none;

	height: 100%;
}
.document-links
{
	margin-top: auto;
	padding-top: 1rem;
	font-size: 12px;
	text-align: right;
}

.info-card > span {
	color: var(--primary);
	font-weight: 700;
}

.text-link {
	font-weight: 700;
	text-decoration: none;
	display: block;
	line-height: 2.5;
}

.photo-card {
	overflow: hidden;
	margin: 0;
	box-shadow: none;
}

.photo-card figcaption strong,
.photo-card figcaption span {
	display: block;
}

.photo-card figcaption span {
	color: var(--muted);
	font-size: 13px;
}
html[data-theme="dark"] .photo-card figcaption span {
	color: var(--surface-2);
}
.container
{
	width: 100%;
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

@media (max-width: 900px) {
	.site-nav {
		flex-wrap: wrap;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.nav-links.is-open {
		display: flex;
	}

	.hero {
		grid-template-columns: 1fr;
		padding-top: 20px;
	}

	.hero-content,
	.section {
		padding: 24px;
	}

	.hero-stats,
	.timeline-item {
		grid-template-columns: 1fr;
	}
}

/* Navegação em níveis */
.nav-item {
	position: relative;
}

.nav-parent {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nav-chevron {
	font-size: 10px;
	opacity: .7;
}

.nav-item.is-active > .nav-parent,
.nav-item:hover > .nav-parent {
	background: var(--surface-2);
	border-color: var(--line);
}

.nav-submenu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--surface);
	box-shadow: var(--shadow);
	display: none;
	z-index: 50;
}

.nav-submenu::before {
	content: "";
	position: absolute;
	left: 0;
	top: -12px;
	width: 100%;
	height: 12px;
}

.nav-item:hover .nav-submenu,
.nav-item:focus-within .nav-submenu {
	display: grid;
	gap: 4px;
}

.nav-submenu a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	white-space: nowrap;
	border-radius: 14px;
}

.nav-submenu a.is-active,
.nav-submenu a:hover {
	background: var(--surface-2);
}

.prauchner-map {
	width: 100%;
	height: 540px;
	border: 1px solid var(--line);
	border-radius: 28px;
	box-shadow: var(--shadow);
	overflow: hidden;
}

.map-popup {
	max-width: 280px;
}

.map-popup strong,
.map-popup small,
.map-popup em {
	display: block;
}

.map-popup small {
	margin-top: 4px;
	opacity: .75;
}

.map-popup em {
	margin-top: 4px;
	font-style: normal;
	opacity: .85;
}

.map-popup p {
	margin: 10px 0;
}

.map-popup a {
	font-weight: 700;
}

@media (max-width: 768px) {
	.prauchner-map {
		height: 420px;
		border-radius: 22px;
	}
}

.genealogy-map {
	min-height: 640px;
	border: 1px solid var(--line);
	border-radius: 24px;
	overflow: hidden;
	background: var(--surface-2);
}

.map-canvas {
	min-height: 640px;
}

.genealogy-map:has(.map-side) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.map-side {
	max-height: 640px;
	overflow: auto;
	padding: 12px;
	border-left: 1px solid var(--line);
	background: var(--surface);
}

.map-side-item {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface-2);
	color: var(--text);
	padding: 12px;
	margin-bottom: 10px;
	text-align: left;
	cursor: pointer;
	font: inherit;
}

.map-side-item:hover {
	border-color: var(--primary);
}

.map-side-item span,
.map-side-item strong,
.map-side-item small {
	display: block;
}

.map-side-item span {
	color: var(--primary);
	font-weight: 700;
	font-size: 12px;
}

.map-side-item small {
	color: var(--muted);
}

.map-popup {
	max-width: 310px;
	line-height: 1.45;
	color: #25221d;
}

.map-popup h3 {
	font-size: 17px;
	margin-bottom: 6px;
}

.map-popup small {
	color: #6f675d;
}

.map-fallback {
	padding: 20px;
}

.map-warning {
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--surface);
}

.map-event-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
}

.map-event-card {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--surface);
}

.map-event-card span {
	color: var(--primary);
	font-weight: 700;
}

.genealogy-panel .evtz-family-tree {
	margin-top: 20px;
}

article.article-history,
.page-container,
section.privacy-policy {
	font-family: Georgia, serif;
	margin: 2rem auto; 
	padding: 0 clamp(2px, 2vw, 1.5rem);
	line-height: 1.75;
}

article.article-history header .meta,
.page-container header .meta
{
	margin-top: 18px;
	padding-top: 18px;

	border-top: 1px solid var(--line);

	font-size: clamp(13px, 1vw, 15px);
	line-height: 1.7;

	color: var(--text-muted);

	text-align: right;
	margin-left: auto;
	max-width: 760px;
	opacity: .75;
}
article.article-history h1,
.page-container h1,
section.privacy-policy h1
{
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.15;
	margin-bottom: 22px;
}

article.article-history h2,
.page-container h2,
section.privacy-policy h2
{
	font-size: clamp(22px, 2.5vw, 30px);
	line-height: 1.2;
	margin-top: 42px;
	margin-bottom: 16px;
}

article.article-history h3,
.page-container h3,
section.privacy-policy h3
{
	font-size: clamp(18px, 2vw, 24px);
	line-height: 1.25;
	margin-top: 32px;
	margin-bottom: 12px;
}

article.article-history h4,
.page-container h4,
section.privacy-policy 4
{
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.3;
	margin-top: 24px;
	margin-bottom: 10px;
}

article.article-history p,
.page-container p,
section.privacy-policy p
{
	font-size: clamp(18px, 1.15vw, 19px);
	line-height: 1.85;
	margin-bottom: 22px;
}
article.article-history blockquote,
.page-container blockquote,
section.privacy-policy blockquote
{
	margin: clamp(28px, 4vw, 48px) 0;
	padding: clamp(14px, 2vw, 24px) clamp(16px, 3vw, 28px);
	border-left: 5px solid var(--line);
	background: rgba(255,255,255,.03);
	border-radius: 0 clamp(8px, 1vw, 14px) clamp(8px, 1vw, 14px) 0;
}

article.article-history blockquote p:last-child
{
	margin-bottom: 0;
}
article.article-history p.subtitle {
    color: var(--muted);
    font-style: italic;
}
article.article-history .article-sources {
	font-size: clamp(13px, 1.5vw, 16px);
}
article.article-history .article-sources a {
	text-decoration: none;
}
article.article-history .article-sources a:hover {
	text-decoration: underline;
}

article.article-history .article-sources ul,
footer.site-footer .footer-links {
	list-style: none;
	padding-left: 10px;
}

article.article-history .article-sources li,
footer.site-footer .footer-links li
{
	position: relative;
	padding-left: 20px;
	margin-bottom: 8px;
}

article.article-history .article-sources li::before,
footer.site-footer .footer-links li::before {
	content: "\f0da";
	font-family: "Font Awesome 7 Free";
	font-weight: 900;
	position: absolute;
	left: 0;
	top: 2px;
}
article.article-history .article-note {
	font-style: italic;
	opacity: .75;
	text-align: right;
}
.article-history .article-image
{
	margin: 32px 0;
	text-align: center;
}

.article-history .article-image a
{
	display: block;
}

.article-history .article-image img
{
	display: block;
	width: 100%;
	max-width: 920px;
	max-height: 520px;
	margin: 0 auto;
	object-fit: cover;

	border-radius: 12px;

	box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.article-history .article-image figcaption
{
	margin-top: 12px;

	font-size: .92rem;
	line-height: 1.5;

	color: #666666;
	font-style: italic;
}

@media (max-width: 768px)
{
	.article-history .article-image img
	{
		max-height: 320px;
		border-radius: 10px;
	}
}

.article-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(128, 128, 128, .25);
}

.article-nav a {
	text-decoration: none;
	font-weight: 600;
}

.article-nav-next {
	margin-left: auto;
	text-align: right;
}

.kicker {
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: 12px;
	color: var(--primary);
	font-weight: 700;
}

/*
article.article-history h2 + p::first-letter
{
	font-family: 'UnifrakturCook', 'Old English Text MT', serif;
	font-size: 3.8em;
	line-height: .8;
	float: left;
	margin:
		8px
		10px
		0
		0;
	font-weight: 700;
}
*/

.site-footer
{
	width: 100%;
	margin-top: 80px;
	background: #1d1a17;
	color: #d4cab8;
	border-top: 1px solid rgba(255,255,255,.08);
}

.footer-inner
{
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 60px 20px;

	display: grid;
	grid-template-columns: 2fr 1fr 1.3fr 1.3fr;
	gap: 40px;
}

.footer-column h4
{
	color: #f2e7d2;
	font-size: 16px;
	margin: 0 0 18px;
}

.footer-column p,
.footer-column li,
.footer-column a
{
	color: #cfc6b8;
	font-size: 13px;
	line-height: 1.5;
}

.footer-column a
{
	text-decoration: none;
}

.footer-column a:hover
{
	color: #ffffff;
}

.footer-logo {
	width: 200px;
	background-color: #efe7d8;
	border: 1px solid #ddd0bd;
	border-radius: 25px;
	padding: 8px 16px;
}

.footer-links
{
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links li
{
	margin-bottom: 8px;
}

.footer-bottom
{
	border-top: 1px solid rgba(255,255,255,.08);
	background: rgba(0,0,0,.22);
	padding: 18px 20px;
	text-align: center;
}

.footer-bottom p
{
	margin: 0 0 6px;
	font-size: 13px;
	color: #978d7f;
}

.footer-bottom a
{
	font-size: 13px;
	color: #cfc6b8;
	text-decoration: none;
}

.footer-bottom a:hover
{
	color: #ffffff;
}

.site-footer .lang-switcher {
	margin-top: 25px;
}

@media (max-width: 900px)
{
	.footer-inner
	{
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px)
{
	.footer-inner
	{
		grid-template-columns: 1fr;
	}
}
@media (max-width: 900px) {
	.site-nav {
		max-height: 100vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.nav-links {
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.nav-links .nav-item,
	.nav-links .nav-parent {
		width: 100%;
	}

	.nav-parent {
		justify-content: center;
	}

	.nav-submenu {
		position: static;
		display: none;
		box-shadow: none;
		margin: 4px 0 8px;
		background: var(--surface-2);
	}

	.nav-item:hover .nav-submenu,
	.nav-item:focus-within .nav-submenu {
		display: grid;
	}

	.genealogy-map:has(.map-side) {
		grid-template-columns: 1fr;
	}

	.map-side {
		max-height: none;
		border-left: 0;
		border-top: 1px solid var(--line);
	}
}

@media (max-width: 900px) {
	.site-nav {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.brand {
		width: 100%;
	}

	.nav-tools {
		width: 100%;
		margin: 12px 0;
		justify-content: center;
	}

	.nav-links {
		width: 100%;
	}
}
.photo-gallery-toolbar
{
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 18px;
}

.photo-view-btn
{
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	border-radius: 999px;
	padding: 7px 14px;
	cursor: pointer;
}

.photo-view-btn.active
{
	background: var(--surface-2);
	color: var(--text);
	border-color: var(--line);
}

.photo-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
}

.photo-card
{
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	background: var(--surface-2);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.photo-open-btn
{
	display: block;
	width: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

.photo-open-btn img
{
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

.photo-card figcaption
{
	padding: 14px;
	font-size: 13px;
}

.photo-grid.gallery-mode .photo-card figcaption {
	display: none;
}

.photo-card figcaption p{
	font-size: 12px;
}

.photo-card figcaption strong
{
	display: block;
	margin-bottom: 4px;
}

.photo-card figcaption span
{
	display: block;
	font-size: 13px;
	opacity: 0.75;
	margin-bottom: 8px;
}

.photo-card figcaption p
{
	margin: 0;
}

.photo-grid.gallery-mode .photo-card figcaption p
{
	display: none;
}

.photo-lightbox
{
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(40, 45, 54, 0.94);
	padding: 24px;
}

.photo-lightbox.open
{
	display: flex;
}

.photo-lightbox-inner
{
	width: min(1100px, 100%);
	max-height: 95vh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 14px;
}

.photo-lightbox-header,
.photo-lightbox-footer
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: #ffffff;
}

.photo-lightbox-title strong
{
	display: block;
}

.photo-lightbox-title span
{
	display: block;
	font-size: 13px;
	opacity: 0.8;
}

.photo-lightbox-image-wrap
{
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}

.photo-lightbox-image
{
	max-width: 100%;
	max-height: 72vh;
	object-fit: contain;
	border-radius: 12px;
	background: #ffffff;
}

.photo-lightbox-actions
{
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.photo-lightbox button,
.photo-lightbox a
{
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	border-radius: 999px;
	padding: 8px 13px;
	text-decoration: none;
	cursor: pointer;
}

.photo-lightbox .active
{
	background: #ffffff;
	color: #282d36;
}
.photo-people {
	font-size: 11px;
}
.photo-group-section,
.document-group-section
{
	margin-top: 3rem;
}

.photo-group-section:first-of-type.
.document-group-section:first-of-type
{
	margin-top: 1.5rem;
}

.photo-group-header
{
	margin-bottom: 1.25rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid rgba(120, 100, 70, 0.22);
}

.photo-group-header h2
{
	margin: 0;
	font-size: clamp(1.45rem, 2.4vw, 2rem);
	line-height: 1.2;
}

.photo-group-header p
{
	max-width: 760px;
	margin: 0.45rem 0 0;
	opacity: 0.78;
	line-height: 1.55;
}

.photo-tags
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.8rem;
}

.photo-tags
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.85rem;
}

.photo-tag
{
	display: inline-flex;
	align-items: center;
	justify-content: center;

	padding: 0.32rem 0.75rem;

	border-radius: 999px;

	background: #ede3d2;
	border: 1px solid #d2c2aa;

	color: #6b5438;

	font-size: 0.65rem !important;
	font-weight: 700;
	line-height: 1;

	letter-spacing: 0.02em;
	text-transform: lowercase;

	white-space: nowrap;

	box-shadow:
		0 1px 0 rgba(255,255,255,0.55) inset,
		0 1px 2px rgba(0,0,0,0.08);
}

.photo-tag::before
{
	content: "#";
	margin-right: 0.22rem;
	opacity: 0.55;
	font-weight: 900;
}

.photo-tag:hover
{
	transform: translateY(-1px);

	background: #e5d7c1;
	border-color: #c5b292;

	box-shadow:
		0 2px 6px rgba(0,0,0,0.12);
}

html.dark .photo-tag
{
	background: #3a342c;
	border-color: #5a5144;
	color: #eadfcd;

	box-shadow:
		0 1px 0 rgba(255,255,255,0.04) inset,
		0 1px 2px rgba(0,0,0,0.25);
}

html.dark .photo-tag:hover
{
	background: #4a4339;
	border-color: #6d6253;
}
.document-thumb
{
	display: block;

	width: 100%;

	margin-bottom: 1rem;

	overflow: hidden;

	border-radius: 10px;
}

.document-thumb img
{
	display: block;

	width: 100%;
	max-width: 250px;
    margin: auto;

	aspect-ratio: 4 / 3;

	object-fit: cover;
	object-position: top center;

	border-radius: 10px;

	box-shadow:
		0 4px 12px rgba(0,0,0,0.12);

	border: 1px solid rgba(0,0,0,0.08);
}
.document-notes-overlay
{
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.72);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 9999;

	opacity: 0;
	visibility: hidden;
	transition: .2s ease;
}

.document-notes-overlay.active
{
	opacity: 1;
	visibility: visible;
}

.document-notes-popup
{
	position: relative;
	width: min(720px, 100%);
	max-height: 90vh;
	overflow-y: auto;

	background: var(--bg);
	border-radius: 18px;
	padding: 32px;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

html.dark .document-notes-popup
{
	background: #282d36;
	color: #ffffff;
}

.document-notes-close
{
	position: absolute;
	top: 14px;
	right: 14px;

	border: 0;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
	color: inherit;
}

.document-notes-title
{
	margin-top: 0;
	margin-bottom: 18px;
	font-size: 24px;
	line-height: 1.2;
}

.document-notes-content
{
	line-height: 1.7;
	white-space: pre-line;
}

body.notes-popup-open
{
	overflow: hidden;
}
.form-response {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	display: none;
	border: 1px solid var(--line);
}

.form-response.success,
.form-response.error {
	display: block;
}

.form-response.success {
	background: color-mix(in srgb, #2f8f46 18%, var(--surface));
	color: var(--text);
}

.form-response.error {
	background: color-mix(in srgb, #b83a3a 18%, var(--surface));
	color: var(--text);
}

.contribute-page .contribute-form,
.contact-page .contact-form {
	margin-top: 2rem;
}

.contribute-page .form-grid,
.contact-page .form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 1.5rem;
}

.contribute-page .form-full,
.contact-page .form-full {
	grid-column: 1 / -1;
}

.contribute-page .contribute-form label,
.contact-page .contact-form label {
	display: block;
}

.contribute-page .contribute-form label span,
.contact-page .contact-form label span {
	display: block;
	margin-bottom: .45rem;
	font-weight: 700;
	color: var(--text);
}

.contribute-page .contribute-form input,
.contribute-page .contribute-form select,
.contribute-page .contribute-form textarea,
.contact-page .contact-form input,
.contact-page .contact-form select,
.contact-page .contact-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: .85rem .95rem;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	font: inherit;
	color: var(--text);
}

.contribute-page .contribute-form input::placeholder,
.contribute-page .contribute-form textarea::placeholder,
.contact-page .contact-form input::placeholder,
.contact-page .contact-form textarea::placeholder {
	color: var(--muted);
}

.contribute-page .contribute-form textarea,
.contact-page .contact-form textarea {
	min-height: 150px;
	resize: vertical;
}

.contribute-page .contribute-form input[type="file"],
.contact-page .contact-form input[type="file"] {
	padding: .7rem;
	background: var(--surface);
	color: var(--text);
}

.contribute-page .contribute-form small,
.contact-page .contact-form small {
	display: block;
	margin-top: .45rem;
	color: var(--muted);
	font-size: .9rem;
}

.contribute-page .submit-button,
.contact-page .submit-button {
	margin-top: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .9rem 1.4rem;
	border: 1px solid var(--primary);
	border-radius: 999px;
	background: var(--primary);
	color: var(--surface);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.contribute-page .submit-button:hover,
.contact-page .submit-button:hover {
	background: var(--primary-strong);
	border-color: var(--primary-strong);
}

@media (max-width: 720px) {
	.contribute-page .form-grid,
	.contact-page .form-grid {
		grid-template-columns: 1fr;
	}
}
.contact-form,
.contribute-form {
	position: relative;
}

.contact-form.is-processing::before,
.contribute-form.is-processing::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 10;
	border-radius: 16px;
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(2px);
}

html[data-theme="dark"] .contact-form.is-processing::before,
html[data-theme="dark"] .contribute-form.is-processing::before {
	background: rgba(40, 45, 54, .78);
}

.contact-form.is-processing::after,
.contribute-form.is-processing::after {
	content: attr(data-processing-text);
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 11;
	transform: translate(-50%, -50%);
	padding: .85rem 1.15rem;
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--line);
	box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
	font-weight: 700;
}

.footer-logo
{
	display: block;
	width: 200px;
	margin: 0 auto 18px;

	background-color: #efe7d8;
	border: 1px solid #ddd0bd;
	border-radius: 25px;
	padding: 8px 16px;
}
.mobile-app-nav
{
	display: none;
}


@media (max-width: 768px)
{
	body
	{
		padding-bottom: 92px;
	}

	footer {
		display: none;
	}

	.mobile-app-nav
	{
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		align-items: end;
		gap: 4px;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
		background: var(--surface);
		border-top: 1px solid var(--line);
		box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14);
	}

	.mobile-app-nav-item
	{
		min-width: 0;
		min-height: 58px;
		padding: 7px 4px 6px;
		border-radius: 18px;
		border: 1px solid transparent;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		color: var(--muted);
		text-decoration: none;
		font-size: 0.72rem;
		line-height: 1.1;
		-webkit-tap-highlight-color: transparent;
	}

	.mobile-app-nav-icon
	{
		font-size: 1.25rem;
		line-height: 1;
	}

	.mobile-app-nav-label
	{
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.mobile-app-nav-item.is-home
	{
	/*	position: relative;
		top: -14px;
		width: 64px;
		height: 64px;
		justify-self: center;
		border-radius: 50%;
		background: var(--accent);
		color: #ffffff;*/
		box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
	}

	.mobile-app-nav-item.is-home .mobile-app-nav-icon
	{
		font-size: 1.45rem;
	}

	.mobile-app-nav-item.is-home .mobile-app-nav-label
	{
		font-size: 0.68rem;
	}

	.mobile-app-nav-item:active
	{
		transform: translateY(1px);
	}
	
	.nav-toggle {
        display: none;
    }

    .nav-tools {
        margin: 0;
	}		

}

.mobile-app-nav-item.active {
    background-color: var(--surface-2);
	border-color: var(--line);
}

.router-page
{
	padding-bottom: 110px;
}

.router-header
{
	text-align: center;
	margin-bottom: 24px;
}

.documents-block .info-card
{
	text-align: center;
}

.documents-block .info-card .document-thumb
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 110px;
	margin: 10px auto 16px auto;
}

.documents-block .info-card .document-thumb img
{
	display: block;
	max-width: 120px;
	max-height: 90px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.documents-block .info-card h3
{
	text-align: center;
	margin-bottom: 12px;
}

/*
.router-grid
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
}
*/
/*
.router-card
{
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	min-height: 72px;
	border-radius: 22px;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	color: var(--text);
	text-decoration: none;
}

.router-card-icon
{
	width: 44px;
	height: 44px;
	border-radius: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--surface-soft);
	color: var(--accent);
	font-size: 1.25rem;
	flex: 0 0 auto;
}

.router-card-label
{
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
}
*/
.markdown-toc
{
	margin: 0 0 2rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--primary-rgba-20);
	border-radius: 12px;
	background: var(--primary-rgba-10);
}

.markdown-toc strong
{
	display: block;
	margin-bottom: 0.75rem;
	font-size: 1.1rem;
	color: var(--primary);
}

.markdown-toc ul
{
	margin: 0;
	padding: 0;
	list-style: none;
}

.markdown-toc li
{
	margin: 0.25rem 0;
	line-height: 1.35;
}

.markdown-toc a
{
	color: inherit;
	text-decoration: none;
}

.markdown-toc a:hover
{
	color: var(--primary);
	text-decoration: underline;
}

.markdown-toc .toc-level-1
{
	margin-left: 0;
	font-weight: 700;
}

.markdown-toc .toc-level-2
{
	margin-left: 1rem;
	font-weight: 600;
}

.markdown-toc .toc-level-3
{
	margin-left: 2rem;
	font-size: 0.95rem;
}

.markdown-toc .toc-level-4
{
	margin-left: 3rem;
	font-size: 0.9rem;
	opacity: 0.85;
}

@media (max-width: 700px)
{
	.markdown-toc
	{
		padding: 1rem;
	}

	.markdown-toc .toc-level-2
	{
		margin-left: 0.75rem;
	}

	.markdown-toc .toc-level-3
	{
		margin-left: 1.5rem;
	}

	.markdown-toc .toc-level-4
	{
		margin-left: 2.25rem;
	}
}