/* newcar.starlume.eu — srovnávač aut
 * Jeden stylesheet, žádný build. Tmavé téma, protože tabulka s desítkami
 * čísel se na tmavém pozadí čte líp než na bílém. */

:root {
	--bg: #0c0f16;
	--bg-raised: #141926;
	--bg-sunken: #090c12;
	--line: #232a3b;
	--line-soft: #1a2030;
	--text: #e6eaf3;
	--text-dim: #99a3ba;
	--text-faint: #6b7590;
	--good: #3fb950;
	--good-bg: rgba(63, 185, 80, 0.12);
	--warn: #d29922;
	--accent: #6ea8fe;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
}

.wrap {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

a { color: var(--accent); }
a:hover { color: #9cc4ff; }

/* ---------- hlavička ---------- */

.masthead {
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, #10141f 0%, var(--bg) 100%);
	padding: 52px 0 40px;
}

.masthead h1 {
	margin: 0 0 10px;
	font-size: clamp(28px, 5vw, 44px);
	line-height: 1.15;
	letter-spacing: -.02em;
}

.masthead .lede {
	margin: 0;
	max-width: 62ch;
	color: var(--text-dim);
	font-size: 17px;
}

.stamp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	padding: 5px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-raised);
	color: var(--text-faint);
	font-size: 12.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.stamp b { color: var(--text-dim); font-weight: 600; }

/* ---------- sekce ---------- */

section { padding: 44px 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }

h2 {
	margin: 0 0 6px;
	font-size: 22px;
	letter-spacing: -.01em;
}

.sub {
	margin: 0 0 26px;
	color: var(--text-dim);
	font-size: 15px;
	max-width: 70ch;
}

/* ---------- výběr vozů ---------- */

.picker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.chip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-raised);
	color: var(--text-dim);
	font: inherit;
	font-size: 14.5px;
	cursor: pointer;
	transition: border-color .15s, color .15s, background .15s;
}

.chip:hover { border-color: #34405c; color: var(--text); }

.chip .dot {
	width: 9px; height: 9px;
	border-radius: 50%;
	background: currentColor;
	opacity: .35;
	transition: opacity .15s;
}

.chip[aria-pressed="true"] {
	color: var(--text);
	background: #1b2233;
	border-color: #3a4761;
}

.chip[aria-pressed="true"] .dot { opacity: 1; }

/* ---------- karty vozů ---------- */

.cards {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-raised);
	box-shadow: var(--shadow);
	padding: 24px;
}

.card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--car-accent, var(--accent));
}

.card .badge {
	display: inline-block;
	margin-bottom: 12px;
	padding: 3px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--car-accent) 16%, transparent);
	color: var(--car-accent);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
}

.card h3 {
	margin: 0 0 2px;
	font-size: 20px;
	letter-spacing: -.01em;
}

.card .trim { margin: 0 0 16px; color: var(--text-dim); font-size: 14px; }

.card .price {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.1;
}

.card .price small { font-size: 16px; font-weight: 500; color: var(--text-dim); }

.card .price-note { margin: 4px 0 20px; color: var(--text-faint); font-size: 13px; }

.keyfacts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: var(--line-soft);
	border: 1px solid var(--line-soft);
	border-radius: 10px;
	overflow: hidden;
}

