/* Games design: articles, category listing, index hub (loaded on games_* views) */
.ga-layout {
  --ga-accent: #2563eb;
  --ga-accent-soft: #eff6ff;
  --ga-text: #1f2937;
  --ga-muted: #6b7280;
  --ga-border: #e5e7eb;
  --ga-surface: #f8fafc;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  color: var(--ga-text);
}
@media (min-width: 1100px) {
  .ga-layout { grid-template-columns: minmax(0, 760px) 300px; justify-content: center; }
}
.ga-article { min-width: 0; }

/* Header */
.ga-header { margin-bottom: 1.75rem; }
.ga-kicker {
  display: inline-block; margin-bottom: .75rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ga-accent); text-decoration: none;
}
.ga-kicker:hover { text-decoration: underline; }
.ga-layout .ga-title {
  margin: 0 0 .75rem; font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: #111827;
}
@media (min-width: 768px) { .ga-layout .ga-title { font-size: 2.6rem; } }
.ga-dek { margin: 0 0 1rem; font-size: 1.2rem; line-height: 1.5; color: #4b5563; }
.ga-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .75rem 0;
  border-top: 1px solid var(--ga-border); border-bottom: 1px solid var(--ga-border);
  font-size: .875rem; color: var(--ga-muted);
}
.ga-meta:empty { display: none; }
.ga-meta-item { display: inline-flex; align-items: center; gap: .4rem; }

