.mi20 {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #002b49;
  --muted: #5e7690;
  --line: #e1e8f0;
  --line-2: #cbd7e3;
  --brand: #ee2737;
  --accent: #00ac10;
  --shadow: 0 10px 28px rgba(7, 36, 63, 0.06);
  --shadow-hover: 0 18px 44px rgba(7, 36, 63, 0.12);
  --shadow-strong: 0 24px 54px rgba(7, 36, 63, 0.16);
  --mi-card-w: 400px;
  --mi-rail-gap: 18px;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: #fff;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.mi20 *,
.mi20 *::before,
.mi20 *::after {
  box-sizing: border-box;
}

.mi20 img {
  max-width: 100%;
  display: block;
}

.mi20 .mi-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.mi20 .mi-hero {
  position: relative;
  padding: 56px 0 34px;
  background: #fff;
  overflow: hidden;
}

.mi20 .mi-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 34px;
  align-items: center;
}

.mi20 .mi-logo-full {
  display: block;
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 52px;
}

.mi20 .mi-hero-range {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 16px;
}

.mi20 .mi-hero-range span:first-child,
.mi20 .mi-hero-range span:last-child {
  color: var(--accent);
}

.mi20 .mi-range-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.mi20 .mi-hero-title {
  margin: 0 0 18px;
  max-width: 10ch;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.mi20 .mi-hl {
  color: var(--brand);
}

.mi20 .mi-hero-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.mi20 .mi-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.mi20 .mi-stat {
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 20px rgba(7, 36, 63, 0.04);
}

.mi20 .mi-stat-num {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.mi20 .mi-stat-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mi20 .mi-hero-media {
  min-width: 0;
}

.mi20 .mi-hero-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 100%);
}

#mi-timeline {
  position: relative;
  z-index: 2;
}

.mi20 .year-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -20px 24px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(203, 215, 227, 0.8);
}

.mi20 .year-nav {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 12px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.mi20 .year-nav::-webkit-scrollbar {
  display: none;
}

.mi20 .year-nav__btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.24s ease, color 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.mi20 .year-nav__btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
}

.mi20 .year-nav__btn--active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 10px 20px rgba(0, 43, 73, 0.14);
}

.mi20 .year-nav__top {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(0, 43, 73, 0.14);
  transition: transform 0.24s ease, background-color 0.24s ease;
}

.mi20 .year-nav__top:hover {
  transform: translateY(-2px);
}

.mi20 .mi-year-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 42px 0 52px;
  border-bottom: 1px solid rgba(225, 232, 240, 0.7);
}

.mi20 .mi-year-tag {
  position: sticky;
  top: 78px;
  align-self: start;
}

.mi20 .mi-yt-year {
  font-size: 42px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--brand);
  margin-bottom: 8px;
}

.mi20 .mi-yt-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.mi20 .mi-yt-line {
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.mi20 .mi-events {
  position: relative;
  min-width: 0;
}

.mi20 .mi-events.has-desktop-arrows {
  padding-inline: 34px;
}

.mi20 .mi-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, var(--mi-card-w));
  gap: var(--mi-rail-gap);
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 2px 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 2px;
  align-items: start;
}

.mi20 .mi-rail::-webkit-scrollbar {
  display: none;
}

.mi20 .mi-rail-ui {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.mi20 .mi-rail-progress {
  position: relative;
  flex: 1 1 auto;
  height: 3px;
  border-radius: 999px;
  background: #e9eef4;
  overflow: visible;
}

.mi20 .mi-rail-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 999px;
  background: linear-gradient(90deg, #20c631 0%, var(--accent) 100%);
  box-shadow: 0 0 6px rgba(0, 172, 16, 0.1);
  transition: transform 0.2s ease-out;
}

.mi20 .mi-rail-progress-bar::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 172, 16, 0.16);
}

.mi20 .mi-rail-count {
  flex: 0 0 auto;
  min-width: 52px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.mi20 .mi-rail-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  display: none;
  place-items: center;
  box-shadow: 0 14px 32px rgba(0, 43, 73, 0.14);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.24s ease, opacity 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.mi20 .mi-rail-arrow:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 16px 36px rgba(0, 43, 73, 0.18);
}

.mi20 .mi-rail-arrow:disabled {
  opacity: 0.38;
  cursor: default;
  transform: translateY(-50%);
  box-shadow: 0 10px 22px rgba(0, 43, 73, 0.08);
}

.mi20 .mi-rail-arrow--prev {
  left: 0;
}

.mi20 .mi-rail-arrow--next {
  right: 0;
}

