/* =====================================================================
   AutoChina — издателска система (.ac-page)
   Обща за началната и страниците „Внос“. Една маска (.ac-line), един
   observer, един rAF цикъл (assets/js/ac-editorial.js), една крива.

   Пре-състоянията (opacity:0 / transform) стоят САМО под html.ac-js —
   без скрипт всичко е видимо. При prefers-reduced-motion страницата е
   статична, но завършена (линията начертана, числата в крайна стойност).

   Зарежда се от pages/header.php с ?v=JS_VERSION — след промяна тук
   JS_VERSION в core/config.php трябва да се вдигне.
   ===================================================================== */

.ac-page {
  --ac-fill-from: #c4cec8;
  --ac-dark: #141417;
  --ac-dark-line: rgba(255, 255, 255, .12);
  --ac-dark-muted: rgba(255, 255, 255, .62);
  --ac-ease: cubic-bezier(.16, 1, .3, 1);
  --ac-ease-2: cubic-bezier(.2, .7, .2, 1);
  --sy: 5.5rem;
  --spx: 6px;
  --dotx: calc(6px - 1rem - 4px);
}

@media (min-width: 640px) {
  .ac-page {
    --spx: 0px;
    --dotx: calc(-1.5rem - 4px);
  }
}

@media (min-width: 1024px) {
  .ac-page {
    --sy: 7.5rem;
    --dotx: calc(-2rem - 4px);
  }
}

/* Tailwind .container е без странични отстояния над 640px, а малко над всеки
   breakpoint (640–1359, 1536–1599) ръбът му съвпада с ръба на екрана. */
@media (min-width: 640px) and (max-width: 1359px),
(min-width: 1536px) and (max-width: 1599px) {
  .ac-page .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ac-page {
    --spx: 1rem;
    --dotx: calc(-1.5rem - 4px);
  }
}

@media (min-width: 1024px) and (max-width: 1359px) {
  .ac-page {
    --dotx: calc(-2rem - 4px);
  }
}

/* Кирилица: DM Sans от Google Fonts няма cyrillic subset — Manrope е fallback
   глиф по глиф и дисплей шрифт за заглавията (.ac-display). */
.ac-page :is(p, span, a, label, button, h1, h2, h3, h4, li, div, input, select, option, small, strong, em) {
  font-family: 'DM Sans', 'Manrope', system-ui, sans-serif;
}

.ac-display,
.ac-display span {
  font-family: 'Manrope', 'DM Sans', system-ui, sans-serif;
  letter-spacing: inherit;
}

.ac-display {
  letter-spacing: -0.028em;
  font-weight: 800;
}

.ac-line,
.ac-line-in {
  letter-spacing: inherit;
}

/* ---- Типографска скала (html { font-size: 17px }) ---- */
.ac-h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -0.03em;
}

.ac-h1--page {
  font-size: clamp(2rem, 4.1vw, 3.6rem);
}

.ac-h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  line-height: 1.02;
}

.ac-h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.2;
  font-weight: 700;
}

.ac-manifest {
  font-size: clamp(1.3rem, 2.1vw, 1.85rem);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ac-big {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
}

.ac-huge {
  font-size: clamp(3.8rem, 8vw, 6.4rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
}

.ac-lead {
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ac-muted);
}

@media (min-width: 1024px) {
  .ac-lead {
    font-size: 1.12rem;
  }
}

.ac-eyebrow {
  display: block;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #8a978f;
}

.ac-eyebrow--red {
  color: var(--ac-red);
}

.ac-eyebrow--ink {
  color: var(--ac-ink);
}

/* ---- Кикер „02 — Защо AutoChina“: номер + линийка, която се чертае ---- */
.ac-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ac-muted);
}

.ac-kicker span {
  letter-spacing: inherit;
}

.ac-kicker-n {
  font-variant-numeric: tabular-nums;
  color: var(--ac-red);
}

.ac-kicker-l {
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  opacity: .55;
  transform-origin: left;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .ac-kicker--folio {
    padding-top: .55rem;
  }
}

