/* Инструкции ContentHub: блоки страницы (текст, врезки, путь, шаги, таблицы, вопросы). */

.g-block,
.g-callout {
  margin-top: 56px;
  scroll-margin-top: 88px;
}

.g-block > h2 {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.g-block > p,
.g-callout p {
  max-width: 66ch;
}

.g-block > h2 + p,
.g-block > p + p {
  margin-top: 14px;
}

.g-block h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Врезка: значок и цвет по смыслу. */
.g-callout {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 24px;
  background: var(--g-blue-soft);
}

.g-callout + .g-callout {
  margin-top: 16px;
}

.g-callout__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--g-blue);
}

.g-callout__title {
  font-weight: 700;
  margin-bottom: 6px !important;
}

.g-callout p + p {
  margin-top: 10px;
}

.g-callout--tip {
  background: var(--g-green-soft);
}

.g-callout--tip .g-callout__icon {
  color: var(--g-green);
}

.g-callout--warning {
  background: var(--g-amber-soft);
}

.g-callout--warning .g-callout__icon {
  color: var(--g-amber);
}

.g-callout--warm {
  background: var(--g-orange-soft);
}

.g-callout--warm .g-callout__icon {
  color: var(--g-orange);
}

.g-callout--danger {
  background: var(--g-red-soft);
}

.g-callout--danger .g-callout__icon {
  color: var(--g-red);
}

/* «Где в боте»: кнопки, как в боте. */
.g-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--g-panel);
}

.g-path__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--g-muted);
}

.g-path ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.g-path li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-path li + li::before {
  content: "›";
  font-size: 22px;
  line-height: 1;
  color: var(--g-orange);
}

.g-button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--g-sky);
  box-shadow: 0 2px 0 var(--g-sky);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

/* Список с галочками. */
.g-checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px !important;
  padding: 0;
  list-style: none;
}

.g-checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.g-checklist svg {
  color: var(--g-green);
  margin-top: 3px;
}

/* Схема из этапов: значки, на телефоне — столбиком. */
.g-scheme {
  display: grid;
  grid-template-columns: repeat(var(--scheme-count), minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px !important;
  padding: 0;
  list-style: none;
}

.g-scheme li {
  position: relative;
  hyphens: manual;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 18px;
  border-radius: 24px;
  background: var(--g-panel);
  line-height: 1.4;
}

.g-scheme li > span:last-child:not(.g-scheme__icon) {
  font-size: 16px;
  color: var(--g-muted);
}

.g-scheme li + li::before {
  content: "";
  position: absolute;
  top: 46px;
  left: -14px;
  width: 14px;
  height: 2px;
  background: var(--g-orange-bright);
}

.g-scheme__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: #fff;
  color: var(--g-blue);
}

.g-scheme__icon b {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--g-orange);
  color: #fff;
  font-size: 13px;
}

.g-scheme--stack {
  grid-template-columns: minmax(0, 1fr);
}

.g-scheme--stack li {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
}

.g-scheme--stack li > strong {
  flex: 1;
}

.g-scheme--stack li > span:last-child:not(.g-scheme__icon) {
  flex-basis: 100%;
  padding-left: 68px;
}

.g-scheme--stack .g-scheme__icon {
  margin-bottom: 0;
}

.g-scheme--stack li + li::before {
  top: -14px;
  left: 44px;
  width: 2px;
  height: 14px;
}

@media (max-width: 1000px) {
  .g-scheme {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-scheme li {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
  }

  .g-scheme li > strong {
    flex: 1;
  }

  .g-scheme li > span:last-child:not(.g-scheme__icon) {
    flex-basis: 100%;
    padding-left: 68px;
  }

  .g-scheme__icon {
    margin-bottom: 0;
  }

  .g-scheme li + li::before {
    top: -14px;
    left: 44px;
    width: 2px;
    height: 14px;
  }
}

/* Шаги: крупный номер, текст, снимок экрана рядом. */
.g-steps {
  margin-top: 24px !important;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.g-steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 36px 64px;
}

.g-steps > li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--g-blue);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.g-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 8px;
  left: 21px;
  width: 2px;
  background: var(--g-line);
}

.g-steps > li.has-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}

.g-steps > li.has-wide-image {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.g-steps__text {
  padding-top: 8px;
}

.g-steps__text h2,
.g-steps__text h3 {
  font-size: 20px;
  line-height: 1.3;
}

.g-steps__text p {
  margin-top: 8px;
}

.g-shot {
  margin: 0;
}

.g-shot a {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--g-line);
  box-shadow: 0 18px 40px -24px rgba(20, 60, 90, 0.45);
  background: #fff;
}

.g-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.g-shot figcaption {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--g-muted);
  text-align: center;
}

.g-shot__zoom {
  color: var(--g-blue);
}

/* Вопросы. */
.g-faq {
  margin-top: 20px;
}

.g-faq details {
  padding: 0 22px;
  margin-bottom: 10px;
  border-radius: 22px;
  background: var(--g-panel);
}

.g-faq details p {
  padding-bottom: 20px;
  max-width: 66ch;
}

/* Таблица: на широком экране — таблица, на телефоне — карточки по строкам. */
.g-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--g-line);
}

.g-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

.g-table th,
.g-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--g-line);
}

.g-table thead th {
  background: var(--g-blue-soft);
  color: var(--g-blue-dark);
  font-weight: 700;
}

.g-table tbody th {
  font-weight: 700;
}

.g-table tbody tr:last-child > * {
  border-bottom: 0;
}

@media (max-width: 700px) {
  .g-block,
  .g-callout {
    margin-top: 44px;
  }

  .g-steps > li {
    padding-left: 56px;
  }

  .g-steps > li.has-image {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  li:not(.has-wide-image) > .g-shot {
    max-width: 300px;
  }

  .g-callout {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }

  .g-table-wrap {
    border: 0;
    overflow: visible;
  }

  .g-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .g-table,
  .g-table tbody,
  .g-table tr,
  .g-table th,
  .g-table td {
    display: block;
    width: 100%;
  }

  .g-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--g-line);
    border-radius: 18px;
    overflow: hidden;
  }

  .g-table tbody th {
    background: var(--g-blue-soft);
    border-bottom: 1px solid var(--g-line);
  }

  .g-table td {
    border-bottom: 1px solid var(--g-line);
  }

  .g-table tbody tr > :last-child {
    border-bottom: 0;
  }

  .g-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--g-muted);
  }
}
