body {
  font-family: Arial, sans-serif;
  color: aliceblue;
  padding: 2em;
  background-color: #101519;
}

.centered-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* min-height, а не height. При фіксованій висоті та justify-content: center
     зміст, що не влазить, виштовхується вгору Й УНИЗ одночасно, і верхня
     частина стає недосяжною скролом — це відома вада флекс-центрування.
     На картці авто туди йшли заголовок і ФОРМА ПОШУКУ: сторінка ставала
     глухим кутом, з якої не можна ані шукати далі, ані повернутись.
     Заміряно на проді: вікно 900px, контейнер 900px, зміст 1126px,
     форма на -111px угорі й -392px унизу, тобто недосяжна за будь-якого
     скролу. З min-height контейнер росте за змістом, і форма на +146px. */
  min-height: 100vh;
  /* 20vw з обох боків на телефоні з'їдало 40% ширини. Обмеження по
     максимуму дає той самий вигляд на широкому екрані й читабельний на
     вузькому. */
  max-width: 72rem;
  margin: 0 auto;
  padding: 2em 1.25rem;
  text-align: center;
}

.centered-wrapper h1 {
  margin-bottom: 0.5em;
  font-size: 2em;
}

.centered-wrapper p {
  margin: 0.2em 0;
  font-size: 1em;
  color: #ccc;
}

.form-wrapper {
  margin-bottom: 2em;
  align-items: center;
  width: 99vw;
  display: flex;
  justify-content: center;
  gap: 1em;
}

input[type="text"] {
  padding: 0.5em;
  font-size: 1em;
  width: 50%;
  align-self: center;
  border-radius: 5px;
}

button {
  padding: 0.5em 1em;
  font-size: 1em;
  background-color: #37745b;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  width: 10%;
}

.results-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1.5em;
  margin-top: 2em;
  width: 100%;
  max-width: 60vw;
}

.photo-placeholder {
  width: 150px;
  height: 150px;
  background-color: #333;
  border-radius: 10px;
}

.car-info {
  text-align: left;
  flex: 1;
}

.car-info {
  width: 50vw;
}

div.info-box {
  padding: 1em;
  margin-bottom: 2em;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 2em;
}

table,
th,
td {
  border: 1px solid #ccc;
  padding: 4px;
}

th,
td {
  padding: 0.5em;
  border-bottom: 1px solid #ccc;
}

th {
  text-align: left;
}

.icon {
  /* Було три класи, і всі три вказували на ОДИН checklist.png — біля кожного
     поля стояв однаковий значок. PNG до того ж не перефарбувати, і на темному
     тлі він губився. Тепер це маски: значок бере колір тексту через
     currentColor, тож лишається світлим на темному тлі. */
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 0.55em;
  vertical-align: -0.2em;
  background-color: currentColor;
  opacity: 0.72;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-plate {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%272%27%20y%3D%276%27%20width%3D%2720%27%20height%3D%2712%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M7%2010v4M12%2010v4M17%2010v4%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%272%27%20y%3D%276%27%20width%3D%2720%27%20height%3D%2712%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M7%2010v4M12%2010v4M17%2010v4%27%2F%3E%3C%2Fsvg%3E");
}

.icon-vin {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%205v14M7.5%205v14M11%205v14M14.5%205v14M18%205v14M20.5%205v14%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%205v14M7.5%205v14M11%205v14M14.5%205v14M18%205v14M20.5%205v14%27%2F%3E%3C%2Fsvg%3E");
}

.icon-tag {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20.6%2013.4%2012%204.8H4.8V12l8.6%208.6z%27%2F%3E%3Ccircle%20cx%3D%278.2%27%20cy%3D%278.2%27%20r%3D%271.3%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20.6%2013.4%2012%204.8H4.8V12l8.6%208.6z%27%2F%3E%3Ccircle%20cx%3D%278.2%27%20cy%3D%278.2%27%20r%3D%271.3%27%2F%3E%3C%2Fsvg%3E");
}

.icon-year {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%275%27%20width%3D%2718%27%20height%3D%2716%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M8%203v4M16%203v4M3%2011h18%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%275%27%20width%3D%2718%27%20height%3D%2716%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M8%203v4M16%203v4M3%2011h18%27%2F%3E%3C%2Fsvg%3E");
}

.icon-color {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%203c4%205%206%207.5%206%2010a6%206%200%200%201-12%200c0-2.5%202-5%206-10z%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%203c4%205%206%207.5%206%2010a6%206%200%200%201-12%200c0-2.5%202-5%206-10z%27%2F%3E%3C%2Fsvg%3E");
}

.icon-car {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2016h16v-4l-2-5H6l-2%205v4z%27%2F%3E%3Ccircle%20cx%3D%277.5%27%20cy%3D%2716.5%27%20r%3D%271.6%27%2F%3E%3Ccircle%20cx%3D%2716.5%27%20cy%3D%2716.5%27%20r%3D%271.6%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2016h16v-4l-2-5H6l-2%205v4z%27%2F%3E%3Ccircle%20cx%3D%277.5%27%20cy%3D%2716.5%27%20r%3D%271.6%27%2F%3E%3Ccircle%20cx%3D%2716.5%27%20cy%3D%2716.5%27%20r%3D%271.6%27%2F%3E%3C%2Fsvg%3E");
}

.icon-fuel {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%2711%27%20height%3D%2716%27%20rx%3D%271.5%27%2F%3E%3Cpath%20d%3D%27M6%208h5%27%2F%3E%3Cpath%20d%3D%27M14%2010h3v6a2%202%200%200%200%204%200V8l-3-3%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%2711%27%20height%3D%2716%27%20rx%3D%271.5%27%2F%3E%3Cpath%20d%3D%27M6%208h5%27%2F%3E%3Cpath%20d%3D%27M14%2010h3v6a2%202%200%200%200%204%200V8l-3-3%27%2F%3E%3C%2Fsvg%3E");
}

.icon-weight {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2020h16l-2-11H6z%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%276%27%20r%3D%272.5%27%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2020h16l-2-11H6z%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%276%27%20r%3D%272.5%27%2F%3E%3C%2Fsvg%3E");
}

.car-selection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  width: 100%;
  justify-content: center;
}