.ac-kicker--light {
  color: rgba(255, 255, 255, .75);
}

.ac-kicker--light .ac-kicker-n {
  color: #ef4444;
}

.ac-js .ac-kicker-l {
  transform: scaleX(0);
  transition: transform .8s var(--ac-ease) .12s;
}

.ac-js .ac-kicker.is-in .ac-kicker-l {
  transform: none;
}

/* ---- Граматика на разкриване ---- */
.ac-js .ac-r {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ac-ease), transform .8s var(--ac-ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.ac-js .ac-r.is-in {
  opacity: 1;
  transform: none;
}

.ac-line {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}

.ac-js .ac-line-in {
  display: block;
  transform: translateY(112%);
  transition: transform .9s var(--ac-ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.ac-js .ac-mask.is-in .ac-line-in {
  transform: none;
}

.ac-hr {
  display: block;
  height: 1px;
  background: var(--ac-line);
}

.ac-hr--dark {
  background: var(--ac-dark-line);
}

.ac-js .ac-hr {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ac-ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.ac-js .ac-hr.is-in {
  transform: none;
}

@keyframes ac-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ac-hrx {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes ac-img {
  from {
    transform: scale(1.08);
  }

  to {
    transform: none;
  }
}

/* Деца в контейнер със стагер: контейнерът получава .is-in, децата влизат сами
   (и родените по-късно от x-for) — .ac-stagger > * с --d по nth-child. */
.ac-js .ac-stagger:not(.is-in)>* {
  opacity: 0;
}

.ac-js .ac-stagger.is-in>* {
  animation: ac-up .7s var(--ac-ease) backwards;
  animation-delay: var(--d, 0ms);
}

.ac-stagger.is-in> :nth-child(2) {
  --d: 70ms;
}

.ac-stagger.is-in> :nth-child(3) {
  --d: 140ms;
}

.ac-stagger.is-in> :nth-child(4) {
  --d: 210ms;
}

.ac-stagger.is-in> :nth-child(5) {
  --d: 280ms;
}

.ac-stagger.is-in> :nth-child(6) {
  --d: 350ms;
}

.ac-stagger.is-in> :nth-child(7) {
  --d: 420ms;
}

.ac-stagger.is-in> :nth-child(8) {
  --d: 490ms;
}

.ac-stagger.is-in> :nth-child(n+9) {
  --d: 560ms;
}

/* ---- Стрелки, линкове, бутони: дръжката на стрелката се чертае при hover ---- */
.ac-arrow {
  width: 20px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  overflow: visible;
}

.ac-arrow line {
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  transition: stroke-dashoffset .28s var(--ac-ease);
}

:is(.ac-link, .ac-btn, .ac-row, .ac-post, .ac-hlink, .ac-tile):hover .ac-arrow line {
  stroke-dashoffset: 0;
}

.ac-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ac-ink);
  cursor: pointer;
  transition: color .2s;
}

.ac-link:hover {
  color: var(--ac-red);
}

.ac-link--red {
  color: var(--ac-red);
}

.ac-link--red:hover {
  color: var(--ac-red-dark);
}

.ac-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 9999px;
  cursor: pointer;
  padding: .9rem 1.8rem;
  transition: background-color .2s, color .2s, box-shadow .3s, border-color .2s, transform .3s var(--ac-ease-2);
}

/* Вариантите са писани двойно (.ac-btn.ac-btn--x), а не с един клас, заради
   Tailwind preflight: `[type='button'], [type='submit'] { background-color:
   transparent; background-image: none }` е със същата тежест като един клас, а
   play-CDN-ът го инжектира по-късно в главата — така фонът на всеки <button>
   изчезваше, докато същият клас върху <a> работеше. */
.ac-btn.ac-btn--red {
  background: var(--ac-red, #dc2626);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 30px -14px rgba(220, 38, 38, .9);
}

.ac-btn.ac-btn--red:hover {
  background: var(--ac-red-dark, #b91c1c);
  color: #fff;
}

.ac-btn.ac-btn--white {
  background: #fff;
  color: var(--ac-ink);
  border: 0;
}

.ac-btn.ac-btn--white:hover {
  background: #fee2e2;
  color: var(--ac-red-dark);
}

.ac-btn.ac-btn--ghost {
  background: transparent;
  color: var(--ac-ink);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ac-line);
}

.ac-btn.ac-btn--ghost:hover {
  box-shadow: inset 0 0 0 1px var(--ac-ink);
}

.ac-btn.ac-btn--ghost-light {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.ac-btn.ac-btn--ghost-light:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

/* ---- Секции със спине (червена линия-гръбнак) ---- */
.ac-sec {
  padding-top: var(--sy);
  padding-bottom: var(--sy);
}

.ac-spine {
  position: absolute;
  left: var(--spx);
  top: calc(-1 * var(--sy));
  bottom: calc(-1 * var(--sy));
  width: 2px;
  background: var(--ac-red);
  transform-origin: top;
  transform: scaleY(var(--p, 0));
  will-change: transform;
  pointer-events: none;
}

.ac-spine-end {
  position: absolute;
  left: calc(var(--spx) - 4px);
  bottom: calc(-1 * var(--sy) - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ac-red);
  transform: scale(0);
  transition: transform .35s var(--ac-ease);
}

.ac-sec.is-end .ac-spine-end {
  transform: none;
}

.ac-at {
  color: var(--ac-fill-from);
  transition: color .35s;
}

.ac-at.is-passed {
  color: var(--ac-ink);
}

.ac-dark .ac-at.is-passed {
  color: #fff;
}

.ac-dot {
  position: absolute;
  left: var(--dotx);
  top: 1.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ac-line);
  transition: background .3s, box-shadow .3s, transform .3s var(--ac-ease);
}

.ac-dot.is-passed {
  background: var(--ac-red);
  box-shadow: 0 0 0 1px var(--ac-red);
  transform: scale(1.4);
}

/* Точки/номерирани клетки с hairline отгоре */
.ac-point {
  position: relative;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ac-line);
}

.ac-point-n {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Стъпки по спине (04 на началната, процесът в SafeImport) */
.ac-step {
  position: relative;
  padding: 1.1rem 0 3rem;
}

.ac-step-k {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ac-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: .6rem;
}

.ac-step-t {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ac-muted);
  transition: color .35s;
}

.ac-step.is-active .ac-step-t,
.ac-step.is-active .ac-step-k {
  color: var(--ac-ink);
}

.ac-step-p {
  color: var(--ac-muted);
  font-size: .98rem;
  line-height: 1.6;
  max-width: 32rem;
  margin-top: .8rem;
}

/* Манифест / изявление, което се изпълва дума по дума със скрола ([data-ac-split]) */
.ac-fill .ac-w {
  color: transparent;
  letter-spacing: inherit;
  background-image: linear-gradient(90deg, var(--ac-ink) 50%, var(--ac-fill-from) 50%);
  background-size: 200% 100%;
  background-position: calc(100% - var(--f, 0) * 100%) 0;
  -webkit-background-clip: text;
  background-clip: text;
}

.ac-dark .ac-fill .ac-w {
  background-image: linear-gradient(90deg, #fff 50%, rgba(255, 255, 255, .28) 50%);
}

@supports not (-webkit-background-clip: text) {
  .ac-fill .ac-w {
    color: inherit;
    background: none;
  }
}

/* ---- Броячи ---- */
.ac-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ---- Индекс: редове, които реагират (марки, инструменти, връзки) ---- */
.ac-index {
  counter-reset: ac-row;
}

.ac-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  counter-increment: ac-row;
  text-decoration: none;
  color: var(--ac-ink);
  break-inside: avoid;
}

.ac-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--ac-line);
  transform-origin: left;
}

