/* ==========================================================================
   AnyGems — единый стиль статей блога (/articles/*).
   Вынесен из inline-<style> первых статей (genshin-tips и др.) в общий файл,
   чтобы все материалы блога были консистентны и правились в одном месте.
   Токены (var(--accent), --bg-card, --text-*, --gem …) приходят из
   /includes/head.html (дизайн-система главной). Здесь — только раскладка статьи.
   ========================================================================== */

/* --- Хлебные крошки --- */
.breadcrumbs { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); padding:20px 0 0; flex-wrap:wrap; }
.breadcrumbs a { color:var(--text-muted); text-decoration:none; transition:color .2s; }
.breadcrumbs a:hover { color:var(--accent); }
.breadcrumbs svg { width:14px; height:14px; opacity:.4; }

/* --- Шапка статьи --- */
.article-header { padding:28px 0 32px; max-width:820px; margin:0 auto; }
.article-tag { display:inline-block; padding:4px 12px; border-radius:6px; background:var(--accent-glow); color:var(--accent); font-size:12px; font-weight:600; margin-bottom:12px; }
.article-title { font-family:'Unbounded',sans-serif; font-weight:800; font-size:32px; line-height:1.3; margin-bottom:16px; }
.article-lead { font-size:17px; line-height:1.65; color:var(--text-secondary); max-width:820px; margin:0 auto 8px; }
.article-meta { display:flex; align-items:center; gap:16px; font-size:13px; color:var(--text-muted); flex-wrap:wrap; }
.article-meta-item { display:flex; align-items:center; gap:6px; }

/* --- Обложка: SVG — базовый слой (всегда рендерится), реальный арт — поверх.
   Если файл арта отсутствует/404 — onerror="this.remove()" снимает <img>, и
   остаётся фирменная SVG-обложка. Порядок в DOM: сначала <svg>, затем <img>. --- */