.car-card {
  display: flex;
  gap: 1em;
  padding: 1em;
  border: 1px solid #3a3f44;
  border-radius: 12px;
  background: #0f1418;
  width: 320px;
  align-items: center;
}

.photo-placeholder.small {
  width: 80px;
  height: 80px;
  background-color: #2a2f34;
  border-radius: 10px;
  flex-shrink: 0;
}

.car-card-body h3 {
  margin: 0 0 0.4em 0;
  font-size: 1.1em;
}

.car-card-body p {
  margin: 0.1em 0;
}

.car-link {
  color: #3bbf7a;
  text-decoration: none;
  font-weight: bold;
}

.car-link:hover {
  text-decoration: underline;
}

/* Застереження про межу покриття номерних знаків.
   Показується, лише коли задано PLATE_DATA_CUTOFF. */
.notice {
  max-width: 46em;
  margin: 0 0 1.5em;
  padding: 0.85em 1.1em;
  text-align: left;
  font-size: 0.92em;
  line-height: 1.5;
  color: #d8dee4;
  background: #1a2026;
  border: 1px solid #3a3f44;
  border-left: 3px solid #c9a227;
  border-radius: 8px;
}

/* Перебиваємо .centered-wrapper p, щоб застереження лишалось читабельним */
.centered-wrapper .notice {
  color: #d8dee4;
  font-size: 0.92em;
}

.notice strong {
  color: aliceblue;
}

/* ---------------------------------------------------------------------------
   Дерево марок. Окремий контейнер, бо .centered-wrapper має height: 100vh —
   довгий перелік моделей у ньому не поміщається.
   --------------------------------------------------------------------------- */
.catalog-wrapper {
  max-width: 60em;
  margin: 0 auto;
  padding: 0 1em 4em;
}

.catalog-wrapper h1 {
  margin: 0.6em 0 0.3em;
  font-size: 1.9em;
}

.crumbs {
  font-size: 0.85em;
  color: #8a97a3;
  margin-bottom: 1.5em;
}

.crumbs a {
  color: #6fb6ff;
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs span {
  margin: 0 0.4em;
}

.catalog-lede {
  color: #b9c4ce;
  margin: 0 0 2em;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14em, 1fr));
  gap: 0.5em 1.5em;
  list-style: none;
  padding: 0;
  margin: 0 0 2em;
}

.catalog-grid li {
  display: flex;
  justify-content: space-between;
  gap: 0.75em;
  padding: 0.45em 0;
  border-bottom: 1px solid #1e2830;
}

.catalog-grid a {
  color: #6fb6ff;
  text-decoration: none;
}