.ac-row-n {
  display: none;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.ac-row-n::before {
  content: counter(ac-row, decimal-leading-zero);
}

.ac-row-name {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform .28s var(--ac-ease-2), color .2s;
}

.ac-row-name--sm {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ac-row-sub {
  color: var(--ac-muted);
  font-size: .92rem;
  line-height: 1.55;
  margin-top: .3rem;
}

.ac-row-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
}

.ac-row-logo img {
  height: 2rem;
  width: auto;
  max-width: 3.5rem;
  object-fit: contain;
  transition: filter .3s, opacity .3s, transform .3s var(--ac-ease-2);
}

.ac-row .ac-arrow {
  color: var(--ac-muted);
  transition: color .2s;
}

.ac-js .ac-index:not(.is-in)>.ac-row {
  opacity: 0;
}

.ac-js .ac-index.is-in>.ac-row {
  animation: ac-up .8s var(--ac-ease) backwards;
  animation-delay: var(--d, 0ms);
}

.ac-js .ac-index.is-in>.ac-row::before {
  animation: ac-hrx .9s var(--ac-ease) backwards;
  animation-delay: var(--d, 0ms);
}

.ac-index.is-in>.ac-row:nth-of-type(2) {
  --d: 60ms;
}

.ac-index.is-in>.ac-row:nth-of-type(3) {
  --d: 120ms;
}

.ac-index.is-in>.ac-row:nth-of-type(4) {
  --d: 180ms;
}

.ac-index.is-in>.ac-row:nth-of-type(5) {
  --d: 240ms;
}

.ac-index.is-in>.ac-row:nth-of-type(6) {
  --d: 300ms;
}

.ac-index.is-in>.ac-row:nth-of-type(7) {
  --d: 360ms;
}

.ac-index.is-in>.ac-row:nth-of-type(8) {
  --d: 420ms;
}

.ac-index.is-in>.ac-row:nth-of-type(9) {
  --d: 480ms;
}

.ac-index.is-in>.ac-row:nth-of-type(10) {
  --d: 540ms;
}

@media (min-width: 1024px) {
  .ac-index--2 {
    column-count: 2;
    column-gap: 4rem;
  }

  .ac-row {
    grid-template-columns: 2.5rem 1fr auto auto;
    min-height: 6rem;
  }

  .ac-row--plain {
    grid-template-columns: 2.5rem 1fr auto;
  }

  .ac-row-n {
    display: block;
  }

  .ac-row-logo img {
    height: 2.4rem;
    max-width: 4rem;
  }
}

@media (hover: hover) {
  .ac-row-logo img {
    filter: grayscale(1);
    opacity: .6;
  }

  .ac-row:hover .ac-row-name {
    transform: translateX(12px);
    color: var(--ac-red);
  }

  .ac-row:hover .ac-row-logo img {
    filter: none;
    opacity: 1;
    transform: translateX(-6px);
  }

  .ac-row:hover .ac-arrow {
    color: var(--ac-red);
  }
}

/* ---- Клетки с разделители (10 % / 20 %, гаранции, принципи) ---- */
.ac-cells {
  display: grid;
  grid-template-columns: 1fr;
}

.ac-cell {
  padding: 1.75rem 0;
  border-top: 1px solid var(--ac-line);
}

.ac-dark .ac-cell {
  border-color: var(--ac-dark-line);
}

@media (min-width: 640px) {
  .ac-cells--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ac-cells--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .ac-cells--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .ac-cells--2 .ac-cell,
  .ac-cells--3 .ac-cell,
  .ac-cells--4 .ac-cell {
    padding: .25rem 2rem;
    border-top: 0;
    border-left: 1px solid var(--ac-line);
  }

  .ac-dark .ac-cells .ac-cell {
    border-color: var(--ac-dark-line);
  }

  .ac-cells .ac-cell:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .ac-cells--4 .ac-cell:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (min-width: 1024px) {
  .ac-cells--4 .ac-cell:nth-child(3) {
    padding-left: 2rem;
    border-left: 1px solid var(--ac-line);
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .ac-cells--4 {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.5rem;
  }
}

/* ---- Ledger: номерирани двойки (риск/отговор, област/получаваш) по спине ---- */
.ac-ledger {
  display: grid;
  grid-template-columns: 1fr;
}

.ac-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 2.5rem;
  padding: 2rem 0 2.25rem;
  border-top: 1px solid var(--ac-line);
}

.ac-entry-n {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ac-entry-t {
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ac-ink);
  margin-top: .5rem;
}

.ac-entry-p {
  color: var(--ac-muted);
  font-size: .96rem;
  line-height: 1.62;
}

.ac-entry-box {
  position: relative;
  padding-left: 1.1rem;
}

.ac-entry-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: .35rem;
  bottom: .35rem;
  width: 2px;
  background: var(--ac-red);
  transform-origin: top;
}

.ac-js .ac-entry-box::before {
  transform: scaleY(0);
  transition: transform .8s var(--ac-ease) .25s;
}

.ac-js .ac-entry.is-in .ac-entry-box::before {
  transform: none;
}

.ac-entry-box--ink::before {
  background: var(--ac-ink);
}

@media (min-width: 1024px) {
  .ac-entry {
    grid-template-columns: 5rem 1fr 1fr;
  }

  .ac-entry--2 {
    grid-template-columns: 5rem 1fr;
  }

  .ac-entry--2 .ac-entry-body {
    max-width: 44rem;
  }
}

/* ---- Списък с отметки, които се чертаят ---- */
.ac-checks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ac-checks li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .8rem 0;
  border-top: 1px solid var(--ac-line);
}