.keyfacts div { background: var(--bg-raised); padding: 12px 14px; }
.keyfacts dt { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.keyfacts dd { margin: 3px 0 0; font-size: 18px; font-weight: 600; }
.keyfacts dd span { font-size: 13px; font-weight: 500; color: var(--text-dim); }

.pros, .cons { margin: 18px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.pros li, .cons li {
	position: relative;
	padding: 4px 0 4px 24px;
	color: var(--text-dim);
}
.pros li::before { content: "+"; position: absolute; left: 6px; color: var(--good); font-weight: 700; }
.cons li::before { content: "−"; position: absolute; left: 6px; color: #f0883e; font-weight: 700; }

.card .price-none { font-size: 24px; color: var(--text-dim); }

.equip {
	margin-top: 16px;
	padding: 12px 14px;
	border: 1px dashed var(--line);
	border-radius: 10px;
}

.equip-title {
	display: block;
	margin-bottom: 6px;
	color: var(--car-accent, var(--accent));
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.equip ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 14px; }

/* ---------- rozměry vedle sebe ---------- */

.size-name { color: var(--car-accent); font-weight: 600; font-size: 15px; }

/* Všechny obrysy sdílejí jedno jeviště: společná vozovka dole, společná
   maska vlevo. Nejvyšší auto vyplní 100 % výšky, ostatní jsou poměrově nižší. */
.size-stage {
	position: relative;
	width: 100%;
	margin: 0 0 6px;
	border-bottom: 2px solid var(--line);
}

.size-box {
	position: absolute;
	left: 0;
	bottom: 0;
	border: 2px solid var(--car-accent);
	border-bottom: 0;
	border-radius: 12px 12px 0 0;
	background: color-mix(in srgb, var(--car-accent) 9%, transparent);
}

.size-scale { margin: 0 0 22px; color: var(--text-faint); font-size: 13px; }

.size-legend {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin-bottom: 26px;
}

.size-card {
	border: 1px solid var(--line);
	border-left: 3px solid var(--car-accent);
	border-radius: 10px;
	background: var(--bg-raised);
	padding: 14px 16px;
}

.size-card dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 5px 12px;
	margin: 10px 0 0;
	font-size: 13.5px;
}

.size-card dl > div { display: contents; }
.size-card dt { color: var(--text-faint); }
.size-card dd { margin: 0; text-align: right; font-weight: 600; }

.boot-bars { margin-top: 8px; }

/* ---------- verdikt ---------- */

.verdict {
	border: 1px solid var(--line);
	border-left: 3px solid var(--warn);
	border-radius: var(--radius);
	background: var(--bg-raised);
	padding: 22px 26px;
}

.verdict h3 { margin: 0 0 8px; font-size: 17px; }
.verdict p { margin: 0 0 12px; color: var(--text-dim); font-size: 15px; }
.verdict p:last-child { margin-bottom: 0; }
.verdict strong { color: var(--text); }

/* ---------- kalkulačka ---------- */

.calc {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(260px, 320px) 1fr;
	align-items: start;
}

.controls {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-raised);
	padding: 20px;
}

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 7px;
	font-size: 13.5px;
	color: var(--text-dim);
}

.field label b { color: var(--text); font-size: 15px; font-weight: 600; }

.field input[type="range"] {
	width: 100%;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--line);
	border-radius: 999px;
	outline-offset: 4px;
}

.field input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--accent);
	border: 3px solid var(--bg-raised);
	cursor: pointer;
}

.field input[type="range"]::-moz-range-thumb {
	width: 12px; height: 12px;
	border-radius: 50%;
	background: var(--accent);
	border: 3px solid var(--bg-raised);
	cursor: pointer;
}

.field select {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg-sunken);
	color: var(--text);
	font: inherit;
	font-size: 14.5px;
}

.results { display: grid; gap: 14px; }

.result-card {
	position: relative;
	border: 1px solid var(--line);
	border-left: 3px solid var(--car-accent, var(--accent));
	border-radius: var(--radius);
	background: var(--bg-raised);
	padding: 18px 22px;
}

.result-card h4 {
	margin: 0 0 14px;
	font-size: 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.tag-owned {
	padding: 2px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--car-accent) 16%, transparent);
	color: var(--car-accent);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
}

.field[hidden] { display: none; }

.result-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 14px 20px;
}

