/*
Theme Name: OnlineRejstřík
Theme URI: https://onlinerejstrik.cz/
Description: Šablona pro veřejný rejstřík firem. Karta firmy vypadá jako čistý výpis z rejstříku — identifikátory v neproporcionálním písmu, stavy jako razítka, všechno na jedno klepnutí zkopírovatelné. Pracuje s daty pluginu OnlineRejstřík ARES.
Author: Michal Frieb
Version: 1.3.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onlinerejstrik-theme
Tags: business-directory, custom-menu, responsive-layout
*/

/* ==================================================================
   1. Základ a proměnné
   ================================================================== */

:root {
	color-scheme: light dark;

	/* Světlý režim */
	--ink: #101828;
	--ink-2: #344054;
	--muted: #5b6672;
	--paper: #f1f4f7;
	--surface: #ffffff;
	--surface-2: #f8fafb;
	--line: #dfe5ec;
	--line-strong: #c3cdd7;

	--accent: #0d6e5f;
	--accent-ink: #0a5449;
	--accent-soft: #e4f1ee;
	--accent-contrast: #ffffff;

	--danger: #b42318;
	--danger-soft: #fdf1f0;
	--warn: #b54708;
	--warn-soft: #fdf4ec;

	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05);
	--shadow-lg: 0 20px 45px -25px rgba(16, 24, 40, .45);

	--gap: 1rem;
	--gap-lg: 2rem;
	--section: 2.5rem;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

	/* předáno pluginu */
	--or-ink: var(--ink);
	--or-paper: var(--paper);
	--or-surface: var(--surface);
	--or-line: var(--line);
	--or-accent: var(--accent);
	--or-accent-soft: var(--accent-soft);
	--or-muted: var(--muted);
	--or-danger: var(--danger);
	--or-radius: var(--radius);
}

/* Tmavá paleta. Používá se, když si ji přeje zařízení, nebo když si ji
   návštěvník sám přepne. Ruční volba má vždycky přednost. */
:root[data-theme="dark"],
html.is-dark {
	--ink: #e8edf2;
	--ink-2: #c2ccd6;
	--muted: #93a1b0;
	--paper: #0b1220;
	--surface: #121b2b;
	--surface-2: #16202f;
	--line: #25324a;
	--line-strong: #3a4c68;

	--accent: #3fb59d;
	--accent-ink: #7fd6c3;
	--accent-soft: #10312c;
	--accent-contrast: #06231e;

	--danger: #f2837a;
	--danger-soft: #2a1614;
	--warn: #e2a25f;
	--warn-soft: #2a1f12;

	--shadow: 0 1px 2px rgba(0, 0, 0, .4);
	--shadow-lg: 0 24px 50px -28px rgba(0, 0, 0, .8);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #e8edf2;
		--ink-2: #c2ccd6;
		--muted: #93a1b0;
		--paper: #0b1220;
		--surface: #121b2b;
		--surface-2: #16202f;
		--line: #25324a;
		--line-strong: #3a4c68;

		--accent: #3fb59d;
		--accent-ink: #7fd6c3;
		--accent-soft: #10312c;
		--accent-contrast: #06231e;

		--danger: #f2837a;
		--danger-soft: #2a1614;
		--warn: #e2a25f;
		--warn-soft: #2a1f12;

		--shadow: 0 1px 2px rgba(0, 0, 0, .4);
		--shadow-lg: 0 24px 50px -28px rgba(0, 0, 0, .8);
	}
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	line-height: 1.2;
	letter-spacing: -.02em;
	font-weight: 700;
}

h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }

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

.mono {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.01em;
}

.wrap {
	width: min(1120px, 100% - 2rem);
	margin-inline: auto;
}

.page-narrow { width: min(760px, 100% - 2rem); }

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	background: var(--accent);
	color: #fff;
	padding: .7rem 1.2rem;
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ==================================================================
   2. Hlavička a navigace
   ================================================================== */

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

.site-head__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 62px;
}

