/* Сторінки порівняння (20.11, tools/compare_pages.py). Контейнер як на головній: min(1520px, 100% - 2*pad).
   Дизайн за зауваженням користувача: іконки, картки «проти», великі цифри, таблиця з акцентом нашої колонки. */
.cmp { --cw: min(1520px, calc(100% - 2 * var(--pad))); --soft: #f4f4f6; --ours: #0c0c0d; }
.cmp-wrap, .cmp-hero { width: var(--cw); margin: 0 auto; }
.cmp-wrap { padding: clamp(56px, 6vw, 96px) 0; border-top: 1px solid var(--line); }
.cmp-h2 { font-size: clamp(26px, 2.4vw, 38px); font-weight: 400; letter-spacing: -.01em; margin: 0 0 32px; }
.cmp-p, .cmp-part p, .cmp-short__item p { font-size: clamp(16px, 1.1vw, 18px); line-height: 1.6; color: var(--muted); margin: 0; max-width: 68ch; }
.cmp-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- перший екран: текст + картки «проти» ---------- */
.cmp-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 96px); align-items: center; padding: calc(76px + clamp(32px, 4vw, 64px)) 0 clamp(56px, 6vw, 96px); }
.cmp-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.cmp-crumbs a { color: inherit; }
.cmp-crumbs a:hover { color: var(--ink); }
.cmp-h1 { font-size: clamp(36px, 4.2vw, 68px); font-weight: 300; line-height: 1.04; letter-spacing: -.02em; margin: 0; }
.cmp-lead { font-size: clamp(17px, 1.3vw, 21px); line-height: 1.55; color: var(--muted); margin: 24px 0 0; max-width: 56ch; }
.cmp-updated { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.cmp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

.cmp-vs { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmp-vs__card { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.cmp-vs__card.is-their { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cmp-vs__img, .cmp-vs__type { position: relative; aspect-ratio: 1; }
.cmp-vs__img img { position: absolute; inset: 8% 12%; width: 76%; height: 84%; object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .16)); }
/* у конкурента без фото: назва моделі й кольори з його списку */
.cmp-vs__type { display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center;
	background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0, 0, 0, .025) 14px 15px); }
