/* Стили для раздела /articles — список и сами статьи. */

body { background-color: var(--bg); color: var(--text, #e6edf3); min-height: 100vh; }

/* ============== Общая обёртка ============== */
.articles-wrap,
.article-wrap {
    max-width: 860px;
    margin: 28px auto;
    padding: 0 16px 60px;
}

/* ============== Хлебные крошки ============== */
.article-breadcrumbs {
    font-size: 13px;
    color: var(--text-subtle, #6e7681);
    margin-bottom: 14px;
}
.article-breadcrumbs a {
    color: var(--text-muted, #8b949e);
    text-decoration: none;
}
.article-breadcrumbs a:hover { color: var(--accent, #58a6ff); text-decoration: underline; }
.article-breadcrumbs span { color: var(--text, #e6edf3); }

/* ============== Индекс статей ============== */
.articles-header {
    background: var(--bg-2, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 24px;
}
.articles-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text, #e6edf3);
}
.articles-header p {
    color: var(--text-muted, #8b949e);
    line-height: 1.7;
    margin: 0;
    max-width: 640px;
}

.articles-category {
    margin-bottom: 28px;
}
.articles-category-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #58a6ff);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px 4px;
}

.article-card {
    display: block;
    background: var(--bg-2, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: border-color .15s ease, transform .1s ease, background .15s ease;
}
.article-card:hover {
    border-color: var(--accent, #58a6ff);
    background: var(--bg-3, #1c2128);
    text-decoration: none;
}
.article-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text, #e6edf3);
    line-height: 1.35;
}
.article-card p {
    color: var(--text-muted, #8b949e);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 8px 0;
}
.article-card .card-meta {
    color: var(--text-subtle, #6e7681);
    font-size: 12px;
}

/* ============== Сама статья ============== */
.article {
    background: var(--bg-2, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 12px;
    padding: 32px 38px;
}
.article-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-muted, #21262d); }
.article-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent, #58a6ff);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.article h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.25;
    color: var(--text, #e6edf3);
}
.article-meta {
    color: var(--text-subtle, #6e7681);
    font-size: 13px;
    margin-bottom: 12px;
}
.article-lead {
    color: var(--text-muted, #8b949e);
    line-height: 1.7;
    font-size: 16px;
    margin: 0;
}

/* ============== Тело статьи ============== */
.article-body h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 12px 0;
    color: var(--text, #e6edf3);
    line-height: 1.3;
}
.article-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 22px 0 10px 0;
    color: var(--text, #e6edf3);
}
.article-body p,
.article-body li {
    color: var(--text-muted, #8b949e);
    line-height: 1.75;
    font-size: 15px;
    margin: 0 0 12px 0;
}
.article-body ul,
.article-body ol {
    padding-left: 22px;
    margin-bottom: 14px;
}
.article-body li { margin-bottom: 6px; }
.article-body a {
    color: var(--accent, #58a6ff);
    text-decoration: none;
}
.article-body a:hover { text-decoration: underline; }
.article-body strong, .article-body b { color: var(--text, #e6edf3); }
.article-body code {
    background: var(--bg-3, #1c2128);
    color: var(--accent-hover, #79c0ff);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.article-body blockquote {
    border-left: 3px solid var(--accent, #58a6ff);
    background: var(--accent-bg, rgba(31,111,235,.08));
    margin: 14px 0;
    padding: 10px 16px;
    color: var(--text, #e6edf3);
    border-radius: 4px;
}
.article-body blockquote p { color: var(--text, #e6edf3); margin: 0; }

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 18px 0;
    font-size: 14px;
}
.article-body th,
.article-body td {
    border: 1px solid var(--border, #30363d);
    padding: 8px 12px;
    text-align: left;
    color: var(--text-muted, #8b949e);
}
.article-body th {
    background: var(--bg-3, #1c2128);
    color: var(--text, #e6edf3);
    font-weight: 600;
}
.article-body td strong { color: var(--text, #e6edf3); }

.article-body figure {
    margin: 18px 0;
    text-align: center;
}
.article-body figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border, #30363d);
    border-radius: 8px;
}
.article-body figcaption {
    color: var(--text-subtle, #6e7681);
    font-size: 12px;
    margin-top: 6px;
}

.article-body .note {
    background: var(--accent-bg, rgba(31,111,235,.10));
    border: 1px solid var(--border, #30363d);
    border-left: 3px solid var(--accent, #58a6ff);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 14px 0;
}
.article-body .note p { margin: 0; color: var(--text, #e6edf3); }

.article-body .warn-box {
    background: var(--warn-bg, rgba(210,153,34,.10));
    border: 1px solid var(--warn-border, rgba(210,153,34,.3));
    border-left: 3px solid var(--warn, #d29922);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 14px 0;
}
.article-body .warn-box p { margin: 0; color: var(--text, #e6edf3); }

/* ============== Связанные инструменты ============== */
.article-related {
    margin-top: 28px;
    padding: 16px 22px;
    background: var(--bg-3, #1c2128);
    border: 1px solid var(--border, #30363d);
    border-radius: 8px;
}
.article-related h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #58a6ff);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px 0;
}
.article-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.article-related li { margin: 0; }
.article-related a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-2, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 18px;
    color: var(--text, #e6edf3);
    text-decoration: none;
    font-size: 13px;
}
.article-related a:hover {
    border-color: var(--accent, #58a6ff);
    color: var(--accent, #58a6ff);
}

/* ============== Низ статьи ============== */
.article-nav {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-muted, #21262d);
    font-size: 14px;
}
.article-nav a {
    color: var(--text-muted, #8b949e);
    text-decoration: none;
}
.article-nav a:hover { color: var(--accent, #58a6ff); text-decoration: underline; }

/* ============== FAQ ============== */
.article-body .faq {
    margin: 14px 0;
}
.article-body .faq details {
    background: var(--bg-3, #1c2128);
    border: 1px solid var(--border, #30363d);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.article-body .faq summary {
    cursor: pointer;
    color: var(--text, #e6edf3);
    font-weight: 600;
    padding: 4px 0;
    list-style: none;
}
.article-body .faq summary::-webkit-details-marker { display: none; }
.article-body .faq summary::before {
    content: "▸ ";
    color: var(--accent, #58a6ff);
    margin-right: 4px;
}
.article-body .faq details[open] summary::before { content: "▾ "; }
.article-body .faq details[open] summary { margin-bottom: 6px; }
.article-body .faq p:last-child { margin-bottom: 4px; }

/* ============== Адаптив ============== */
@media (max-width: 640px) {
    .article { padding: 22px 18px; }
    .article h1 { font-size: 22px; }
    .article-body h2 { font-size: 18px; }
    .articles-header { padding: 22px 18px; }
    .articles-header h1 { font-size: 22px; }
}
