/* ==========================================================================
   Formuláře ke stažení – společný styl (světlý i tmavý vzhled)
   ========================================================================== */

:root {
	color-scheme: light;

	--orange: #ff8118;
	--orange-600: #e06a03;
	--orange-50: #fff4ea;
	--orange-line: #ffd9b8;
	--blue: #448ccb;
	--blue-600: #2f76b5;
	--blue-50: #eef5fc;
	--green: #1ec29d;
	--green-600: #0f9a7b;
	--green-50: #e8f8f4;
	--red-600: #c62828;
	--red-50: #fdecec;

	--bg: #f7f8fb;
	--card: #ffffff;
	--line: #e3e6ec;
	--line-strong: #d3d8e1;
	--text: #121826;
	--text-body: #222938;
	--muted: #3a4252;
	--subtle: #5a6273;

	--radius: 14px;
	--radius-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
	--shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);

	--page: 1180px;
	--header-h: 68px;
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

:root[data-theme="dark"] {
	color-scheme: dark;

	--orange-600: #ff9d4d;
	--orange-50: rgba(255, 129, 24, .13);
	--orange-line: rgba(255, 129, 24, .3);
	--blue-600: #78b4ea;
	--blue-50: rgba(68, 140, 203, .17);
	--green-600: #45d6b3;
	--green-50: rgba(30, 194, 157, .14);
	--red-600: #ff8a8e;
	--red-50: rgba(229, 72, 77, .16);

	--bg: #0e131b;
	--card: #161c27;
	--line: #263040;
	--line-strong: #36425a;
	--text: #eef1f6;
	--text-body: #d3d9e3;
	--muted: #b3bccb;
	--subtle: #8f99ab;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
	--shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
	--shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
}

/* ---------- Základ ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); transition: background-color .2s; }

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	font-weight: 450;
	line-height: 1.6;
	letter-spacing: -.003em;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--orange-600); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 24px; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 26px; height: 26px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 14px; border-radius: 8px; background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.skip-link:focus { left: 8px; }

body,
.site-header,
.cat-card,
.group,
.prose,
.aside-box { transition: background-color .2s, border-color .2s, color .2s; }

/* ---------- Hlavička ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--card) 88%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header .page { position: relative; display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand .logo { width: 34px; height: 34px; flex: none; }
.brand .logo .cut { fill: var(--card); }

.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 550; white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--text); }
body[data-section="skupiny"] .nav a[data-nav="skupiny"],
body[data-section="vydavatele"] .nav a[data-nav="vydavatele"],
body[data-section="pojistovny"] .nav a[data-nav="pojistovny"] { color: var(--text); background: var(--bg); }

.header-search { position: relative; margin-left: auto; width: 280px; }
.header-search > .icon { position: absolute; left: 13px; top: 12px; color: var(--subtle); pointer-events: none; }
.header-search input {
	width: 100%;
	height: 40px;
	padding: 0 14px 0 38px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg);
	font: inherit;
	font-size: 14px;
	color: var(--text);
	outline: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-search input:focus { background: var(--card); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }

.icon-btn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--muted);
	cursor: pointer;
	flex: none;
	transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--orange); border-color: var(--line-strong); }
.icon-btn .icon { width: 19px; height: 19px; }
.header-search + .icon-btn { margin-left: -16px; }
.search-toggle { display: none; }

.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* ---------- Výsledky hledání ---------- */

.search-results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	min-width: 320px;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	text-align: left;
	z-index: 60;
}
.header-search .search-results { left: auto; width: 440px; }
.search-results a,
.search-results .search-msg {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 16px;
	color: var(--text);
	border-bottom: 1px solid var(--line);
	font-size: 15px;
	line-height: 1.35;
}
.search-results a:last-child { border-bottom: 0; }
.search-results a .icon { color: var(--subtle); }
.search-results a span { flex: 1; min-width: 0; }
.search-results a small { display: block; margin-top: 2px; color: var(--subtle); font-size: 12.5px; }
.search-results a mark { background: none; color: var(--orange-600); font-weight: 700; }
.search-results a:hover,
.search-results a.is-active { background: var(--orange-50); }
.search-results .search-msg { color: var(--muted); border-bottom: 0; }
.search-results .search-more { position: sticky; bottom: 0; justify-content: center; color: var(--subtle); font-size: 13px; background: var(--card); border-top: 1px solid var(--line); }

