/* ==========================================================================
   Главная (/) — витрина по этапам жизни. Полный каталог — на /tools.
   !important здесь только против MPF_GLOBAL.css: section{padding,margin},
   section h2/p{margin}, li{font-size} и классов defaultH1–H4 и defaultP, которые
   main.js вешает после загрузки. Без них размеры прыгали бы (CLS).
   ========================================================================== */
.hm {
  --hm-gold-text: #7d6a00; /* золото для текста на светлом фоне, контраст 5:1 */
  --hm-line: #e5ecec;
  --hm-radius: 20px;

  background: #f8fbfb;
  overflow-x: clip;
}

.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hm-gold-text);
}

.hm-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.hm-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #fffaf0 0%, #fbeec7 100%);
  border: 1px solid rgba(189, 160, 0, 0.18);
  color: var(--main-bg-color);
}

.hm-ico svg {
  width: 18px;
  height: 18px;
}

.hm-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--hm-gold-text);
  text-decoration: none;
}

.hm-link-light {
  color: var(--gold-color);
}

.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--main-bg-color);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hm-btn-gold {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--gold-color);
  color: var(--main-bg-color);
  font-size: 16px;
}

/* ---------- Секции и заголовки ---------- */
.hm-section {
  padding: 56px 0 0 !important;
  margin: 0 !important;
}

.hm-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.hm-head h2 {
  margin: 10px 0 0 !important;
  font-size: 28px !important;
  line-height: 1.15 !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--main-bg-color);
}

.hm-head p {
  margin: 10px 0 0 !important;
  font-size: 16px !important;
  line-height: 1.55;
  color: var(--dark-text-color);
}

/* ---------- 1. Hero ---------- */
.hm-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  /* Постоянная высота с запасом: при подгрузке шрифтов текст перестраивается,
     а всё, что ниже героя, должно стоять на месте. Уже 640px вместо фото
     подбор (конец файла). Замер с кнопкой вместо поиска: контент до 587px
     на 360–959px, до 654px на 320px (см. медиазапрос ниже) */
  min-height: 620px;
  padding: calc(var(--header-space) + 16px) 0 40px !important; /* фото уходит под стекло шапки */
  margin: 0 !important;
  overflow: hidden;
  background: var(--main-bg-color);
  color: #fff;
}

.hm-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
}

.hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(17, 17, 17, 0.5) 0%,
    rgba(17, 17, 17, 0.62) 45%,
    rgba(17, 17, 17, 0.86) 100%
  );
}

.hm-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
}

.hm-eyebrow.hm-eyebrow-light {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  letter-spacing: 0.06em;
}

.hm-eyebrow-light::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-color);
}

.hm-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(40px, 11.5vw, 52px) !important;
  line-height: 1.08 !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  text-wrap: balance;
  color: #fff;
}

.hm-hero h1 span {
  display: block;
  color: var(--gold-color);
}

.hm-hero .hm-hero-lead {
  max-width: 640px;
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 359px) {
  .hm-hero {
    min-height: 680px;
  }
}

.hm-hero-cta {
  margin-top: 4px;
  box-shadow: 0 12px 30px rgba(189, 160, 0, 0.35);
}

.hm-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 22px;
  margin: 4px 0 0;
}

.hm-stats dt {
  font-family: "Montserrat", sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-color);
}

.hm-stats dd {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- 2. Этапы: столбик на телефоне, 2 колонки от 640px, 3 от 960px ---------- */
.hm-stages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.hm-stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  box-shadow: 0 12px 30px -20px rgba(17, 17, 17, 0.4);
}

.hm-stage-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e9efef;
}

.hm-stage-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-stage:last-child .hm-stage-media img {
  object-position: 70% 50%;
}

.hm-stage-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(17, 17, 17, 0.74) 100%);
}

.hm-stage-media h3 {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 1;
  margin: 0;
  font-size: 22px !important;
  line-height: 1.15 !important;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.hm-stage-num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--main-bg-color);
}

.hm-stage-list {
  flex: 1;
  padding: 6px 16px 6px;
}

.hm-stage-list li,
.hm-name-tools li {
  font-size: 15px !important;
}

.hm-stage-list a,
.hm-name-tools a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 6px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  color: var(--main-bg-color);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.hm-stage-list li:first-child a {
  border-top: 0;
}

