/* ==========================================================================
   /tools/unified-allowance — калькулятор единого пособия
   Блоки результата и статьи — общие с «Семейной выплатой» (классы sv-*),
   элементы формы — общие для инструментов (tool-form.css, классы tf-*);
   оба файла подключаются через CSS_DEPS. Здесь — только своё: минимумы региона,
   шкала 50 / 75 / 100 %, проверка по доходу, пример расчёта, списки статьи.
   ========================================================================== */
/* у блоков результата свой display — без этого атрибут hidden их не прячет */
.ua-page [hidden] {
  display: none !important;
}

/* Свой фон шапки на компьютере: уютные детали по краям, центр пустой под заголовок */
.ua-page .sv-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(232, 225, 245, 0.7) 100%),
    url("/assets/images/unified-allowance-hero-bg.webp") center / cover no-repeat,
    linear-gradient(180deg, #ffffff 0%, #e8e1f5 100%) !important;
}

/* Ссылки в тексте — как в статьях других инструментов (.mb-seo a в maternity-bag.css) */
.ua-page .sv-article a,
.ua-page .tf-more a {
  color: var(--gold-color);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(189, 160, 0, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.ua-page .sv-article a:hover,
.ua-page .tf-more a:hover {
  color: var(--main-bg-color);
  text-decoration-color: currentColor;
}

/* Примечание под источниками: строка с иконкой «i», без золотой полосы и курсива */
.ua-page .sr-sources-note {
  display: flex;
  gap: 10px;
  margin: 18px 0 0 !important;
  padding: 16px 0 0 !important;
  border: 0 !important;
  border-top: 1px dashed #e6dfc6 !important;
  border-radius: 0 !important;
  background: none !important;
  font-style: normal !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #6b6555;
}

.ua-page .sr-sources-note::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: var(--gold-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Минимумы региона ---------- */
.ua-pm {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.ua-pm div {
  padding: 10px 10px 11px;
  border-radius: 12px;
  background: var(--tf-accent-soft);
}

.ua-pm dt {
  font-size: 11.5px;
  line-height: 1.2;
  color: #5e5873;
}

.ua-pm dd {
  margin: 4px 0 0;
  font: 800 15px/1.1 "Montserrat", sans-serif;
  color: var(--main-bg-color);
  white-space: nowrap;
}

.ua-page .sv-verdict-title:focus {
  outline: none;
}

/* ---------- Ступени 50 → 75 → 100 % в статье: карточки во всю ширину текста ---------- */
.ua-ladder {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 18px 0 22px !important;
  padding: 0 !important;
  list-style: none;
}

.ua-ladder li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--tf-line);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px -16px rgba(37, 33, 60, 0.45);
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: var(--dark-text-color);
}

/* соединительная линия между ступенями */
.ua-ladder li + li::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 45px;
  width: 2px;
  height: 12px;
  background: #d9cff3;
}

.ua-ladder-pct {
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fff3c4 55%, #f0d561 100%);
  box-shadow: inset 0 0 0 1px rgba(189, 160, 0, 0.3), 0 6px 16px -8px rgba(189, 160, 0, 0.6);
  font: 800 17px/1 "Montserrat", sans-serif;
  color: var(--main-bg-color);
}

.ua-ladder li:nth-child(2) .ua-ladder-pct {
  background: linear-gradient(180deg, #fff6d6 0%, #f6dc6e 60%, #e6c21f 100%);
}

.ua-ladder li:nth-child(3) .ua-ladder-pct {
  background: linear-gradient(180deg, #f6dc6e 0%, #e2c22a 55%, #bda000 100%);
}

.ua-ladder-text b {
  display: block;
  margin-bottom: 2px;
  font: 700 14.5px/1.3 "Montserrat", sans-serif;
  color: var(--main-bg-color);
}

/* ---------- Списки «Кому положено» и «Почему отказывают»: строки с иконкой ---------- */
/* .ua-page впереди — иначе .sv-article > ul li из semeynaya-vyplata.css ставит строкам padding: 5px 0 */
.ua-rows {
  margin: 18px 0 22px !important;
  padding: 0 !important;
  list-style: none;
}

.ua-page .ua-rows li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 !important;
  padding: 18px 0;
  font-size: 14.5px !important;
  line-height: 1.5 !important;
  color: var(--dark-text-color);
}

.ua-page .ua-rows li:first-child {
  padding-top: 4px;
}

.ua-page .ua-rows li:last-child {
  padding-bottom: 4px;
}

.ua-page .ua-rows li + li {
  border-top: 1px solid #e9e5f0;
}

.ua-rows-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tf-accent-soft);
  color: var(--tf-accent);
}