.catalog-grid a:hover {
  text-decoration: underline;
}

.catalog-count {
  color: #7c8894;
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
}

.catalog-table th,
.catalog-table td {
  padding: 0.5em 0.7em;
  text-align: left;
  border-bottom: 1px solid #1e2830;
}

.catalog-table th {
  color: #7c8894;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.catalog-table a {
  color: #6fb6ff;
  text-decoration: none;
}

.catalog-pages {
  display: flex;
  align-items: center;
  gap: 1.5em;
  color: #7c8894;
  font-size: 0.9em;
}

.catalog-pages a {
  color: #6fb6ff;
  text-decoration: none;
}

.catalog-note,
.catalog-foot {
  color: #7c8894;
  font-size: 0.85em;
  margin-top: 2em;
}

.catalog-note a,
.catalog-foot a {
  color: #6fb6ff;
}

/* Блок посилань на марки в підвалі пошуку й карток авто. */
.brand-links {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid #1e2830;
  width: 100%;
  text-align: left;
}

.brand-links h2 {
  font-size: 1em;
  color: #7c8894;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8em;
}

.brand-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.2em;
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.brand-links a,
.catalog-back a {
  color: #6fb6ff;
  text-decoration: none;
}

.brand-links a:hover,
.catalog-back a:hover {
  text-decoration: underline;
}

.catalog-back {
  margin-top: 1.5em;
  color: #b9c4ce;
}

/* ---------------------------------------------------------------------------
   Публічна статистика. Графіки — серверний SVG, тож кольори беруться звідси,
   а не з клієнтської бібліотеки.
   --------------------------------------------------------------------------- */
.chart {
  width: 100%;
  height: auto;
  margin: 0.5em 0 2em;
  overflow: visible;
}

.chart-bar { height: 34px; margin-bottom: 0.8em; }

.ch-grid { stroke: #1e2830; stroke-width: 1; }
.ch-axis { fill: #7c8894; font-size: 11px; font-family: Arial, sans-serif; }
.ch-line { fill: none; stroke: #6fb6ff; stroke-width: 2; stroke-linejoin: round; }
.ch-area { fill: #6fb6ff; opacity: 0.12; }
.ch-bar  { fill: #6fb6ff; }
.ch-label { fill: #b9c4ce; font-size: 12px; font-family: Arial, sans-serif; }
.ch-link { fill: #6fb6ff; }
.ch-link:hover { text-decoration: underline; }
.ch-value { fill: #7c8894; font-size: 11px; font-family: Arial, sans-serif; }

.ch-seg-0 { fill: #6fb6ff; }
.ch-seg-1 { fill: #4c8fd0; }
.ch-seg-2 { fill: #3aa88a; }
.ch-seg-3 { fill: #c8a44a; }
.ch-seg-4 { fill: #b56bc4; }
.ch-seg-5 { fill: #d97a5a; }
.ch-seg-6 { fill: #5f7b8c; }
.ch-seg-7 { fill: #3a4650; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.4em;
  list-style: none;
  padding: 0;
  margin: 0 0 2em;
  font-size: 0.88em;
  color: #b9c4ce;
}

.legend .sw {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  border-radius: 2px;
  margin-right: 0.45em;
  vertical-align: baseline;
}

.sw-0 { background: #6fb6ff; }
.sw-1 { background: #4c8fd0; }
.sw-2 { background: #3aa88a; }
.sw-3 { background: #c8a44a; }
.sw-4 { background: #b56bc4; }
.sw-5 { background: #d97a5a; }
.sw-6 { background: #5f7b8c; }
.sw-7 { background: #3a4650; }

.catalog-wrapper h2 {
  font-size: 1.15em;
  margin: 2em 0 0.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #1e2830;
}

.stats-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
  margin: 0 0 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid #1e2830;
}

.stats-nav a { color: #6fb6ff; text-decoration: none; }
.stats-nav a:hover { text-decoration: underline; }

.stats-note {
  border-left: 3px solid #3aa88a;
  background: #12211d;
  padding: 0.7em 1em;
  margin: 1em 0 2em;
  font-size: 0.9em;
  color: #b9c4ce;
}

.stats-disclaimer {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid #1e2830;
  font-size: 0.88em;
  color: #8a97a3;
}

.stats-disclaimer strong { color: #c8a44a; }

.slice-sub {
  font-size: 0.95em;
  color: #b9c4ce;
  font-weight: normal;
  margin: 1.2em 0 0;
}