.hm-stage-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin: 0 16px 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--hm-gold-text);
  text-decoration: none;
}

/* ---------- 3. Чаще всего ---------- */
.hm-top {
  display: grid;
  gap: 16px;
}

.hm-top-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 280px;
  padding: 26px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 24px;
  background: #fdf7f1;
  color: var(--main-bg-color);
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hm-top-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Светлая вуаль: иллюстрации по краям фона не спорят с текстом */
.hm-top-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.55) 70%, rgba(255, 255, 255, 0.25) 100%);
}

.hm-ico.hm-ico-lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px -10px rgba(17, 17, 17, 0.45);
}

.hm-ico-lg svg {
  width: 26px;
  height: 26px;
}

.hm-top-card h3 {
  margin: 6px 0 0;
  font-size: 22px !important;
  line-height: 1.2 !important;
  font-weight: 800;
}

.hm-top-card p {
  max-width: 34ch;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.5;
  color: #3e4848;
}

.hm-top-card .hm-btn {
  margin-top: auto;
}

/* ---------- 4. Имена ---------- */
.hm-names-grid {
  display: grid;
  gap: 24px;
}

.hm-names-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 24px;
}

.hm-name-tools {
  display: grid;
  column-gap: 24px;
}

.hm-name-tools li:first-child a {
  border-top: 0;
}

.hm-names-sub {
  margin: 28px 0 12px;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 800;
  color: var(--main-bg-color);
}

.hm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hm-chips li {
  font-size: 14px !important;
}

.hm-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--hm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--main-bg-color);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

/* ---------- 5. Почему нам доверяют ---------- */
.hm-section.hm-trust {
  margin-top: 64px !important;
  padding: 56px 0 !important;
  background: var(--main-bg-color);
  color: rgba(255, 255, 255, 0.75);
}

.hm-trust .hm-head h2 {
  color: #fff;
}

.hm-trust .hm-eyebrow {
  color: var(--gold-color);
}

.hm-trust-grid {
  display: grid;
  gap: 32px;
}

.hm-trust-photos {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-auto-rows: 140px;
  gap: 10px;
}

.hm-trust-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.hm-trust-photos img:first-child {
  grid-row: span 2;
}

.hm-trust-photos img:nth-child(2) {
  object-position: 50% 20%;
}

.hm-trust-list {
  display: grid;
  gap: 20px;
}

.hm-trust-list li {
  position: relative;
  padding-left: 42px;
  font-size: 15px !important;
}

.hm-trust-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--gold-color);
}

.hm-trust-list h3 {
  margin: 0 0 4px;
  font-size: 17px !important;
  line-height: 1.3 !important;
  font-weight: 700;
  color: #fff;
}

.hm-trust-list p {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- 6. Финальный баннер: текст + облако разделов каталога ---------- */
.hm-section:last-child {
  padding-bottom: 72px !important;
}

.hm-cta {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 28px;
  padding: 32px 22px;
  overflow: hidden;
  border: 1px solid rgba(189, 160, 0, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(247, 203, 202, 0.85) 0%, transparent 60%),
    radial-gradient(90% 110% at 100% 100%, rgba(189, 160, 0, 0.26) 0%, transparent 62%),
    #fff9ef;
}

/* декор: мягкий розовый круг и золотое кольцо, только CSS */
.hm-cta::before,
.hm-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hm-cta::before {
  top: -150px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(247, 203, 202, 0.75) 0%, rgba(247, 203, 202, 0) 70%);
}

.hm-cta::after {
  bottom: -140px;
  left: -100px;
  width: 280px;
  height: 280px;
  border: 44px solid rgba(189, 160, 0, 0.1);
}

.hm-cta h2 {
  margin: 0 !important;
  font-size: 28px !important;
  line-height: 1.15 !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--main-bg-color);
}

.hm-cta p {
  margin: 10px 0 0 !important;
  font-size: 16px !important;
  line-height: 1.5;
  color: #3e4848;
}

.hm-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 22px;
}

.hm-cta-actions .hm-btn {
  flex: 1 1 100%;
}

/* «Все N инструментов» и «Предложить идею» в блоке «Весь каталог» — светлые капсулы с золотым свечением
   и бликом, как «Все инструменты» в начале главной (золотая кнопка в шапке компьютера — прежняя) */
