/* /tools/ — каталог инструментов (native WP) */

.mg-ti-native-wrap .mg2-hero::after {
  display: none;
}

.mg-ti__hero {
  padding-bottom: clamp(32px, 5vw, 48px);
}

/* Hero lead: как на /tools/proverka-aktivnosti — Lead Bold, не 400 из body */
.mg-ti__hero .mg2-hero__lead {
  max-width: 48ch;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--mg-black, #000);
}

.mg-ti__hero-lead-tail {
  white-space: nowrap;
}

/* #21440: обезличенные цифры за сутки / неделю / средний балл */
.mg-ti__hub-stats {
  margin: 0.85rem 0 0;
  max-width: 52ch;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--mg-gray-700, #3d3d3d);
}

.mg-ti__section {
  padding: clamp(40px, 6vw, 64px) 0;
  background: var(--mg-white);
}

.mg-ti__section--cream {
  background: var(--mg-cream);
}

.mg-ti__section--cta {
  padding-bottom: clamp(56px, 8vw, 96px);
}

/* Секции каталога: кегль как .mg2-section-head h2 (эталон «От запроса — к сегменту») */
.mg-ti__heading {
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-size: clamp(28px, 6.6vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--mg-black, #000);
}

.mg-ti__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Утилиты: ровная сетка 3×N */
.mg-ti__grid--tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mg-ti__grid--tools > .mg-ti__card {
  grid-column: auto;
}

.mg-ti__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mg-ti__card-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100%;
  padding: clamp(20px, 2.5vw, 28px);
  border: 2px solid var(--mg-black);
  background: var(--mg-white);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.mg-ti__section--cream .mg-ti__card-link {
  border-color: var(--mg-black);
}

.mg-ti .mg-ti__card-link:hover,
.mg-ti .mg-ti__card-link:focus-visible {
  border-color: var(--mg-blue-link);
  background: var(--mg-white);
  outline: none;
}

.mg-ti .mg-ti__card-link:hover .mg-ti__card-title,
.mg-ti .mg-ti__card-link:focus-visible .mg-ti__card-title {
  color: var(--mg-blue-link);
}

.mg-ti__card-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
}

.mg-ti__card-title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--mg-black, #000);
  transition: color 0.15s ease;
}

.mg-ti__card-lead {
  flex: 1 1 auto;
  margin: 0 0 16px;
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--mg-black, #000);
}

.mg-ti__card-cta {
  flex-shrink: 0;
  margin-top: auto;
  font-size: 16px;
  font-weight: 700;
  color: var(--mg-blue-link);
}

.mg-ti__cta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  padding: clamp(28px, 4vw, 40px);
  border: none;
  background: var(--mg-cream);
}

.mg-ti__cta-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.mg-ti__cta-lead {
  margin: 0;
  max-width: 48ch;
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--mg-black, #000);
}

.mg-ti__cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.mg-ti__cta-actions .mg2-btn {
  min-width: 200px;
  text-align: center;
}

.mg-ti__cta-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--mg-blue-link);
  text-decoration: none;
}

.mg-ti__cta-link:hover,
.mg-ti__cta-link:focus-visible {
  color: var(--mg-blue-hover);
}

@media (max-width: 960px) {
  .mg-ti__grid,
  .mg-ti__grid--tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mg-ti__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mg-ti__cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .mg-ti__cta-actions {
    width: 100%;
  }

  .mg-ti__cta-actions .mg2-btn {
    width: 100%;
  }
}

/* Hub /services + /tools: отступ под фиксированную шапку даёт body.mg-shell-chrome (native-shell.css) */
.mg-page-services-index .mg-ti__hero,
.mg-page-tools-index .mg-ti__hero {
  margin-top: 0;
}

.mg-page-services-index .mg-ti__hero {
  padding-bottom: clamp(12px, 2vw, 20px);
}

