/* ==========================================================================
   Česká přirovnání – design system
   Brand colours come from the original 2011 logo: cyan, lime green, magenta.
   ========================================================================== */

@font-face {
	font-family: "Nunito";
	font-style: normal;
	font-display: swap;
	font-weight: 200 1000;
	src: url(fonts/nunito-latin-ext-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Nunito";
	font-style: normal;
	font-display: swap;
	font-weight: 200 1000;
	src: url(fonts/nunito-latin-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* brand */
	--cyan: #00a8e9;
	--green: #85b919;
	--magenta: #bc1d83;

	/* brand colours dark enough for text on light surfaces (WCAG AA) */
	--cyan-ink: #0073a3;
	--green-ink: #4b7305;
	--magenta-ink: #a3166f;

	/* soft tints for backgrounds */
	--cyan-soft: #e3f5fd;
	--green-soft: #eef7dc;
	--magenta-soft: #fbe6f3;

	--bg: #f6f7f3;
	--surface: #ffffff;
	--surface-2: #eff2ea;
	--text: #1d2330;
	--muted: #5b6474;
	--border: #e2e6dc;
	--danger: #c62828;
	--danger-soft: #fdecec;

	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgb(20 30 40 / 0.05), 0 8px 24px -12px rgb(20 30 40 / 0.18);
	--shadow-lg: 0 2px 4px rgb(20 30 40 / 0.05), 0 24px 48px -20px rgb(20 30 40 / 0.28);
	--brand-gradient: linear-gradient(90deg, var(--cyan), var(--green) 50%, var(--magenta));

	--font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--container: 1120px;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--cyan-ink: #4fcaf7;
		--green-ink: #a6d64a;
		--magenta-ink: #f06cbf;
		--cyan-soft: #0e2c3a;
		--green-soft: #1f2d0c;
		--magenta-soft: #3a1330;
		--bg: #111419;
		--surface: #1a1e26;
		--surface-2: #232834;
		--text: #eceff4;
		--muted: #a2abba;
		--border: #2e3441;
		--danger: #ff6b6b;
		--danger-soft: #3b1818;
		--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.6);
		--shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -20px rgb(0 0 0 / 0.7);
		color-scheme: dark;
	}
}

/* explicit choice from the theme toggle */
:root[data-theme="dark"] {
	--cyan-ink: #4fcaf7;
	--green-ink: #a6d64a;
	--magenta-ink: #f06cbf;
	--cyan-soft: #0e2c3a;
	--green-soft: #1f2d0c;
	--magenta-soft: #3a1330;
	--bg: #111419;
	--surface: #1a1e26;
	--surface-2: #232834;
	--text: #eceff4;
	--muted: #a2abba;
	--border: #2e3441;
	--danger: #ff6b6b;
	--danger-soft: #3b1818;
	--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.6);
	--shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -20px rgb(0 0 0 / 0.7);
	color-scheme: dark;
}

/* ---------- base ---------- */

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

html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 850; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
sup { font-size: .55em; font-weight: 800; color: var(--green-ink); margin-left: .15em; vertical-align: super; }

a { color: var(--magenta-ink); text-decoration-thickness: .08em; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { color: var(--cyan-ink); text-decoration-color: currentColor; }

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

img, svg { max-width: 100%; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; color: var(--muted); margin: 0 0 .6em; display: flex; align-items: center; gap: .4em; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); }
.narrow { max-width: 720px; }

/* ---------- wordmark ---------- */

.wordmark {
	font-weight: 900;
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
	letter-spacing: -0.035em;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
}
.wordmark:hover { color: inherit; }
.wordmark-sm { font-size: 1.3rem; display: inline-block; margin-bottom: .6em; }
.wm-cyan { color: var(--cyan); }
.wm-green { color: var(--green); }
.wm-ink { color: var(--text); }
.wm-magenta { color: var(--magenta); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .wm-magenta { color: #e0449f; }
}
:root[data-theme="dark"] .wm-magenta { color: #e0449f; }

/* ---------- header ---------- */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	position: relative;
}
.site-header::before { content: ""; display: block; height: 5px; background: var(--brand-gradient); }

.header-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-top: 14px;
	padding-bottom: 10px;
	flex-wrap: wrap;
}
.header-row .wordmark { margin-right: auto; }