.ac-checks li:first-child {
  border-top: 0;
}

.ac-dark .ac-checks li {
  border-color: var(--ac-dark-line);
}

.ac-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: .15rem;
  fill: none;
  stroke: var(--ac-red);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ac-check--ink {
  stroke: var(--ac-ink);
}

.ac-check--muted {
  stroke: #8a978f;
}

.ac-check--blue {
  stroke: #2563eb;
}

.ac-check--green {
  stroke: #15803d;
}

.ac-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.ac-js .ac-checks.is-in .ac-check path {
  animation: ac-drawline .55s var(--ac-ease) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 200ms);
}

.ac-js .ac-checks:not(.is-in) .ac-check path {
  stroke-dashoffset: 24;
}

html:not(.ac-js) .ac-check path {
  stroke-dashoffset: 0;
}

@keyframes ac-drawline {
  to {
    stroke-dashoffset: 0;
  }
}

.ac-x {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: #ef4444;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* ---- Лента с етапи (срокове), която се чертае сегмент по сегмент ---- */
.ac-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}

.ac-bar-seg {
  position: relative;
  padding-top: 1rem;
}

.ac-bar-seg::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--ac-red);
  transform-origin: left;
}

.ac-bar-seg:nth-child(2)::before {
  background: #ef4444;
}