.mg-page-services-index .mg-ti__section--cards {
  padding-top: clamp(8px, 1.5vw, 16px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.mg-page-services-index .mg-ti__section--cards .mg-ti__grid--tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mg-page-services-index .mg-ti__section--cta {
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.mg-page-services-index .mg-ti__cta--services {
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
  width: 100%;
  max-width: 720px;
  padding: clamp(18px, 2.5vw, 24px) clamp(20px, 3vw, 28px);
  border: none;
  background: var(--mg-cream);
}

.mg-page-services-index .mg-ti__cta--services .mg-ti__cta-title {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
}

.mg-page-services-index .mg-ti__cta--services .mg-ti__cta-actions {
  flex: 0 0 auto;
  margin: 0;
}

.mg-page-services-index .mg-ti__cta--services .mg2-btn--fill {
  min-width: 0;
  padding-inline: clamp(18px, 2.5vw, 28px);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .mg-page-services-index .mg-ti__cta--services {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .mg-page-services-index .mg-ti__cta--services .mg-ti__cta-actions .mg2-btn--fill {
    width: 100%;
  }
}

/* ——— Хаб-навигатор (#21960) — визуал 1:1 с Claude Design ——— */

.mg-ti--hub {
  --ti-ink: #121110;
  --ti-muted: #5e5955;
  --ti-line: #e2dcd7;
  --ti-cream: var(--mg-cream, #f2eeeb);
  --ti-accent: var(--mg-blue-link, #0263ad);
  --ti-bg: var(--mg-white, #fff);
  color: var(--ti-ink);
}

.mg-ti--hub .mg-ti__h1 {
  margin: 0;
  max-width: 1100px;
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--ti-ink);
}

.mg-ti--hub .mg-ti__hero-lead,
.mg-ti--hub .mg-ti__hero .mg2-hero__lead {
  max-width: none;
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ti-muted);
}

.mg-ti--hub .mg-ti__hero--detect {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 6vw, 88px);
}

.mg-ti--hub .mg-ti__hero--detect .mg2-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 32px);
}

.mg-ti__detect {
  width: 100%;
  max-width: none;
  margin: clamp(4px, 1vw, 16px) 0 0;
}

.mg-ti__detect-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 80px;
  overflow: hidden;
  border: 1.5px solid var(--ti-ink);
  border-radius: 3px;
  background: var(--ti-bg);
}

.mg-ti__detect-input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ti-ink);
  font: inherit;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 80px;
  resize: none;
  overflow: hidden;
  scrollbar-width: none;
}

.mg-ti__detect-input::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mg-ti__detect-input.is-multiline,
.mg-ti__detect-input.is-scrollable {
  line-height: 1.35;
  padding-top: 22px;
  padding-bottom: 22px;
}

.mg-ti__detect-input.is-scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
}

.mg-ti__detect-row.is-expanded {
  height: auto;
  min-height: 80px;
}

.mg-ti__detect-input.is-scrollable::-webkit-scrollbar {
  display: block;
  width: 8px;
}

.mg-ti__detect-input:focus {
  outline: none;
}

.mg-ti__detect-row:focus-within {
  border-color: var(--ti-accent);
}

.mg-ti__detect-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 44px;
  border: 0;
  border-radius: 0;
  background: var(--ti-accent);
  color: #fff;
  font: inherit;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mg-ti__detect-btn:hover,
.mg-ti__detect-btn:focus-visible {
  background: var(--mg-blue-hover, #1570c0);
  outline: none;
}

.mg-ti__detect-status {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ti-muted);
}

.mg-ti__detect-status--ok {
  color: var(--ti-accent);
}

.mg-ti__detect-status--warn {
  color: #a15c00;
}

.mg-ti__section-head {
  margin-bottom: clamp(24px, 3vw, 40px);
}

.mg-ti__section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
}

.mg-ti__section-head--row .mg-ti__heading {
  margin: 0;
  flex: 1 1 280px;
}

.mg-ti__section-head--row .mg-ti__section-lead {
  margin: 0;
  flex: 0 1 360px;
  max-width: 360px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ti-muted);
}

.mg-ti__section-lead {
  margin: 8px 0 0;
  max-width: 52ch;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ti-muted);
}

.mg-ti__section--scenarios {
  padding: clamp(48px, 7vw, 88px) 0;
  background: var(--ti-cream);
}

.mg-ti__scenarios {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.mg-ti__scenario {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  min-height: 340px;
  padding: 24px;
  border: 0;
  border-radius: 3px;
  background: var(--ti-bg);
}

.mg-ti__scenario-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ti-ink);
}

.mg-ti__scenario-lead {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ti-muted);
  text-wrap: pretty;
}

.mg-ti__scenario-steps {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-ti__scenario-steps > li {
  margin: 0;
  padding: 0;
}

.mg-ti__scenario-step {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--ti-line);
  color: var(--ti-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.mg-ti__scenario-step:hover,
.mg-ti__scenario-step:focus-visible {
  color: var(--ti-accent);
  outline: none;
}

.mg-ti__scenario-num {
  flex: 0 0 auto;
  width: auto;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ti-accent);
}

.mg-ti__scenario-cta {
  margin-top: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--ti-accent);
  text-decoration: none;
}

