/* ═══════════════════════════════════════════════════════════
   ORDObim — раздел «Инструкции»
   Дополнение к styles.css: две колонки, оглавление, шаги
   ═══════════════════════════════════════════════════════════ */

/* ── Шапка раздела ── */
.docs-hero {
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-deep);
  padding: 56px 0 48px;
}
.docs-hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: 16px;
}
.docs-hero .hero-sub { margin-bottom: 0; }

/* Хлебные крошки */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--line); }

/* ── Каркас страницы инструкции ── */
.docs-layout {
  display: grid;
  grid-template-columns: 244px 1fr;
  gap: 48px;
  align-items: start;
  /* боковые отступы берём у .frame — не перебиваем их */
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ── Оглавление ── */
.docs-toc {
  position: sticky;
  top: 88px;
  border-left: 1.5px solid var(--ink);
  padding-left: 18px;
}
.docs-toc-key {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 14px;
}
.docs-toc ol {
  list-style: none;
  counter-reset: toc;
}
.docs-toc li { counter-increment: toc; }
.docs-toc a {
  display: block;
  padding: 7px 0 7px 30px;
  position: relative;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line-soft);
}
.docs-toc li:first-child a { border-top: none; }
.docs-toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--line);
}
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.active {
  color: var(--ink);
  font-weight: 600;
}
.docs-toc a.active::before { color: var(--accent); }

.docs-toc-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.docs-toc-foot .btn { width: 100%; padding: 10px 14px; font-size: 14px; }

/* ── Содержимое ── */
.docs-body { min-width: 0; max-width: 760px; }

.doc-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.doc-lead b { color: var(--ink); font-weight: 600; }

/* Снимок панели */
.panel-shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #FCFDFC;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 12px;
  margin-bottom: 12px;
}
.panel-shot img { display: block; width: 100%; height: auto; }
.figcap {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

/* Карточки-указатель на разделы */
.doc-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 56px;
}
.doc-index a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.doc-index a:hover { border-color: var(--ink); transform: translateY(-2px); }
.doc-index i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  flex: none;
}
.doc-index div { min-width: 0; }
.doc-index b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.doc-index p { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }

/* ── Раздел-кнопка ── */
.doc-section {
  border-top: 1.5px solid var(--ink);
  padding-top: 32px;
  margin-bottom: 56px;
  scroll-margin-top: 88px;
}
.doc-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.doc-section > h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 14px;
}
.doc-what {
  font-size: 16.5px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 14px;
}
.doc-section p { color: var(--ink-soft); margin-bottom: 14px; }
.doc-section p:last-child { margin-bottom: 0; }

.doc-section h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin: 32px 0 16px;
}

/* ── Шаги ── */
.steps-list {
  list-style: none;
  counter-reset: st;
  border-left: 1.5px solid var(--line);
  margin-left: 13px;
}
.steps-list > li {
  counter-increment: st;
  position: relative;
  padding: 0 0 22px 30px;
  margin-left: -13px;
  font-size: 15.5px;
  line-height: 1.6;
}
.steps-list > li:last-child { padding-bottom: 0; }
.steps-list > li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Вложенный список параметров диалога */
.opts {
  list-style: none;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.opts li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 12px 16px 12px 34px;
  border-top: 1px dashed var(--line-soft);
  position: relative;
}
.opts li:first-child { border-top: none; }
.opts li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 21px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--blue);
}
.opts b { color: var(--ink); font-weight: 600; }

/* Простой список */
.dash-list { list-style: none; }
.dash-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line-soft);
}
.dash-list li:first-child { border-top: none; }
.dash-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--blue);
}
.dash-list b { color: var(--ink); font-weight: 600; }

/* Клавиша / кнопка интерфейса */
kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #fff;
  padding: 1px 6px;
  color: var(--ink);
  white-space: nowrap;
}

