:root {
	--bg-page: #fffdf6;
	--bg-soft: #f5f0e3;
	--line: #e7e0cd;
	--text: #2b2922;
	--muted: #7a7464;
	--accent: #6b5d2f;
	--accent-soft: #ece4cc;
	--radius: 14px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	min-height: 100vh;
	padding: 56px 16px 0 16px;
	background: #3A372D radial-gradient(ellipse at top, #4A463A 0%, #3A372D 50%, #2B2922 100%) fixed;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--accent);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(107, 93, 47, 0.35);
	transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
	color: var(--text);
	text-decoration-color: currentColor;
}

h1, h2, h3, h4 {
	color: var(--text);
	line-height: 1.25;
}

h2 {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 24px;
}

h3 {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 12px;
}

p {
	margin-bottom: 1.5em;
}

ul {
	margin-bottom: 1.5em;
	list-style: none;
}

br.clearfix {
	display: none;
}

/* Stránka */

#wrapper {
	max-width: 1040px;
	margin: 0 auto;
	background: var(--bg-page);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* Hlavička */

#header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	padding: 36px 48px;
	border-bottom: 1px solid var(--line);
}

#logo h1 {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

#logo a {
	color: var(--text);
	font-weight: inherit;
	text-decoration: none;
}

#menu ul {
	display: flex;
	gap: 8px;
	margin: 0;
}

#menu a {
	display: block;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
}

#menu a:hover {
	background: var(--bg-soft);
	color: var(--text);
}

#menu li.active a {
	background: var(--accent-soft);
	color: var(--accent);
}

/* Obsah */

#page {
	display: grid;
	grid-template-columns: 240px 1fr;
	align-items: start;
	gap: 40px;
	padding: 40px 48px 48px 48px;
}

#sidebar {
	padding: 24px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 12px;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--muted);
}

#sidebar h3 {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

#sidebar p {
	margin: 0;
}

#content .box > p {
	margin: 0;
}

#content table {
	width: 100%;
	border-collapse: collapse;
}

#content td {
	padding: 14px 12px;
	font-size: 0.9375rem;
	border-top: 1px solid var(--line);
	vertical-align: top;
}

#content tr:first-child td {
	border-top: 0;
}

#content td:first-child {
	width: 1%;
	padding-right: 24px;
	white-space: nowrap;
	font-size: 0.875rem;
	line-height: 1.85;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}

#content tr:hover td {
	background: var(--bg-soft);
}

/* Patička */

#page-bottom {
	padding: 24px 48px;
	background: var(--bg-soft);
	border-top: 1px solid var(--line);
	text-align: center;
}

#page-bottom h3 {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--muted);
}

#footer {
	padding: 24px 0 40px 0;
	text-align: center;
	font-size: 0.8125rem;
	color: #A39E88;
}

#footer a {
	color: #C9C3AA;
}

@media (prefers-color-scheme: light) {
	body {
		background: #9E9884 radial-gradient(ellipse at top, #ADA792 0%, #9E9884 50%, #8A8471 100%) fixed;
	}

	#footer {
		color: #4A4536;
	}

	#footer a {
		color: #2E2B22;
	}
}

/* Mobil */

@media (max-width: 760px) {
	body {
		padding: 0;
	}

	#wrapper {
		border-radius: 0;
	}

	#header {
		padding: 24px 20px;
	}

	#logo h1 {
		font-size: 1.625rem;
	}

	#page {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 28px 20px 32px 20px;
	}

	#content {
		order: -1;
	}

	#content td {
		padding: 12px 8px;
	}

	#content td:first-child {
		padding-right: 12px;
	}

	#page-bottom {
		padding: 20px;
	}
}