.header-search {
	order: 3;
	flex: 1 1 100%;
	display: flex;
	background: var(--surface-2);
	border: 2px solid transparent;
	border-radius: 999px;
	padding: 2px 4px 2px 16px;
	transition: border-color .15s, background .15s;
}
.header-search:focus-within { border-color: var(--cyan); background: var(--surface); }
.header-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: inherit; padding: 6px 0; outline: none; }
.header-search button { border: 0; background: none; color: var(--muted); padding: 6px 10px; cursor: pointer; border-radius: 999px; }
.header-search button:hover { color: var(--magenta-ink); }

@media (min-width: 860px) {
	.header-search { order: 0; flex: 0 1 340px; }
	.header-row .wordmark { margin-right: 0; }
	.header-actions { margin-left: auto; }
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.main-nav {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 12px;
	-webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
	mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.main-nav::-webkit-scrollbar { display: none; }
@media (min-width: 860px) { .main-nav { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; } }

.nav-pill {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 750;
	font-size: .95rem;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s, color .15s;
}
.nav-pill:hover { background: var(--surface-2); color: var(--text); }
.nav-pill.active { background: var(--cyan-soft); color: var(--cyan-ink); }
.nav-pill sup { vertical-align: baseline; font-size: .75em; color: var(--muted); }
.nav-pill.active sup { color: inherit; }
.nav-pill-fun { color: var(--green-ink); }
.nav-pill-fun:hover { background: var(--green-soft); color: var(--green-ink); }
.nav-pill-fun:hover .icon { transform: rotate(-20deg) scale(1.1); }
.nav-pill-fun .icon { transition: transform .2s; }
.nav-pill-admin { color: var(--magenta-ink); border: 1px dashed color-mix(in srgb, var(--magenta) 45%, transparent); }
.nav-pill-admin sup,
.nav-pill-admin.active sup { color: #fff; background: var(--magenta); border-radius: 999px; padding: 0 .5em; }

/* user menu */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; border-radius: 999px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 20;
	min-width: 200px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	padding: 8px;
	display: grid;
}
.user-menu-panel a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 650; }
.user-menu-panel a:hover { background: var(--surface-2); }
.user-menu-nick { padding: 6px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

.avatar {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--brand-gradient);
	color: #fff;
	font-weight: 900;
	text-shadow: 0 1px 2px rgb(0 0 0 / .25);
}
.avatar-lg { width: 72px; height: 72px; font-size: 2rem; flex: none; }

/* ---------- buttons ---------- */

.btn {
	--btn-bg: var(--surface-2);
	--btn-fg: var(--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45em;
	padding: 11px 22px;
	border-radius: 999px;
	border: 2px solid transparent;
	background: var(--btn-bg);
	color: var(--btn-fg);
	font: inherit;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s, box-shadow .15s, background .15s, filter .15s;
	white-space: nowrap;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: .92rem; }
.btn-magenta { --btn-bg: var(--magenta); --btn-fg: #fff; }
.btn-green { --btn-bg: var(--green); --btn-fg: #15200a; }
.btn-cyan { --btn-bg: var(--cyan); --btn-fg: #032131; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--border); }
.btn-ghost:hover { --btn-bg: var(--surface-2); box-shadow: none; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); }
.header-actions .btn span { display: none; }
@media (min-width: 480px) { .header-actions .btn span { display: inline; } }
@media (max-width: 479px) {
	.header-row { gap: 10px; }
	.header-actions { gap: 6px; }
}
/* iPhone SE (1st gen) and similar: keep the wordmark and buttons on one row */
@media (max-width: 359px) { .header-row .wordmark { font-size: 1.05rem; } }

/* theme toggle: shows the moon in light mode and the sun in dark mode */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); background: none; color: var(--text); cursor: pointer; transition: background .15s; }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle .icon-sun { display: none; }
: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; }
}

.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- layout ---------- */

main.container { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }

.grid-2 { display: grid; gap: 20px; margin: 24px 0; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow);
	margin-bottom: 20px;
}
@media (max-width: 400px) { .card { padding: 18px 16px; } }

/* the Turnstile widget is a fixed 300px wide – shrink it on the narrowest phones */
.cf-turnstile { min-height: 65px; }
@media (max-width: 359px) { .cf-turnstile { width: 300px; transform: scale(.84); transform-origin: 0 0; margin-bottom: -10px; } }
@media (min-width: 720px) { .card { padding: 28px; } }