/* ---------- Tlačítka ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 20px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 650;
	font-size: 15px;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	transition: background .15s, box-shadow .15s, transform .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 129, 24, .28); }
.btn--primary:hover { background: #ec6f05; color: #fff; transform: translateY(-1px); }
.btn--ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--lg { min-height: 54px; padding: 10px 28px; font-size: 16px; }
.btn--block { width: 100%; }
[data-theme="dark"] .btn--primary { box-shadow: 0 6px 18px rgba(255, 129, 24, .22); }

/* ---------- Úvodní stránka ---------- */

.hero {
	position: relative;
	padding: 72px 0 56px;
	background:
		radial-gradient(600px 300px at 85% 0%, rgba(68, 140, 203, .10), transparent 70%),
		radial-gradient(500px 260px at 10% 10%, rgba(255, 129, 24, .10), transparent 70%),
		var(--card);
	border-bottom: 1px solid var(--line);
	text-align: center;
}
[data-theme="dark"] .hero {
	background:
		radial-gradient(600px 300px at 85% 0%, rgba(68, 140, 203, .16), transparent 70%),
		radial-gradient(500px 260px at 10% 10%, rgba(255, 129, 24, .12), transparent 70%),
		var(--card);
}

.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--green-50); color: var(--green-600); font-size: 13px; font-weight: 650; margin-bottom: 20px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -.035em; max-width: 820px; margin: 0 auto 16px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }

.search-xl { position: relative; max-width: 680px; margin: 0 auto; }
.search-xl > .icon { position: absolute; left: 22px; top: 21px; color: var(--subtle); width: 22px; height: 22px; pointer-events: none; }
.search-xl input {
	width: 100%;
	height: 64px;
	padding: 0 150px 0 56px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	box-shadow: var(--shadow-lg);
	font: inherit;
	font-size: 17px;
	color: var(--text);
	outline: none;
}
.search-xl input:focus { border-color: var(--blue); }
.search-xl .btn { position: absolute; right: 8px; top: 8px; min-height: 48px; }

.popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; color: var(--subtle); }
.popular a { padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.popular a:hover { border-color: var(--orange); color: var(--orange-600); }

.stats { display: flex; justify-content: center; gap: 48px; margin-top: 44px; flex-wrap: wrap; }
.stats div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.stats .icon { color: var(--green); }
.stats strong { color: var(--text); }

.section { padding: 56px 0; }
.section--tight { padding-top: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: 26px; font-weight: 700; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }

.cat-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.cat-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cat-card__head a { color: var(--text); font-weight: 650; font-size: 18px; line-height: 1.3; }
.cat-card__head a:hover { color: var(--orange-600); }
.cat-card__img,
.cat-hero__img { flex: none; display: grid; place-items: center; width: 64px; height: 64px; }
.cat-card__img img,
.cat-hero__img img { display: block; max-width: none; }
.cat-card__head .count { display: block; margin-top: 2px; font-size: 13px; font-weight: 550; color: var(--subtle); }
.cat-card__links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cat-card__links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.cat-card__links a .icon { opacity: 0; transform: translateX(-4px); transition: .15s; color: var(--orange); }
.cat-card__links a:hover { color: var(--text); }
.cat-card__links a:hover .icon { opacity: 1; transform: none; }
.cat-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; font-weight: 650; color: var(--orange-600); }

.tile { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; flex: none; }
.tile--orange { background: var(--orange-50); color: var(--orange); }
.tile--blue { background: var(--blue-50); color: var(--blue); }
.tile--green { background: var(--green-50); color: var(--green-600); }
.tile--sm { width: 36px; height: 36px; border-radius: 10px; }

.chip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chip-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.chip-panel h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 16px; }
.chip-panel h2 a { color: var(--text); }
.chip-panel h2 a:hover { color: var(--orange-600); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 7px 14px; border-radius: 999px; background: var(--bg); border: 1px solid transparent; color: var(--text); font-size: 14px; }
.chips a:hover { background: var(--card); border-color: var(--blue); color: var(--blue-600); }

