/* Статические страницы справки Меркурий-ИИ */
:root {
    --help-orange: #e8a020;
    --help-orange-soft: #fffbeb;
    --help-border: #e8e4dc;
    --help-text: #2a2a2a;
    --help-muted: #6b6560;
    --help-max: 720px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.help-page {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    font-size: 11pt;
    line-height: 1.55;
    color: var(--help-text);
    background: #faf9f6;
}

.help-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--help-border);
}

.help-header a {
    color: var(--help-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.help-header a:hover {
    color: var(--help-orange);
}

.help-header-brand {
    font-weight: 700;
    color: var(--help-orange);
}

.help-main {
    max-width: var(--help-max);
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.help-eyebrow {
    margin: 0 0 8px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--help-muted);
}

.help-main h1 {
    margin: 0 0 12px;
    font-size: 1.75em;
    line-height: 1.25;
}

.help-lead {
    margin: 0 0 28px;
    font-size: 1.08em;
    color: #444;
}

.help-block {
    margin-bottom: 22px;
}

.help-block h2 {
    margin: 0 0 10px;
    font-size: 1.1em;
}

.help-block p {
    margin: 0 0 10px;
}

.help-block ul,
.help-block ol {
    margin: 0 0 10px;
    padding-left: 1.35em;
}

.help-block li {
    margin-bottom: 6px;
}

.help-block--tip {
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--help-orange-soft);
    border-left: 3px solid var(--help-orange);
}

.help-block code {
    font-size: 0.92em;
    padding: 1px 5px;
    border-radius: 4px;
    background: #f0ede6;
}

.help-pre {
    margin: 12px 0 16px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88em;
    line-height: 1.45;
    background: #1e1e1e;
    color: #e8e4dc;
    border-radius: 8px;
}

.help-pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.help-table {
    width: 100%;
    margin: 12px 0 16px;
    border-collapse: collapse;
    font-size: 0.95em;
}

.help-table th,
.help-table td {
    padding: 8px 10px;
    border: 1px solid var(--help-border);
    text-align: left;
    vertical-align: top;
}

.help-table th {
    background: #f5f3ee;
    font-weight: 600;
}

/* Заглушки и готовые скриншоты в статьях справки */
.help-screenshot {
    margin: 18px 0 22px;
}

.help-screenshot img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--help-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.help-screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 200px;
    padding: 24px 20px;
    text-align: center;
    border-radius: 8px;
    border: 2px dashed #c9c0b0;
    background: repeating-linear-gradient(
        -45deg,
        #f5f2eb,
        #f5f2eb 10px,
        #efe9df 10px,
        #efe9df 20px
    );
}

.help-screenshot-placeholder-label {
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--help-muted);
}

.help-screenshot-placeholder-desc {
    max-width: 36em;
    font-size: 0.95em;
    line-height: 1.45;
    color: #555;
}

.help-screenshot figcaption {
    margin-top: 10px;
    font-size: 0.92em;
    color: var(--help-muted);
    line-height: 1.45;
}

.help-toc {
    margin: 0 0 24px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--help-border);
}

.help-toc h2 {
    margin: 0 0 10px;
    font-size: 0.95em;
}

.help-toc ul {
    margin: 0;
    padding-left: 1.25em;
}

.help-toc a {
    color: var(--help-text);
    font-weight: 600;
}

.help-toc a:hover {
    color: var(--help-orange);
}

.help-block[id] {
    scroll-margin-top: 16px;
}

.help-videos {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--help-border);
}

.help-videos h2 {
    margin: 0 0 8px;
    font-size: 1.15em;
}

.help-videos-note {
    margin: 0 0 16px;
    font-size: 0.95em;
    color: var(--help-muted);
}

.help-video-platform {
    display: inline-flex;
    padding: 3px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #eee9df;
    border: 1px solid var(--help-border);
}

.help-video-platform-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--help-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.help-video-platform-btn:hover {
    color: var(--help-text);
}

.help-video-platform-btn.is-active {
    background: #fff;
    color: var(--help-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.help-video-item {
    margin-bottom: 24px;
}

.help-video-item h3 {
    margin: 0 0 10px;
    font-size: 1em;
}

.help-video-empty {
    margin: 0;
    padding: 20px;
    text-align: center;
    color: var(--help-muted);
    background: #fff;
    border: 1px dashed var(--help-border);
    border-radius: 8px;
    font-size: 0.95em;
}

.help-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

.help-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.help-footer {
    max-width: var(--help-max);
    margin: 0 auto;
    padding: 0 20px 32px;
    font-size: 0.85em;
    color: var(--help-muted);
}

.help-footer a {
    color: var(--help-orange);
}

/* Хаб: список разделов */
.help-hub-intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 20px 12px;
}

.help-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 20px 48px;
}

.help-hub-card {
    display: block;
    padding: 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--help-border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.help-hub-card:hover {
    border-color: var(--help-orange);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.help-hub-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05em;
}

.help-hub-card span {
    font-size: 0.88em;
    color: var(--help-muted);
    line-height: 1.4;
}

/* Скриншоты: миниатюра → на весь экран */
.help-figure {
    margin: 16px 0 20px;
}

.help-figure figcaption {
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--help-muted);
}

.help-figure-link,
.help-figure-placeholder {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0;
    padding: 0;
    border: 1px dashed var(--help-border);
    border-radius: 10px;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.help-figure-link:hover,
.help-figure-placeholder:hover {
    border-color: var(--help-orange);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.help-figure-thumb {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}

.help-figure-placeholder {
    min-height: 140px;
    font: inherit;
    color: var(--help-muted);
}

.help-figure-placeholder-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 20px;
    text-align: center;
    font-size: 0.92em;
    line-height: 1.45;
}

.help-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 18, 14, 0.88);
}

.help-lightbox[hidden] {
    display: none !important;
}

.help-lightbox__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.help-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.help-lightbox__img {
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.help-lightbox__caption {
    max-width: 720px;
    margin: 14px 0 0;
    color: #f5f0e6;
    font-size: 0.95em;
    text-align: center;
    line-height: 1.5;
}

.help-lightbox__placeholder {
    max-width: 520px;
    padding: 32px 28px;
    border-radius: 10px;
    background: #fff;
    color: var(--help-text);
    text-align: center;
    line-height: 1.55;
}
