/* Справка портала (/help.php) — вид «Кабинета РОБОСИТИ» (static/rc-cab.css): палитра и
   Golos Text сайта, рабочая плотность — текст 15px, заголовок страницы 24px, карточки 16px
   с рамкой без теней, руководства — вкладками с подчёркиванием внизу шапки.
   Каркас (rc-wrap, rc-tile, rc-card, rc-ic, rc-btn) берётся из static/rc-site.css,
   размеры здесь ужаты до кабинетных. Своё — hp-*: названия кнопок, пути по интерфейсу,
   таблицы, заметки, вопросы и скриншоты внутри текста; lg-* — оглавление и документ. */

/* портал подключает w3.css и portal.css — возвращаем странице шрифт и фон сайта */
body.rc-body.page-help{background:var(--rc-bg);font-family:var(--rc-font);color:var(--rc-ink)}
.page-help .hp h1,.page-help .hp h2,.page-help .hp h3{font-family:var(--rc-font);margin:0}
.page-help .hp .rc-wrap{max-width:1240px;padding:0 24px}
.hp{--hp-muted:#7A746D;--hp-ink-2:#4A4643;--hp-sunken:#F7F1E8;font-size:14px;line-height:1.45}
.hp-top{padding-top:20px}

/* ---- шапка: заголовок и вкладки руководств ---- */
.lg-hero{padding:14px 20px 0;border-radius:16px}
.lg-hero__text{min-width:0}
.lg-back{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600}
.rc-body a.lg-back{color:var(--rc-coral-deep)}
.rc-body a.lg-back:hover{color:var(--rc-coral-ink)}
.lg-back .rci{width:16px;height:16px}
.lg-title{margin-top:6px;font-size:24px;line-height:1.2;font-weight:700;letter-spacing:-.02em}

.hp-seg{display:flex;gap:2px;margin:12px -20px 0;padding:0 10px;border:0;border-top:1px solid var(--rc-line);border-radius:0;background:none;overflow-x:auto;scrollbar-width:none}
.hp-seg::-webkit-scrollbar{display:none}
.rc-body .hp-seg>a{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 12px;border-radius:0;background:none;font-size:14px;font-weight:600;color:var(--hp-muted);white-space:nowrap;box-shadow:none}
.rc-body .hp-seg>a:hover{color:var(--rc-ink);background:none}
.rc-body .hp-seg>a[aria-selected="true"]{color:var(--rc-ink);background:none;box-shadow:none}
.rc-body .hp-seg>a[aria-selected="true"]::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;border-radius:2px;background:var(--rc-coral)}
.hp-seg .rci{width:18px;height:18px;flex:0 0 auto}
.hp-seg>a[aria-selected="true"] .rci{color:var(--rc-coral-ink)}