.mi20 .mi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 560px;
  max-height: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-snap-align: start;
  transform: none;
  transition: box-shadow 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
  align-self: start;
}

.mi20 .mi-card:hover {
  box-shadow: var(--shadow-hover);
}

.mi20 .mi-card.is-expanded {
  transform: none;
  box-shadow: var(--shadow-strong);
  border-color: rgba(0, 172, 16, 0.2);
  z-index: 3;
}

.mi20 .mi-photo-wrapper {
  overflow: hidden;
  max-height: 220px;
  min-height: 220px;
  width: 100%;
  flex: 0 0 220px;
  transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1), min-height 0.42s cubic-bezier(0.22, 1, 0.36, 1), flex-basis 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.mi20 .mi-photo {
  position: relative;
  height: 220px;
  aspect-ratio: auto;
  background: #eef3f7;
}

.mi20 .mi-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.mi20 .mi-card:hover .mi-photo img {
  transform: scale(1.02);
}

.mi20 .mi-card.is-expanded .mi-photo-wrapper {
  max-height: 0;
  min-height: 0;
  flex-basis: 0;
}

.mi20 .mi-card.is-expanded .mi-photo img {
  transform: scale(1.01);
  opacity: 0;
}

.mi20 .mi-card-head {
  padding: 18px 18px 0;
  flex: 0 0 auto;
}

.mi20 .mi-card-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.mi20 .mi-card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mi20 .mi-card-text {
  padding: 14px 18px 0;
  color: #34526b;
  font-size: 15px;
  line-height: 1.7;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease, padding-top 0.32s ease;
}

.mi20 .mi-card-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.mi20 .mi-card.is-expanded .mi-card-text {
  display: block;
  padding-top: 10px;
  overflow: auto;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 43, 73, 0.28) transparent;
}

.mi20 .mi-card.is-expanded .mi-card-text::-webkit-scrollbar {
  width: 6px;
}

.mi20 .mi-card.is-expanded .mi-card-text::-webkit-scrollbar-track {
  background: transparent;
}

.mi20 .mi-card.is-expanded .mi-card-text::-webkit-scrollbar-thumb {
  background: rgba(0, 43, 73, 0.24);
  border-radius: 999px;
}

.mi20 .mi-card-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--card) 82%);
  pointer-events: none;
  transition: opacity 0.24s ease;
  opacity: 0;
}

.mi20 .mi-card-text.is-clamped::after {
  opacity: 1;
}

.mi20 .mi-card.is-expanded .mi-card-text::after {
  opacity: 0;
}

.mi20 .mi-card-toggle {
  margin: 18px 18px 18px;
  margin-top: auto;
  width: max-content;
  min-height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: #eff5fb;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
  align-self: flex-start;
  flex: 0 0 auto;
}

.mi20 .mi-card-toggle:hover {
  box-shadow: 0 8px 18px rgba(7, 36, 63, 0.08);
}

.mi20 .mi-card.is-expanded .mi-card-toggle {
  background: var(--accent);
  color: #fff;
}

/* === БЛОК "МЕТАЛЛОИНВЕСТ СЕГОДНЯ" === */
.mi20 .mi-today {
  position: relative;
  z-index: 2;
  padding: 72px 0 84px;
  background: #ffffff;               /* чисто белый фон всей секции */
}

.mi20 .mi-today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 26px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #ffffff;               /* белый фон вместо градиента */
  box-shadow: none;                  /* убрана тень */
}

.mi20 .mi-today-lead {
  margin: 0 0 22px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.mi20 .mi-top-return {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 43, 73, 0.16);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.mi20 .mi-top-return:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 43, 73, 0.2);
}

.mi20 .mi-top-return-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  line-height: 1;
}

/* Подложка под логотипом — теперь точно белая */
.mi20 .mi-today-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #ffffff;               /* чисто белый, без градиента */
}

.mi20 .mi-logo-today {
  width: min(100%, 320px);
  height: auto;
}

.mi20 .mi-next-section-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(238, 39, 55, 0.25);
  transition: transform 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.mi20 .mi-next-section-btn:hover {
  transform: translateY(-2px);
}

.mi20 .mi-next-section-btn.is-end {
  background: var(--ink);
  box-shadow: 0 16px 32px rgba(0, 43, 73, 0.22);
}

.mi20 .year-nav__btn:focus-visible,
.mi20 .year-nav__top:focus-visible,
.mi20 .mi-card-toggle:focus-visible,
.mi20 .mi-top-return:focus-visible,
.mi20 .mi-next-section-btn:focus-visible,
.mi20 .mi-rail-arrow:focus-visible {
  outline: 3px solid rgba(0, 172, 16, 0.22);
  outline-offset: 3px;
}

