/* ============================================================================
   Arceus Neo — components.css
   Script cards, injector-mini cards, tag chips, the crimson code block, the text
   search, table of contents, FAQ, feature grid, install steps, and the longread
   components (byline, tables, screenshot placeholders, callouts, glossary,
   pros/cons). Dark cards with a crimson hover border are this theme's signature;
   the flagship gets a DOUBLE crimson outline + a gold "★ ТОП" badge (a device not
   used elsewhere in the network — deltaexecutor uses a dashed outline, xenoexecutor
   a filled header ribbon).
   ========================================================================== */

/* ── Card grid ─────────────────────────────────────────────────────────── */
/* Mobile-first + overflow-safe: min(NNNpx, 100%) keeps a single column from ever
   exceeding a narrow (320px) viewport, and the grid grows to more columns as space
   allows — no max-width query needed (brief §1/§14, min-width-only). */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  align-items: start;
}
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }

/* ── Script card (.acard) — dark, hover lifts + crimson border. ──────────── */
.acard {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 18px; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.acard:hover { border-color: var(--neon); transform: translateY(-2px); box-shadow: var(--shadow); }

/* Flagship — DOUBLE crimson outline (brief §2.4) + gold "★ ТОП" badge. */
.acard--top { outline: 1px solid var(--neon); outline-offset: 3px; border-color: var(--neon); }
.acard__badge {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--ff-head); font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: var(--gold); border: 1px solid var(--gold); border-radius: var(--r-chip);
  padding: 2px 7px; text-transform: uppercase; background: rgba(245,194,66,.08);
}

.acard__games { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.acard__title { font-size: 19px; margin: 0 0 10px; line-height: 1.2; text-transform: none; padding-right: 56px; }
.acard__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.acard__shots { display: grid; gap: 8px; margin: 0 0 12px; }
.acard__shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-code); }
.acard__desc { color: var(--text-muted); margin: 0 0 12px; }
.acard__perks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 5px; }
.acard__perks li { position: relative; padding-left: 20px; font-size: 14px; }
.acard__perks li::before { content: '✦'; position: absolute; left: 0; color: var(--neon); font-size: 11px; top: 3px; }
.acard__dl { width: 100%; margin-bottom: 12px; }
.acard > .codebox { margin-top: auto; }

/* ── Tag chips (brief §2.4 — small square, uppercase, crimson-on-dim) ──────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--r-chip); font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding: 4px 9px; line-height: 1.3;
  background: var(--neon-dim); color: var(--neon);
}
.tag--game { background: var(--bg-raise); border: 1px solid var(--border); color: var(--text-primary); text-transform: none; font-size: 12px; }
.tag--ver { font-family: var(--ff-code); text-transform: none; letter-spacing: 0; background: transparent; border: 1px solid var(--neon); color: var(--neon); }
.tag--key { background: var(--neon); color: var(--on-neon); }
.tag--safe { background: rgba(62,207,142,.14); color: var(--ok); }
.tag--ok  { background: rgba(62,207,142,.14); color: var(--ok); text-transform: none; }
.tag--warn{ background: rgba(242,185,75,.14); color: var(--warn); text-transform: none; }

/* ── Feature grid (.feats) ─────────────────────────────────────────────── */
.feats { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.feats__item {
  position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 14px 16px 14px 40px; color: var(--text-primary);
}
.feats__item::before {
  content: '✦'; position: absolute; left: 14px; top: 14px; color: var(--neon);
  font-weight: 600; font-size: 13px;
}

/* Plain feature list (front hero-adjacent) */
.feat-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.feat-list li { position: relative; padding-left: 22px; }
.feat-list li::before { content: '✦'; position: absolute; left: 0; color: var(--neon); font-size: 12px; top: 4px; }

/* ── Install / ordered steps (.steps) ──────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: step; display: grid; gap: 12px; }
.steps li {
  position: relative; padding: 14px 16px 14px 56px; counter-increment: step;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card);
}
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px;
  width: 30px; height: 30px; border-radius: var(--r-chip);
  background: var(--neon-dim); color: var(--neon); font-family: var(--ff-head); font-weight: 600;
  display: grid; place-items: center; font-size: 15px;
}

/* ── Crimson code block (.codebox) — dark panel with a label bar + Copy. ───── */
.codebox { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.codebox__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--border);
}
.codebox__lang { font-family: var(--ff-code); font-size: 12px; color: var(--neon); text-transform: uppercase; letter-spacing: .1em; }
.codebox__copy {
  font-family: var(--ff-text); font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-primary); border: 1px solid var(--border);
  border-radius: var(--r-btn); padding: 4px 12px; transition: border-color .15s, color .15s, background .15s;
}
.codebox__copy:hover { border-color: var(--neon); color: var(--neon); }
.codebox__copy--done { border-color: var(--ok); color: var(--ok); }
.codebox__body {
  margin: 0; padding: 14px; font-family: var(--ff-code); font-size: 13px; line-height: 1.6;
  color: #C7CBDD; white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto;
}