.hm-cta-actions .hm-btn-gold,
.hm-cta-actions .hm-btn-gold:hover,
.hm-btn.hm-btn-ghost {
  position: relative;
  overflow: hidden;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background-color: #fff3c4;
  background-image: linear-gradient(180deg, #fff 0%, #fff3c4 55%, #f0d561 100%);
  box-shadow:
    inset 0 0 0 1px rgba(189, 160, 0, 0.22),
    inset 0 -2px 0 rgba(150, 120, 0, 0.25),
    0 10px 30px rgba(189, 160, 0, 0.35),
    0 0 50px rgba(242, 211, 91, 0.22);
  color: var(--main-bg-color);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hm-cta-actions .hm-btn-gold::after,
.hm-btn.hm-btn-ghost::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: translateX(-133%) skewX(-18deg);
  animation: hm-cta-shine 4s ease-in-out infinite 1.5s;
}

/* облако чипов-разделов */
.hm-cta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hm-cta-chips li {
  font-size: 15px !important;
}

.hm-cta-chips a {
  --tilt: 0deg;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px 6px 6px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 22px -14px rgba(17, 17, 17, 0.45);
  color: var(--main-bg-color);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transform: rotate(var(--tilt));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hm-cta-chips li:nth-child(4n + 1) a { --tilt: -2deg; }
.hm-cta-chips li:nth-child(4n + 2) a { --tilt: 1.5deg; }
.hm-cta-chips li:nth-child(4n + 3) a { --tilt: -1deg; }
.hm-cta-chips li:nth-child(4n + 4) a { --tilt: 2deg; }

.hm-cta-chip-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip);
}

.hm-cta-chip-ico svg {
  width: 18px;
  height: 18px;
}

.hm-cta-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip) 55%, #fff);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

/* телефон: чипы компактнее, чтобы короткие вставали по два в строку */
@media (max-width: 639px) {
  .hm-cta-chips {
    gap: 8px;
  }
  .hm-cta-chips li {
    font-size: 14px !important;
  }
  .hm-cta-chips a {
    gap: 8px;
    min-height: 44px;
    padding: 5px 7px 5px 5px;
  }
  .hm-cta-chip-ico {
    width: 32px;
    height: 32px;
  }
  .hm-cta-chip-num {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
  }
}

/* ---------- Наведение и фокус ---------- */
@media (hover: hover) and (pointer: fine) {
  .hm-cta-chips a:hover {
    transform: translateY(-3px) rotate(0deg);
    box-shadow: 0 16px 28px -14px rgba(17, 17, 17, 0.45);
  }
  .hm-btn-ghost:hover {
    background: #fff;
  }
  .hm-top-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -18px rgba(17, 17, 17, 0.35);
  }
  .hm-stage-list a:hover,
  .hm-name-tools a:hover,
  .hm-chips a:hover {
    color: var(--hm-gold-text);
  }
  .hm-chips a:hover {
    border-color: var(--gold-color);
  }
  .hm-link:hover,
  .hm-stage-more:hover {
    text-decoration: underline;
  }
  .hm-btn-gold:hover {
    background: #d4b500;
  }
}

.hm a:focus-visible,
.hm button:focus-visible {
  outline: 2px solid var(--gold-color);
  outline-offset: 3px;
}

/* ---------- Ширина ---------- */
@media (min-width: 640px) {
  .hm-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .hm-cta {
    padding: 40px 36px;
  }
  .hm-cta-actions .hm-btn {
    flex: 0 0 auto;
  }
  .hm-name-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hm-name-tools li:nth-child(2) a {
    border-top: 0;
  }
  .hm-trust-photos {
    grid-auto-rows: 190px;
  }
}