/* Table of contents */
.ga-toc[hidden] { display: none !important; }
.ga-toc {
  background: var(--ga-surface); border: 1px solid var(--ga-border);
  border-inline-start: 4px solid var(--ga-accent); border-radius: .5rem;
  padding: 1rem 1.25rem; margin: 0 0 2rem;
}
.ga-toc-title { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #111827; margin-bottom: .5rem; }
.ga-toc-list { list-style: none; margin: 0; padding: 0; counter-reset: ga-toc; }
.ga-toc-list li { counter-increment: ga-toc; display: flex; gap: .6rem; padding: .3rem 0; line-height: 1.4; }
.ga-toc-list li::before { content: counter(ga-toc) "."; font-weight: 700; color: var(--ga-accent); min-width: 1.25rem; }
.ga-toc-list a { color: var(--ga-text); text-decoration: none; font-weight: 500; }
.ga-toc-list a:hover, .ga-toc-list a.is-active { color: var(--ga-accent); text-decoration: underline; }
.ga-sidebar { display: none; }
@media (min-width: 1100px) {
  .ga-sidebar { display: block; }
  .ga-toc-sticky { position: sticky; top: 1.5rem; margin: 0; font-size: .925rem; max-height: calc(100vh - 3rem); overflow: auto; }
  .ga-toc-inline { display: none !important; }
}

/* Body typography */
.ga-body { font-size: 1.125rem; line-height: 1.75; overflow-wrap: break-word; }
.ga-body > *:first-child { margin-top: 0; }
.ga-body p { margin: 0 0 1.25rem; }
.ga-body a { color: var(--ga-accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.ga-body a:hover { text-decoration-thickness: 2px; }
.ga-body strong, .ga-body b { font-weight: 700; color: #111827; }
.ga-body h2 {
  font-size: 1.6rem; line-height: 1.25; font-weight: 800; color: #111827;
  margin: 2.75rem 0 1rem; padding-inline-start: .85rem; border-inline-start: 5px solid var(--ga-accent);
  scroll-margin-top: 1.5rem;
}
.ga-body h3 { font-size: 1.3rem; line-height: 1.3; font-weight: 700; color: #111827; margin: 2rem 0 .75rem; scroll-margin-top: 1.5rem; }
.ga-body h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.ga-body ul, .ga-body ol { margin: 0 0 1.25rem; padding-inline-start: 1.5rem; }
.ga-body ul { list-style: disc; }
.ga-body ol { list-style: decimal; }
.ga-body li { margin: .35rem 0; padding-inline-start: .25rem; }
.ga-body li::marker { color: var(--ga-accent); font-weight: 700; }
.ga-body blockquote {
  margin: 1.5rem 0; padding: .75rem 1.25rem; border-inline-start: 4px solid var(--ga-border);
  color: #374151; font-style: italic; background: var(--ga-surface);
}
.ga-body hr { border: 0; border-top: 1px solid var(--ga-border); margin: 2.5rem 0; }

/* Images */
.ga-body img { max-width: 100%; height: auto; border-radius: .5rem; }
.ga-body .games-image { margin: 1.75rem 0; aspect-ratio: auto; }
.ga-body .games-image img { width: 100%; height: auto; aspect-ratio: var(--games-img-ratio, auto); object-fit: cover; background: #f1f5f9; display: block; }
.ga-body > .games-image:first-child, .ga-body > p:first-child > .games-image:first-child { margin-top: 0; }
.ga-body figcaption, .ga-body .games-image-caption {
  margin-top: .5rem; font-size: .85rem; line-height: 1.45; color: var(--ga-muted);
}

/* Tables */
.ga-body table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5rem 0; font-size: 1rem; line-height: 1.5;
  border: 1px solid var(--ga-border); border-radius: .5rem; overflow: hidden; table-layout: auto;
}
.ga-body th { background: #1f2937; color: #fff; font-weight: 700; text-align: start; padding: .7rem .9rem; border: 0; }
.ga-body td { padding: .7rem .9rem; border: 0; border-top: 1px solid var(--ga-border); vertical-align: top; }
.ga-body tbody tr:nth-child(even) td { background: var(--ga-surface); }
.ga-body td img, .ga-body th img { width: 100%; height: auto; }
@media (max-width: 640px) {
  .ga-body table { font-size: .9rem; }
  .ga-body th, .ga-body td { padding: .55rem .6rem; overflow-wrap: anywhere; }
}

/* Callouts */
.ga-body .games-callout {
  margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: .5rem; border: 0;
  border-inline-start: 5px solid #94a3b8; background: var(--ga-surface); font-size: 1.05rem;
}
.ga-body .games-callout > *:last-child { margin-bottom: 0; }
.ga-body .games-callout-tip { border-inline-start-color: var(--ga-accent); background: var(--ga-accent-soft); }
.ga-body .games-callout-warning { border-inline-start-color: #f59e0b; background: #fffbeb; }

/* ===== Games category listing ===== */
.gl-layout {
  --ga-accent: #2563eb; --ga-accent-soft: #eff6ff; --ga-text: #1f2937; --ga-muted: #6b7280; --ga-border: #e5e7eb; --ga-surface: #f8fafc;
  max-width: 900px; margin: 0 auto; padding: 1.5rem 0 3rem; color: var(--ga-text);
}
.gl-header { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 3px solid #111827; }
.gl-layout .gl-title { margin: 0 0 .5rem; font-size: 2rem; line-height: 1.15; font-weight: 800; color: #111827; }
@media (min-width: 768px) { .gl-layout .gl-title { font-size: 2.5rem; } }
.gl-header .ga-dek { margin: 0; }
.gl-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.gl-chip {
  display: inline-block; padding: .4rem .9rem; border: 1px solid var(--ga-border); border-radius: 999px;
  background: #fff; color: var(--ga-text); font-size: .9rem; font-weight: 600; text-decoration: none;
}
.gl-chip:hover { border-color: var(--ga-accent); color: var(--ga-accent); }
.gl-intro { margin-bottom: 1.5rem; }
.gl-list { display: flex; flex-direction: column; }
.gl-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .9rem; align-items: start; padding: 1.25rem 0; border-bottom: 1px solid var(--ga-border); }
.gl-card:first-child { padding-top: 0; }
@media (min-width: 641px) { .gl-card { grid-template-columns: 280px minmax(0, 1fr); gap: 1.5rem; } .gl-card .gl-thumb { aspect-ratio: 16 / 9; } }
@media (max-width: 640px) {
  .gl-layout .gl-card-title { font-size: 1.05rem; }
  .gl-card-excerpt { -webkit-line-clamp: 2; font-size: .925rem; }
}
.gl-thumb { display: block; aspect-ratio: 4 / 3; border-radius: .5rem; overflow: hidden; background: #e2e8f0; }
.gl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gl-card:hover .gl-thumb img { transform: scale(1.03); }
.gl-thumb-empty { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }
.gl-card-body { min-width: 0; }
.gl-card-cat { display: inline-block; margin-bottom: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ga-accent); text-decoration: none; }
.gl-card-cat:hover { text-decoration: underline; }
.gl-layout .gl-card-title { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.3; font-weight: 800; }
.gl-card-title a { color: #111827; text-decoration: none; }
.gl-card-title a:hover { color: var(--ga-accent); }
.gl-card-excerpt {
  margin: 0 0 .6rem; color: #4b5563; font-size: 1rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gl-card-meta { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ga-muted); }
.gl-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 2rem; }
.gl-page {
  min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ga-border); border-radius: .5rem; background: #fff; color: var(--ga-text); font-weight: 600; text-decoration: none;
}
a.gl-page:hover { border-color: var(--ga-accent); color: var(--ga-accent); }
.gl-page.is-current { background: var(--ga-accent); border-color: var(--ga-accent); color: #fff; }
.gl-page-gap { border-color: transparent; background: transparent; }

/* ===== Games index (hub) ===== */
.gi-layout {
  --ga-accent: #2563eb; --ga-accent-soft: #eff6ff; --ga-text: #1f2937; --ga-muted: #6b7280; --ga-border: #e5e7eb; --ga-surface: #f8fafc;
  max-width: 1120px; margin: 0 auto; padding: 1.5rem 0 3rem; color: var(--ga-text);
}
.gi-layout a { text-decoration: none; }
.gi-header { padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 3px solid #111827; }
.gi-layout .gi-title { margin: 0; font-size: 2.25rem; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; color: #111827; }
@media (min-width: 768px) { .gi-layout .gi-title { font-size: 3rem; } }
.gi-rootnav { margin-bottom: 2rem; }
.gi-chip-count {
  display: inline-block; min-width: 1.5rem; padding: 0 .4rem; margin-inline-start: .25rem; border-radius: 999px;
  background: var(--ga-surface); color: var(--ga-muted); font-size: .75rem; font-weight: 700; line-height: 1.5rem; text-align: center;
}
.gi-date { display: inline-block; font-size: .8rem; color: var(--ga-muted); }
.gi-layout .gl-card-cat { margin-bottom: .3rem; }
.gi-layout .gl-thumb-empty { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }

/* Latest: lead + side list */
.gi-latest { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-bottom: 3rem; }
@media (min-width: 900px) { .gi-latest { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.gi-lead-thumb { display: block; aspect-ratio: 16 / 9; border-radius: .75rem; overflow: hidden; background: #e2e8f0; margin-bottom: 1rem; }
.gi-lead-thumb img, .gi-side-thumb img, .gi-card-thumb img, .gi-game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gi-lead:hover .gi-lead-thumb img, .gi-card:hover .gi-card-thumb img, .gi-game:hover .gi-game-cover img, .gi-side-item:hover .gi-side-thumb img { transform: scale(1.03); }
.gi-layout .gi-lead-title { margin: 0 0 .6rem; font-size: 1.6rem; line-height: 1.2; font-weight: 800; }
@media (min-width: 768px) { .gi-layout .gi-lead-title { font-size: 2rem; } }
.gi-lead-title a, .gi-side-heading a, .gi-card-title a, .gi-section-title a { color: #111827; }
.gi-lead-title a:hover, .gi-side-heading a:hover, .gi-card-title a:hover, .gi-section-title a:hover { color: var(--ga-accent); }
.gi-side { border-top: 3px solid var(--ga-accent); padding-top: .75rem; }
@media (min-width: 900px) { .gi-side { border-top: 0; padding-top: 0; } }
.gi-side-title { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ga-accent); margin-bottom: .5rem; }
.gi-side-list { list-style: none; margin: 0; padding: 0; }
.gi-side-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: .85rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--ga-border); }
.gi-side-item:first-child { padding-top: 0; }
.gi-side-item:last-child { border-bottom: 0; }
.gi-side-thumb { display: block; aspect-ratio: 4 / 3; border-radius: .5rem; overflow: hidden; background: #e2e8f0; }
.gi-layout .gi-side-heading { margin: 0 0 .25rem; font-size: 1rem; line-height: 1.3; font-weight: 700; }

/* Category sections */
.gi-section { margin-top: 3rem; }
.gi-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: .6rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--ga-border); }
.gi-layout .gi-section-title { margin: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 800; padding-inline-start: .75rem; border-inline-start: 5px solid var(--ga-accent); }
.gi-more { font-size: .9rem; font-weight: 700; color: var(--ga-accent); white-space: nowrap; }
.gi-more:hover { text-decoration: underline; }
.gi-section-dek { margin: -.5rem 0 1.25rem; color: #4b5563; }

/* Game tiles (subcategories) */
.gi-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
@media (min-width: 641px) { .gi-games { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.gi-game { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: .75rem; overflow: hidden; background: #1f2937; color: #fff; }
.gi-game-cover { position: absolute; inset: 0; display: block; }
.gi-game::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,24,39,.9) 0%, rgba(17,24,39,.35) 55%, rgba(17,24,39,0) 100%); }
.gi-game-name, .gi-game-count { position: absolute; left: .9rem; right: .9rem; z-index: 1; }
.gi-game-name { bottom: 1.9rem; font-size: 1.05rem; line-height: 1.25; font-weight: 800; color: #fff; }
.gi-game-count { bottom: .75rem; display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.75); }
.gi-game:hover { box-shadow: 0 0 0 3px var(--ga-accent); }

/* Article cards grid */
.gi-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 1.5rem; }
@media (min-width: 641px) { .gi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .gi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gi-card-thumb { display: block; aspect-ratio: 16 / 9; border-radius: .5rem; overflow: hidden; background: #e2e8f0; margin-bottom: .75rem; }
.gi-layout .gi-card-title { margin: 0 0 .35rem; font-size: 1.1rem; line-height: 1.3; font-weight: 800; }
.gi-empty { color: var(--ga-muted); }
@media (max-width: 640px) {
  .gi-grid { gap: 0; }
  .gi-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .85rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--ga-border); }
  .gi-card:first-child { padding-top: 0; }
  .gi-card-thumb { aspect-ratio: 4 / 3; margin-bottom: 0; }
  .gi-layout .gi-card-title { font-size: 1rem; }
  .gi-layout .gi-title { font-size: 2rem; }
}

/* --- Пакет переноса: базовые правила games из dist/s.css soring.com (на случай, если в s.css нового сайта их нет). Стили .ga-body выше по специфичности перекрывают их. --- */
.games-article img{max-width:100%;height:auto}
.games-article table{width:100%;table-layout:fixed;overflow-wrap:anywhere;border-collapse:collapse;margin:1rem 0}
.games-article th,.games-article td{vertical-align:top;padding:.75rem;border:1px solid #e5e7eb}
.games-article td img,.games-article th img{width:100%;height:auto}
.games-image{aspect-ratio:var(--games-img-ratio);max-width:100%;margin:1rem 0;display:block}
.games-image img{width:100%;height:100%;object-fit:contain;display:block}
.games-callout{margin:1rem 0;padding:1rem 1.25rem;border-radius:.75rem;border-left:.35rem solid #94a3b8;background:#f8fafc}
.games-callout-tip{border-left-color:#38bdf8;background:#f0f9ff}
.games-callout-warning{border-left-color:#f59e0b;background:#fffbeb}