/* --- Десктоп: строго 2 карточки в ряду --- */
@media (min-width: 861px) {
  .mi20 .mi-events.has-desktop-arrows {
    position: relative;
  }
  .mi20 .mi-events.has-desktop-arrows .mi-rail-arrow {
    display: grid;
  }
  .mi20 .mi-events.has-desktop-arrows .mi-rail {
    grid-auto-columns: calc((100% - var(--mi-rail-gap)) / 2);
  }
}

/* --- Планшеты и небольшие экраны --- */
@media (max-width: 1100px) {
  .mi20 .mi-hero-grid,
  .mi20 .mi-today-grid {
    grid-template-columns: 1fr;
  }
  .mi20 .mi-hero-title {
    max-width: 12ch;
  }
  .mi20 .mi-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Мобильные устройства --- */
@media (max-width: 860px) {
  .mi20 .mi-hero {
    padding: 36px 0 24px;
  }
  .mi20 .mi-hero-grid,
  .mi20 .mi-today-grid {
    grid-template-columns: 1fr;
  }
  .mi20 .mi-hero-media {
    display: none;
  }
  .mi20 .mi-logo-full {
    height: 48px;
    margin-bottom: 32px;
  }
  .mi20 .mi-year-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 34px 0 42px;
  }
  .mi20 .mi-year-tag {
    position: static;
    top: auto;
  }
  .mi20 .mi-yt-line {
    width: 44px;
  }
  .mi20 .mi-events.has-desktop-arrows {
    padding-inline: 0;
  }
  .mi20 .mi-rail-arrow {
    display: none !important;
  }
}

/* --- Узкие мобильные --- */
@media (max-width: 640px) {
  .mi20 .mi-container {
    padding-right: 16px;
    padding-left: 16px;
  }
  .mi20 .year-nav-wrapper {
    margin-right: -16px;
    margin-left: -16px;
    margin-bottom: 20px;
    padding-right: 16px;
    padding-left: 16px;
  }
  .mi20 .mi-year-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 28px 0 36px;
  }
  .mi20 .mi-year-tag {
    position: static;
    top: auto;
    padding-bottom: 2px;
  }
  .mi20 .mi-yt-year {
    font-size: 38px;
  }
  .mi20 .mi-rail {
    grid-auto-columns: calc(100vw - 60px);
    gap: 12px;
    padding: 8px 0 14px;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
  }
  .mi20 .mi-card {
    width: 100%;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    border-radius: 22px;
  }
  .mi20 .mi-photo-wrapper {
    max-height: 200px;
    min-height: 200px;
    flex: 0 0 200px;
  }
  .mi20 .mi-photo {
    height: 200px;
    aspect-ratio: auto;
  }
  .mi20 .mi-card-head {
    padding: 16px 16px 0;
  }
  .mi20 .mi-card-title {
    font-size: 21px;
  }
  .mi20 .mi-card-sub {
    font-size: 12px;
  }
  .mi20 .mi-card-text {
    padding: 12px 16px 0;
    font-size: 14px;
    line-height: 1.6;
  }
  .mi20 .mi-card-text.is-clamped {
    -webkit-line-clamp: 5;
  }
  .mi20 .mi-card.is-expanded .mi-photo-wrapper {
    max-height: 0;
    min-height: 0;
    flex-basis: 0;
  }
  .mi20 .mi-card.is-expanded .mi-card-text {
    display: block;
    overflow: auto;
    max-height: 100%;
  }
  .mi20 .mi-card-toggle {
    margin: 14px 16px 16px;
    margin-top: auto;
    min-height: 44px;
  }
  .mi20 .mi-rail-progress {
    height: 3px;
  }
  .mi20 .mi-rail-progress-bar::before {
    width: 8px;
    height: 8px;
    right: -6px;
  }
  .mi20 .mi-today {
    padding: 56px 0 64px;
  }
  .mi20 .mi-today-grid {
    padding: 22px;
    border-radius: 24px;
  }
  .mi20 .mi-top-return {
    width: 100%;
    justify-content: center;
  }
  .mi20 .mi-next-section-btn {
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 14px;
  }
}

/* --- Отключение анимации для пользователей, предпочитающих reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mi20 *,
  .mi20 *::before,
  .mi20 *::after {
    animation: none !important;
    transition: none !important;
  }
  .mi20 .mi-card,
  .mi20 .mi-card.is-expanded {
    transform: none !important;
  }
}