/* ── Text search (.finder) — /katalog/. ────────────────────────────────── */
.finderbar { margin: 4px 0 22px; }
.finder {
  width: 100%; max-width: 520px; display: block;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-btn);
  padding: 13px 16px; font-family: var(--ff-text); font-size: 16px; color: var(--text-primary);
}
.finder::placeholder { color: var(--text-muted); }
.finder:focus { outline: none; border-color: var(--neon); }
.finder-count { color: var(--text-muted); font-size: 14px; margin: 10px 0 0; font-family: var(--ff-code); }

/* ── Table of contents (.onpage) ───────────────────────────────────────── */
.onpage {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--neon);
  border-radius: var(--r-card); padding: 14px 18px; margin: 0 0 26px;
}
.onpage__label { display: block; font-family: var(--ff-code); color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.onpage__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.onpage__list a { color: var(--neon); font-weight: 600; }
.onpage__list a:hover { text-decoration: underline; }

/* ── FAQ (details/summary) — .qa ───────────────────────────────────────── */
.qa { display: grid; gap: 10px; max-width: 80ch; }
.qa__item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.qa__q { cursor: pointer; padding: 15px 44px 15px 18px; font-family: var(--ff-head); font-size: 16px; text-transform: none; list-style: none; position: relative; }
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--neon); font-family: var(--ff-code); font-size: 20px; line-height: 1; }
.qa__item[open] .qa__q::after { content: '\2013'; }
.qa__a { padding: 0 18px 16px; color: var(--text-muted); }
.qa__a p { margin: 0; }
.qa__a a { color: var(--neon); text-decoration: underline; }

/* ── Injector-mini cards (.injmini) — /obnovleniya/ "temporary replacements". ─ */
.injmini { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px; transition: border-color .15s, transform .12s; }
.injmini:hover { border-color: var(--neon); transform: translateY(-2px); }
.injmini__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.injmini__mono { width: 44px; height: 44px; flex: none; border-radius: var(--r-card); background: var(--neon-dim); color: var(--neon); font-family: var(--ff-head); font-size: 22px; display: grid; place-items: center; }
.injmini__id { min-width: 0; }
.injmini__name { font-size: 18px; margin: 0; text-transform: none; }
.injmini__platform { color: var(--text-muted); font-size: 13px; margin: 2px 0 0; font-family: var(--ff-code); }
.injmini__flags { margin-left: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.injmini__desc { color: var(--text-muted); margin: 0 0 12px; }
.injmini__perks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.injmini__perks li { position: relative; padding-left: 20px; font-size: 14px; }
.injmini__perks li::before { content: '✦'; position: absolute; left: 0; color: var(--neon); font-size: 11px; top: 3px; }
.injmini__steps { margin: 0 0 14px; padding-left: 1.2em; color: var(--text-muted); font-size: 14px; }
.injmini__steps li { margin-bottom: 4px; }
.injmini__btn { width: 100%; }

/* ── Empty state (.blank) ──────────────────────────────────────────────── */
.blank {
  background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--r-card);
  padding: 30px; text-align: center; color: var(--text-muted);
}
.blank a { color: var(--neon); text-decoration: underline; }

/* ── Long-form content (longreads): sub-headings, lead paragraph ──────────── */
.slab h3 { font-size: clamp(18px, 2.6vw, 22px); margin: 26px 0 10px; text-transform: none; }
.slab h4 { font-size: 17px; margin: 18px 0 8px; text-transform: none; }
.lede { font-size: 18px; color: var(--text-primary); }
.slab > ul:not([class]), .slab > ol:not([class]) { display: grid; gap: 8px; }
.slab > ul:not([class]) li, .slab > ol:not([class]) li { padding-left: 2px; }