.ua-rows--no .ua-rows-ic {
  background: #fdeeec;
  color: #c0453a;
}

.ua-rows-text {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.ua-rows-text b {
  display: block;
  margin-bottom: 2px;
  font: 700 15px/1.3 "Montserrat", sans-serif;
  color: var(--main-bg-color);
}

/* ---------- Пример расчёта: исходные данные, лента шагов с номерами, итог ---------- */
.ua-example {
  margin: 18px 0;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.66) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(17, 17, 17, 0.04), 0 18px 38px -24px rgba(37, 33, 60, 0.5);
}

.ua-example-intro {
  margin: 0 0 14px !important;
  font-size: 15px !important;
  line-height: 1.5;
  color: var(--main-bg-color);
}

.ua-example-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}

.ua-example-facts div {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f2eefb;
}

.ua-example-facts dt {
  font-size: 12px;
  line-height: 1.25;
  color: #5e5873;
}

.ua-example-facts dd {
  margin: 4px 0 0;
  font: 800 16px/1.1 "Montserrat", sans-serif;
  color: var(--main-bg-color);
  white-space: nowrap;
}

.ua-example-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 16px !important;
  padding: 0 !important;
  list-style: none;
}

/* шаг — карточка, как ступени 50 / 75 / 100 % выше */
.ua-page .ua-ex-step {
  margin: 0 !important;
  padding: 16px 18px 18px;
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px -16px rgba(37, 33, 60, 0.45);
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.ua-ex-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ua-ex-head b {
  font: 700 15px/1.3 "Montserrat", sans-serif;
  color: var(--main-bg-color);
}

.ua-example-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--main-bg-color);
  font: 800 13.5px/1 "Montserrat", sans-serif;
  color: #fff;
}

.ua-ex-calc {
  margin: 12px 0 2px;
  font: 600 13.5px/1.45 "Montserrat", sans-serif;
  color: #77748a;
}

.ua-ex-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.ua-ex-val strong {
  font: 800 22px/1.2 "Montserrat", sans-serif;
  letter-spacing: -0.01em;
  color: var(--main-bg-color);
  white-space: nowrap;
}

.ua-example-res {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font: 700 12.5px/1 "Montserrat", sans-serif;
  white-space: nowrap;
}

.ua-example-res[data-ok="1"] {
  background: #e8f5ee;
  color: #1f7a45;
}

.ua-example-res[data-ok="0"] {
  background: #fdecea;
  color: #b3372a;
}

/* шкала: доход на человека против минимума (отметка с подписью) */
.ua-ex-bar {
  position: relative;
  height: 8px;
  margin: 14px 0 22px;
  border-radius: 999px;
  background: #eeebf4;
}

.ua-ex-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, #8fd3ad, #2f9a5f);
}

.ua-ex-step[data-ok="0"] .ua-ex-bar i {
  background: linear-gradient(90deg, #f3b2a9, #d0493b);
}

.ua-ex-bar em {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: calc(var(--m) * 100%);
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--main-bg-color);
}

.ua-ex-bar em span {
  position: absolute;
  top: calc(100% + 4px);
  right: -2px;
  font: 600 11px/1 "Nunito", sans-serif;
  font-style: normal;
  color: #6b6878;
  white-space: nowrap;
}