/* ── Плашка «Важно» ── */
.callout {
  display: flex;
  gap: 14px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.callout::before {
  content: "!";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.callout b { color: var(--ink); font-weight: 600; }

.callout-info {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 4%, transparent);
}
.callout-info::before { content: "i"; background: var(--blue); }

/* ── Таблица проверок ── */
.doc-table-wrap { overflow-x: auto; }
.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
  border: 1.5px solid var(--ink);
  font-size: 14.5px;
}
.doc-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-deep);
}
.doc-table td {
  padding: 13px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  vertical-align: top;
  line-height: 1.5;
}
.doc-table tr:first-child td { border-top: none; }
.doc-table td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  width: 44px;
}
.doc-table td:nth-child(2) { color: var(--ink); font-weight: 600; width: 210px; }

/* ── Легенда кнопок в окне результатов ── */
.ui-keys { list-style: none; }
.ui-keys li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.ui-keys li:first-child { border-top: none; }
.ui-keys .key {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
}
.ui-keys .key-wide { width: auto; padding: 0 10px; font-size: 12px; }

/* Цветовая легенда блоков результата */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.legend span {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 12px 5px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  position: relative;
  color: var(--ink-soft);
}
.legend span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

/* ── Навигация «назад / вперёд» внизу ── */
.doc-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1.5px solid var(--ink);
  padding-top: 24px;
  flex-wrap: wrap;
}
.doc-nav a {
  font-size: 15px;
  font-weight: 600;
}

/* ── Хаб инструкций ── */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.doc-card {
  display: block;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.doc-card:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 var(--line); }
.doc-card h3 { font-size: 20px; margin: 10px 0 8px; }
.doc-card p { font-size: 14.5px; color: var(--ink-soft); }
.doc-card-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
}

.doc-card-soon {
  border-color: var(--line);
  background: transparent;
  cursor: default;
}
.doc-card-soon:hover { transform: none; box-shadow: none; }
.doc-card-soon h3 { color: var(--ink-soft); }
.doc-card-soon .doc-card-foot { color: var(--ink-soft); }

/* ── Адаптив ── */
@media (max-width: 980px) {
  .docs-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; padding-bottom: 64px; }
  .docs-toc {
    position: static;
    border-left: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 16px 18px;
  }
  .docs-body { max-width: none; }
}

@media (max-width: 720px) {
  .doc-index,
  .doc-cards { grid-template-columns: 1fr; }
  .docs-hero { padding: 36px 0 32px; }
  .steps-list > li { font-size: 15px; }
  .doc-table td:nth-child(2) { width: auto; }
}

/* ── Макет шапки таблицы плагина ─────────────────────────────────────────
   Не скриншот: текст остаётся чётким на любом экране, находится поиском и
   переводится. Ширины столбцов взяты из плагина, пропорции те же. */
.grid-head-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--ink);
  background: #fff;
  margin-bottom: 10px;
}
.grid-head { display: flex; min-width: 940px; }
.grid-head .gh {
  flex: 0 0 auto;
  padding: 9px 10px 10px;
  background: #F0F4FA;
  border-right: 2px solid #8FA8CC;
}
.grid-head .gh:last-child { border-right: none; }
.grid-head .gh b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
/* поле фильтра под заголовком — есть не у всех столбцов */
.grid-head .gh i {
  display: block;
  height: 17px;
  margin-top: 6px;
  background: #EEF3FB;
  border: 1px solid #AABCD8;
}
.grid-head .gh.no-filter i { visibility: hidden; }
.grid-head-note { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 18px; }

/* ── Таблица столбцов отчёта: метка обязательности + где включается ── */
.doc-table td.c-req {
  width: 112px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-soft);
}
.doc-table td.c-where { width: 210px; font-size: 13.5px; }
.req-yes, .req-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.req-yes { background: var(--accent); color: #fff; }
.req-no  { background: var(--paper-deep); color: var(--ink-soft); border: 1px solid var(--line); }

@media (max-width: 720px) {
  .doc-table td.c-req,
  .doc-table td.c-where { width: auto; }
}

/* ── Плашка над заголовком инструкции (подсказка про F1) ── */
.hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 12px 5px 8px;
  margin-bottom: 16px;
}
.hero-hint kbd { margin: 0; }
