/* ============================================================
   Инструкция для клиентов (/guide): поверх panel.css, те же цвета и карточки, что в кабинете.
   ============================================================ */

.guide-sidebar-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 0 8px 12px; margin-top: -10px; }
.guide-nav-item { align-items: flex-start; line-height: 1.35; }
.guide-nav-num {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; background: var(--bg); color: var(--text-muted);
}
.guide-nav-item.active .guide-nav-num { background: var(--brand); color: #fff; }
.guide-quick {
    margin-top: auto; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--brand-tint); display: flex; flex-direction: column; gap: 8px; margin-top: 24px;
}
.guide-quick-title { font-size: 12px; font-weight: 700; color: var(--text); }
.guide-quick .btn { justify-content: center; }

.guide-content { max-width: none; }
.guide-top { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.guide-wrap { max-width: 920px; margin: 0 auto; }
.guide-crumbs { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-crumbs a { color: var(--text-muted); }
.guide-crumbs a:hover { color: var(--brand); }

/* Шапка раздела */
.guide-hero { margin-bottom: 22px; }
.guide-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; }
.guide-hero p { font-size: 16px; line-height: 1.6; color: #4b4863; }
.guide-hero .guide-actions { margin-top: 18px; }
.guide-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Якоря по разделу */
.guide-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.guide-chips a {
    font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--border); color: var(--text);
}
.guide-chips a:hover { border-color: var(--brand-light); background: var(--brand-tint); color: var(--brand-dark); }

/* Текст */
.guide-section { margin-bottom: 34px; scroll-margin-top: 20px; }
.guide-section > h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 14px; }
.guide-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.guide-text p, .guide-section > p { font-size: 15px; line-height: 1.65; color: #3a374f; margin-bottom: 12px; }
.guide-section ul, .guide-section ol.guide-list { padding-left: 20px; margin: 0 0 12px; }
.guide-section li { font-size: 15px; line-height: 1.6; color: #3a374f; margin-bottom: 6px; }
.guide-section a:not(.btn) { color: var(--brand); font-weight: 500; }
.guide-section a:not(.btn):hover { text-decoration: underline; }
.guide-section .card p:last-child, .guide-card p:last-child { margin-bottom: 0; }
.guide-ui { font-weight: 600; color: var(--text); white-space: nowrap; }

/* Карточки в сетке */
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.guide-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.guide-card p { font-size: 14px; line-height: 1.55; color: #4b4863; margin-bottom: 10px; }
.guide-card .btn { margin-top: 4px; }
a.guide-card { display: block; color: inherit; transition: border-color 0.15s, transform 0.15s; }
a.guide-card:hover { border-color: var(--brand-light); transform: translateY(-1px); }
.guide-card-num { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.guide-card-icon {
    width: 38px; height: 38px; border-radius: 10px; background: var(--brand-light); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.guide-card-icon svg { width: 20px; height: 20px; }

/* Нумерованные шаги */
.guide-steps { list-style: none; counter-reset: gstep; display: grid; gap: 12px; padding: 0; margin: 0; }
.guide-steps > li {
    counter-increment: gstep; position: relative; padding: 16px 18px 16px 58px; margin: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.guide-steps > li::before {
    content: counter(gstep); position: absolute; left: 18px; top: 15px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.guide-steps strong { display: block; font-size: 15px; margin-bottom: 3px; color: var(--text); }
.guide-steps p, .guide-steps li { font-size: 14px; line-height: 1.55; color: #4b4863; margin: 0; }

/* Врезки */
.guide-note {
    border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14.5px; line-height: 1.6; margin: 0 0 16px;
    background: var(--brand-tint); border: 1px solid var(--brand-light); color: var(--text);
}
.guide-note strong { color: var(--brand-dark); }
.guide-note-warn { background: var(--orange-bg); border-color: #f0d49c; color: #5c3a00; }
.guide-note-warn strong { color: #8a4b00; }
.guide-note-ok { background: var(--green-bg); border-color: #bfe8cf; color: #0f3d24; }
.guide-note-ok strong { color: #0f5132; }
.guide-note p { margin: 0 0 6px; font-size: inherit; line-height: inherit; color: inherit; }
.guide-note p:last-child { margin: 0; }

/* Скриншоты */
.guide-shot { margin: 6px 0 22px; }
.guide-shot img {
    display: block; max-width: 100%; height: auto; border-radius: 12px;
    border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(30, 27, 46, 0.08); background: var(--card);
}
.guide-shot-narrow img { max-width: 520px; }
.guide-shot figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* Таблицы */
.guide-table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.guide-table th, .guide-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.guide-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; background: var(--brand-tint); }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-table td:first-child { font-weight: 600; white-space: nowrap; }

/* Пилюли как в кабинете */
.guide-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.guide-pill-green { background: var(--green-bg); color: var(--green); }
.guide-pill-orange { background: var(--orange-bg); color: var(--orange); }
.guide-pill-red { background: var(--red-bg); color: var(--red); }
.guide-pill-gray { background: var(--bg); color: var(--text-muted); }

/* FAQ */
.guide-faq { display: grid; gap: 10px; }
.guide-faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.guide-faq summary {
    cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-size: 15px; font-weight: 600; position: relative;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: '+'; position: absolute; right: 16px; top: 11px; font-size: 20px; color: var(--brand); }
.guide-faq details[open] summary::after { content: '−'; }
.guide-faq details > div { padding: 0 16px 14px; font-size: 14.5px; line-height: 1.6; color: #3a374f; }
.guide-faq details > div p { margin: 0 0 8px; }
.guide-faq details > div p:last-child { margin: 0; }

/* Шаблон обращения */
.guide-template {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.7;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; white-space: pre-wrap;
}

/* Листалка и подвал */
.guide-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 20px; }
.guide-pager-link {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text);
}
.guide-pager-link:hover { border-color: var(--brand-light); }
.guide-pager-next { text-align: right; grid-column: 2; }
.guide-pager-label { font-size: 12px; color: var(--text-muted); }
.guide-pager-title { font-size: 15px; font-weight: 600; color: var(--brand-dark); }
.guide-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); padding: 16px 0 8px; border-top: 1px solid var(--border); }
.guide-footer-legal { display: flex; gap: 14px; flex-wrap: wrap; }
.guide-footer-legal a { color: var(--text-muted); }
.guide-footer-legal a:hover { color: var(--brand); }

@media (max-width: 860px) {
    .guide-content { padding: 72px 16px 24px; }
    .guide-top { position: absolute; top: 16px; right: 16px; margin: 0; }
    .guide-hero h1 { font-size: 24px; }
    .guide-hero p { font-size: 15px; }
    .guide-grid, .guide-grid-3 { grid-template-columns: 1fr; }
    .guide-pager { grid-template-columns: 1fr; }
    .guide-pager-next { grid-column: 1; }
    .guide-shot-narrow img { max-width: 100%; }
    .guide-table td:first-child { white-space: normal; }
}
@media (max-width: 420px) {
    .guide-top .btn-ghost { display: none; }
}