.brand {
	display: flex;
	align-items: center;
	gap: .65rem;
	text-decoration: none;
	color: var(--ink);
	margin-right: auto;
}

.brand__mark {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--accent);
	color: #fff;
	flex: 0 0 auto;
}
.brand__mark svg { width: 19px; height: 19px; }

.brand__text strong {
	display: block;
	font-size: 1.05rem;
	letter-spacing: -.02em;
	line-height: 1.2;
}
.brand__text small {
	display: block;
	font-size: .75rem;
	color: var(--muted);
}

.site-nav__list {
	display: flex;
	gap: .35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	display: block;
	padding: .45rem .75rem;
	border-radius: var(--radius-sm);
	text-decoration: none;
	color: var(--ink-2);
	font-size: .9375rem;
	font-weight: 500;
}
.site-nav__list a:hover { background: var(--paper); color: var(--ink); }

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: .5rem;
	cursor: pointer;
	color: var(--ink);
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars span {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

@media (max-width: 720px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		padding: .5rem 1rem 1rem;
	}
	.site-nav.is-open { display: block; }
	.site-nav__list { flex-direction: column; }
	.site-nav__list a { padding: .7rem .5rem; }
}

.site-main { padding: 1.5rem 0 3rem; }

/* ==================================================================
   3. Titulní strana
   ================================================================== */

.hero {
	background:
		radial-gradient(120% 100% at 50% 0%, var(--accent-soft) 0%, transparent 60%),
		var(--surface);
	border-bottom: 1px solid var(--line);
	padding: 2.5rem 0 2.75rem;
	margin: -1.5rem 0 2rem;
}

.hero__inner { text-align: center; }

.hero__eyebrow {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--accent-ink);
	margin: 0 0 .6rem;
}

.hero__title {
	max-width: 20ch;
	margin-inline: auto;
	margin-bottom: .6rem;
}

.hero__sub {
	max-width: 62ch;
	margin: 0 auto 1.6rem;
	color: var(--ink-2);
	font-size: 1.0625rem;
}

.hero .or-search { max-width: 640px; margin-inline: auto; }
.hero .or-search__hint { text-align: left; }

.hero__facts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .35rem 1.5rem;
	list-style: none;
	margin: 1.75rem 0 0;
	padding: 0;
	font-size: .875rem;
	color: var(--muted);
}
.hero__facts span { color: var(--ink); font-weight: 700; }

.sections { display: grid; gap: 2.5rem; }

.block__head { margin-bottom: .9rem; }
.block__head h2 { margin-bottom: .2rem; }
.block__head p { margin: 0; color: var(--muted); font-size: .9375rem; }

.block-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

@media (max-width: 820px) {
	.block-cols { grid-template-columns: 1fr; }
}

/* ==================================================================
   4. Karta firmy — hlavní obrazovka
   ================================================================== */

.record__head {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.5rem 1.5rem 1.35rem;
	margin-bottom: 1rem;
	box-shadow: var(--shadow);
}

.record__eyebrow {
	margin: 0 0 .5rem;
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--muted);
}

.record__title {
	margin: 0 0 .85rem;
	font-size: clamp(1.55rem, 1.1rem + 2vw, 2.35rem);
	text-wrap: balance;
}

.record__ident {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .75rem;
	margin-bottom: 1rem;
}

.ident {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: .3rem .5rem .3rem .65rem;
}

.ident__label {
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--muted);
}

.ident__value {
	font-size: 1.0625rem;
	font-weight: 600;
	user-select: all;
}

.copy-btn {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	padding: 0;
	font-size: .75rem;
	transition: background-color .15s ease, color .15s ease;
}
.copy-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.copy-btn.is-copied { width: auto; padding: 0 .5rem; color: var(--accent-ink); background: var(--accent-soft); }
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Razítka stavu */
.stamps { display: flex; flex-wrap: wrap; gap: .4rem; }

.stamp {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .22rem .6rem;
	border: 1.5px solid var(--line-strong);
	border-radius: 4px;
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	background: transparent;
	white-space: nowrap;
}