.article-cover { width:100%; max-width:900px; margin:0 auto 32px; aspect-ratio:2.2/1; border-radius:var(--radius); overflow:hidden; background:linear-gradient(135deg,#141a2e,#0a1020); position:relative; }
.article-cover > svg,.article-cover > img { position:absolute; inset:0; width:100%; height:100%; display:block; }
.article-cover > svg { z-index:1; }
.article-cover > img { object-fit:cover; z-index:2; }

/* --- Тело статьи --- */
.article-body { max-width:820px; margin:0 auto 48px; }
.article-body h2 { font-family:'Unbounded',sans-serif; font-weight:700; font-size:22px; margin:38px 0 14px; color:var(--text-primary); scroll-margin-top:90px; }
.article-body h3 { font-family:'Unbounded',sans-serif; font-weight:600; font-size:17px; margin:26px 0 10px; color:var(--text-primary); }
.article-body p { font-size:15.5px; line-height:1.8; color:var(--text-secondary); margin-bottom:16px; }
.article-body ul,.article-body ol { margin:0 0 16px; padding:0; list-style:none; }
.article-body li { padding-left:22px; position:relative; margin-bottom:8px; font-size:15.5px; line-height:1.7; color:var(--text-secondary); }
.article-body li::before { content:''; position:absolute; left:0; top:10px; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.article-body ol { counter-reset:li; }
.article-body ol > li::before { counter-increment:li; content:counter(li); top:2px; width:auto; height:auto; border-radius:0; background:none; color:var(--accent); font-weight:700; font-size:13px; }
.article-body strong { color:var(--text-primary); }
.article-body a { color:var(--accent); text-decoration:none; }
.article-body a:hover { text-decoration:underline; }
.article-body figure { margin:24px 0; }
.article-figure { margin:24px auto; max-width:820px; }
.article-figure img { width:100%; border-radius:var(--radius-sm); border:1px solid var(--border); display:block; background:var(--bg-secondary); }
.article-figure figcaption { font-size:12.5px; color:var(--text-muted); text-align:center; margin-top:8px; }

/* --- Оглавление (TOC) --- */
.article-toc { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:18px 22px; margin:0 auto 28px; max-width:820px; }
.article-toc-title { font-family:'Unbounded',sans-serif; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin-bottom:10px; }
.article-toc ul { list-style:none; margin:0; padding:0; columns:2; }
.article-toc li { margin-bottom:7px; }
.article-toc a { color:var(--text-secondary); text-decoration:none; font-size:13.5px; transition:color .2s; }
.article-toc a:hover { color:var(--accent); }
@media (max-width:600px){ .article-toc ul{ columns:1; } }

/* --- Инфо-боксы --- */
.tip-box,.warn-box,.info-box { border-radius:var(--radius-sm); padding:18px 22px; margin-bottom:20px; display:flex; gap:12px; align-items:flex-start; }
.tip-box { background:var(--accent-glow); border:1px solid rgba(69,227,255,.2); }
.tip-box svg { flex-shrink:0; color:var(--accent); margin-top:2px; }
.warn-box { background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.2); }
.warn-box svg { flex-shrink:0; color:var(--red); margin-top:2px; }
.info-box { background:rgba(138,107,255,.09); border:1px solid rgba(138,107,255,.22); }
.info-box svg { flex-shrink:0; color:var(--violet); margin-top:2px; }
.tip-box p,.warn-box p,.info-box p { margin-bottom:0; font-size:14px; }

/* --- Таблица «ключ-значение» / характеристики --- */
.kv-table,.data-table { width:100%; border-collapse:collapse; margin:0 0 22px; font-size:14px; overflow:hidden; border-radius:var(--radius-sm); }
.kv-table td,.data-table td,.data-table th { border:1px solid var(--border); padding:10px 14px; text-align:left; color:var(--text-secondary); vertical-align:top; }
.data-table th { background:var(--bg-card); color:var(--text-primary); font-family:'Unbounded',sans-serif; font-weight:600; font-size:13px; }
.kv-table td:first-child { color:var(--text-primary); font-weight:600; width:38%; background:var(--bg-card); }
.data-table tr:nth-child(even) td { background:rgba(151,173,220,.03); }
.table-scroll { overflow-x:auto; margin-bottom:22px; }
.table-scroll .data-table,.table-scroll .kv-table { margin-bottom:0; min-width:520px; }

/* --- Тир-бейджи + тир-строки --- */
.tier-badge { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:24px; padding:0 8px; border-radius:6px; font-family:'Unbounded',sans-serif; font-weight:700; font-size:12px; color:#05070d; }
.tier-S{ background:linear-gradient(135deg,#ffd45e,#ff9d3c);} .tier-A{ background:linear-gradient(135deg,#45e3ff,#2bb5d4);} .tier-B{ background:linear-gradient(135deg,#8a6bff,#6b4bff);} .tier-C{ background:linear-gradient(135deg,#8391ab,#5f6b82); color:#f1f5fc;}
.tier-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.tier-row:last-child { border-bottom:none; }
.tier-row .t-name { font-weight:600; color:var(--text-primary); }
.tier-row .t-note { color:var(--text-muted); font-size:13.5px; }

/* --- За / против --- */
.pros-cons { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:0 0 22px; }
.pc-card { border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px 18px; background:var(--bg-card); }
.pc-card h4 { font-family:'Unbounded',sans-serif; font-size:14px; margin:0 0 10px; display:flex; align-items:center; gap:7px; }
.pc-pro h4 { color:var(--green); } .pc-con h4 { color:var(--red); }
.pc-card ul { margin:0; } .pc-card li { font-size:14px; margin-bottom:6px; }
.pc-pro li::before { background:var(--green); } .pc-con li::before { background:var(--red); }
@media (max-width:600px){ .pros-cons{ grid-template-columns:1fr; } }

/* --- Карточки команд/сборок --- */
.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin:0 0 22px; }
.team-card { border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px 18px; background:var(--bg-card); }
.team-card h4 { font-family:'Unbounded',sans-serif; font-size:14px; margin:0 0 6px; color:var(--text-primary); }
.team-card .roles { font-size:13.5px; color:var(--text-secondary); line-height:1.6; }
.team-card .roles b { color:var(--accent); font-weight:600; }

/* --- CTA-блок (gem-бордер, как на about.html) --- */
.article-cta { max-width:820px; margin:8px auto 48px; text-align:center; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:36px 32px; position:relative; overflow:hidden; }
.article-cta::before { content:""; position:absolute; inset:0; border-radius:var(--radius); padding:1px; background:var(--gem); opacity:.6; -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; pointer-events:none; }
.article-cta h2 { font-family:'Unbounded',sans-serif; font-weight:700; font-size:20px; margin-bottom:10px; }
.article-cta p { font-size:14px; color:var(--text-secondary); margin-bottom:20px; }
.article-cta-btn { display:inline-flex; align-items:center; gap:8px; padding:12px 28px; background:var(--accent); color:var(--bg-primary); border-radius:10px; font-family:'Unbounded',sans-serif; font-size:13px; font-weight:700; text-decoration:none; transition:transform .2s,box-shadow .2s; }
.article-cta-btn:hover { transform:translateY(-2px); box-shadow:0 8px 24px var(--accent-glow-strong); }

/* --- Похожие игры / статьи --- */
.section-title { font-family:'Unbounded',sans-serif; font-weight:700; font-size:22px; margin-bottom:20px; max-width:820px; margin-left:auto; margin-right:auto; }
.rec-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; margin:0 auto 40px; max-width:820px; }
.rec-card { background:var(--bg-card); border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--border); text-decoration:none; color:var(--text-primary); transition:transform .2s,border-color .2s; }
.rec-card:hover { transform:translateY(-3px); border-color:rgba(255,255,255,.1); }
.rec-card-img { aspect-ratio:1; overflow:hidden; background:var(--bg-secondary); }
.rec-card-img img { width:100%; height:100%; object-fit:cover; }
.rec-card-name { padding:10px 12px; font-size:12px; font-weight:500; }

/* --- Ссылки на другие статьи блога (внутренняя перелинковка) --- */
.read-more { max-width:820px; margin:0 auto 40px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); padding:18px 22px; }
.read-more h3 { font-family:'Unbounded',sans-serif; font-size:14px; margin:0 0 12px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; }
.read-more ul { list-style:none; margin:0; padding:0; }
.read-more li { margin-bottom:8px; }
.read-more a { color:var(--accent); text-decoration:none; font-size:14.5px; }
.read-more a:hover { text-decoration:underline; }

/* --- FAQ-аккордеон (нативный <details>/<summary>) --- */
.article-faq { max-width:820px; margin:0 auto 40px; }
.article-faq .section-title { margin-bottom:16px; }
.faq-item { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); margin-bottom:10px; overflow:hidden; transition:border-color .2s; }
.faq-item[open] { border-color:rgba(69,227,255,.2); }
.faq-item summary { cursor:pointer; padding:14px 18px; font-weight:600; color:var(--text-primary); font-size:15px; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content:'+'; color:var(--accent); font-size:22px; font-weight:400; line-height:1; flex-shrink:0; transition:transform .2s; }
.faq-item[open] summary::after { transform:rotate(45deg); }
.faq-item .faq-a { padding:0 18px 16px; }
.faq-item .faq-a p { font-size:14.5px; line-height:1.75; color:var(--text-secondary); margin:0; }

@media (max-width:768px){
  .article-title{ font-size:24px; }
  .article-body h2{ font-size:19px; }
  .article-lead{ font-size:15.5px; }
  .article-cta{ padding:24px 20px; }
  .faq-item summary{ font-size:14px; }
}