.ua-example-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #111;
  color: #fff;
}

.ua-example-total span {
  font: 800 13px/1.3 "Montserrat", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ua-example-total span small {
  display: block;
  margin-top: 4px;
  font: 600 12.5px/1.35 "Nunito", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.7);
}

.ua-example-total b {
  flex: none;
  font: 800 24px/1 "Montserrat", sans-serif;
  color: #f2d35b;
  text-align: right;
  white-space: nowrap;
}

.ua-example-total b small {
  display: block;
  margin-top: 4px;
  font: 600 12px/1 "Nunito", sans-serif;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Вердикт: иконка и заголовок в строку, пояснение на всю ширину ----------
   Заголовок — h2: глобальные стили задают ему капс и размер с !important */
.ua-page .sv-verdict {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 10px;
  padding: 18px 20px;
}

.ua-page .sv-verdict-text {
  display: contents;
}

.ua-page .sv-verdict-title {
  margin: 0 !important;
  font: 800 19px/1.25 "Montserrat", sans-serif !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

.ua-page .sv-verdict-note {
  grid-column: 1 / -1;
  margin: 0 !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  color: #3f4a4a;
}

/* ---------- «Сроки и куда подавать»: шаги с номером в кружке, как «Как подать заявление» ---------- */
.ua-page .sv-deadline-steps {
  counter-reset: ua-dl;
  display: grid;
  gap: 16px;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.ua-page .sv-deadline-steps li {
  counter-increment: ua-dl;
  position: relative;
  margin: 0 !important;
  padding: 3px 0 0 44px !important;
  font-size: 14.5px !important;
  line-height: 1.5 !important;
  color: var(--dark-text-color);
}

.ua-page .sv-deadline-steps li::before {
  content: counter(ua-dl);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--main-bg-color);
  font: 800 13.5px/1 "Montserrat", sans-serif;
  color: #fff;
}

/* линия от кружка к кружку */
.ua-page .sv-deadline-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -14px;
  left: 14px;
  width: 2px;
  background: #e4ddf6;
}

.ua-page .sv-deadline-steps strong {
  display: block;
  margin-bottom: 2px;
  font: 700 15px/1.35 "Montserrat", sans-serif;
  color: var(--main-bg-color);
}

/* ---------- «Проверка по доходу»: плашки, шкала против порога, итог ---------- */
.ua-page #ua-income-rows {
  display: grid;
  gap: 12px;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}

.ua-page #ua-income-rows > li {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

.ua-page #ua-income-rows > li.ua-cmp-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ua-cmp-tiles div {
  padding: 12px 14px 13px;
  border-radius: 14px;
  background: var(--tf-accent-soft);
}

.ua-cmp-tiles div + div {
  background: #f4f1ea;
}

.ua-cmp-tiles span {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  color: #5e5873;
}

/* .sv-check-rows b из semeynaya-vyplata.css выравнивает вправо — здесь нужно влево */
.ua-page .ua-cmp-tiles b {
  display: block;
  margin-top: 5px;
  text-align: left;
  font: 800 20px/1.1 "Montserrat", sans-serif;
  color: var(--main-bg-color);
  white-space: nowrap;
}

.ua-cmp-tiles small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.3;
  color: #77748a;
}

/* шкала: заливка — доход на человека, чёрная отметка — порог */
.ua-page #ua-income-rows > li.ua-cmp-bar {
  position: relative;
  height: 10px;
  margin: 4px 0 0 !important;
  border-radius: 999px;
  background: #eeebf4;
}

.ua-cmp-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, #8fd3ad, #2f9a5f);
}

.ua-cmp-bar[data-ok="0"] i {
  background: linear-gradient(90deg, #f3b2a9, #d0493b);
}

.ua-cmp-bar em {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: calc(var(--m) * 100%);
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--main-bg-color);
}

