/* ============================================
   Xterium /knowledge — rebuilt from scaffold (knowledge-base.html)
   All classes prefixed: xk-
   @since 2026-05-17 (Phase L scaffold rebuild)
   ============================================ */

/* ===== HERO ===== */
.xk-hero {
  position: relative;
  z-index: 1;
  padding: 40px 0 24px;
  overflow: hidden;
}
.xk-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.xk-hero-bg picture, .xk-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}
.xk-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,10,20,.65) 0%, rgba(6,10,20,.85) 60%, var(--xh-bg-deep, #060a14) 100%);
}
.xk-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
}
.xk-hero-inner .xh-breadcrumbs { margin-bottom: 14px; }
.xk-hero-title {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: clamp(32px, 4.5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 12px;
}
.xk-hero-desc {
  font-size: 16px;
  color: var(--xh-text-secondary, #a4b3c8);
  max-width: 640px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Search */
.xk-search {
  display: flex;
  align-items: stretch;
  max-width: 640px;
  background: var(--xh-bg-card, #0c1322);
  border: 1px solid var(--xh-border-light, #1e2d4a);
  border-radius: var(--xh-radius, 6px);
  overflow: hidden;
  transition: border-color var(--xh-transition, .3s ease);
}
.xk-search:focus-within {
  border-color: var(--xh-orange, #e88420);
}
.xk-search-icon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--xh-text-muted, #8a99b0);
}
.xk-search-icon svg { width: 18px; height: 18px; }
.xk-search__input,
.xk-search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--xh-text, #e8ecf2);
  font-family: var(--xh-font-body, 'Source Sans 3'), sans-serif;
  font-size: 15px;
  padding: 14px 8px;
  outline: none;
}
.xk-search input::placeholder,
.xk-search__input::placeholder {
  color: var(--xh-text-muted, #8a99b0);
}
.xk-search-btn {
  padding: 14px 20px;
  background: none;
  border: none;
  border-left: 1px solid var(--xh-border, #162035);
  color: var(--xh-blue-light, #4a9df5);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background var(--xh-transition, .3s ease);
}
.xk-search-btn:hover { background: rgba(42,125,225,.08); }
.xk-search-btn svg { width: 18px; height: 18px; }

/* Filter chips */
.xk-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: var(--xh-max-w, 1200px);
  margin: 20px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  position: relative;
  z-index: 1;
}
.xk-filters-label {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--xh-text-muted, #8a99b0);
  letter-spacing: .3px;
  margin-right: 4px;
}
.xk-filter-tag {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: .3px;
  border: 1px solid var(--xh-border, #162035);
  color: var(--xh-text-secondary, #a4b3c8);
  background: transparent;
  cursor: pointer;
  transition: all var(--xh-transition, .3s ease);
}
.xk-filter-tag:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  color: var(--xh-text, #e8ecf2);
  background: rgba(255,255,255,.03);
}
.xk-filter-tag.is-active {
  border-color: var(--xh-orange, #e88420);
  color: #fff;
  background: rgba(232,132,30,.12);
}

/* ===== CATEGORIES ===== */
.xk-cats {
  position: relative;
  z-index: 1;
  padding: 48px 0;
}
.xk-cats-grid {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.xk-cat {
  text-align: center;
  padding: 24px 12px;
  border-radius: var(--xh-radius-lg, 10px);
  border: 1px solid var(--xh-border, #162035);
  background: var(--xh-bg-card, #0c1322);
  transition: all var(--xh-transition, .3s ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.xk-cat:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.xk-cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(42,125,225,.25);
  background: rgba(42,125,225,.08);
}
.xk-cat-icon svg {
  width: 24px;
  height: 24px;
  color: var(--xh-blue-light, #4a9df5);
}
.xk-cat h3 {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  margin: 0 0 4px;
}
.xk-cat-count {
  font-size: 12px;
  color: var(--xh-text-muted, #8a99b0);
}

/* ===== POPULAR + NEWBIE (xk-dual) ===== */
.xk-dual {
  position: relative;
  z-index: 1;
  padding: 0 0 48px;
}
.xk-dual-grid {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.xk-panel {
  background: var(--xh-bg-card, #0c1322);
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius-lg, 10px);
  padding: 28px;
}
.xk-panel-title {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin: 0 0 20px;
}

/* Popular list */
.xk-popular-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.xk-popular-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--xh-border, #162035);
  transition: background var(--xh-transition, .3s ease);
  text-decoration: none;
  color: inherit;
}
.xk-popular-item:last-child { border-bottom: none; }
.xk-popular-item:hover { background: rgba(255,255,255,.02); }
.xk-popular-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--xh-radius, 6px);
  background: linear-gradient(135deg, #0d1830 0%, #162040 100%);
  border: 1px solid var(--xh-border, #162035);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xk-popular-thumb svg {
  width: 18px;
  height: 18px;
  color: var(--xh-text-muted, #8a99b0);
  opacity: .55;
}
.xk-popular-body {
  flex: 1;
  min-width: 0;
}
.xk-popular-title {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--xh-text, #e8ecf2);
  margin-bottom: 4px;
}
.xk-popular-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--xh-text-muted, #8a99b0);
}
.xk-popular-tag {
  color: var(--xh-blue-light, #4a9df5);
  font-weight: 600;
}

/* Newbie steps */
.xk-newbie-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.xk-newbie-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.xk-newbie-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(232,132,30,.12);
  border: 1px solid rgba(232,132,30,.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--xh-orange, #e88420);
}
.xk-newbie-step p {
  margin: 0;
  font-size: 14px;
  color: var(--xh-text-secondary, #a4b3c8);
  line-height: 1.5;
  padding-top: 3px;
}

/* Thematic collections */
.xk-collections {
  margin-top: 20px;
  border-top: 1px solid var(--xh-border, #162035);
  padding-top: 20px;
}
.xk-collections-title {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #fff;
  margin-bottom: 14px;
}
.xk-collections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.xk-collection {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--xh-radius, 6px);
  border: 1px solid var(--xh-border, #162035);
  transition: all var(--xh-transition, .3s ease);
  text-decoration: none;
  color: inherit;
}
.xk-collection:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  background: rgba(255,255,255,.02);
}
.xk-collection svg {
  width: 18px;
  height: 18px;
  color: var(--xh-blue-light, #4a9df5);
  flex-shrink: 0;
}
.xk-collection-name {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--xh-text, #e8ecf2);
}

/* ===== RECENT UPDATES ===== */
.xk-updates {
  position: relative;
  z-index: 1;
  padding: 0 0 48px;
}
.xk-updates-panel {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
}
.xk-updates-panel .xh-section-title {
  text-align: left;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.xk-updates-panel .xh-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--xh-border-light, #1e2d4a);
}
.xk-updates-list {
  background: var(--xh-bg-card, #0c1322);
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius-lg, 10px);
  overflow: hidden;
}
.xk-update-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--xh-border, #162035);
  transition: background var(--xh-transition, .3s ease);
  text-decoration: none;
  color: inherit;
}
.xk-update-item:last-child { border-bottom: none; }
.xk-update-item:hover { background: rgba(255,255,255,.02); }
.xk-update-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.xk-update-dot--patch    { background: var(--xh-orange, #e88420); }
.xk-update-dot--new      { background: var(--xh-blue, #2a7de1); }
.xk-update-dot--change   { background: var(--xh-teal, #20b0b8); }
.xk-update-dot--balance  { background: var(--xh-purple, #6a40b8); }
.xk-update-dot--economy  { background: var(--xh-green, #20a868); }
.xk-update-title {
  flex: 1;
  font-size: 14px;
  color: var(--xh-text, #e8ecf2);
}
.xk-update-date {
  font-size: 13px;
  color: var(--xh-text-muted, #8a99b0);
  white-space: nowrap;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-weight: 600;
}

/* ===== ARTICLES GRID ===== */
.xk-articles {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  border-top: 1px solid var(--xh-border, #162035);
}
.xk-articles-header {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto 24px;
  padding: 0 var(--xh-container-pad, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.xk-articles-header h2 {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin: 0;
}
.xk-articles-grid {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.xk-article-card {
  background: var(--xh-bg-card, #0c1322);
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius-lg, 10px);
  overflow: hidden;
  transition: all var(--xh-transition, .3s ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.xk-article-card:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.xk-article-img {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #0d1830 0%, #162040 100%);
  border-bottom: 1px solid var(--xh-border, #162035);
  display: flex;
  align-items: center;
  justify-content: center;
}
.xk-article-img svg {
  width: 32px;
  height: 32px;
  color: var(--xh-text-muted, #8a99b0);
  opacity: .35;
}
.xk-article-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.xk-article-title {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--xh-text, #e8ecf2);
  margin-bottom: 8px;
  line-height: 1.3;
  flex: 1;
}
.xk-article-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--xh-text-muted, #8a99b0);
  align-items: center;
}
.xk-article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.xk-article-meta svg { width: 12px; height: 12px; }
.xk-article-cat {
  color: var(--xh-blue-light, #4a9df5);
  font-weight: 700;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  text-transform: uppercase;
  letter-spacing: .3px;
}
/* Wave J Phase H+ 2026-05-20 — per-category color (matches knowledge-strip palette). */
.xk-article-cat--guides    { color: #f1c75e; }
.xk-article-cat--wiki      { color: #78aaff; }
.xk-article-cat--mechanics { color: #78ffb4; }

/* Popular topics list — unified palette с .xk-article-cat. */
.xk-popular-tag--guides    { color: #f1c75e !important; }
.xk-popular-tag--wiki      { color: #78aaff !important; }
.xk-popular-tag--mechanics { color: #78ffb4 !important; }

/* Wave J Phase H+ 2026-05-21 — unified category palette ВЕЗДЕ.
   Filter chips, popular thumbs, иконки — все используют те же 3 цвета что и knowledge-strip на главной. */
:root {
  --xh-cat-guides: #f1c75e;     /* yellow */
  --xh-cat-wiki: #78aaff;       /* blue */
  --xh-cat-mechanics: #78ffb4;  /* green */
}
/* Filter chips activated state — окрашиваются в свой цвет. */
.xk-filter-tag[data-chip="guides"].is-active,
.xk-filter-tag[data-chip="guides"]:hover { color: var(--xh-cat-guides); border-color: var(--xh-cat-guides); }
.xk-filter-tag[data-chip="mechanics"].is-active,
.xk-filter-tag[data-chip="mechanics"]:hover { color: var(--xh-cat-mechanics); border-color: var(--xh-cat-mechanics); }
.xk-filter-tag[data-chip="newbie"].is-active,
.xk-filter-tag[data-chip="newbie"]:hover { color: var(--xh-cat-guides); border-color: var(--xh-cat-guides); }
.xk-filter-tag[data-chip="combat"].is-active,
.xk-filter-tag[data-chip="combat"]:hover { color: var(--xh-cat-mechanics); border-color: var(--xh-cat-mechanics); }
.xk-filter-tag[data-chip="economy"].is-active,
.xk-filter-tag[data-chip="economy"]:hover { color: var(--xh-cat-wiki); border-color: var(--xh-cat-wiki); }

/* Article card hover — accent в цвет категории. */
.xk-article-card--guides:hover    { border-color: var(--xh-cat-guides); }
.xk-article-card--wiki:hover      { border-color: var(--xh-cat-wiki); }
.xk-article-card--mechanics:hover { border-color: var(--xh-cat-mechanics); }

/* Popular item thumb — icon фоновый цвет в категорию. */
.xk-popular-item--guides    .xk-popular-thumb { background: rgba(241, 199, 94, .12); color: var(--xh-cat-guides); }
.xk-popular-item--wiki      .xk-popular-thumb { background: rgba(120, 170, 255, .12); color: var(--xh-cat-wiki); }
.xk-popular-item--mechanics .xk-popular-thumb { background: rgba(120, 255, 180, .12); color: var(--xh-cat-mechanics); }

/* ===== FAQ ===== */
.xk-faq {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  border-top: 1px solid var(--xh-border, #162035);
}
.xk-faq .xh-section-title {
  text-align: center;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.xk-faq .xh-section-title::before,
.xk-faq .xh-section-title::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--xh-border-light, #1e2d4a);
}
.xk-faq-grid {
  max-width: 900px;
  margin: 32px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.xk-faq-grid .xh-faq-item {
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius, 6px);
  background: var(--xh-bg-card, #0c1322);
  overflow: hidden;
}
.xk-faq-grid .xh-faq-item[open] {
  border-color: var(--xh-border-light, #1e2d4a);
}
.xk-faq-grid .xh-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--xh-text, #e8ecf2);
  cursor: pointer;
  list-style: none;
}
.xk-faq-grid .xh-faq-q::-webkit-details-marker { display: none; }
.xk-faq-grid .xh-faq-q svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--xh-text-muted, #8a99b0);
  transition: transform var(--xh-transition, .3s ease);
}
.xk-faq-grid .xh-faq-item[open] .xh-faq-q svg {
  transform: rotate(180deg);
  color: var(--xh-orange, #e88420);
}
.xk-faq-grid .xh-faq-a {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--xh-text-secondary, #a4b3c8);
  line-height: 1.6;
}

/* ===== SUPPORT BAR ===== */
.xk-support {
  position: relative;
  z-index: 1;
  padding: 0 0 56px;
}
.xk-support-bar {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 24px 32px;
  background: var(--xh-bg-card, #0c1322);
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius-lg, 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.xk-support-text {
  font-size: 14px;
}
.xk-support-text strong {
  color: #fff;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.xk-support-text span {
  color: var(--xh-text-secondary, #a4b3c8);
}
.xk-support-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .xk-cats-grid { grid-template-columns: repeat(3, 1fr); }
  .xk-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .xk-hero { padding: 32px 0 24px; }
  .xk-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .xk-dual-grid { grid-template-columns: 1fr; }
  .xk-faq-grid { grid-template-columns: 1fr; }
  .xk-support-bar { flex-direction: column; text-align: center; }
  .xk-articles-grid { grid-template-columns: 1fr 1fr; }
  .xk-updates-panel .xh-section-title { font-size: 18px; letter-spacing: 1.5px; }
  .xk-faq .xh-section-title { font-size: 22px; }
}
@media (max-width: 480px) {
  .xk-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .xk-articles-grid { grid-template-columns: 1fr; }
  .xk-collections-grid { grid-template-columns: 1fr; }
  .xk-cat { padding: 20px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .xk-cat, .xk-article-card, .xk-popular-item, .xk-faq-grid .xh-faq-q svg { transition: none; }
}