.result-grid dt { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.result-grid dd { margin: 3px 0 0; font-size: 19px; font-weight: 600; }
.result-grid dd small { font-size: 13px; font-weight: 500; color: var(--text-dim); }

.delta {
	margin-top: 4px;
	padding: 14px 22px;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	color: var(--text-dim);
	font-size: 14.5px;
}
.delta b { color: var(--text); }
.delta p { margin: 0 0 10px; }
.delta-list { margin: 0; padding-left: 18px; }
.delta-list li { margin-bottom: 8px; }
.delta-list li:last-child { margin-bottom: 0; }

/* ---------- pruhové grafy ---------- */

.bars { display: grid; gap: 22px; }

.bar-group h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.bar-group h4 span { color: var(--text-faint); font-weight: 400; font-size: 13px; }

.bar-row {
	display: grid;
	grid-template-columns: minmax(120px, 190px) 1fr auto;
	align-items: center;
	gap: 14px;
	margin-bottom: 9px;
	font-size: 14px;
}

.bar-row .name { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar-track {
	height: 22px;
	border-radius: 6px;
	background: var(--bg-sunken);
	overflow: hidden;
}

.bar-fill {
	height: 100%;
	border-radius: 6px;
	background: var(--car-accent, var(--accent));
	opacity: .85;
	transition: width .4s ease;
}

.bar-row .val { font-weight: 600; min-width: 78px; text-align: right; }

/* ---------- tabulka ---------- */

.table-scroll {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-raised);
}

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }

thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	padding: 14px 16px;
	background: #171d2c;
	border-bottom: 1px solid var(--line);
	text-align: right;
	font-size: 13px;
	letter-spacing: .02em;
	white-space: nowrap;
}

thead th:first-child { text-align: left; }
thead th .th-brand { display: block; color: var(--text-faint); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }

tbody th.group {
	padding: 16px;
	background: var(--bg-sunken);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line-soft);
	text-align: left;
	font-size: 13px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--text-dim);
}

tbody td, tbody th.rowlabel {
	padding: 11px 16px;
	border-bottom: 1px solid var(--line-soft);
	vertical-align: baseline;
}

tbody th.rowlabel {
	text-align: left;
	font-weight: 400;
	color: var(--text-dim);
	width: 40%;
}

tbody td { text-align: right; white-space: nowrap; }
tbody tr:hover td, tbody tr:hover th.rowlabel { background: rgba(255, 255, 255, .015); }

td.win {
	color: var(--good);
	font-weight: 600;
	background: var(--good-bg);
}

td.win::after { content: " ✓"; font-size: 11px; opacity: .8; }

tr.emph td, tr.emph th.rowlabel { font-size: 15.5px; }
tr.emph th.rowlabel { color: var(--text); }

td.small, th.rowlabel .small { font-size: 12.5px; color: var(--text-faint); white-space: normal; }

.noteref {
	display: inline-block;
	margin-left: 5px;
	color: var(--accent);
	font-size: 11px;
	vertical-align: super;
	cursor: help;
	text-decoration: none;
}

/* ---------- poznámky, zdroje ---------- */

.notes { margin-top: 22px; display: grid; gap: 10px; }

.note {
	display: grid;
	grid-template-columns: 26px 1fr;
	gap: 10px;
	font-size: 13.5px;
	color: var(--text-faint);
}

.note .n { color: var(--accent); font-weight: 600; }

.sources { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.source-block h4 { margin: 0 0 8px; font-size: 14.5px; }
.source-block ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-dim); }
.source-block li { margin-bottom: 6px; }

footer {
	border-top: 1px solid var(--line);
	padding: 30px 0 50px;
	color: var(--text-faint);
	font-size: 13px;
}

footer p { margin: 0 0 8px; max-width: 78ch; }

/* ---------- responsivita ---------- */

@media (max-width: 860px) {
	.calc { grid-template-columns: 1fr; }
	.bar-row { grid-template-columns: minmax(90px, 130px) 1fr auto; font-size: 13px; }
	tbody th.rowlabel { width: auto; min-width: 190px; }
}

@media (max-width: 560px) {
	.masthead { padding: 34px 0 28px; }
	.card { padding: 20px; }
	.card .price { font-size: 27px; }
	.keyfacts { grid-template-columns: 1fr 1fr; }
	.bar-row { grid-template-columns: 1fr; gap: 4px; }
	.bar-row .val { text-align: left; }
}

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