
/* ============================================================
   Стили блога SibScreen.ru
   Применяются ко всем страницам, где есть контейнер
   .sibscreen-article. Не конфликтуют со стилями других проектов.
   ============================================================ */

/* ---------- Базовый контейнер статьи ---------- */
.sibscreen-article {
    max-width: 760px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #1f2933;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Заголовки ---------- */
.sibscreen-article h1 {
    font-size: 2.1em;
    line-height: 1.25;
    margin: 0 0 28px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.sibscreen-article h2 {
    font-size: 1.55em;
    line-height: 1.3;
    margin: 56px 0 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.005em;
}

.sibscreen-article h3 {
    font-size: 1.2em;
    line-height: 1.4;
    margin: 36px 0 12px;
    font-weight: 600;
    color: #1f2933;
}

/* ---------- Абзацы и списки ---------- */
.sibscreen-article p {
    margin: 0 0 22px;
}

.sibscreen-article ul,
.sibscreen-article ol {
    margin: 0 0 24px;
    padding-left: 26px;
}

.sibscreen-article li {
    margin-bottom: 10px;
}

.sibscreen-article li > p {
    margin-bottom: 8px;
}

/* ---------- Ссылки ---------- */
.sibscreen-article a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.sibscreen-article a:hover {
    color: #1d4ed8;
}

/* ---------- Жирный и курсив ---------- */
.sibscreen-article strong {
    font-weight: 700;
    color: #0f172a;
}

.sibscreen-article em {
    font-style: italic;
    color: #4b5563;
}

/* ---------- Цитаты ---------- */
.sibscreen-article blockquote {
    margin: 28px 0;
    padding: 16px 24px;
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    color: #334155;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

/* ---------- Таблицы ---------- */
.sibscreen-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.sibscreen-article table thead th {
    background: #f1f5f9;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #cbd5e1;
    color: #0f172a;
}

.sibscreen-article table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.sibscreen-article table tbody tr:hover {
    background: #f8fafc;
}

@media (max-width: 640px) {
    .sibscreen-article table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ---------- Изображения ---------- */
.sibscreen-article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 28px auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ---------- Блок автора ---------- */
.sibscreen-article .author-block {
    margin-top: 48px;
    padding: 20px 24px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0 6px 6px 0;
    font-size: 0.92em;
    color: #4b5563;
}

/* ---------- Оглавление (TOC) ---------- */
.sibscreen-article .article-toc {
    margin: 32px 0 40px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.sibscreen-article .toc-title {
    margin: 0 0 16px;
    font-size: 1.05em;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sibscreen-article .toc-list,
.sibscreen-article .toc-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sibscreen-article .toc-list {
    counter-reset: toc-h2;
}

.sibscreen-article .toc-list > li {
    counter-increment: toc-h2;
    margin-bottom: 8px;
    font-weight: 500;
}

.sibscreen-article .toc-list > li > a::before {
    content: counter(toc-h2) ". ";
    font-weight: 600;
    color: #0f172a;
}

.sibscreen-article .toc-sublist {
    counter-reset: toc-h3;
    margin: 6px 0 12px 24px;
}

.sibscreen-article .toc-sublist > li {
    counter-increment: toc-h3;
    margin-bottom: 6px;
    font-size: 0.95em;
    line-height: 1.4;
}

.sibscreen-article .toc-sublist > li > a::before {
    content: counter(toc-h2) "." counter(toc-h3) ". ";
    font-weight: 500;
    color: #64748b;
}

.sibscreen-article .toc-list a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s;
}

.sibscreen-article .toc-list a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---------- Плавный скролл и якоря ---------- */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

.sibscreen-article h2[id],
.sibscreen-article h3[id] {
    scroll-margin-top: 80px;
}

/* ---------- FAQ-блок ---------- */
.sibscreen-article h2:has(+ h3),
.sibscreen-article h2#faq,
.sibscreen-article h2#chastye-voprosy {
    margin-top: 56px;
}

.sibscreen-article h3 + p {
    color: #374151;
    margin-bottom: 16px;
}

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 768px) {
    .sibscreen-article {
        font-size: 16.5px;
        line-height: 1.65;
        padding: 0 16px;
    }

    .sibscreen-article h1 { font-size: 1.75em; margin-bottom: 22px; }
    .sibscreen-article h2 { font-size: 1.35em; margin-top: 42px; }
    .sibscreen-article h3 { font-size: 1.12em; margin-top: 28px; }
}
</style>