.promo {
	position: relative;
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 32px;
	align-items: center;
	padding: 40px;
	border-radius: 20px;
	background: linear-gradient(135deg, #1f2a44 0%, #2a3b63 100%);
	color: #fff;
	overflow: hidden;
}
.promo::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 129, 24, .45), transparent 70%); }
.promo > * { position: relative; z-index: 1; }
.promo h2 { font-size: 28px; margin-bottom: 10px; }
.promo p { color: #c8d0e0; margin: 0 0 20px; }
.promo ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.promo li { display: flex; gap: 10px; align-items: center; color: #e6ebf5; }
.promo li .icon { color: var(--green); }
[data-theme="dark"] .promo { background: linear-gradient(135deg, #1b2740 0%, #24345a 100%); border: 1px solid var(--line-strong); }

/* ---------- Drobečková navigace ---------- */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 18px 0; font-size: 14px; color: var(--subtle); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--orange-600); }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs > span:last-child { color: var(--text); }

/* ---------- Stránka skupiny ---------- */

.cat-hero { background: var(--card); border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.cat-hero__row { display: flex; align-items: center; gap: 18px; }
.cat-hero__row .tile { width: 60px; height: 60px; border-radius: 16px; }
.cat-hero h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 700; margin: 0; }
.cat-hero__sub { margin: 4px 0 0; color: var(--muted); }

.filter { display: block; position: relative; margin-top: 24px; max-width: 520px; }
.filter input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--text); background: var(--bg); outline: none; }
.filter input:focus { background: var(--card); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.filter .icon { position: absolute; left: 15px; top: 14px; color: var(--subtle); pointer-events: none; }

.layout-side { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 36px 0 64px; align-items: start; }

.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin-bottom: 10px; }
.toc a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; line-height: 1.35; border-left: 2px solid transparent; }
.toc a:hover { background: var(--card); color: var(--text); }
.toc a.is-active { background: var(--card); color: var(--text); border-left-color: var(--orange); font-weight: 650; }
.toc a small { color: var(--subtle); font-weight: 450; }

/* Seznam z generátoru (bez JavaScriptu zůstane plochý, ale čitelný) */
.cat-list > hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0 0; }
.cat-list > h2 { font-size: 20px; margin: 18px 0 4px; }
.cat-list > h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--subtle); margin: 18px 0 6px; }

.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 12px; margin-bottom: 22px; }
.group > h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; padding: 16px 16px 4px; margin: 0; }
.group > h2 .count { font-size: 13px; font-weight: 650; color: var(--subtle); background: var(--bg); padding: 2px 10px; border-radius: 999px; }
.group > h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--subtle); padding: 18px 16px 6px; margin: 0; }

.form-item { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 10px; color: var(--text); font-size: 15px; line-height: 1.4; }
.form-item > .icon:first-child { color: var(--subtle); }
.form-item .ver { flex: none; font-size: 12px; font-weight: 650; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.form-item .go { margin-left: auto; color: var(--subtle); transition: transform .15s, color .15s; }
.form-item:hover { background: var(--orange-50); color: var(--text); }
.form-item:hover > .icon:first-child,
.form-item:hover .go { color: var(--orange); }
.form-item:hover .go { transform: translateX(3px); }

.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Rozcestníky vydavatelů a pojišťoven ---------- */

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 36px 0 64px; }

/* ---------- Detail formuláře ---------- */

.detail-top { background: var(--card); border-bottom: 1px solid var(--line); padding-bottom: 48px; }
.detail-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 48px; align-items: start; }