/* ── E-E-A-T byline / page meta bar (.credit) ────────────────────────────── */
.credit {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 22px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card);
  font-size: 13px; color: var(--text-muted);
}
.credit__item { display: inline-flex; align-items: center; gap: 6px; }
.credit strong { color: var(--text-primary); font-weight: 600; }

/* ── TL;DR "Коротко" answer box — a short, self-contained answer up top
   (AI-snippet friendly) ─────────────────────────────────────────────────── */
.tldr {
  display: grid; gap: 6px; background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--neon); border-radius: var(--r-card); padding: 14px 18px; margin: 0 0 22px;
}
.tldr__label { font-family: var(--ff-head); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--neon); }
.tldr p { margin: 0; color: var(--text-primary); }
.tldr a { color: var(--neon); text-decoration: underline; }

/* ── Content tables (.dtable, scroll on mobile) ──────────────────────────── */
.scroller { overflow-x: auto; margin: 18px 0; border: 1px solid var(--border); border-radius: var(--r-card); }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; background: var(--bg-card); }
.dtable th, .dtable td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dtable thead th { background: var(--bg-raise); color: var(--text-primary); font-weight: 600; font-family: var(--ff-text); white-space: nowrap; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable td:first-child { color: var(--text-primary); font-weight: 600; }

/* ── Screenshot placeholders (.snap) ─────────────────────────────────────── */
.snap { margin: 18px 0; }
.snap__frame {
  aspect-ratio: 16 / 9; border: 1px dashed var(--border); border-radius: var(--r-card); background: var(--bg-code);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-muted); text-align: center; padding: 18px;
}
.snap__img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-code); }
.snap__ico { font-size: 26px; opacity: .5; color: var(--neon); }
.snap__hint { font-family: var(--ff-code); font-size: 12px; letter-spacing: .04em; }
.snap__cap { margin: 8px 2px 0; font-size: 13px; color: var(--text-muted); }
.snap__cap b { color: var(--text-primary); font-weight: 600; }

/* ── Callouts / notes (.note) ────────────────────────────────────────────── */
.note { border: 1px solid var(--border); border-left: 3px solid var(--neon); border-radius: var(--r-card); background: var(--bg-card); padding: 14px 18px; margin: 18px 0; }
.note--warn { border-left-color: var(--warn); }
.note__t { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.note p:last-child { margin-bottom: 0; }
.note a { color: var(--neon); text-decoration: underline; }

/* ── Glossary / definition list (.defs) ──────────────────────────────────── */
.defs { display: grid; gap: 10px; margin: 18px 0; }
.defs__item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px 16px; }
.defs__t { font-weight: 600; color: var(--text-primary); }
.defs__d { color: var(--text-muted); margin: 2px 0 0; }

/* ── Pros / cons (.scales) ───────────────────────────────────────────────── */
.scales { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
.scales__col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.scales__col h4 { margin: 0 0 8px; }
.scales--pro h4 { color: var(--ok); }
.scales--con h4 { color: var(--warn); }
.scales__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.scales__col li { position: relative; padding-left: 20px; font-size: 14px; color: var(--text-muted); }
.scales--pro li::before { content: '+'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.scales--con li::before { content: '\2212'; position: absolute; left: 0; color: var(--warn); font-weight: 700; }
@media (min-width: 561px) { .scales { grid-template-columns: 1fr 1fr; } }

/* ── Related-pages jump cards (.jumps) ───────────────────────────────────── */
.jumps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 8px 0; }
.jump { display: flex; flex-direction: column; gap: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; transition: border-color .15s, transform .12s; }
.jump:hover { border-color: var(--neon); transform: translateY(-2px); }
.jump__name { font-family: var(--ff-head); font-size: 16px; color: var(--text-primary); }
.jump__go { color: var(--neon); font-size: 13px; font-weight: 600; }

/* ── Ad slot (restyled narrower by gate.css on the funnel pages) ──────────── */
.promo-slot { min-height: 90px; margin: 20px 0; }
.promo-slot:empty { min-height: 90px; }