.cmp-vs__type span { font-size: clamp(30px, 3.2vw, 52px); font-weight: 200; letter-spacing: .14em; }
.cmp-vs__type small { font-size: 12px; color: var(--muted); max-width: 22ch; }
.cmp-vs__body { padding: 20px clamp(18px, 1.8vw, 28px) 26px; border-top: 1px solid var(--line); }
.cmp-vs__brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.cmp-vs__name { font-size: clamp(20px, 1.7vw, 28px); font-weight: 500; margin: 6px 0 0; }
.cmp-vs__price { font-size: clamp(26px, 2.4vw, 38px); font-weight: 300; margin: 14px 0 0; }
.cmp-vs__meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.cmp-vs__x { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
	display: grid; place-items: center; background: var(--ours); color: #fff; font-size: 18px; font-weight: 500; letter-spacing: .04em; box-shadow: 0 0 0 8px #fff; z-index: 1; }

.cmp-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cmp-dots i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cmp-dots--lg { justify-content: flex-start; gap: 12px; }
.cmp-dots--lg i { width: 44px; height: 44px; }

/* ---------- головне в цифрах ---------- */
.cmp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cmp-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: clamp(20px, 2vw, 30px); border-radius: var(--r); background: var(--soft); }
.cmp-stat .cmp-ic { width: 28px; height: 28px; }
.cmp-stat__l { justify-self: end; align-self: center; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cmp-stat__v { display: grid; align-content: start; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.cmp-stat__v b { font-size: clamp(19px, 1.7vw, 28px); font-weight: 400; line-height: 1.15; }
.cmp-stat__v small { font-size: 12px; color: var(--muted); }
.cmp-stat__v.is-ours b { font-weight: 500; }
.cmp-stat__v.is-ours small { color: var(--ink); }

/* ---------- коротко ---------- */
.cmp-short__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmp-short__item { border-radius: var(--r); padding: clamp(22px, 2.4vw, 36px); box-shadow: inset 0 0 0 1px var(--line); }
.cmp-short__item.is-ours { background: var(--ours); box-shadow: none; }
.cmp-short__item.is-ours b, .cmp-short__item.is-ours p { color: #fff; }
.cmp-short__item.is-ours p { opacity: .72; }
.cmp-short__item b { display: block; font-size: clamp(18px, 1.4vw, 22px); font-weight: 500; margin-bottom: 10px; }

/* ---------- таблиця: справжня <table>; наша колонка на сірому; однакові рядки позначені ---------- */
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: clamp(15px, 1.05vw, 17px); }
.cmp-table th, .cmp-table td { text-align: left; vertical-align: top; padding: 20px 22px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.cmp-table thead th { font-weight: 500; font-size: clamp(16px, 1.15vw, 19px); border-bottom: 0; padding-top: 22px; }
.cmp-table thead th.is-ours { border-radius: var(--r) var(--r) 0 0; }
.cmp-table .is-ours { background: var(--soft); font-weight: 500; }
.cmp-table tbody tr:last-child .is-ours { border-radius: 0 0 var(--r) var(--r); }
.cmp-table tbody th { font-weight: 400; width: 28%; padding-left: 0; }
.cmp-table td { width: 36%; }
.cmp-rowh { display: inline-flex; align-items: center; gap: 12px; }
.cmp-rowh .cmp-ic { color: var(--muted); }
.cmp-eq { display: inline-block; margin: 8px 0 0 34px; font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.cmp-note { font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* ---------- Monaco зблизька: макроплитки, як на сторінці Rocket ---------- */
.cmp-det { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cmp-det__tile { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.cmp-det__tile img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cmp-det__tile figcaption { padding: 16px 18px 20px; font-size: 14px; color: var(--muted); }
.cmp-det__tile b { display: block; font-size: clamp(16px, 1.15vw, 19px); font-weight: 500; color: var(--ink); margin-bottom: 4px; }

/* ---------- детально: картки з іконкою ---------- */
.cmp-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cmp-part { padding: clamp(22px, 2.2vw, 32px); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.cmp-part__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--soft); margin-bottom: 20px; }
.cmp-part h3, .cmp-who__col h3 { font-size: clamp(18px, 1.4vw, 22px); font-weight: 500; margin: 0 0 12px; }

/* ---------- кому що ---------- */
.cmp-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmp-who__col { border-radius: var(--r); padding: clamp(24px, 2.6vw, 40px); box-shadow: inset 0 0 0 1px var(--line); }
.cmp-who__col.is-ours { background: var(--ours); box-shadow: none; color: #fff; }
.cmp-who__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.cmp-who__col li { display: flex; gap: 12px; align-items: flex-start; font-size: clamp(16px, 1.1vw, 18px); line-height: 1.45; }
.cmp-who__col li .cmp-ic { width: 16px; height: 16px; margin-top: 1px; padding: 4px; border-radius: 50%; background: var(--soft); color: var(--ink); stroke-width: 2.4; box-sizing: content-box; }
.cmp-who__col.is-ours li .cmp-ic { background: #fff; }

/* ---------- кольори ---------- */
.cmp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px clamp(40px, 6vw, 120px); align-items: start; }
.cmp-sw { display: grid; grid-template-columns: repeat(7, minmax(0, 56px)); gap: 12px; }
.cmp-sw img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 1px var(--line); }
.cmp-colors__their { font-size: 14px; color: var(--muted); margin: 32px 0 14px; }

/* ---------- FAQ і джерела ---------- */
.cmp details { border-top: 1px solid var(--line); }
.cmp details:last-child { border-bottom: 1px solid var(--line); }
.cmp summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-size: clamp(16px, 1.1vw, 18px); }
.cmp summary::-webkit-details-marker { display: none; }
.cmp summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 300; transition: transform .3s; }
.cmp details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.cmp details p { padding: 0 40px 20px 0; margin: 0; color: var(--muted); line-height: 1.6; }
.cmp-src { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; font-size: 15px; color: var(--muted); }
.cmp-src li { display: flex; gap: 12px; align-items: flex-start; }
.cmp-src .cmp-ic { width: 18px; height: 18px; margin-top: 2px; }
.cmp-src a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1200px) {
	.cmp-det { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cmp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cmp-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.cmp-hero, .cmp-two, .cmp-short__grid, .cmp-who, .cmp-parts { grid-template-columns: minmax(0, 1fr); }
	.cmp-hero { padding-top: calc(64px + 28px); }
	.cmp-vs { order: -1; gap: 10px; }
	/* на телефоні значок на стику фото і підпису: квадратне фото = половина ширини (margin-top у % рахується від ширини) */
	.cmp-vs__x { width: 44px; height: 44px; font-size: 14px; box-shadow: 0 0 0 6px #fff; top: 0; margin-top: calc(50% - 5px); }
	.cmp-vs__body { padding: 14px 14px 18px; }
	.cmp-vs__type { gap: 12px; padding: 12px; }
	.cmp-vs__type span { font-size: 22px; letter-spacing: .08em; }
	.cmp-vs__type small { display: none; }
	.cmp-dots { gap: 6px; }
	.cmp-dots i { width: 14px; height: 14px; }
	.cmp-stat { padding: 16px; }
	/* таблиця на телефоні: підпис рядка над двома клітинками, без горизонтальної прокрутки */
	.cmp-table thead th:first-child { display: none; }
	.cmp-table thead tr, .cmp-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.cmp-table tbody th { grid-column: 1 / -1; width: auto; padding: 18px 0 8px; border-bottom: 0; }
	.cmp-table td, .cmp-table thead th { width: auto; padding: 10px 12px 16px; }
	.cmp-table thead th { padding: 14px 12px; }
	.cmp-table thead th.is-ours, .cmp-table tbody tr:last-child .is-ours { border-radius: 0; }
	.cmp-table .is-ours { border-radius: 8px; }
	.cmp-eq { margin: 6px 0 0 8px; }
	.cmp-sw { grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.cmp-dots--lg i { width: 34px; height: 34px; }
}
@media (max-width: 420px) {
	.cmp-stats { grid-template-columns: minmax(0, 1fr); }
	.cmp-vs__name { font-size: 17px; }
	.cmp-vs__price { font-size: 22px; }
}

/* зведена сторінка порівнянь (tools/compare_auto.py) */
.cmp-hero--hub { grid-template-columns: minmax(0, 1fr); }
.cmp-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cmp-hub__item { display: grid; gap: 6px; padding: 20px 22px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); transition: background .25s; }
.cmp-hub__item:hover { background: var(--soft); }
.cmp-hub__item span { font-size: clamp(16px, 1.1vw, 18px); font-weight: 500; }
.cmp-hub__item small { font-size: 14px; color: var(--muted); }
@media (max-width: 1200px) { .cmp-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cmp-hub { grid-template-columns: minmax(0, 1fr); } }

/* 20.11 «хуйня з версткою» у плашках: вирівнювання по верху, текст дрібніший за цифри й з переносом */
.cmp-stat { align-content: start; }
.cmp-stat__l { text-align: right; }
.cmp-stat__v b { overflow-wrap: anywhere; }
.cmp-stat__v b.is-text { font-size: clamp(16px, 1.15vw, 19px); font-weight: 400; line-height: 1.3; }
.cmp-stat__v.is-ours b.is-text { font-weight: 500; }
/* критеріїв 4 або 5: рядами по 4/3 без порожніх дір */
.cmp-parts { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* 20.11 перевірка верстки: довга назва моделі конкурента (AVTOTKANYNA, MANHATTAN) ширша за картку */
.cmp-vs__type span { max-width: 100%; overflow-wrap: anywhere; letter-spacing: .08em; font-size: clamp(24px, 2.6vw, 44px); }
@media (max-width: 900px) { .cmp-vs__type span { font-size: clamp(15px, 5vw, 22px); letter-spacing: .04em; } }

/* 20.11 «зроби кріcла ширяючими»: як на головній (hm-float), тінь під кріслом стискається, коли воно вгорі */
.cmp-vs__img.is-float img { inset: 6% 12% 12%; height: 80%; animation: cmp-float 5s ease-in-out infinite; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .14)); }
.cmp-vs__img.is-float::after { content: ""; position: absolute; left: 26%; right: 26%; bottom: 6%; height: 5%; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(0, 0, 0, .26), transparent); animation: cmp-shadow 5s ease-in-out infinite; }
@keyframes cmp-float { 0%, 100% { translate: 0 -10px; } 50% { translate: 0 6px; } }
@keyframes cmp-shadow { 0%, 100% { transform: scale(.78); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cmp-vs__img.is-float img, .cmp-vs__img.is-float::after { animation: none; } }
/* 20.11 перевірка верстки: довгі адреси джерел без пробілів розтягували сторінку на телефоні */
.cmp-src li { min-width: 0; }
.cmp-src a, .cmp-src span { min-width: 0; overflow-wrap: anywhere; }
.cmp-two > * { min-width: 0; }
