/* =============================================================================
   Сведено — общий стиль раздела «Инструкция» (/help).
   Дизайн-система адаптирована из docs/manager-guide.html (внутренний источник),
   чтобы раздел выглядел единообразно. Подключается во всех статьях /help.
   ========================================================================== */
:root {
  --bg: #f6f8fb; --bg-elev: #ffffff; --bg-dim: #f0f4f8;
  --ink: #0f172a; --ink-2: #334155; --ink-3: #64748b;
  --line: #e5e9ee; --line-2: #d8dee5;
  --accent: #2563eb; --accent-soft: #dbeafe;
  --success: #16a34a; --success-soft: #dcfce7;
  --warning: #d97706; --warning-soft: #fef3c7;
  --danger: #dc2626; --danger-soft: #fee2e2;
  --violet: #7c3aed; --violet-soft: #ede9fe;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 48px -12px rgba(15,23,42,.18), 0 4px 8px rgba(15,23,42,.06);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); }

/* — Верхняя панель — */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 16px;
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 18px; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.topbar .brand .dot { width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--violet)); }
.topbar .back { margin-left: auto; font-size: 14px; font-weight: 500;
  color: var(--ink-3); text-decoration: none; }
.topbar .back:hover { color: var(--accent); }

/* — Раскладка — */
.page { max-width: 1080px; margin: 0 auto; padding: 40px 24px 96px; }

/* — HERO (компактный) — */
.hero {
  position: relative; border-radius: 28px; padding: 48px 40px 52px;
  background:
    radial-gradient(circle at top right, rgba(124,58,237,.18), transparent 50%),
    radial-gradient(circle at bottom left, rgba(37,99,235,.18), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white; overflow: hidden; margin-bottom: 32px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.85); margin-bottom: 18px;
}
.hero-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #22d3ee; box-shadow: 0 0 12px #22d3ee; }
.hero h1 { margin: 0 0 12px; font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.06; }
.hero p { max-width: 720px; margin: 0; font-size: 18px; color: rgba(255,255,255,.78); }

/* — Хлебные крошки / мета — */
.crumb { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; }
.crumb a { text-decoration: none; }
.meta { font-size: 13px; color: var(--ink-3); margin: 0 0 24px; }

/* — Сетка статей (хаб) — */
.hub-grid { display: grid; gap: 16px; margin: 8px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.hub-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.hub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-2); }
.hub-card .n {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--violet)); color: white;
  display: grid; place-items: center; font-size: 17px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.hub-card h3 { margin: 4px 0 6px; font-size: 17px; font-weight: 600; }
.hub-card p { margin: 0; font-size: 14px; color: var(--ink-3); }

/* — Секции / карточки — */
section.sec { margin: 40px 0 0; scroll-margin-top: 72px; }
.sec h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.01em; margin: 0 0 12px; }
.sec p, .sec li { font-size: 16px; color: var(--ink-2); }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-sm); margin: 16px 0; }
.card h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; color: var(--ink); }

/* — Шаги — */
.steps { display: grid; gap: 18px; margin: 18px 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow-sm); }
.step .step-n { width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0; }
.step .step-body h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 600; }
.step .step-body p, .step .step-body ul { margin: 8px 0; }
.step ul { padding-left: 18px; }

/* — Плашки — */
.callout { margin: 16px 0; padding: 16px 20px; border-radius: 12px;
  border-left: 4px solid var(--accent); background: var(--accent-soft); font-size: 15px; color: var(--ink); }
.callout.success { border-left-color: var(--success); background: var(--success-soft); }
.callout.warning { border-left-color: var(--warning); background: var(--warning-soft); }
.callout.danger  { border-left-color: var(--danger);  background: var(--danger-soft); }
.callout.tip     { border-left-color: var(--violet);  background: var(--violet-soft); }
.callout strong { color: var(--ink); }
.callout::before { content: attr(data-icon); margin-right: 8px; font-weight: 700; }

/* — Скриншот + легенда с номерами — */
figure.shot { margin: 20px 0 8px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption { padding: 12px 18px; font-size: 13px; color: var(--ink-3);
  background: var(--bg-dim); border-top: 1px solid var(--line); }
figure.shot.placeholder { display: grid; place-items: center; min-height: 220px;
  background: repeating-linear-gradient(45deg, #f3f6fa, #f3f6fa 12px, #eef2f7 12px, #eef2f7 24px);
  color: var(--ink-3); text-align: center; padding: 32px; }
figure.shot.placeholder .ph-badge { font-size: 13px; font-weight: 600; color: var(--warning);
  background: var(--warning-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 10px; display: inline-block; }
.legend { list-style: none; counter-reset: lg; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.legend li { counter-increment: lg; display: flex; align-items: baseline; gap: 12px;
  font-size: 15px; color: var(--ink-2); }
.legend li::before { content: counter(lg); flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--danger); color: white; display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* — kbd / code — */
code, kbd { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; font-size: .92em;
  background: var(--bg-dim); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
code { overflow-wrap: anywhere; word-break: break-word; }
kbd { border: 1px solid var(--line-2); box-shadow: inset 0 -2px 0 rgba(0,0,0,.06); }

/* — Навигация назад/вперёд — */
.article-nav { display: flex; gap: 12px; margin-top: 48px; flex-wrap: wrap; }
.article-nav a { flex: 1; min-width: 220px; display: block; text-decoration: none;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.article-nav a:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); }
.article-nav .dir { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.article-nav .ttl { font-size: 16px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.article-nav a.next { text-align: right; }

/* — Подвал — */
.foot { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 13px; text-align: center; }
.foot a { text-decoration: none; }

@media (max-width: 640px) {
  .page { padding: 28px 16px 80px; }
  .hero { padding: 32px 22px 36px; }
  .step { grid-template-columns: 32px 1fr; padding: 18px; }
  .step .step-n { width: 28px; height: 28px; font-size: 13px; }
}
@media print { .topbar { display: none; } .step, .card, figure.shot { box-shadow: none; } }