.stamp--ok { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.stamp--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-soft); }
.stamp--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.stamp--info { color: var(--ink-2); }
.stamp--neutral, .stamp--muted { color: var(--muted); }

.record__lead {
	margin: 1rem 0 0;
	color: var(--ink-2);
	font-size: 1.0625rem;
	max-width: 75ch;
}

/* Mřížka panelů */
.record__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (max-width: 780px) {
	.record__grid { grid-template-columns: 1fr; }
}

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.15rem 1.25rem 1.3rem;
	box-shadow: var(--shadow);
}

.panel--wide { grid-column: 1 / -1; }
.panel--check, .panel--invoice, .panel--faq { margin-bottom: 1rem; }

.panel__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: .9rem;
	padding-bottom: .6rem;
	border-bottom: 1px solid var(--line);
}

.panel__head h2 {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-2);
}

.panel__note { font-size: .8125rem; color: var(--muted); }

.icon { width: 17px; height: 17px; flex: 0 0 auto; color: var(--accent); }
.icon--xs { width: 12px; height: 12px; }

.panel__links {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	margin-top: .9rem;
	padding-top: .75rem;
	border-top: 1px solid var(--line);
	font-size: .8125rem;
}
.panel__links a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
.panel__links a:hover { text-decoration: underline; }

/* Rychlé ověření */
.check-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: .5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.check {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: .6rem .75rem;
	background: var(--surface-2);
}

.check__label {
	display: block;
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--muted);
	margin-bottom: .1rem;
}
.check__value { font-weight: 600; }

.check--ok { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.check--ok .check__value { color: var(--accent-ink); }
.check--danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }
.check--danger .check__value { color: var(--danger); }
.check--warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }

.alert {
	display: flex;
	gap: .6rem;
	align-items: flex-start;
	margin: .9rem 0 0;
	padding: .75rem .9rem;
	border-radius: var(--radius-sm);
	font-size: .9375rem;
}
.alert svg { flex: 0 0 auto; margin-top: .15rem; }
.alert--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.alert--danger .icon { color: var(--danger); }
.alert--danger a { color: inherit; }

/* Fakturační blok */
.invoice-block {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

.invoice-block__text {
	flex: 1 1 260px;
	margin: 0;
	padding: .9rem 1rem;
	background: var(--surface-2);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius-sm);
	font-family: var(--mono);
	font-size: .875rem;
	line-height: 1.7;
	white-space: pre-line;
	user-select: all;
	color: var(--ink);
}

/* Tabulka údajů */
.rec-table { margin: 0; }

.rec-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: .5rem 0;
	border-bottom: 1px solid var(--line);
}
.rec-row:last-child { border-bottom: 0; }

.rec-row__label {
	color: var(--muted);
	font-size: .9375rem;
	flex: 0 0 auto;
}

.rec-row__value {
	margin: 0;
	text-align: right;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.rec-row__note {
	display: block;
	width: 100%;
	font-size: .75rem;
	font-weight: 400;
	color: var(--muted);
}

/* Adresa */
.address { font-style: normal; line-height: 1.7; }
.address__line { display: block; }
.address__line--muted { color: var(--muted); font-size: .9375rem; }

/* Osoby */
.people { list-style: none; margin: 0; padding: 0; }

.person {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	justify-content: space-between;
	align-items: baseline;
	padding: .7rem 0;
	border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: 0; }

.person__name { font-weight: 600; display: block; }
.person__role {
	display: block;
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--accent-ink);
}
.person__addr { display: block; font-size: .8125rem; color: var(--muted); }
.person__since, .person__share { font-size: .875rem; color: var(--muted); text-align: right; }
.person__share-main { display: block; font-weight: 600; color: var(--ink); }
.person__share-sub { display: block; font-size: .8125rem; }

.note-box {
	margin-top: .9rem;
	padding: .75rem .9rem;
	background: var(--surface-2);
	border-radius: var(--radius-sm);
	font-size: .9375rem;
}
.note-box__label {
	display: block;
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--muted);
	margin-bottom: .2rem;
}