.preview { position: relative; display: block; padding: 22px; border-radius: 18px; background: linear-gradient(160deg, var(--blue-50), var(--orange-50)); border: 1px solid var(--line); cursor: zoom-in; }
.preview img { display: block; width: 100%; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(16, 24, 40, .08), 0 18px 40px rgba(16, 24, 40, .14); transform: rotate(-1.2deg); transition: transform .3s; }
.preview:hover img { transform: rotate(0) scale(1.01); }
.preview__zoom { position: absolute; right: 34px; bottom: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(18, 24, 38, .85); color: #fff; font-size: 13px; font-weight: 650; backdrop-filter: blur(4px); }
[data-theme="dark"] .preview img { box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 40px rgba(0, 0, 0, .5); filter: brightness(.92); }
[data-theme="dark"] .preview__zoom { background: rgba(0, 0, 0, .7); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badges:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; line-height: 1.3; }
.badge .icon { width: 14px; height: 14px; }
.badge a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.badge--green { background: var(--green-50); color: var(--green-600); }
.badge--blue { background: var(--blue-50); color: var(--blue-600); }
.badge a { color: inherit; text-decoration: none; }
.badge a:hover { text-decoration: underline; }
.badge--gray { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge--red { background: var(--red-50); color: var(--red-600); }
.badges h4.vzor { margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 650; }

.detail-info h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.detail-info h1 .h1-ver { color: var(--subtle); font-weight: 600; white-space: nowrap; }
.detail-info .lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; max-width: 640px; }

.notice { display: flex; gap: 12px; align-items: flex-start; max-width: 640px; margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--red-50); color: var(--text); font-size: 15px; }
.notice .icon { color: var(--red-600); margin-top: 2px; }
.notice strong { color: var(--red-600); }
.notice p { margin: 0; }

.cta-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--card); box-shadow: var(--shadow); max-width: 640px; }
.cta-card__row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-card__row .btn--primary { flex: 1 1 260px; }
.cta-card__note { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.cta-card__note .icon { color: var(--green); }
.cta-card__note--info .icon { color: var(--blue); flex: none; }

.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; max-width: 640px; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.checks .icon { color: var(--green); width: 18px; height: 18px; }

.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 48px 0 72px; align-items: start; }
.detail-body.is-short { grid-template-columns: minmax(0, 1fr) 320px; }

/* Text formuláře */
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 52px; font-size: 16.5px; line-height: 1.75; overflow-wrap: anywhere; }
.prose:not(:has(*)) { display: none; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 23px; font-weight: 700; margin: 2.4em 0 .7em; }
.prose .form-info > h2,
.prose .form-info-box > h2 { padding-top: 1.6em; border-top: 1px solid var(--line); }
.prose .form-info > h2:first-child,
.prose .form-info-box > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 17.5px; font-weight: 700; margin: 1.6em 0 .5em; }
.prose > h3:first-child { margin-top: 0; }
.prose h3:has(+ h3) { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-600); margin: 2.2em 0 -.2em; }
.prose h4 { font-size: 16px; margin: 1.4em 0 .4em; }
.prose p { margin: 0 0 1em; color: var(--text-body); }
.prose p:empty { display: none; }
.prose ul,
.prose ol { padding-left: 0; list-style: none; margin: 0 0 1.2em; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-body); }
.prose li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.prose li strong { color: var(--text); font-weight: 700; }
.prose ul ul { margin: 10px 0 4px; }
.prose ul ul li::before { background: transparent; border: 1.5px solid var(--orange); }
.prose a { text-decoration: underline; text-decoration-color: rgba(47, 118, 181, .3); text-underline-offset: 3px; }
[data-theme="dark"] .prose a { text-decoration-color: rgba(120, 180, 234, .4); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; }
.prose th,
.prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.form-info--plain { white-space: pre-line; }
.prose .ep,
.prose .jv { font-size: 15px; color: var(--muted); }

.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--orange); z-index: 100; transition: width .1s linear; }

.after-article { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 22px; }
.after-article:not(:has(.aside-box:not([hidden]))) { display: none; }

/* Boční panel a menší boxy */
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.aside-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-size: 14px; color: var(--muted); }
.aside-box > :last-child { margin-bottom: 0; }
.aside-box h2,
.aside-box h3,
.aside-box h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin: 0 0 12px; }
.aside-box * + h3,
.aside-box * + h4 { margin-top: 18px; }
.aside-box p { margin: 0 0 10px; }
.aside-box br { display: none; }
.aside-box ul { list-style: none; padding: 0; margin: 0 0 10px; }
.aside-box ul a,
.aside-box p > a,
.aside-box a.row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: var(--text); line-height: 1.4; }
.aside-box ul a::before,
.aside-box p > a::before { content: ""; flex: none; width: 16px; height: 16px; background: var(--subtle); -webkit-mask: var(--doc-icon) center / contain no-repeat; mask: var(--doc-icon) center / contain no-repeat; }
.aside-box ul a:hover,
.aside-box p > a:hover,
.aside-box a.row:hover { background: var(--bg); color: var(--text); }
.aside-box a.row .icon { color: var(--subtle); }
.aside-box .form-source-text a { display: inline; padding: 0; margin: 0; color: var(--blue-600); }
.aside-box .form-source-text a::before { display: none; }
.aside-box strong { color: var(--text); }
.aside-box .changes-label { display: block; margin: 0 0 4px; font-size: 13px; color: var(--muted); }