.ac-bar-seg:nth-child(3)::before {
  background: #f87171;
}

.ac-bar-seg:nth-child(4)::before {
  background: #fca5a5;
}

.ac-js .ac-bar-seg::before {
  transform: scaleX(0);
  transition: transform .9s var(--ac-ease);
  transition-delay: calc(var(--i, 0) * 220ms);
}

.ac-js .ac-bar.is-in .ac-bar-seg::before {
  transform: none;
}

@media (max-width: 639px) {
  .ac-bar {
    grid-template-columns: 1fr 1fr;
    row-gap: 1.25rem;
  }
}

/* ---- Плочки-връзки (към други страници) ---- */
.ac-tile {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--ac-line);
  color: var(--ac-ink);
  text-decoration: none;
  transition: color .2s;
}

.ac-tile:hover {
  color: var(--ac-red);
}

.ac-tile-t {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ac-tile-p {
  color: var(--ac-muted);
  font-size: .93rem;
  line-height: 1.6;
}

.ac-tile .ac-arrow {
  color: var(--ac-muted);
  transition: color .2s;
}

.ac-tile:hover .ac-arrow {
  color: var(--ac-red);
}

@media (min-width: 640px) {
  .ac-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
  }

  .ac-tiles--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ac-tiles--4 {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 2rem;
  }
}

/* ---- FAQ: редове с hairline, плюсът се върти в кръст ---- */
.ac-faq {
  border-top: 1px solid var(--ac-line);
}

.ac-faq-item {
  border-bottom: 1px solid var(--ac-line);
}