/* Seznamy */
.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li { margin-bottom: .5rem; }
.plain-list--small { font-size: .9375rem; }

/* Živnosti */
.trades { list-style: none; margin: 0; padding: 0; }

.trade {
	padding: .75rem .85rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	margin-bottom: .5rem;
	background: var(--surface-2);
}

.trade__head {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .75rem;
	justify-content: space-between;
	align-items: baseline;
}
.trade__name { font-weight: 600; }
.trade__meta { font-size: .8125rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; }

.trade__fields {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: .3rem;
	margin: .6rem 0 0;
	padding: 0;
}
.trade__fields li {
	font-size: .75rem;
	padding: .15rem .5rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-2);
}

/* Chipy */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }

.chip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .25rem .6rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	font-size: .8125rem;
	color: var(--ink-2);
	text-decoration: none;
}
.chip--link:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip--sm { font-size: .6875rem; padding: .1rem .45rem; }
.chip__code { font-size: .6875rem; color: var(--muted); }

/* Změny — hlavní odlišnost webu */
.panel--changes { border-left: 3px solid var(--accent); }

.changes { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.change {
	padding: .7rem 0;
	border-bottom: 1px solid var(--line);
}
.change:last-child { border-bottom: 0; }

.change__top {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: baseline;
	margin-bottom: .2rem;
}

.change__label {
	font-size: .6875rem;
	text-transform: uppercase;
	letter-spacing: .09em;
	font-weight: 700;
	color: var(--accent-ink);
}
.change__top time { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.change__body {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem;
	font-size: .9375rem;
}

.change__old { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.change__arrow { color: var(--muted); }
.change__new { font-weight: 600; }
.change__new--gone { font-weight: 400; color: var(--muted); font-style: italic; }
.change--add .change__label { color: var(--accent-ink); }
.change--remove .change__label { color: var(--danger); }

/* Historie */
.timeline {
	list-style: none;
	margin: 0;
	padding: 0 0 0 1.25rem;
	border-left: 2px solid var(--line);
}

.timeline__item {
	position: relative;
	padding: 0 0 1.1rem;
}
.timeline__item::before {
	content: "";
	position: absolute;
	left: -1.62rem;
	top: .45rem;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--line-strong);
	border: 2px solid var(--surface);
}
.timeline__item--vznik::before { background: var(--accent); }
.timeline__item--insolvence::before { background: var(--danger); }
.timeline__item--zanik::before { background: var(--danger); }

.timeline__item time {
	display: block;
	font-size: .75rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.timeline__item p { margin: .1rem 0 .3rem; }

/* FAQ */
.faq details {
	border-bottom: 1px solid var(--line);
	padding: .2rem 0;
}
.faq details:last-child { border-bottom: 0; }

.faq summary {
	cursor: pointer;
	padding: .65rem 0;
	font-weight: 600;
	list-style: none;
	display: flex;
	gap: .5rem;
	align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
	content: "›";
	color: var(--accent);
	font-weight: 700;
	transition: transform .15s ease;
	display: inline-block;
}
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { margin: 0 0 .8rem 1rem; color: var(--ink-2); }

/* Související */
.related { margin: 2rem 0 0; }
.related h2 { font-size: 1.05rem; margin-bottom: .7rem; }

.firm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: .6rem;
}
.firm-cards--list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.firm-card {
	display: block;
	padding: .8rem .95rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	text-decoration: none;
	color: var(--ink);
	transition: border-color .15s ease, transform .15s ease;
}
.firm-card:hover { border-color: var(--accent); transform: translateY(-1px); }

.firm-card__name { display: block; font-weight: 600; line-height: 1.35; }
.firm-card__meta { display: block; margin-top: .25rem; font-size: .8125rem; color: var(--muted); }
.firm-card__meta .dot { margin: 0 .3rem; }
.firm-card__flags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; }
.firm-card__flags:empty { display: none; }

/* Patička karty */
.record__foot {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: .8125rem;
	color: var(--muted);
}
.record__foot p { margin-bottom: .5rem; }

.record__cta {
	margin-top: 2rem;
	padding: 1.5rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-align: center;
}
.record__cta h2 { margin-bottom: .8rem; }
.record__cta .or-search { max-width: 520px; margin-inline: auto; }

/* ==================================================================
   5. Výpisy, filtry a další stránky
   ================================================================== */

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	align-items: center;
	font-size: .8125rem;
	color: var(--muted);
	margin-bottom: 1rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs__sep { opacity: .5; }

.page-head { margin-bottom: 1.25rem; }
.page-head__desc { color: var(--ink-2); max-width: 75ch; }
.page-head__count { font-size: .8125rem; color: var(--muted); margin: .75rem 0; }

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	align-items: flex-end;
	padding: 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin-bottom: 1.25rem;
}