/* ---- оглавление слева, документ справа ---- */
.hp-guide.rc-sec{padding-top:16px;padding-bottom:56px}
.lg-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;align-items:start}
.lg-side{position:sticky;top:84px;display:flex;flex-direction:column;gap:12px}
.lg-toc{padding:12px 8px 8px;border-radius:16px}
.lg-toc nav{position:relative;max-height:calc(100vh - 290px);min-height:160px;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.lg-toc summary{display:none}
.lg-toc__h{padding:0 10px 8px;font-size:12.5px;font-weight:600;color:var(--hp-muted)}
.lg-toc ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.lg-toc a{display:flex;gap:8px;padding:6px 10px;border-radius:10px;font-size:13.5px;line-height:1.35;font-weight:500;transition:background .15s,color .15s}
.rc-body .lg-toc a{color:var(--hp-ink-2)}
.rc-body .lg-toc a:hover{background:var(--hp-sunken);color:var(--rc-ink)}
.rc-body .lg-toc a[aria-current="true"]{background:var(--rc-coral-soft);color:var(--rc-coral-deep);font-weight:600}
.lg-toc a b{flex:0 0 18px;font-weight:700;color:var(--rc-coral-ink)}
.lg-rel{padding:6px;border-radius:16px;display:flex;flex-direction:column;gap:1px}
.lg-rel a{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:10px;font-size:13.5px;line-height:1.3;font-weight:600}
.rc-body .lg-rel a{color:var(--rc-ink)}
.rc-body .lg-rel a:hover{background:var(--hp-sunken);color:var(--rc-coral-deep)}
.lg-rel .rc-ic{flex:0 0 30px;width:30px;height:30px;border-radius:9px}
.lg-rel .rc-ic .rci{width:18px;height:18px}

.lg-doc{padding:24px 28px 20px;border-radius:16px;min-width:0}
.lg-body{max-width:80ch;font-size:15px;line-height:1.6;color:var(--hp-ink-2)}
.lg-body p{margin:0 0 .8em;font-size:inherit;line-height:inherit} /* portal.css задаёт всем p 18px */
.lg-body .hp-guide__t{margin:0 0 16px;font-size:12.5px;font-weight:600;color:var(--hp-muted)}
.page-help .hp .lg-body h2{display:flex;align-items:center;gap:10px;margin:28px 0 12px;padding-top:22px;border-top:1px solid var(--rc-line);font-size:20px;line-height:1.25;font-weight:700;letter-spacing:-.01em;color:var(--rc-ink)}
.page-help .hp .lg-body .hp-sec:first-of-type h2{margin-top:0;padding-top:0;border-top:0}
.hp-sec{scroll-margin-top:84px}
.hp-num{flex:0 0 28px;width:28px;height:28px;border-radius:8px;background:var(--rc-coral-soft);color:var(--rc-coral-deep);font-size:14px;font-weight:700;letter-spacing:0;display:flex;align-items:center;justify-content:center}
.page-help .hp .lg-body h3{margin:18px 0 8px;font-size:16px;font-weight:700;line-height:1.3;color:var(--rc-ink)}
.lg-body ul,.lg-body ol{margin:0 0 .8em;padding-left:1.3em}
.lg-body li{margin-bottom:.3em;padding-left:.15em}
.lg-body li::marker{color:var(--rc-coral);font-weight:700}
.lg-body a:not(.rc-btn){color:var(--rc-coral-deep);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.lg-body b,.lg-body strong{font-weight:600;color:var(--rc-ink)}
.lg-top{margin-top:20px;display:flex;justify-content:flex-start}
.page-help .lg-doc .rc-btn--sm,.page-help .lg-body .rc-btn{height:36px;padding:0 14px;font-size:14px;font-weight:600}

/* название кнопки или поля — как на экране */
.hp-ui{display:inline-block;padding:0 7px;border-radius:7px;background:var(--hp-sunken);border:1px solid var(--rc-line);font-size:.88em;font-weight:600;line-height:1.55;color:var(--rc-ink);white-space:nowrap}
/* путь по интерфейсу */
.hp-path{display:flex;flex-wrap:wrap;align-items:center;gap:5px 6px;margin:0 0 12px}
.hp-path .hp-ui{white-space:normal}
.hp-path__sep{color:var(--rc-coral-ink);font-weight:700}
/* кнопка-переход на страницу портала */
.lg-body .hp-act{margin:4px 8px 4px 0}

/* скриншоты интерфейса */
.hp-shot{margin:4px 0 16px}
.hp-shot a{display:block;border:1px solid var(--rc-line);border-radius:12px;overflow:hidden;background:var(--rc-bg);transition:border-color .15s}
.hp-shot a:hover{border-color:#E4DACB}
.hp-shot img{display:block;width:100%;height:auto}
.hp-shot figcaption{margin-top:6px;font-size:13px;line-height:1.4;color:var(--hp-muted)}
.lg-body .hp-shot--narrow{max-width:520px}

/* таблицы */
.hp-tw{overflow-x:auto;margin:4px 0 14px;border:1px solid var(--rc-line);border-radius:12px}
.hp-tbl{width:100%;border-collapse:collapse;font-size:14px;line-height:1.45}
.hp-tbl th{padding:9px 14px;text-align:left;font-size:12.5px;font-weight:600;color:var(--hp-muted);background:var(--hp-sunken);border-bottom:1px solid var(--rc-line);white-space:nowrap}
.hp-tbl td{padding:10px 14px;vertical-align:top;border-bottom:1px solid var(--rc-line)}
.hp-tbl tr:last-child td{border-bottom:0}

/* заметки */
.hp-note{display:flex;gap:10px;margin:10px 0 14px;padding:10px 14px;border-radius:10px;font-size:14px;line-height:1.5}
.hp-note::before{flex:0 0 auto;font-weight:700}
.hp-note--tip{background:#E6F4EA;color:#1D6B3C}
.hp-note--tip::before{content:"Совет"}
.hp-note--warn{background:var(--rc-coral-soft);color:var(--rc-coral-deep)}
.hp-note--warn::before{content:"Важно"}
.hp-note .hp-ui{background:rgba(255,255,255,.7)}

/* вопросы */
.hp-faq{border:1px solid var(--rc-line);border-radius:12px;padding:0 16px}
.hp-faq details{border-top:1px solid var(--rc-line)}
.hp-faq details:first-of-type{border-top:0}
.hp-faq summary{list-style:none;cursor:pointer;padding:11px 0;font-size:15px;font-weight:600;color:var(--rc-ink);display:flex;justify-content:space-between;gap:12px}
.hp-faq summary::-webkit-details-marker{display:none}
.hp-faq summary::after{content:"+";flex:0 0 auto;font-size:18px;line-height:1;color:var(--rc-coral-ink)}
.hp-faq details[open] summary::after{content:"−"}
.hp-faq details p{margin:0 0 12px}

@media (max-width: 960px){
  .lg-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  .lg-side{position:static}
  .lg-toc nav{max-height:none;min-height:0}
  .lg-toc{padding:4px}
  .lg-toc summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:0 12px;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;list-style:none}
  .lg-toc summary::-webkit-details-marker{display:none}
  .lg-toc summary .rci{width:20px;height:20px;transition:transform .25s}
  .lg-toc[open] summary .rci{transform:rotate(180deg)}
  .lg-toc__h{display:none}
  .lg-toc ol{padding:2px 4px 6px}
  .lg-rel{display:none}
}
@media (max-width: 760px){
  .page-help .hp .rc-wrap{padding:0 12px}
  .hp-top{padding-top:12px}
  .lg-hero{padding:12px 14px 0}
  .lg-title{font-size:21px}
  .hp-seg{margin:10px -14px 0;padding:0 4px}
  .rc-body .hp-seg>a{padding:0 10px}
  .hp-guide.rc-sec{padding-top:12px;padding-bottom:40px}
  .lg-doc{padding:16px 14px}
  .lg-body{font-size:14.5px;line-height:1.58}
  .page-help .hp .lg-body h2{font-size:18px;gap:10px;margin-top:24px;padding-top:18px}
  .hp-num{flex-basis:26px;width:26px;height:26px;font-size:13px}
  .lg-body ul,.lg-body ol{padding-left:1.15em}
  .hp-ui{white-space:normal}
  .hp-tbl{font-size:13.5px}
  .hp-tbl th,.hp-tbl td{padding:8px 10px}
}