:root { --doc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }

.aside-box--toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.4; }
.aside-box--toc a:hover { border-left-color: var(--orange); color: var(--text); }
.aside-box--toc a.is-active { border-left-color: var(--orange); color: var(--text); font-weight: 650; }

.aside-cta { border-color: var(--orange-line); background: linear-gradient(180deg, var(--card), var(--orange-50)); }
.aside-cta strong { display: block; font-size: 15px; line-height: 1.35; margin-bottom: 12px; color: var(--text); }
.aside-cta .btn { width: 100%; }
.aside-cta .btn + .btn { margin-top: 8px; }
[data-theme="dark"] .aside-cta { background: var(--orange-50); }

.mobile-cta { display: none; }

/* ---------- Náhled přes celou obrazovku ---------- */

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(8, 12, 20, .82); backdrop-filter: blur(4px); cursor: zoom-out; }
.lightbox img { max-width: min(100%, 980px); max-height: 100%; border-radius: 6px; background: #fff; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- Stránka 404 ---------- */

.not-found { padding: 80px 0 96px; text-align: center; }
.not-found .code { font-size: clamp(64px, 12vw, 120px); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--orange); margin-bottom: 12px; }
.not-found h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
.not-found p { color: var(--muted); max-width: 560px; margin: 0 auto 14px; }
.not-found .search-xl { margin: 32px auto 24px; }
.not-found .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- Patička ---------- */