@media (min-width: 960px) {
  .hm-section {
    padding-top: 88px !important;
  }
  .hm-head {
    margin-bottom: 32px;
  }
  .hm-head h2 {
    font-size: 40px !important;
  }
  .hm-head p {
    font-size: 17px !important;
  }

  .hm-hero {
    align-items: center;
    min-height: 720px;
    padding: calc(var(--header-space) + 20px) 0 72px !important;
  }
  .hm-hero-bg {
    object-position: 50% 30%;
  }
  .hm-hero-inner {
    align-items: center;
    gap: 22px;
    text-align: center;
  }
  .hm-hero h1 {
    font-size: 76px !important;
    line-height: 1.02 !important;
  }
  .hm-hero .hm-hero-lead {
    font-size: 18px !important;
  }
  .hm-stats {
    gap: 48px;
  }
  .hm-stats dt {
    font-size: 36px;
  }

  .hm-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .hm-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  .hm-top-card {
    min-height: 320px;
    padding: 32px 28px 28px;
  }

  .hm-names-grid {
    grid-template-columns: 5fr 6fr;
    align-items: start;
    gap: 56px;
  }
  .hm-names-photo {
    aspect-ratio: 4 / 5;
    position: sticky;
    top: 100px;
  }

  .hm-section.hm-trust {
    margin-top: 96px !important;
    padding: 88px 0 !important;
  }
  .hm-trust-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
  }
  .hm-trust-photos {
    grid-auto-rows: 220px;
  }

  .hm-cta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 48px;
    padding: 56px;
  }
  .hm-cta h2 {
    font-size: 36px !important;
  }
  .hm-cta-chips {
    justify-content: center;
    gap: 16px 14px;
  }
  /* «коллаж»: чётные чипы чуть ниже */
  .hm-cta-chips li:nth-child(even) {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-top-card,
  .hm-cta-chips a {
    transition: none;
  }
}

/* ---------- Телефон: первый экран-подбор ----------
   Уже 640px вместо фото-героя: один вопрос, четыре плитки-цели, кнопка в раздел
   каталога и карточка самого посещаемого инструмента выбранной цели.
   Мелкие подписи — span/div: main.js вешает на все p размер через !important. */
.hm-quiz-sub,
.hm-quiz,
.hm-more {
  display: none;
}