.mg-ti__scenario-cta:hover,
.mg-ti__scenario-cta:focus-visible {
  color: var(--mg-blue-hover, #1570c0);
  outline: none;
}

.mg-ti__sticky {
  position: sticky;
  top: 80px;
  z-index: 20;
  padding: 16px 0;
  border-bottom: 1px solid var(--ti-line);
  background: var(--ti-bg);
}

.mg-ti__sticky-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.mg-ti__search-wrap {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  max-width: 100%;
}

.mg-ti__search {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--ti-line);
  border-radius: 3px;
  background: var(--ti-bg);
  color: var(--ti-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.mg-ti__search:focus {
  outline: none;
  border-color: var(--ti-accent);
}

.mg-ti__search-kbd {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--ti-line);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ti-muted);
  pointer-events: none;
}

.mg-ti__tabs {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.mg-ti__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ti-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.mg-ti__tab:hover,
.mg-ti__tab:focus-visible {
  background: var(--ti-cream);
  color: var(--ti-accent);
  outline: none;
}

.mg-ti__tab.is-active {
  background: var(--ti-ink);
  color: #fff;
}

.mg-ti__tab.is-active .mg-ti__tab-count {
  opacity: 0.6;
  color: inherit;
}

.mg-ti__tab-count {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.mg-ti--hub .mg-ti__catalog > .mg-ti__section {
  padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 96px);
}

.mg-ti--hub .mg-ti__catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.mg-ti--hub .mg-ti__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ti-ink);
}

.mg-ti__section--scenarios .mg-ti__heading {
  font-size: clamp(32px, 5vw, 56px);
}

.mg-ti__heading-count {
  font-size: 0.55em;
  font-weight: 600;
  opacity: 0.45;
}

.mg-ti__section-lead--inline {
  margin: 0 0 0 auto;
  max-width: none;
}

.mg-ti--hub .mg-ti__grid--tools {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mg-ti--hub .mg-ti__card-link {
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ti-line);
  border-radius: 3px;
  background: var(--ti-bg);
  transition: border-color 0.15s ease;
}

.mg-ti--hub .mg-ti__card-link:hover,
.mg-ti--hub .mg-ti__card-link:focus-visible {
  border-color: var(--ti-accent);
  background: var(--ti-bg);
  outline: none;
}

.mg-ti--hub .mg-ti__card-link:hover .mg-ti__card-title,
.mg-ti--hub .mg-ti__card-link:focus-visible .mg-ti__card-title {
  color: var(--ti-accent);
}

.mg-ti__card-abbr {
  position: static;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: var(--ti-cream);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ti-ink);
  opacity: 1;
}

.mg-ti__card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.mg-ti__card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 2px;
}

.mg-ti__badge {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.mg-ti__badge--popular {
  background: var(--ti-cream);
  color: var(--ti-ink);
}

.mg-ti__badge--ai {
  background: #e8f0f8;
  color: var(--ti-accent);
}

.mg-ti__badge--api {
  background: var(--ti-ink);
  color: #fff;
}

.mg-ti--hub .mg-ti__card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ti-ink);
}

.mg-ti--hub .mg-ti__card-lead {
  flex: 0 1 auto;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ti-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mg-ti__empty {
  padding: clamp(40px, 6vw, 64px) 0;
  text-align: center;
}

.mg-ti__empty-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
}

.mg-ti__empty-lead {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ti-muted);
}

.mg-ti--hub .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mg-ti__section--alt {
  padding-top: clamp(32px, 4vw, 48px);
  padding-bottom: clamp(48px, 6vw, 96px);
}

.mg-ti__section--alt .mg-ti__heading {
  max-width: 900px;
  font-size: clamp(28px, 4.5vw, 48px);
}

.mg-ti__alt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-ti__alt-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px 0 0;
  border: 0;
  border-top: 1.5px solid var(--ti-ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.mg-ti__alt-link:hover,
.mg-ti__alt-link:focus-visible {
  outline: none;
}

.mg-ti__alt-link:hover .mg-ti__alt-title,
.mg-ti__alt-link:focus-visible .mg-ti__alt-title {
  color: var(--ti-accent);
}

.mg-ti__alt-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ti-ink);
  transition: color 0.15s ease;
}

.mg-ti__alt-lead {
  flex: 1 1 auto;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ti-muted);
  text-wrap: pretty;
}

.mg-ti__alt-tools {
  font-size: 15px;
  font-weight: 600;
  color: var(--ti-accent);
}