.ua-page #ua-income-rows > li.ua-cmp-how {
  font-size: 12.5px !important;
  color: #77748a;
}

/* ---------- Шкала размера: 50 / 75 / 100 % — подсвечен назначенный ---------- */
.ua-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ua-steps li {
  padding: 12px 10px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px #e2deee;
  color: #8a8697;
}

.ua-steps b {
  display: block;
  font: 800 22px/1 "Montserrat", sans-serif;
}

.ua-steps span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.3;
}

.ua-steps li[data-on="1"] {
  background: linear-gradient(180deg, #fff 0%, #fff3c4 60%, #f6e08a 100%);
  box-shadow: inset 0 0 0 1.5px var(--gold-color), 0 10px 24px -14px rgba(189, 160, 0, 0.6);
  color: var(--main-bg-color);
}

.ua-steps-note {
  margin: 0 !important;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--dark-text-color);
}

/* «75% от минимума для трудоспособных 18 166 ₽» не влезает в одну строку на телефоне */
.ua-page .sv-person-rows dd {
  white-space: normal;
  text-align: right;
}

/* ---------- Телефон ---------- */
@media (max-width: 639px) {
  .ua-form {
    padding: 0 !important;
  
  }

  .ua-form .sv-form-sub {
    margin-bottom: 14px !important;
  
  }

  .ua-pm {
    gap: 6px;
  
  }

  .ua-pm div {
    padding: 9px 8px 10px;
  
  }

  .ua-pm dd {
    font-size: 14px;
  
  }

  .ua-steps b {
    font-size: 19px;
  
  }

  .ua-page .sv-verdict {
    padding: 16px;
  
  }

  .ua-page .sv-verdict-title {
    font-size: 18px !important;
  
  }

  .ua-rows {
    margin: 14px 0 18px !important;
  
  }

  .ua-page .ua-rows li {
    gap: 12px;
    padding: 17px 0;
    font-size: 14px !important;
  
  }

  .ua-rows-ic {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  
  }

  .ua-rows-ic svg {
    width: 18px;
    height: 18px;
  
  }

  .ua-example {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  
  }

  .ua-example-facts {
    gap: 6px;
  
  }

  .ua-example-facts div {
    padding: 9px 9px 10px;
  
  }

  .ua-example-facts dt {
    font-size: 11.5px;
  
  }

  .ua-example-facts dd {
    font-size: 14.5px;
  
  }

  .ua-page .ua-ex-step {
    padding: 14px 14px 16px;
  
  }

  .ua-ex-val strong {
    font-size: 20px;
  
  }

  .ua-example-total {
    padding: 14px 16px;
  
  }

  .ua-example-total b {
    font-size: 21px;
  
  }

  .ua-ladder li {
    gap: 12px;
    padding: 11px 12px;
  
  }

  .ua-ladder li + li::before {
    left: 41px;
  
  }

  .ua-ladder-pct {
    width: 58px;
    font-size: 16px;
  
  }

  .ua-steps span {
    font-size: 11.5px;
  
  }

  /* секции ниже формы — плотнее: у MPF_GLOBAL у section поля 20px с !important */
  .ua-page section.sv-article,
  .ua-page section.sv-related,
  .ua-page section.faq-section,
  .ua-page section.sv-results {
    padding: 0 !important;
    margin: 0 0 30px !important;
  
  }

  /* у «Источников» своя рамка — внутренние поля оставляем, меняем только отступ снаружи */
  .ua-page section.sr-sources-block {
    margin: 0 0 30px !important;
  
  }

  .ua-page .sv-results {
    gap: 12px;
  
  }

  /* блоки без карточки (заголовок + строки) — с воздухом сверху, иначе заголовок липнет к карточке выше */
  .ua-page .sv-results > .th-flat {
    margin-top: 16px !important;
  
  }

  .ua-page .calc-share {
    margin: 14px 0 22px;
  
  }

  .ua-page .calc-author-block {
    margin: 0 0 28px;
  
  }
}