.filters__field { display: grid; gap: .25rem; flex: 1 1 160px; }
.filters__field span { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.filters select {
	width: 100%;
	padding: .5rem .6rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: .9375rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .6rem 1.1rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.pager {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem;
	justify-content: center;
	margin: 1.5rem 0;
}
.pager .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 .6rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	text-decoration: none;
	color: var(--ink);
	font-size: .9375rem;
}
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pager .page-numbers:hover:not(.current) { border-color: var(--accent); }

.empty {
	text-align: center;
	padding: 3rem 1rem;
	background: var(--surface);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
}
.empty p { color: var(--muted); max-width: 55ch; margin-inline: auto; }
.empty .or-search { max-width: 460px; margin: 1.5rem auto 0; }
.empty__code { font-size: 3rem; font-weight: 700; color: var(--line-strong); margin: 0; }

.block { margin-bottom: 0; }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2rem; }

.post-list { display: grid; gap: 1rem; }
.post-item {
	padding: 1rem 1.15rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.post-item h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.post-item a { text-decoration: none; color: var(--ink); }
.post-item a:hover { color: var(--accent-ink); }
.post-item__excerpt { color: var(--muted); font-size: .9375rem; }

/* Sloupcový graf let */
.yearbars {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 160px;
	padding: .75rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow-x: auto;
}
.yearbar {
	flex: 1 0 18px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 100%;
	gap: .35rem;
}
.yearbar__fill {
	width: 100%;
	background: var(--accent);
	border-radius: 3px 3px 0 0;
	opacity: .85;
}
.yearbar:hover .yearbar__fill { opacity: 1; }
.yearbar__label { font-size: .625rem; color: var(--muted); }

/* ==================================================================
   6. Patička
   ================================================================== */

.site-foot {
	background: var(--surface);
	border-top: 1px solid var(--line);
	padding: 2.5rem 0 1.5rem;
	margin-top: 3rem;
	font-size: .9375rem;
}

.site-foot__grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(3, 1fr);
	gap: 2rem;
	margin-bottom: 2rem;
}

@media (max-width: 780px) {
	.site-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
	.site-foot__grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

.site-foot__brand strong { display: block; font-size: 1.05rem; margin-bottom: .4rem; }
.site-foot__brand p { color: var(--muted); font-size: .875rem; max-width: 40ch; }

.site-foot__col h2 {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--muted);
	margin-bottom: .6rem;
}
.site-foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-foot__col a { color: var(--ink-2); text-decoration: none; }
.site-foot__col a:hover { color: var(--accent-ink); text-decoration: underline; }

.site-foot__legal {
	border-top: 1px solid var(--line);
	padding-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	justify-content: space-between;
	font-size: .8125rem;
	color: var(--muted);
}
.site-foot__legal p { margin: 0; }

/* ==================================================================
   7. Tisk — karta firmy má dávat smysl i na papíře
   ================================================================== */

