/* =========================================================================
   Кейс «Магистраль Лизинг» — дополнения к base.css
   ========================================================================= */
.case-hero--ml { background-image: url(/assets/img/ml-hero.jpg); background-position: 50% 55%; }
.case-hero--ml::before { background: linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, .3) 100%); }

/* Логотип: значок + шрифтовая надпись */
.ml-logo { display: inline-flex; align-items: center; gap: 10px; color: #111; text-decoration: none; white-space: nowrap; }
.ml-logo svg { width: 30px; height: 30px; flex: none; }
.ml-logo b { font-family: "Inter Tight", var(--f-head); font-weight: 800; font-size: 26px; letter-spacing: .01em; }
.ml-logo span { font-family: "Inter Tight", var(--f-head); font-weight: 300; font-size: 26px; letter-spacing: .01em; }
.gallery img { height: auto; }

/* Граф структуры сайта */
.ml-graph { margin: 50px 0 0; padding: 30px 30px 24px; border-radius: 24px; background: #f5f7f8; }
.ml-graph__scroll { overflow-x: auto; }
.ml-graph svg { display: block; width: 100%; min-width: 820px; height: auto; }
.ml-graph figcaption { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; line-height: 18px; color: var(--c-muted); }
.ml-graph figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.ml-graph figcaption i { display: inline-block; width: 22px; height: 0; border-top: 2px solid #00897b; }
.ml-graph figcaption i.dash { border-top: 2px dashed #f9a825; }

/* Точки входа из поиска */
.ml-src { margin: 50px 0 0; padding: 32px 36px; border-radius: 24px; background: #f5f7f8; }
.ml-src__list { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.ml-src__list li { display: grid; grid-template-columns: 260px minmax(0, 1fr) 56px; gap: 20px; align-items: center; }
.ml-src__name { font-size: 15px; line-height: 20px; color: var(--c-ink); }
.ml-src__name small { display: block; font-size: 12px; line-height: 16px; color: var(--c-muted); }
.ml-src__bar { height: 14px; border-radius: 7px; background: #e0e6e8; overflow: hidden; }
.ml-src__bar i { display: block; height: 100%; border-radius: 7px; background: #80cbc4; }
.ml-src__list li:first-child .ml-src__bar i { background: #00897b; }
.ml-src__v { font-family: var(--f-head); font-size: 17px; font-weight: 600; line-height: 22px; color: var(--c-ink); text-align: right; font-variant-numeric: tabular-nums; }

/* Калькулятор (иллюстрация) */
.ml-calc { margin-top: 50px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -36px rgba(33, 33, 33, .35); border: 1px solid #e3e7ea; }
.ml-calc__in { padding: 32px 34px; display: flex; flex-direction: column; gap: 26px; }
.ml-calc__t { font-family: var(--f-head); font-size: 22px; font-weight: 600; line-height: 28px; color: var(--c-ink); }
.ml-calc__f { display: flex; flex-direction: column; gap: 10px; }
.ml-calc__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 20px; color: var(--c-muted); }
.ml-calc__row b { font-family: var(--f-head); font-weight: 600; font-size: 17px; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.ml-calc__track { position: relative; height: 4px; border-radius: 2px; background: #e0e6e8; }
.ml-calc__track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #111; }
.ml-calc__track i::after { content: ""; position: absolute; right: -9px; top: -7px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #111; }
.ml-calc__out { padding: 32px 34px; background: #111; color: #fff; display: flex; flex-direction: column; gap: 18px; }
.ml-calc__o { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ml-calc__o span { font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .6); }
.ml-calc__o i { display: block; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .16); }
.ml-calc__btn { margin-top: auto; padding: 14px 20px; border-radius: 30px; background: #fff; color: #111; font-family: var(--f-head); font-weight: 600; font-size: 15px; text-align: center; }

@media (max-width: 1023px) {
  .ml-calc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 666px) {
  .ml-logo b, .ml-logo span { font-size: 20px; }
  .ml-logo svg { width: 24px; height: 24px; }
  .ml-graph { padding: 22px 16px 18px; border-radius: 20px; }
  .ml-src { padding: 24px 20px; border-radius: 20px; }
  .ml-src__list li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .ml-src__bar { grid-column: 1 / -1; grid-row: 2; }
  .ml-calc__in, .ml-calc__out { padding: 24px 20px; }
}

/* Карточки позиций: две в ряд на десктопе, одна — на телефоне */
.tdm-pos__cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tdm-pos__value small { font-size: .5em; font-weight: 400; opacity: .75; white-space: nowrap; }
@media (max-width: 666px) { .tdm-pos__cards--2 { grid-template-columns: minmax(0, 1fr); } }