.page-head { margin-bottom: 24px; display: flex; flex-wrap: wrap; align-items: end; gap: 8px 20px; }
.page-head > h1, .page-head > .lead, .page-head > .breadcrumbs, .page-head > .muted { flex-basis: 100%; }
.page-head > h1 { margin-bottom: 0; }
.page-head .segmented { margin-left: 0; }
@media (min-width: 720px) {
	.page-head > h1 { flex: 1 1 auto; }
	.page-head .segmented { margin-left: auto; }
}
.page-head .lead { margin: 0; }
.breadcrumbs { margin: 0; font-weight: 700; font-size: .95rem; color: var(--muted); }
.hash { color: var(--green); margin-right: .05em; }

.author-head { flex-wrap: nowrap; align-items: center; gap: 16px; }
.author-head > div { flex: 1; }
.author-head .muted { margin: .3em 0 0; }

/* panels: coloured card headers echo the old tab graphics */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.panel > :not(.panel-head) { margin-left: 22px; margin-right: 22px; }
.panel > :last-child { margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; }
.panel-more { font-size: .9rem; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: .2em; color: inherit; opacity: .85; }
.panel-more:hover { opacity: 1; color: inherit; }
.panel-magenta .panel-head { background: var(--magenta); color: #fff; }
.panel-cyan .panel-head { background: var(--cyan); color: #032131; }
.panel-green .panel-head { background: var(--green); color: #15200a; }

/* ---------- hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; margin: 8px 0 12px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; margin-top: 20px; } }
.hero-title { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.8rem); font-weight: 950; letter-spacing: -0.04em; margin-bottom: .35em; }
.hl-green {
	color: var(--green-ink);
	background: linear-gradient(transparent 62%, color-mix(in srgb, var(--green) 30%, transparent) 62%);
	padding: 0 .08em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }

.hero-search {
	display: flex;
	gap: 6px;
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: 999px;
	padding: 5px;
	box-shadow: var(--shadow);
	max-width: 560px;
	transition: border-color .15s;
}
.hero-search:focus-within { border-color: var(--cyan); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.1rem; color: inherit; padding: 8px 16px; outline: none; }
.hero-search .btn { padding: 10px 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.daily-card {
	position: relative;
	background: var(--surface);
	border-radius: 26px;
	padding: 28px 28px 22px;
	box-shadow: var(--shadow-lg);
	isolation: isolate;
	transform: rotate(-1.2deg);
}
.daily-card::before {
	content: "";
	position: absolute;
	inset: -3px;
	z-index: -1;
	border-radius: 29px;
	background: var(--brand-gradient);
}
.daily-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 26px;
	background: var(--surface);
}
.daily-card .eyebrow { color: var(--magenta-ink); }
.daily-quote { margin: 0 0 16px; font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); font-weight: 900; line-height: 1.2; letter-spacing: -0.02em; }
.daily-quote::before { content: "„"; color: var(--magenta); }
.daily-quote::after { content: "“"; color: var(--magenta); }
.daily-quote a { color: var(--text); text-decoration: none; }
.daily-quote a:hover { color: var(--magenta-ink); }
.daily-meta { display: flex; align-items: center; gap: 12px; margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	font-weight: 800;
	font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--green-soft);
	color: var(--green-ink);
	font-weight: 900;
	transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--green-ink); }
.faq details p { color: var(--muted); margin: 0 0 14px; max-width: 75ch; }

/* ---------- lists ---------- */

.toplist, .newlist, .plainlist { list-style: none; padding: 0; }
.toplist li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.toplist li:last-child, .newlist li:last-child { border-bottom: 0; }
.rank {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--magenta-soft);
	color: var(--magenta-ink);
	font-weight: 900;
	font-size: .9rem;
}
.toplist li:nth-child(-n+3) .rank { background: var(--magenta); color: #fff; }
.toplist-text, .newlist-text { flex: 1; font-weight: 750; color: var(--text); text-decoration: none; }
.toplist-text:hover, .newlist-text:hover { color: var(--magenta-ink); }
.newlist li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.newlist .meta { flex: none; font-size: .85rem; }

.plainlist li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.plainlist li:last-child { border-bottom: 0; }
.plainlist a { color: var(--text); font-weight: 700; text-decoration: none; }
.plainlist a:hover { color: var(--magenta-ink); }

.meta { color: var(--muted); font-size: .88rem; display: inline-flex; align-items: center; gap: .3em; }
.meta a { color: inherit; font-weight: 700; }

.score {
	display: inline-grid;
	place-items: center;
	min-width: 2.6em;
	padding: 2px 9px;
	border-radius: 999px;
	font-weight: 900;
	font-size: .88rem;
	font-variant-numeric: tabular-nums;
}
.score-pos { background: var(--green-soft); color: var(--green-ink); }
.score-neg { background: var(--magenta-soft); color: var(--magenta-ink); }
.score-zero { background: var(--surface-2); color: var(--muted); }

/* comparison card rows */
.clist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.clist-item {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	transition: border-color .15s, box-shadow .15s, transform .12s;
}
.clist-item:hover { border-color: color-mix(in srgb, var(--cyan) 50%, var(--border)); box-shadow: var(--shadow); }
.clist-main { flex: 1; min-width: 0; }
.clist-text { font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; }
.clist-text:hover { color: var(--magenta-ink); }
.clist-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; }

.card-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
@media (min-width: 720px) { .card-list { grid-template-columns: repeat(2, 1fr); } }
.card-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 12px 16px;
}
.card-list a { font-weight: 750; color: var(--text); text-decoration: none; }
.card-list a:hover { color: var(--magenta-ink); }

/* chips */
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chips-lg { display: flex; gap: 8px; margin-bottom: 24px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--cyan-soft);
	color: var(--cyan-ink);
	font-weight: 750;
	font-size: .85rem;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.chip:hover { background: var(--cyan); color: #032131; }
.chips-lg .chip { padding: 6px 14px; font-size: .98rem; }
.chip .count { font-size: .8em; }

/* segmented control */
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented a { padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .92rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.segmented a:hover { color: var(--text); }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented sup { color: var(--magenta-ink); }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 10px;
	border-radius: 999px;
	font-weight: 800;
	text-decoration: none;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
}
.page:hover { border-color: var(--cyan); color: var(--cyan-ink); }
.page.current { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.page-gap { border: 0; background: none; }

/* ---------- detail ---------- */

.pager-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; }
.pager-link { display: inline-flex; align-items: center; gap: .3em; font-weight: 800; color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.pager-link:hover { background: var(--surface); color: var(--text); }
.pager-random { color: var(--green-ink); }
@media (max-width: 480px) { .pager-link span { display: none; } }

.quote-card {
	position: relative;
	background: var(--surface);
	border-radius: 28px;
	padding: 36px 24px 26px;
	box-shadow: var(--shadow-lg);
	text-align: center;
	overflow: hidden;
}
.quote-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--brand-gradient); }
@media (min-width: 720px) { .quote-card { padding: 56px 48px 32px; } }
.quote {
	font-size: clamp(2rem, 1.2rem + 4vw, 3.6rem);
	font-weight: 950;
	letter-spacing: -0.035em;
	line-height: 1.1;
	margin: 0 auto 28px;
	max-width: 22ch;
	text-wrap: balance;
}
.quote::before { content: "„"; color: var(--magenta); }
.quote::after { content: "“"; color: var(--magenta); }
.dict-word { color: inherit; text-decoration: underline dotted var(--cyan); text-decoration-thickness: .06em; text-underline-offset: .12em; }
.dict-word:hover { color: var(--cyan-ink); }
.notice { display: inline-block; background: var(--magenta-soft); color: var(--magenta-ink); font-weight: 800; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }

.vote { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-bottom: 20px; }
.vote-btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font: inherit;
	font-weight: 850;
	font-size: 1.05rem;
	padding: 12px 22px;
	border-radius: 999px;
	border: 2px solid;
	cursor: pointer;
	background: var(--surface);
	transition: transform .12s, background .15s, color .15s;
}
.vote-btn b { font-variant-numeric: tabular-nums; }
.vote-btn:hover { transform: translateY(-2px) scale(1.03); }
.vote-btn:active { transform: scale(.97); }
.vote-like { border-color: var(--green); color: var(--green-ink); }
.vote-like:hover { background: var(--green); color: #15200a; }
.vote-dislike { border-color: var(--magenta); color: var(--magenta-ink); }
.vote-dislike:hover { background: var(--magenta); color: #fff; }
.vote-score { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--muted); }
.vote.is-loading { opacity: .6; pointer-events: none; }
.vote-btn.pop { animation: pop .35s ease-out; }
@keyframes pop { 50% { transform: scale(1.12); } }

.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 22px 22px; }
.facts dt { font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: .4em; }
.facts dd { margin: 0; }

