/* ============================================
   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, var(--xh-bg-primary)) 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: var(--xh-white);
  line-height: 1.05;
  margin: 0 0 12px;
}
.xk-hero-desc {
  font-size: 16px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  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, var(--xh-bg-card));
  border: 1px solid var(--xh-border-light, var(--xh-border-light));
  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, var(--xh-orange));
}
.xk-search-icon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--xh-text-muted, var(--xh-text-dim));
}
.xk-search-icon svg { width: 18px; height: 18px; }
.xk-search__input,
.xk-search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--xh-text, var(--xh-text));
  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, var(--xh-text-dim));
}
.xk-search-btn {
  padding: 14px 20px;
  background: none;
  border: none;
  border-left: 1px solid var(--xh-border, var(--xh-border));
  color: var(--xh-blue-light, var(--xh-blue-light));
  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, var(--xh-text-dim));
  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, var(--xh-border));
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  background: transparent;
  cursor: pointer;
  transition: all var(--xh-transition, .3s ease);
}
.xk-filter-tag:hover {
  border-color: var(--xh-border-light, var(--xh-border-light));
  color: var(--xh-text, var(--xh-text));
  background: var(--xh-overlay-2);
}
.xk-filter-tag.is-active {
  border-color: var(--xh-orange, var(--xh-orange));
  color: var(--xh-white);
  background: var(--xh-orange-a12);
}

/* ===== 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, var(--xh-border));
  background: var(--xh-bg-card, var(--xh-bg-card));
  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, var(--xh-border-light));
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--xh-shadow-soft);
}
.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, var(--xh-blue-light));
}
.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: var(--xh-white);
  margin: 0 0 4px;
}
.xk-cat-count {
  font-size: 12px;
  color: var(--xh-text-muted, var(--xh-text-dim));
}

/* ===== 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, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  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: var(--xh-white);
  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, var(--xh-border));
  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: var(--xh-overlay-1); }
.xk-popular-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--xh-radius, 6px);
  background: linear-gradient(135deg, var(--xh-bg-card-hover) 0%, var(--xh-border) 100%);
  border: 1px solid var(--xh-border, var(--xh-border));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xk-popular-thumb svg {
  width: 18px;
  height: 18px;
  color: var(--xh-text-muted, var(--xh-text-dim));
  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, var(--xh-text));
  margin-bottom: 4px;
}
.xk-popular-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--xh-text-muted, var(--xh-text-dim));
}
.xk-popular-tag {
  color: var(--xh-blue-light, var(--xh-blue-light));
  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: var(--xh-orange-a12);
  border: 1px solid var(--xh-orange-a30);
  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, var(--xh-orange));
}
.xk-newbie-step p {
  margin: 0;
  font-size: 14px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  line-height: 1.5;
  padding-top: 3px;
}

/* Thematic collections */
.xk-collections {
  margin-top: 20px;
  border-top: 1px solid var(--xh-border, var(--xh-border));
  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: var(--xh-white);
  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, var(--xh-border));
  transition: all var(--xh-transition, .3s ease);
  text-decoration: none;
  color: inherit;
}
.xk-collection:hover {
  border-color: var(--xh-border-light, var(--xh-border-light));
  background: var(--xh-overlay-1);
}
.xk-collection svg {
  width: 18px;
  height: 18px;
  color: var(--xh-blue-light, var(--xh-blue-light));
  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, var(--xh-text));
}

/* ===== 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: var(--xh-white);
  display: flex;
  align-items: center;
  gap: 16px;
}
.xk-updates-panel .xh-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--xh-border-light, var(--xh-border-light));
}
.xk-updates-list {
  background: var(--xh-bg-card, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  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, var(--xh-border));
  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: var(--xh-overlay-1); }
.xk-update-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.xk-update-dot--patch    { background: var(--xh-orange, var(--xh-orange)); }
.xk-update-dot--new      { background: var(--xh-blue, var(--xh-blue-deep)); }
.xk-update-dot--change   { background: var(--xh-teal, var(--xh-teal)); }
.xk-update-dot--balance  { background: var(--xh-purple, var(--xh-purple)); }
.xk-update-dot--economy  { background: var(--xh-green, var(--xh-green)); }
.xk-update-title {
  flex: 1;
  font-size: 14px;
  color: var(--xh-text, var(--xh-text));
}
.xk-update-date {
  font-size: 13px;
  color: var(--xh-text-muted, var(--xh-text-dim));
  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, var(--xh-border));
}
.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: var(--xh-white);
  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, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  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, var(--xh-border-light));
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--xh-shadow-soft);
}
.xk-article-img {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--xh-bg-card-hover) 0%, var(--xh-border) 100%);
  border-bottom: 1px solid var(--xh-border, var(--xh-border));
  display: flex;
  align-items: center;
  justify-content: center;
}
.xk-article-img svg {
  width: 32px;
  height: 32px;
  color: var(--xh-text-muted, var(--xh-text-dim));
  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, var(--xh-text));
  margin-bottom: 8px;
  line-height: 1.3;
  flex: 1;
}
.xk-article-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--xh-text-muted, var(--xh-text-dim));
  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, var(--xh-blue-light));
  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: var(--xh-gold-soft); }
.xk-article-cat--wiki      { color: var(--xh-blue-accent); }
.xk-article-cat--mechanics { color: var(--xh-mint); }

/* Popular topics list — unified palette с .xk-article-cat. */
.xk-popular-tag--guides    { color: var(--xh-gold-soft) !important; }
.xk-popular-tag--wiki      { color: var(--xh-blue-accent) !important; }
.xk-popular-tag--mechanics { color: var(--xh-mint) !important; }

/* Wave J Phase H+ 2026-05-21 — unified category palette ВЕЗДЕ.
   Filter chips, popular thumbs, иконки — все используют те же 3 цвета что и knowledge-strip на главной. */
:root {
  --xh-cat-guides: var(--xh-gold-soft);     /* yellow */
  --xh-cat-wiki: var(--xh-blue-accent);       /* blue */
  --xh-cat-mechanics: var(--xh-mint);  /* 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, var(--xh-border));
}
.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: var(--xh-white);
  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, var(--xh-border-light));
}
.xk-faq-grid {
  max-width: 900px;
  margin: 32px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.xk-faq-grid .xh-faq-item {
  border: 1px solid var(--xh-border, var(--xh-border));
  border-radius: var(--xh-radius, 6px);
  background: var(--xh-bg-card, var(--xh-bg-card));
  overflow: hidden;
}
.xk-faq-grid .xh-faq-item[open] {
  border-color: var(--xh-border-light, var(--xh-border-light));
}
.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, var(--xh-text));
  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, var(--xh-text-dim));
  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, var(--xh-orange));
}
.xk-faq-grid .xh-faq-a {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  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, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  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: var(--xh-white);
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.xk-support-text span {
  color: var(--xh-text-secondary, var(--xh-text-secondary));
}
.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; }
}