.mg-page-tools-index .mg-ti__section--cta {
  padding-top: 0;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.mg-page-tools-index .mg-ti__cta--tools {
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  width: 100%;
  max-width: none;
  padding: clamp(40px, 6vw, 72px);
  border: none;
  border-radius: 3px;
  background: var(--ti-accent);
  grid-template-columns: none;
}

.mg-page-tools-index .mg-ti__cta--tools .mg-ti__cta-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 720px;
}

.mg-page-tools-index .mg-ti__cta--tools .mg-ti__cta-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
}

.mg-page-tools-index .mg-ti__cta--tools .mg-ti__cta-lead {
  margin: 0;
  max-width: none;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 500;
  line-height: 1.45;
  color: #fff;
  text-wrap: pretty;
}

.mg-page-tools-index .mg-ti__cta--tools .mg-ti__cta-actions {
  flex: 0 0 auto;
  margin: 0;
}

.mg-ti__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 36px;
  border-radius: 3px;
  background: #fff;
  color: #0b1b2b;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mg-ti__cta-btn:hover,
.mg-ti__cta-btn:focus-visible {
  background: #f2eeeb;
  color: #0b1b2b;
  outline: none;
}

@media (max-width: 1199px) {
  .mg-ti--hub .mg-ti__grid--tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mg-ti__scenarios {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .mg-ti__scenario {
    scroll-snap-align: start;
  }

  .mg-ti__alt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .mg-ti--hub .mg-ti__h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .mg-ti--hub .mg-ti__hero--detect {
    padding-top: 36px;
    padding-bottom: 40px;
  }

  .mg-ti__sticky {
    top: 64px;
  }

  .mg-ti__sticky-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .mg-ti__search-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  .mg-ti__detect-row {
    flex-direction: column;
    height: auto;
  }

  .mg-ti__detect-input {
    height: 64px;
    line-height: 64px;
    padding: 0 20px;
    font-size: 16px;
  }

  .mg-ti__detect-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
  }

  .mg-ti__section-head--row {
    flex-direction: column;
    align-items: flex-start;
  }

  .mg-ti__section-head--row .mg-ti__section-lead {
    max-width: none;
  }

  .mg-ti__scenarios {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
  }

  .mg-ti__scenario {
    flex: 0 0 min(82vw, 300px);
    min-height: 300px;
  }

  .mg-ti--hub .mg-ti__grid--tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .mg-ti__alt-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mg-ti__search-kbd {
    display: none;
  }

  .mg-page-tools-index .mg-ti__cta--tools {
    flex-direction: column;
    align-items: stretch;
    padding: 32px 20px;
  }

  .mg-ti__cta-btn {
    width: 100%;
    padding: 16px 24px;
  }
}

/* Ссылки хаба: body.mg-site--v2b иначе наследует чёрный */
body.mg-site--v2b .mg-ti--hub a.mg-ti__scenario-step,
body.mg-site--v2b .mg-ti--hub a.mg-ti__scenario-cta,
body.mg-site--v2b .mg-ti--hub a.mg-ti__card-link,
body.mg-site--v2b .mg-ti--hub a.mg-ti__alt-link {
  color: inherit;
}

body.mg-site--v2b .mg-ti--hub a.mg-ti__scenario-cta,
body.mg-site--v2b .mg-ti--hub a.mg-ti__alt-tools,
body.mg-site--v2b .mg-ti--hub .mg-ti__alt-tools {
  color: var(--ti-accent, #0263ad);
}

body.mg-site--v2b .mg-ti--hub a.mg-ti__detect-btn,
body.mg-site--v2b .mg-ti--hub button.mg-ti__detect-btn {
  color: #fff;
}

body.mg-site--v2b .mg-ti--hub a.mg-ti__cta-btn {
  color: #0b1b2b;
}

html[data-theme='dark'] .mg-ti--hub {
  --ti-ink: #f3f0ed;
  --ti-muted: #a39d98;
  --ti-line: #322f2c;
  --ti-cream: #1d1b1a;
  --ti-accent: #6cb0ea;
  --ti-bg: #131212;
}

html[data-theme='dark'] .mg-ti__detect-input,
html[data-theme='dark'] .mg-ti__search,
html[data-theme='dark'] .mg-ti__scenario {
  background: var(--ti-bg);
}

html[data-theme='dark'] .mg-ti__sticky {
  background: var(--ti-bg);
  border-bottom-color: var(--ti-line);
}

html[data-theme='dark'] .mg-ti__tab.is-active {
  background: #f3f0ed;
  color: #131212;
}

html[data-theme='dark'] .mg-ti__badge--api {
  background: #eee;
  color: #111;
}

html[data-theme='dark'] .mg-page-tools-index .mg-ti__cta--tools {
  background: #1570c0;
}