.ac-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ac-ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color .2s;
}

.ac-faq-q:hover {
  color: var(--ac-red);
}

.ac-faq-plus {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--ac-line);
  transition: transform .4s var(--ac-ease), background-color .25s, box-shadow .25s;
}

.ac-faq-plus::before,
.ac-faq-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
}

.ac-faq-plus::before {
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.ac-faq-plus::after {
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ac-ease);
}

.ac-faq-q[aria-expanded="true"] .ac-faq-plus {
  transform: rotate(135deg);
  background: var(--ac-ink);
  color: #fff;
  box-shadow: none;
}

.ac-faq-a {
  padding: 0 0 1.5rem;
  color: var(--ac-muted);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 46rem;
}

.ac-faq-a a {
  color: var(--ac-red);
  font-weight: 600;
}

/* ---- Тъмни повърхности ---- */
.ac-dark {
  background: var(--ac-dark);
  color: #fff;
}

.ac-dark .ac-kicker {
  color: var(--ac-dark-muted);
}

.ac-dark .ac-kicker-n {
  color: #ef4444;
}

.ac-dark .ac-link {
  color: #fff;
}

.ac-dark .ac-link:hover {
  color: #ef4444;
}

.ac-dark .ac-lead,
.ac-dark .ac-entry-p,
.ac-dark .ac-tile-p {
  color: var(--ac-dark-muted);
}

.ac-dark .ac-entry,
.ac-dark .ac-point,
.ac-dark .ac-tile,
.ac-dark .ac-faq,
.ac-dark .ac-faq-item,
.ac-dark .ac-checks li {
  border-color: var(--ac-dark-line);
}

.ac-dark .ac-hr,
.ac-dark .ac-row::before {
  background: var(--ac-dark-line);
}

.ac-dark .ac-faq-q {
  color: #fff;
}

.ac-dark .ac-faq-a {
  color: var(--ac-dark-muted);
}

.ac-dark .ac-entry-t,
.ac-dark .ac-tile,
.ac-dark .ac-row {
  color: #fff;
}

/* Хлебни трохи */
.ac-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  color: #8a978f;
}

.ac-crumbs a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.ac-crumbs a:hover {
  color: var(--ac-red);
}

.ac-crumbs i {
  font-size: 9px;
  opacity: .7;
}

.ac-crumbs--light {
  color: rgba(255, 255, 255, .55);
}

.ac-crumbs--light a:hover {
  color: #fff;
}

.ac-crumbs .is-here {
  color: var(--ac-ink);
  font-weight: 600;
}

.ac-crumbs--light .is-here {
  color: #fff;
}

/* Тънка решетка за светъл герой на вътрешна страница */
.ac-hero-light {
  position: relative;
  background: linear-gradient(180deg, #fbf7f7 0%, #ffffff 100%);
}

.ac-hero-light::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(15, 26, 20, .05) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}

.ac-hero-light>* {
  position: relative;
}

/* ---- Reduced motion: всичко видимо и завършено от първия кадър ---- */
@media (prefers-reduced-motion: reduce) {

  .ac-js .ac-r,
  .ac-js .ac-line-in,
  .ac-js .ac-hr,
  .ac-js .ac-kicker-l,
  .ac-js .ac-stagger>*,
  .ac-js .ac-index>.ac-row,
  .ac-js .ac-index>.ac-row::before,
  .ac-js .ac-entry-box::before,
  .ac-js .ac-bar-seg::before {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .ac-js .ac-check path {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .ac-spine-sec {
    --p: 1;
  }

  .ac-at,
  .ac-row-n,
  .ac-step-t,
  .ac-step-k {
    color: var(--ac-ink) !important;
  }

  .ac-dark .ac-at {
    color: #fff !important;
  }

  .ac-dot {
    background: var(--ac-red);
    box-shadow: 0 0 0 1px var(--ac-red);
  }

  .ac-spine-end {
    transform: none !important;
  }

  .ac-fill .ac-w {
    color: inherit;
    background: none;
  }

  .ac-page * {
    transition-duration: .01ms !important;
  }
}