/* ---------- A–Z ---------- */

.az-bar {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 10px 0;
	margin-bottom: 16px;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(8px);
}
.az-bar::-webkit-scrollbar { display: none; }
.az-bar { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
@media (min-width: 860px) { .az-bar { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; } }
.az-bar a {
	flex: none;
	display: inline-grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	border-radius: 10px;
	font-weight: 900;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
}
.az-bar a:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.az-groups { columns: 1; column-gap: 20px; }
@media (min-width: 720px) { .az-groups { columns: 2; } }
@media (min-width: 1040px) { .az-groups { columns: 3; } }
.az-group { break-inside: avoid; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; scroll-margin-top: 70px; }
.az-letter { font-size: 2rem; text-transform: uppercase; margin: 0 0 6px; color: var(--cyan-ink); }
.az-group:nth-child(3n+2) .az-letter { color: var(--green-ink); }
.az-group:nth-child(3n+3) .az-letter { color: var(--magenta-ink); }
.az-list { list-style: none; padding: 0; margin: 0; }
.az-list li { padding: 3px 0; }
.az-list a { color: var(--text); text-decoration: none; font-weight: 650; }
.az-list a:hover { color: var(--magenta-ink); text-decoration: underline; }

/* ---------- tags ---------- */

.tag-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tag-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; border-top: 5px solid var(--cyan); box-shadow: var(--shadow); }
.tag-card.tone-1 { border-top-color: var(--green); }
.tag-card.tone-2 { border-top-color: var(--magenta); }
.tag-card h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 1.25rem; margin: 0; }
.tag-card h2 a { color: var(--text); text-decoration: none; }
.tag-card h2 a:hover { color: var(--magenta-ink); }
.tag-card .count { font-size: .85rem; font-weight: 900; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.tag-children { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }

/* ---------- authors ---------- */

.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: 720px; }
.ranking li { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; }
.ranking .rank { background: var(--surface-2); color: var(--muted); }
.ranking-nick { flex: 1; font-weight: 800; font-size: 1.08rem; color: var(--text); text-decoration: none; }
.ranking-nick:hover { color: var(--magenta-ink); }
.ranking-count { color: var(--muted); font-weight: 700; font-size: .92rem; }
.podium { padding-top: 14px !important; padding-bottom: 14px !important; }
.podium .rank { width: 40px; height: 40px; font-size: 1.1rem; }
.podium-1 { border-color: var(--magenta) !important; background: linear-gradient(90deg, var(--magenta-soft), var(--surface)) !important; }
.podium-1 .rank { background: var(--magenta); color: #fff; }
.podium-2 { border-color: var(--cyan) !important; }
.podium-2 .rank { background: var(--cyan); color: #032131; }
.podium-3 { border-color: var(--green) !important; }
.podium-3 .rank { background: var(--green); color: #15200a; }

/* ---------- forms ---------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 800; }
.field.required > label:not(.check)::after, .field.required > .check span::after { content: " *"; color: var(--magenta-ink); }
.field-help { color: var(--muted); font-size: .88rem; }
.field-error { color: var(--danger); font-weight: 700; font-size: .9rem; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--danger); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"]:not(.header-search input):not(.hero-search input), textarea, select {
	width: 100%;
	font: inherit;
	color: inherit;
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 11px 14px;
	transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 20%, transparent); }
textarea { min-height: 120px; resize: vertical; }
.input-lg { font-size: 1.3rem; font-weight: 750; }

.check { display: inline-flex; align-items: center; gap: .55em; cursor: pointer; font-weight: 650; }
.check input { width: 1.15em; height: 1.15em; accent-color: var(--magenta); margin: 0; }
.check-strong { font-weight: 850; }

.form-errors { list-style: none; margin: 0; padding: 12px 16px; background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); font-weight: 750; }
.form-errors:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.auth { display: grid; place-items: start center; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 18px 0 0; font-size: .95rem; }

.tips { background: var(--green-soft); border-radius: var(--radius); padding: 18px 22px; }
.tips ul { margin: 0; padding-left: 1.2em; }

.search-form { display: grid; gap: 14px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
@media (max-width: 479px) {
	.search-row { flex-wrap: wrap; }
	.search-row input { flex-basis: 100%; }
	.search-row .btn { flex: 1; }
}
.search-scopes { display: flex; flex-wrap: wrap; gap: 18px; border: 0; padding: 0; margin: 0; }
.results h2 { margin-top: 28px; }

.contact-card { text-align: center; }

.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }

/* ---------- flash messages ---------- */

.flashes { display: grid; gap: 10px; margin-bottom: 22px; }
.flash {
	padding: 13px 18px;
	border-radius: var(--radius-sm);
	font-weight: 750;
	border-left: 6px solid;
	background: var(--surface);
	box-shadow: var(--shadow);
	animation: slide-in .3s ease-out;
}
.flash-success { border-color: var(--green); background: var(--green-soft); }
.flash-info { border-color: var(--cyan); background: var(--cyan-soft); }
.flash-error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- profile ---------- */

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { border-radius: var(--radius); padding: 18px 20px; font-weight: 750; }
.stat b { display: block; font-size: 2rem; font-weight: 950; line-height: 1.1; }
.stat-green { background: var(--green-soft); color: var(--green-ink); }
.stat-cyan { background: var(--cyan-soft); color: var(--cyan-ink); }
.stat-magenta { background: var(--magenta); color: #fff; }
.stat-cta { display: flex; align-items: center; justify-content: center; gap: .4em; text-decoration: none; font-size: 1.1rem; }
.stat-cta:hover { color: #fff; filter: brightness(1.08); }

/* ---------- admin ---------- */

.admin-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .admin-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.tag-picker { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.tag-picker legend { padding: 0 6px; }
.tag-picker-grid { display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tag-picker-group { display: grid; gap: 4px; align-content: start; }
.tag-picker-group strong { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.delete-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.dup-card ul { margin: 4px 0 12px; padding-left: 1.2em; font-size: .95rem; }
.dup-alert { border-color: var(--danger); }
.badge { display: inline-block; vertical-align: middle; font-size: .75rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.badge-pending { background: var(--magenta-soft); color: var(--magenta-ink); }
.badge-ok { background: var(--green-soft); color: var(--green-ink); }
h1 .badge { font-size: .8rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 14px; border-bottom: 2px solid var(--border); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td a { font-weight: 700; color: var(--text); }

/* admin table: each row becomes a small card on phones */
@media (max-width: 639px) {
	.table-admin thead { display: none; }
	.table-admin tr {
		display: grid;
		grid-template-columns: auto auto 1fr auto auto;
		grid-template-areas: "text text text score actions" "id author date date date";
		align-items: center;
		gap: 4px 10px;
		padding: 12px 14px;
		border-bottom: 1px solid var(--border);
	}
	.table-admin tr:last-child { border-bottom: 0; }
	.table-admin td { padding: 0; border: 0; }
	.table-admin .col-text { grid-area: text; }
	.table-admin .col-score { grid-area: score; }
	.table-admin .col-actions { grid-area: actions; }
	.table-admin .col-id { grid-area: id; font-size: .85rem; }
	.table-admin .col-author { grid-area: author; font-size: .85rem; color: var(--muted); }
	.table-admin .col-date { grid-area: date; font-size: .85rem; color: var(--muted); }
}
form.inline { display: inline; }

/* ---------- errors ---------- */

.error-page { text-align: center; padding: 32px 0; }
.error-page h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.error-page .lead { margin: 0 auto 8px; }
.error-page .hero-actions { justify-content: center; }
.error-code {
	font-size: clamp(6rem, 4rem + 10vw, 11rem);
	font-weight: 1000;
	line-height: 1;
	letter-spacing: -0.06em;
	margin: 0 0 12px;
	display: inline-block;
	background: var(--brand-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------- footer ---------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 0 28px; }
.tag-cloud { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; line-height: 1.3; }
.cloud-tag { text-decoration: none; font-weight: 800; color: var(--cyan-ink); }
.cloud-tag:nth-child(3n+2) { color: var(--green-ink); }
.cloud-tag:nth-child(3n+3) { color: var(--magenta-ink); }
.cloud-tag:hover { text-decoration: underline; }
.cloud-tag.w1 { font-size: .9rem; }
.cloud-tag.w2 { font-size: 1.05rem; }
.cloud-tag.w3 { font-size: 1.25rem; }
.cloud-tag.w4 { font-size: 1.5rem; }
.cloud-tag.w5 { font-size: 1.8rem; font-weight: 900; }

.footer-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { color: var(--text); font-weight: 650; text-decoration: none; }
.footer-links a:hover { color: var(--magenta-ink); text-decoration: underline; }
.license { font-size: .85rem; margin: 28px 0 0; }
.license a { color: inherit; }