.site-footer { margin-top: auto; background: var(--card); border-top: 1px solid var(--line); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin: 0 0 14px; }
.footer-grid h2 ~ a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; line-height: 1.4; }
.footer-grid h2 ~ a:hover { color: var(--orange-600); }
.footer-about p { color: var(--muted); font-size: 14px; margin: 14px 0 18px; max-width: 280px; }
.footer-about .andel { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 22px; color: var(--muted); font-size: 14px; }
.footer-about .andel:hover { color: var(--text); }
.footer-about .andel .icon { width: 18px; height: 18px; color: #e5484d; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--subtle); }
.footer-bottom a { color: var(--muted); }

/* ---------- Informační ikonka „zdarma“ ---------- */

.info-tip { position: relative; display: inline-grid; place-items: center; vertical-align: middle; margin-left: 2px; cursor: help; color: inherit; opacity: .85; }
.info-tip .icon { width: 17px; height: 17px; }
.info-tip:hover,
.info-tip:focus,
.info-tip.is-open { opacity: 1; outline: none; }
.info-tip::after {
	content: attr(data-tip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	width: max-content;
	max-width: 260px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #121826;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
	text-align: left;
	white-space: normal;
	box-shadow: var(--shadow-lg);
	transform: translateX(calc(-50% + var(--tip-x, 0px)));
	display: none;
	pointer-events: none;
	z-index: 80;
}
.info-tip:hover::after,
.info-tip:focus::after,
.info-tip.is-open::after { display: block; animation: tip-in .15s ease-out; }
@keyframes tip-in { from { opacity: 0; } }
[data-theme="dark"] .info-tip::after { background: #2a3447; }
.info-tip--below::after { bottom: auto; top: calc(100% + 10px); }
.free-note { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Dialog před stažením ---------- */

.dl-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
.dl-dialog::backdrop { background: rgba(8, 12, 20, .55); backdrop-filter: blur(3px); }
.dl-dialog[open] { animation: dl-in .2s ease-out; }
@keyframes dl-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dl-dialog__box { position: relative; padding: 28px; }
.dl-dialog__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--bg); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.dl-dialog__close:hover { color: var(--text); }
.dl-dialog__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 36px; }
.dl-dialog__head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); margin: 0 0 2px; }
.dl-dialog__head p { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.35; }
.dl-tips { padding: 18px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 18px; }
.dl-tips strong { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.dl-tips strong .icon { color: var(--orange); }
.dl-tips p { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.dl-tips label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.dl-tips input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 15px; outline: none; }
.dl-tips input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.dl-tips input.is-invalid { border-color: var(--red-600); }
.dl-tips small { display: block; margin-top: 8px; font-size: 12px; color: var(--subtle); line-height: 1.45; }
.dl-tips .dl-error { color: var(--red-600); font-weight: 600; }
.dl-tips .dl-thanks { display: flex; align-items: center; gap: 8px; color: var(--green-600); font-weight: 650; font-size: 15px; margin: 0 0 6px; }
.dl-tips .dl-thanks + p { margin: 0; }
.dl-tips .dl-consent a { color: inherit; text-decoration: underline; }
.dl-dialog .btn--primary { width: 100%; }
.dl-dialog__free { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dl-text { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.dl-actions { display: grid; gap: 10px; }
.dl-actions .btn--ghost { width: 100%; }
.dl-actions .btn.is-done { color: var(--green-600); border-color: var(--green); }
.dl-url { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; }
.dl-foot { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--subtle); text-align: center; }

/* ---------- Responzivita ---------- */

@media (max-width: 1024px) {
	.header-search { display: none; }
	.header-search + .search-toggle { display: grid; margin-left: auto; }
	body.search-open .header-search { display: block; position: absolute; left: 24px; right: 24px; top: calc(100% + 10px); width: auto; margin: 0; }
	body.search-open .header-search input { height: 48px; background: var(--card); box-shadow: var(--shadow-lg); font-size: 16px; }
	body.search-open .header-search > .icon { top: 16px; }
	.header-search .search-results { left: 0; width: auto; }
	.site-header .page { gap: 16px; }
	.detail-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 32px; }
	.detail-body { grid-template-columns: minmax(0, 1fr); }
	.aside { position: static; grid-template-columns: 1fr 1fr; }
	.aside-box--toc { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	:root { --header-h: 112px; }
	.page { padding: 0 18px; }
	.site-header .page { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 10px 12px; }
	.brand { font-size: 16px; }
	.nav { order: 5; width: calc(100% + 36px); margin: 0 -18px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
	.nav::-webkit-scrollbar { display: none; }
	.nav a { padding: 6px 12px; font-size: 14px; }
	body.search-open .header-search { left: 18px; right: 18px; top: 58px; }
	.hero { padding: 44px 0 40px; }
	.hero .lead { font-size: 16px; }
	.search-xl input { height: 56px; padding-right: 20px; font-size: 16px; }
	.search-xl > .icon { top: 17px; }
	.search-xl .btn { display: none; }
	.search-results { min-width: 0; }
	.stats { gap: 14px; flex-direction: column; align-items: center; margin-top: 32px; }
	.section { padding: 40px 0; }
	.chip-cols,
	.promo { grid-template-columns: 1fr; }
	.promo { padding: 28px; }
	.layout-side { grid-template-columns: 1fr; padding-top: 24px; }
	.toc { display: none; }
	.group { padding: 4px 4px 8px; }
	.form-item { padding: 10px 12px; gap: 10px; }
	.detail-top { padding-bottom: 32px; }
	.detail-grid { grid-template-columns: 1fr; gap: 24px; }
	.preview { max-width: 220px; margin: 0 auto; padding: 14px; }
	.preview__zoom { right: 20px; bottom: 20px; }
	.checks { grid-template-columns: 1fr; }
	.detail-body { padding: 28px 0 48px; }
	.prose { padding: 26px 20px; font-size: 16px; }
	.aside { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
	.mobile-cta {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
		background: color-mix(in srgb, var(--card) 95%, transparent);
		border-top: 1px solid var(--line);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		z-index: 60;
		transform: translateY(110%);
		transition: transform .25s;
	}
	.mobile-cta.is-visible { transform: none; }
	.mobile-cta.mobile-cta--two { display: flex; gap: 10px; }
	.mobile-cta--two .btn--primary { flex: 1 1 auto; }
	.mobile-cta--two .btn--ghost { flex: none; padding: 8px 16px; }
	body.page-form { padding-bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

@media print {
	.site-header, .site-footer, .aside, .mobile-cta, .cta-card, .checks, .read-progress, .filter, .toc { display: none !important; }
	body { background: #fff; }
	.prose, .group { border: 0; padding: 0; }
}