@media (max-width: 639px) {
  .hm-eyebrow-light,
  .hm-hero-lead,
  .hm-hero-cta,
  .hm-stats,
  .hm-hero-bg,
  .hm-top-section {
    display: none !important;
  }

  .hm-hero {
    min-height: 0;
    padding: var(--header-space) 0 20px !important;
    color: var(--main-bg-color);
    background:
      radial-gradient(60% 40% at 100% 6%, rgba(240, 205, 120, 0.42), transparent 70%),
      radial-gradient(70% 45% at 0% 60%, rgba(247, 203, 202, 0.7), transparent 70%),
      linear-gradient(170deg, #fff6e6 0%, #ffeeee 48%, var(--ligth-bg-color) 100%);
  }

  .hm-hero::before {
    display: none;
  }

  .hm-hero-inner {
    display: block;
  }

  .hm-hero h1 {
    margin-top: 6px;
    font-size: clamp(27px, 7.8vw, 32px) !important;
    line-height: 1.1 !important;
    color: var(--main-bg-color);
  }

  /* золото темнее фирменного: на светлом фоне #bda000 слишком бледный */
  .hm-hero h1 span {
    width: fit-content;
    background: linear-gradient(90deg, #a38600, #c49c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .hm-hero .hm-quiz-sub {
    display: block;
    max-width: 36ch;
    min-height: 2.9em;
    margin: 8px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.45;
    color: var(--dark-text-color);
  }

  .hm-quiz {
    display: block;
  }

  .hm-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .hm-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 106px; /* иконка 12+38 px сверху, 8 px воздуха до названия */
    padding: 12px;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 8px 24px -12px rgba(17, 17, 17, 0.25),
      0 0 0 1px rgba(17, 17, 17, 0.06);
    color: var(--main-bg-color);
    text-decoration: none;
    transition: transform 0.2s;
  }

  .hm-tile:active {
    transform: scale(0.98);
  }

  .hm-tile:focus-visible {
    outline: 3px solid var(--c);
    outline-offset: 2px;
  }

  /* фото справа на 54% ширины, к левому краю растворяется */
  .hm-tile-pic {
    position: absolute;
    top: 0;
    right: 0;
    width: 54%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%);
    mask-image: linear-gradient(90deg, transparent 0, #000 55%);
    opacity: 0.95;
    pointer-events: none;
  }

  .hm-tile-ic {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #fff;
    background: color-mix(in srgb, var(--c) 16%, #fff);
    color: var(--c);
  }

  .hm-tile-ic svg {
    width: 20px;
    height: 20px;
  }

  .hm-tile b,
  .hm-tile small {
    position: relative;
    text-shadow: 0 0 10px #fff, 0 0 4px #fff;
  }

  .hm-tile b {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(14px, 4.1vw, 16px);
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
  }

  .hm-tile small {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.25;
    color: var(--dark-text-color);
    white-space: nowrap;
  }

  /* светлая капсула с золотым свечением и бликом — как «Написать нам» на /kontakty */
  .hm-quiz-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    margin-top: 16px;
    border-radius: 999px;
    background-color: #fff3c4;
    background-image: linear-gradient(180deg, #fff 0%, #fff3c4 55%, #f0d561 100%);
    box-shadow:
      inset 0 0 0 1px rgba(189, 160, 0, 0.22),
      inset 0 -2px 0 rgba(150, 120, 0, 0.25),
      0 10px 30px rgba(189, 160, 0, 0.35),
      0 0 50px rgba(242, 211, 91, 0.22);
    color: var(--main-bg-color);
    font-family: "Montserrat", sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
  }
  .hm-quiz-cta svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
  }
  .hm-quiz-cta::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    transform: translateX(-133%) skewX(-18deg);
    animation: hm-cta-shine 4s ease-in-out infinite 1.5s;
  }

  .hm-match {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 10px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px -14px rgba(17, 17, 17, 0.35);
    color: var(--main-bg-color);
    text-decoration: none;
  }

  /* фото инструмента, иконка — значком в углу */
  .hm-match-ic {
    position: relative;
    flex: none;
    width: 60px;
    height: 72px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--c) 18%, #fff);
    color: var(--c);
  }

  .hm-match-ic img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
  }

  .hm-match-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px #fff, 0 4px 10px -2px rgba(17, 17, 17, 0.25);
  }

  .hm-match-badge svg {
    width: 15px;
    height: 15px;
  }

  .hm-match-body {
    flex: 1;
    min-width: 0;
  }

  .hm-match-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f6efcc;
    color: #806b00;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
  }

  .hm-match-name,
  .hm-match-why {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hm-match-name {
    margin-top: 3px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(15px, 4.2vw, 17px);
    font-weight: 700;
    line-height: 1.2;
  }

  .hm-match-why {
    font-size: 13px;
    line-height: 1.4;
    color: var(--dark-text-color);
  }

  .hm-match-go {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--main-bg-color);
    color: #fff;
  }

  .hm-match-go svg {
    width: 18px;
    height: 18px;
  }

  .hm-more {
    display: block;
    padding: 22px 0 0 !important; /* общий отступ section из global.css здесь не нужен */
    margin: 0 !important;
  }

  /* этапы сразу под «Ещё популярным»: обычный отступ секции здесь слишком большой */
  .hm-more + .hm-section {
    padding-top: 32px !important;
  }

  .hm-more h2 {
    margin: 0 0 12px !important;
    font-size: 18px !important;
    line-height: 1.2;
    color: var(--main-bg-color);
    letter-spacing: 0;
    text-transform: none;
  }

  .hm-more-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hm-more-row a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06);
    color: var(--main-bg-color);
    text-decoration: none;
  }

  .hm-more-row picture {
    display: contents;
  }

  .hm-more-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin-bottom: 6px;
    border-radius: 12px;
    object-fit: cover;
  }

  .hm-more-row b {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(14px, 3.9vw, 15px);
    font-weight: 700;
    line-height: 1.2;
  }

  .hm-more-row small {
    font-size: 13px;
    line-height: 1.3;
    color: var(--dark-text-color);
  }
}

/* узкие телефоны: место под название в карточке инструмента */
@media (max-width: 379px) {
  .hm-match {
    gap: 10px;
  }

  .hm-match-ic {
    width: 50px;
  }

  .hm-match-go {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 639px) and (prefers-reduced-motion: reduce) {
  .hm-tile {
    transition: none;
  }
}

@keyframes hm-cta-shine {
  0%,
  60% {
    transform: translateX(-133%) skewX(-18deg);
  }
  100% {
    transform: translateX(433%) skewX(-18deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hm-quiz-cta::after,
  .hm-cta-actions .hm-btn-gold::after,
  .hm-btn.hm-btn-ghost::after {
    animation: none;
  }
}
