/* Автономная инструкция PRISM AI */

:root {
  --ad-bg: #f3f4f6;
  --ad-surface: #ffffff;
  --ad-border: #e2e8f0;
  --ad-text: #0f172a;
  --ad-muted: #64748b;
  --ad-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body.instructions-page {
  margin: 0;
  min-height: 100vh;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-family: "Inter", "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.instructions-page a.instructions-page__link-btn {
  color: #ffffff;
  text-decoration: none;
}

.instructions-page a.instructions-page__link-btn:hover {
  background: #1e293b;
  color: #ffffff;
  text-decoration: none;
}

.instructions-page a.instructions-page__link-btn--accent {
  color: #0f172a;
}

.instructions-page a.instructions-page__link-btn--accent:hover {
  background: #8eb32d;
  color: #0f172a;
  text-decoration: none;
}

.instructions-page__topbar {
  padding-bottom: 14px;
}

.instructions-page__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.instructions-page__brand img {
  display: block;
}

.instructions-page__product {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.instructions-page__product span {
  color: #3f9200;
}

.instructions-page__shell {
  width: 100%;
  max-width: calc(1280px + 6cm);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.instructions-page__header {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--ad-border, #e2e8f0);
  margin-bottom: 24px;
  margin-left: 0;
}

.instructions-page__title {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ad-text, #0f172a);
}

.instructions-page__subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ad-muted, #64748b);
  max-width: 720px;
}

.instructions-page__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-left: 0;
}

@media (max-width: 960px) {
  .instructions-page__header {
    margin-left: 0;
  }

  .instructions-page__layout {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .instructions-page__toc {
    position: static !important;
    max-height: none !important;
  }
}

.instructions-page__toc {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--ad-surface, #fff);
  border: 1px solid var(--ad-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: var(--ad-shadow, 0 1px 3px rgba(15, 23, 42, 0.06));
  padding: 14px 12px;
}

.instructions-page__toc-title {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ad-muted, #64748b);
}

.instructions-page__toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.instructions-page__toc-item {
  margin: 0;
}

.instructions-page__toc-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}

.instructions-page__toc-link:hover {
  background: #f8fafc;
  color: var(--ad-text, #0f172a);
}

.instructions-page__toc-link--sub {
  padding-left: 22px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ad-muted, #64748b);
}

.instructions-page__toc-link.is-active {
  background: rgba(173, 239, 0, 0.35);
  color: #1f2937;
  font-weight: 600;
}

.instructions-page__content {
  display: grid;
  gap: 20px;
}

.instructions-page__section {
  scroll-margin-top: 20px;
  background: var(--ad-surface, #fff);
  border: 1px solid var(--ad-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: var(--ad-shadow, 0 1px 3px rgba(15, 23, 42, 0.06));
  padding: 22px 24px;
}

.instructions-page__section-title {
  margin: 0 0 14px;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions-page__section-num {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #adef00;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.instructions-page__section-subtitle {
  margin: 24px 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ad-text, #0f172a);
}

.instructions-page__section-subtitle:first-of-type {
  margin-top: 0;
}

.instructions-page__text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.instructions-page__text:last-child {
  margin-bottom: 0;
}

.instructions-page__list {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.instructions-page__list li {
  margin-bottom: 8px;
}

.instructions-page__list li:last-child {
  margin-bottom: 0;
}

.instructions-page__list:last-child {
  margin-bottom: 0;
}

.instructions-page__tag-types + .instructions-page__text,
.instructions-page__screenshots + .instructions-page__text,
.instructions-page__note + .instructions-page__text,
.instructions-page__list + .instructions-page__text {
  margin-top: 4px;
}

.instructions-page__screenshots + .instructions-page__section-subtitle,
.instructions-page__note + .instructions-page__section-subtitle,
.instructions-page__tag-types + .instructions-page__section-subtitle,
.instructions-page__table-wrap + .instructions-page__section-subtitle {
  margin-top: 28px;
}

.instructions-page__list--ordered {
  list-style: decimal;
}

.instructions-page__note {
  margin: 16px 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(173, 239, 0, 0.12);
  border: 1px solid rgba(63, 146, 0, 0.22);
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.instructions-page__note:last-child {
  margin-bottom: 0;
}

.instructions-page__note strong {
  color: #1f2937;
}

.instructions-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}

.instructions-page__links:last-child {
  margin-bottom: 0;
}

  color: #ffffff;
}

.instructions-page__link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

  background: #1e293b;
  color: #ffffff;
  text-decoration: none;
}

.instructions-page__link-btn--accent {
  background: #adef00;
}

  color: #0f172a;
}

  background: #8eb32d;
  color: #0f172a;
  text-decoration: none;
}

.instructions-page__table-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
  border: 1px solid var(--ad-border, #e2e8f0);
  border-radius: 10px;
}

.instructions-page__table-wrap:last-child {
  margin-bottom: 0;
}

.instructions-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}

.instructions-page__table th,
.instructions-page__table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ad-border, #e2e8f0);
}

.instructions-page__table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--ad-text, #0f172a);
  white-space: nowrap;
}

.instructions-page__table tr:last-child td {
  border-bottom: none;
}

.instructions-page__table tbody tr:hover td {
  background: #fafafa;
}

  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
  font-weight: 800;
  color: #adef00;
  line-height: 1;
}

  background: rgba(173, 239, 0, 0.15);
}

.instructions-page__steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.instructions-page__steps:last-child {
  margin-bottom: 0;
}

.instructions-page__steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 14px 12px 44px;
  background: #f8fafc;
  border: 1px solid var(--ad-border, #e2e8f0);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}

.instructions-page__steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #adef00;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructions-page__tag-types {
  display: grid;
  gap: 12px;
  margin: 12px 0 20px;
}

.instructions-page__tag-types:last-child {
  margin-bottom: 0;
}

.instructions-page__tag-shot {
  margin: 0;
}

.instructions-page__tag-shot img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.instructions-page__tag-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--ad-border, #e2e8f0);
  background: #f8fafc;
}

.instructions-page__tag-card-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ad-text, #0f172a);
}

.instructions-page__tag-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.instructions-page__screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
  gap: 12px;
  margin: 18px 0 24px;
}

.instructions-page__screenshots:last-child {
  margin-bottom: 0;
}

.instructions-page__screenshots::before {
  content: "Скриншоты - нажмите для просмотра в полном размере";
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--ad-muted, #64748b);
}

.instructions-page__screenshots--full {
  grid-template-columns: 1fr;
}

.instructions-page__screenshots--full.instructions-page__screenshots--pair {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
  .instructions-page__screenshots--full.instructions-page__screenshots--pair {
    grid-template-columns: 1fr;
  }
}

.instructions-page__screenshots--full::before {
  content: "Нажмите на скриншот для просмотра в полном размере";
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--ad-muted, #64748b);
}

.instructions-page__screenshots--full .instructions-page__shot--static img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.instructions-page__screenshots--compact {
  max-width: min(680px, 72%);
}

.instructions-page__screenshots--compact .instructions-page__shot--static img {
  width: 100%;
  max-width: 100%;
}

.instructions-page__shot {
  margin: 0;
  border: 1px solid var(--ad-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: zoom-in;
  position: relative;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.instructions-page__shot:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.instructions-page__shot::after {
  content: none;
}

.instructions-page__shot img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.instructions-page__shot figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ad-muted, #64748b);
  border-top: 1px solid var(--ad-border, #e2e8f0);
  background: #fff;
}

.instructions-page__lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.88);
}

.instructions-page__lightbox[hidden] {
  display: none;
}

.instructions-page__lightbox-img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.instructions-page__lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.instructions-page__lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}