@media print {
	.site-head, .site-foot, .record__cta, .related, .nav-toggle, .copy-btn, .or-search { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.panel, .record__head { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
	.record__grid { grid-template-columns: 1fr; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ==================================================================
   8. Přehledový box, DPH, hodnocení, úplný výpis
   ================================================================== */

/* Kopírovatelné řádky — hlavní důvod, proč sem lidi chodí */
.panel--facts { margin-bottom: 1rem; }

.facts { margin: 0; display: grid; }

.fact {
	display: grid;
	grid-template-columns: minmax(110px, 150px) 1fr;
	gap: .5rem 1rem;
	align-items: baseline;
	padding: .55rem .6rem;
	margin: 0 -.6rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background-color .12s ease;
	position: relative;
}
.fact + .fact { border-top: 1px solid var(--line); }
.fact:hover, .fact:focus-visible { background: var(--surface-2); }
.fact:hover .fact__copy, .fact:focus-visible .fact__copy { opacity: 1; }

.fact__label {
	margin: 0;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--muted);
}

.fact__value {
	margin: 0;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: .5rem;
	word-break: break-word;
}

.fact__copy {
	opacity: 0;
	color: var(--muted);
	transition: opacity .12s ease;
	flex: 0 0 auto;
}
.fact__copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.fact.is-copied, .account.is-copied {
	background: var(--accent-soft);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.fact.is-copied::after, .account.is-copied::after {
	content: "Zkopírováno";
	position: absolute;
	right: .6rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--accent-ink);
	background: var(--surface);
	padding: .1rem .4rem;
	border-radius: 4px;
}
.fact.is-copied .fact__copy, .account.is-copied .fact__copy { opacity: 0; }

@media (max-width: 520px) {
	.fact { grid-template-columns: 1fr; gap: .1rem; }
}

/* Registr DPH */
.panel--alarm { border-left: 3px solid var(--danger); }

.alert--ok {
	background: var(--accent-soft);
	color: var(--accent-ink);
	border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.alert--ok .icon { color: var(--accent-ink); }

.subhead {
	margin: 1.2rem 0 .5rem;
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
	font-weight: 700;
}
.panel > .subhead:first-of-type { margin-top: .4rem; }

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

.account {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .4rem .9rem;
	padding: .55rem .6rem;
	margin: 0 -.6rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.account + .account { border-top: 1px solid var(--line); }
.account:hover, .account:focus-visible { background: var(--surface-2); }
.account:hover .fact__copy, .account:focus-visible .fact__copy { opacity: 1; }
.account__number { font-size: 1.0625rem; font-weight: 600; }
.account__date { font-size: .8125rem; color: var(--muted); }

.hint { font-size: .8125rem; color: var(--muted); margin: .7rem 0 0; }
.muted { color: var(--muted); font-weight: 400; }

/* Hodnocení */
.panel--rating { margin-bottom: 1rem; }
.panel--rating.is-busy { opacity: .6; pointer-events: none; }

.rating {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: center;
	justify-content: space-between;
}

.rating__figure { display: flex; flex-direction: column; }

.rating__score {
	font-family: var(--mono);
	font-size: 2.4rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.03em;
}
.rating__score.is-plus { color: var(--accent-ink); }
.rating__score.is-minus { color: var(--danger); }
.rating__score.is-zero { color: var(--muted); }

.rating__votes { font-size: .8125rem; color: var(--muted); margin-top: .2rem; }

.rating__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.rating__btn {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .55rem .9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-2);
	font: inherit;
	font-size: .9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.rating__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.rating__btn:hover { border-color: var(--line-strong); }

.rating__btn--up.is-active {
	border-color: var(--accent);
	background: var(--accent-soft);
	color: var(--accent-ink);
}
.rating__btn--up.is-active svg { fill: color-mix(in srgb, var(--accent) 25%, transparent); }

.rating__btn--down.is-active {
	border-color: var(--danger);
	background: var(--danger-soft);
	color: var(--danger);
}
.rating__btn--down.is-active svg { fill: color-mix(in srgb, var(--danger) 22%, transparent); }

.rating__note { margin: .7rem 0 0; font-size: .875rem; color: var(--accent-ink); min-height: 1.2em; }
.rating__note.is-error { color: var(--danger); }

/* Úplný výpis a vztahy */
.panel--former { background: var(--surface-2); }
.people--former .person__name { font-weight: 500; color: var(--muted); }
.people--former .person__name { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); }

.relation + .relation { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Datum aktualizace v hlavičce */
.record__updated {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin: 0 0 .9rem;
	font-size: .8125rem;
	color: var(--muted);
}
.record__updated strong { color: var(--ink-2); font-weight: 600; }

/* ==================================================================
   9. Přepínač světlého a tmavého režimu
   ================================================================== */

.theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
	flex: 0 0 auto;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-ink); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ==================================================================
   10. Články
   ================================================================== */

.article-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.25rem;
}
.article-grid--small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.article-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color .15s ease, transform .15s ease;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.article-card__link { display: block; text-decoration: none; color: inherit; height: 100%; }

.article-card__media {
	aspect-ratio: 12 / 7;
	background: var(--surface-2);
	display: grid;
	place-items: center;
	overflow: hidden;
}
.article-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card__placeholder { color: var(--line-strong); }
.article-card__placeholder svg { width: 32px; height: 32px; }

.article-card__body { padding: 1rem 1.1rem 1.2rem; }

.article-card__cat {
	display: inline-block;
	font-size: .6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--accent-ink);
	margin-bottom: .4rem;
}

.article-card__title { font-size: 1.125rem; margin: 0 0 .4rem; line-height: 1.3; }
.article-card__excerpt { color: var(--muted); font-size: .9375rem; margin: 0 0 .6rem; }
.article-card__meta { font-size: .8125rem; color: var(--muted); }

.article__head { padding-top: .5rem; }
.article__cats { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.article__title { margin-bottom: .5rem; text-wrap: balance; }
.article__lead { font-size: 1.125rem; color: var(--ink-2); margin-bottom: 1.2rem; }

.byline {
	display: flex;
	align-items: center;
	gap: .7rem;
	padding: .9rem 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.byline__avatar { border-radius: 50%; }
.byline__author { display: block; font-weight: 600; }
.byline__meta { display: block; font-size: .8125rem; color: var(--muted); }

.article__figure { margin: 1.75rem auto; }
.article__figure img { width: 100%; border-radius: var(--radius); display: block; }
.article__figure figcaption { margin-top: .5rem; font-size: .8125rem; color: var(--muted); text-align: center; }

.article__body { margin-top: 1.75rem; }
.article__tags { margin: 1.75rem 0; }

.article__foot { margin-top: 2rem; }

.author-box {
	display: flex;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.author-box__avatar { border-radius: 50%; flex: 0 0 auto; }
.author-box h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.author-box p { color: var(--muted); font-size: .9375rem; margin-bottom: .4rem; }

.subpages { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.subpages ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.subpages a { text-decoration: none; }
.subpages a:hover { text-decoration: underline; }

.comments { margin-top: 2.5rem; }

/* Text článku */
.prose { font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.15rem; }
.prose img, .prose figure img { border-radius: var(--radius); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .8125rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.prose blockquote {
	margin: 1.6em 0;
	padding: .3em 0 .3em 1.2em;
	border-left: 3px solid var(--accent);
	color: var(--ink-2);
	font-style: italic;
}
.prose code {
	font-family: var(--mono);
	font-size: .9em;
	background: var(--surface-2);
	padding: .1em .35em;
	border-radius: 4px;
}
.prose pre {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 1rem;
	overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.wp-caption, .alignwide { max-width: 100%; }
.aligncenter { display: block; margin-inline: auto; }

/* ==================================================================
   11. Hodnocení v hlavičce karty
   ================================================================== */

.rating--hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1.25rem;
	margin: 0 0 1rem;
	padding: .75rem .9rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}
.rating--hero.is-busy { opacity: .6; pointer-events: none; }

.rating--hero .rating__figure { flex-direction: row; align-items: center; gap: .6rem; }
.rating--hero .rating__score { font-size: 1.9rem; }
.rating--hero .rating__meta { display: flex; flex-direction: column; }
.rating--hero .rating__word { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.rating--hero .rating__votes { font-size: .75rem; color: var(--muted); margin: 0; }
.rating--hero .rating__actions { margin-left: auto; }
.rating--hero .rating__btn { padding: .4rem .7rem; font-size: .875rem; }
.rating--hero .rating__note { flex: 1 0 100%; margin: 0; font-size: .8125rem; }
.rating--hero .rating__note:empty { display: none; }

/* ==================================================================
   12. Sbírka listin
   ================================================================== */

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

.deed {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .2rem 1rem;
	align-items: baseline;
	padding: .6rem 0;
	border-bottom: 1px solid var(--line);
}
.deed:last-child { border-bottom: 0; }
.deed__name { font-weight: 500; }
.deed__name a { text-decoration: none; }
.deed__name a:hover { text-decoration: underline; }
.deed__ref { grid-column: 1; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.deed__date { font-size: .8125rem; color: var(--muted); white-space: nowrap; }

/* ==================================================================
   13. Opravy rozestupů a responzivita
   ================================================================== */

/* Panely na kartě firmy potřebují mezeru i mimo mřížku. */
.record > .wrap > .panel,
.panel--former,
.panel--faq,
.panel--dph,
.panel--rating,
.panel--facts,
.panel--check,
.panel--invoice { margin-bottom: var(--gap); }

.record__grid { margin-bottom: 0; }
.record__grid + .panel,
.record__grid + section { margin-top: var(--gap); }

.related + .related { margin-top: var(--section); }
.record__foot { margin-top: var(--section); }

@media (max-width: 1024px) {
	:root { --section: 2rem; --gap-lg: 1.5rem; }
	.wrap { width: min(1120px, 100% - 1.75rem); }
}

@media (max-width: 780px) {
	:root { --gap: .75rem; --section: 1.75rem; }

	body { font-size: 15.5px; }
	.wrap { width: 100% - 1.5rem; width: calc(100% - 1.5rem); }

	.hero { padding: 1.75rem 0 2rem; margin-bottom: 1.5rem; }
	.hero__facts { gap: .3rem 1rem; font-size: .8125rem; }

	.record__head { padding: 1.1rem 1rem; }
	.record__ident { gap: .4rem; }
	.ident { width: 100%; justify-content: space-between; }

	.panel { padding: 1rem; }
	.panel__head { margin-bottom: .7rem; }

	.rating--hero { flex-direction: column; align-items: stretch; }
	.rating--hero .rating__actions { margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
	.rating--hero .rating__btn { justify-content: center; }

	.rec-row { flex-direction: column; gap: .1rem; }
	.rec-row__value { text-align: left; justify-content: flex-start; }

	.person { flex-direction: column; align-items: flex-start; }
	.person__since, .person__share { text-align: left; }

	.invoice-block { flex-direction: column; }
	.invoice-block .btn { width: 100%; }

	.check-grid { grid-template-columns: 1fr 1fr; }

	.deed { grid-template-columns: 1fr; }
	.deed__date { white-space: normal; }

	.article-grid { grid-template-columns: 1fr; gap: 1rem; }
	.byline { flex-wrap: wrap; }
	.author-box { flex-direction: column; }

	.site-foot { padding-top: 1.75rem; margin-top: 2rem; }
	.filters { padding: .8rem; }
	.filters__field { flex-basis: 100%; }
	.filters .btn { width: 100%; }
}

@media (max-width: 460px) {
	.check-grid { grid-template-columns: 1fr; }
	.hero__facts { flex-direction: column; align-items: center; gap: .2rem; }
	.record__title { font-size: 1.5rem; }
	.stamps { gap: .3rem; }
	.stamp { font-size: .625rem; padding: .18rem .45rem; }
	.pager .page-numbers { min-width: 34px; height: 34px; }
}

/* Dotyková zařízení: efekty na hover jsou tam k ničemu, kopírovací
   ikona ať je vidět rovnou. */
@media (hover: none) {
	.fact__copy, .account .fact__copy { opacity: .55; }
	.firm-card:hover, .article-card:hover { transform: none; }
}
