/* AXL Knowledge Base — design from Claude Design handoff (2026-06), adapted:
   Manrope instead of Plus Jakarta Sans (Cyrillic support), 2-column article shell
   (no "on this page" rail — EZ article HTML has no semantic headings). */

:root {
  --accent: #2a6df4;
  --accent-strong: #1e57d6;
  --accent-tint: #eef4ff;
  --accent-tint-2: #f6f9ff;
  --ink: #0e1726;
  --ink-2: #3b4759;
  --ink-3: #5c6b80;
  --muted: #8a98ab;
  --line: #e8edf3;
  --line-2: #f0f3f8;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --radius-card: 16px;
  --shadow-card: 0 1px 2px rgba(16, 28, 51, .04);
  --shadow-hover: 0 12px 30px -12px rgba(20, 55, 120, .28);
  --font-head: 'Manrope', -apple-system, "Segoe UI", sans-serif;
  --font-body: 'Manrope', -apple-system, "Segoe UI", sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; letter-spacing: -.015em; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-tint); }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #dfe5ee; border-radius: 20px; border: 3px solid #fff; }
*::-webkit-scrollbar-thumb:hover { background: #cdd6e3; }

/* ─── Reading progress bar ──────────────────────────────────────────────── */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70;
  background: linear-gradient(90deg, var(--accent), #5aa0ff);
  transform: scaleX(0); transform-origin: left;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.read-progress.visible { opacity: 1; }

/* ─── Header ────────────────────────────────────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.hdr-in { max-width: 1400px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; color: inherit; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.brand .name { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.brand .kb { font-size: 14.5px; color: var(--ink-3); padding-left: 13px; margin-left: 2px; border-left: 1px solid var(--line); font-weight: 500; white-space: nowrap; }
.hdr-search { flex: 1; max-width: 420px; margin-left: 6px; }
.hdr-spacer { flex: 1; }
.login-btn { display: flex; align-items: center; font-size: 14.5px; color: #fff; background: var(--accent); font-weight: 600; padding: 8px 18px; border-radius: 9px; white-space: nowrap; transition: background .15s; }
.login-btn:hover { background: var(--accent-strong); color: #fff; text-decoration: none; }

/* ─── Search input ──────────────────────────────────────────────────────── */
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 14px; color: var(--muted); font-size: 18px; pointer-events: none; }
.search input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 10px 14px 10px 42px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.search.hero-search input { font-size: 18px; padding: 18px 18px 18px 54px; border-radius: 15px; box-shadow: var(--shadow-card); }
.search.hero-search .ico { left: 20px; font-size: 21px; }
.search.hero-search .kbd { position: absolute; right: 16px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-weight: 600; background: var(--bg-soft); }

/* ─── Search suggestions dropdown ───────────────────────────────────────── */
.search-suggest { position: relative; }
.suggest-box {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 18px 45px -18px rgba(20, 55, 120, .35);
  overflow: hidden; text-align: left; max-height: 420px; overflow-y: auto;
}
.suggest-item { display: block; padding: 11px 16px; border-bottom: 1px solid var(--line-2); color: inherit; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item.selected, .suggest-item:hover { background: var(--accent-tint-2); text-decoration: none; }
.suggest-title { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.suggest-item.selected .suggest-title { color: var(--accent); }
.suggest-desc { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
/* NB: no overflow:hidden — the search suggest dropdown must escape the hero. */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-bg svg { position: absolute; inset: 0; }
/* z-index above the quicknav (40) so the suggest dropdown isn't covered when scrolling */
.hero-in { position: relative; z-index: 45; max-width: 760px; margin: 0 auto; padding: 84px 28px 72px; text-align: center; }
.hero h1 { font-size: 44px; line-height: 1.1; font-weight: 800; margin-bottom: 14px; }
.hero h1 .accent { color: var(--accent); }
.hero p.sub { font-size: 18px; color: var(--ink-3); margin: 0 auto 34px; max-width: 520px; }
.hero-about { white-space: nowrap; font-weight: 600; }
.hero-about:hover { text-decoration: underline; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 20px; }
.chip { font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; transition: .15s; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint-2); }
.chip .ico { font-size: 14px; color: var(--accent); margin-right: 6px; }

/* ─── Category quick-nav ────────────────────────────────────────────────── */
.quicknav { position: sticky; top: 64px; z-index: 40; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.quicknav-in { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.quicknav-in::-webkit-scrollbar { display: none; }
.qn-item { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-3); padding: 14px 14px; border-bottom: 2px solid transparent; white-space: nowrap; transition: .15s; }
.qn-item .ico { font-size: 16px; color: var(--muted); }
.qn-item:hover { color: var(--ink); }
.qn-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.qn-item.active .ico { color: var(--accent); }

/* ─── Landing sections ──────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.cat-sec { padding-top: 56px; scroll-margin-top: 128px; }
.cat-sec:last-child { padding-bottom: 90px; }
.cat-head { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.cat-head .cat-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.cat-head h2 { font-size: 25px; font-weight: 700; }
.cat-head .count { font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.cat-head .seeall { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 5px; }
.cat-head .seeall .ico { font-size: 15px; transition: transform .15s; }
.cat-head .seeall:hover .ico { transform: translateX(3px); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px 22px 18px; cursor: pointer; display: flex; flex-direction: column; min-height: 150px;
  color: inherit; transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d7e2f6; }
.card h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; color: var(--ink); }
.card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); margin: 0; flex: 1; }
.card .read { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.card .read .ico { font-size: 15px; transition: transform .15s; }
.card:hover .read .ico { transform: translateX(3px); }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--bg-soft); }
.foot-in {
  max-width: var(--maxw); margin: 0 auto; padding: 28px 28px 32px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 28px;
  color: var(--ink-3); font-size: 14px;
}
.foot-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.foot-support { margin: 0; line-height: 1.45; color: var(--ink-3); }
.foot-support a { font-weight: 600; color: var(--accent); }
.foot-support a:hover { color: var(--accent-strong); }
.foot-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; line-height: 1.35; }
.foot-sep { color: var(--muted); user-select: none; }
.foot-link { color: var(--ink-3); font-weight: 500; }
.foot-link:hover { color: var(--accent); }
.foot-lang-drop { position: relative; flex: 0 0 auto; margin-left: auto; }
.foot-lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color .12s, color .12s;
}
.foot-lang-btn:hover { border-color: #c8d9fb; color: var(--accent); }
.foot-lang-btn .ico { font-size: 14px; color: var(--muted); transition: transform .18s; }
.foot-lang-drop.open .foot-lang-btn { border-color: #c8d9fb; color: var(--accent); }
.foot-lang-drop.open .foot-lang-btn .ico { transform: rotate(180deg); color: var(--accent); }
.foot-lang-menu {
  position: absolute; right: 0; left: auto; bottom: calc(100% + 8px); z-index: 60;
  min-width: 148px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 -10px 28px rgba(14, 23, 38, .12);
}
.foot-lang-menu[hidden] { display: none; }
.foot-lang-menu a {
  display: block; padding: 8px 12px; border-radius: 7px;
  color: var(--ink-3); font-weight: 500; font-size: 14px;
}
.foot-lang-menu a:hover { background: var(--bg-soft); color: var(--ink); }
.foot-lang-menu a.active { background: var(--accent-tint); color: var(--accent); font-weight: 700; }

/* ─── Article shell + sidebar ───────────────────────────────────────────── */
.article-shell { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: 272px minmax(0, 1fr); align-items: start; }

.sidebar {
  --side-pad: 12px;
  --side-step: 12px;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
  border-right: 1px solid var(--line); padding: 16px 8px 48px;
  background: #fafbfc;
}

.side-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 0 4px;
}
.side-back {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 7px 8px; border-radius: 7px;
}
.side-back:hover { background: #fff; color: var(--ink); }
.side-back .ico { font-size: 14px; flex: 0 0 auto; }
.side-close {
  display: none; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-3);
}
.side-close:hover { background: var(--bg-soft); color: var(--ink); }
.side-close .ico { font-size: 16px; }

.side-tree { display: flex; flex-direction: column; }

/* Sidebar rows — nested sections match article links; top level is slightly stronger */
.side-tree > .side-section { border-bottom: 1px solid var(--line); }
.side-tree > .side-section:last-child { border-bottom: 0; }

.side-section-btn,
.side-link {
  --side-glyph: 22px;
  --side-chev: 18px;
  --side-gap: 10px;
  display: grid;
  align-items: center;
  column-gap: var(--side-gap);
  width: 100%;
  padding: 8px var(--side-pad) 8px calc(var(--side-pad) + var(--depth, 0) * var(--side-step));
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--ink-3); border-left: 2px solid transparent;
  transition: color .12s, border-color .12s, background .12s;
  overflow-wrap: anywhere;
}
.side-section-btn {
  grid-template-columns: var(--side-glyph) minmax(0, 1fr) var(--side-chev);
  border: 0; border-left: 2px solid transparent;
  background: none; text-align: left; cursor: pointer;
  line-height: 1;
}
a.side-link {
  display: grid;
  grid-template-columns: var(--side-glyph) minmax(0, 1fr);
  line-height: 1.35;
}
.side-section-btn:hover,
.side-link:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.side-section.open > .side-section-btn,
.side-section-btn.active,
.side-link.active {
  color: var(--accent); font-weight: 600;
  border-left-color: var(--accent); background: #fff;
}

/* Top-level section header */
.side-tree > .side-section > .side-section-btn {
  min-height: 44px;
  padding-top: 11px; padding-bottom: 11px;
  padding-left: var(--side-pad);
  font-family: var(--font-head); font-size: 13.5px; font-weight: 700;
  color: var(--ink);
}
.side-tree > .side-section > .side-section-btn:hover { color: var(--accent); background: none; }
.side-tree > .side-section.open > .side-section-btn { color: var(--accent); background: none; }

.side-glyph {
  width: var(--side-glyph); height: var(--side-glyph);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0;
}
.side-section.open .side-glyph { color: var(--accent); }
.side-glyph .ico.cat { display: block; width: 18px; height: 18px; vertical-align: 0; }
.side-label,
.side-link-label { min-width: 0; line-height: 1.25; }
.side-tree > .side-section > .side-section-btn .side-label {
  line-height: var(--side-glyph);
  padding-top: 1px;
}
.side-chev {
  display: flex; align-items: center; justify-content: center;
  width: var(--side-chev); height: var(--side-glyph);
  color: var(--muted);
  transition: transform .18s ease;
}
.side-chev .ico { display: block; width: 14px; height: 14px; vertical-align: 0; }
.side-section.open > .side-section-btn .side-chev { transform: rotate(180deg); color: var(--accent); }

.side-section-body {
  overflow: hidden; display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .2s ease;
}
.side-section.open > .side-section-body { grid-template-rows: 1fr; }
.side-section-in { min-height: 0; overflow: hidden; padding-bottom: 4px; }
.side-tree > .side-section > .side-section-in { padding-bottom: 6px; }

/* ─── Mobile burger nav ─────────────────────────────────────────────────── */
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  background: none; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); font-size: 19px;
}
.nav-burger:hover { background: var(--bg-soft); }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 75; background: rgba(14, 23, 38, .4);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

.article { padding: 46px 56px 90px; min-width: 0; max-width: 880px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 500; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: #cfd7e2; }
.crumbs .cur { color: var(--ink-2); }
.article h1 { font-size: 38px; line-height: 1.12; font-weight: 800; margin-bottom: 14px; }
.article .meta { display: flex; align-items: center; gap: 16px; font-size: 13.5px; color: var(--muted); padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.article .meta .m { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.ez-wrapper-content { margin-top: 0; }

/* ─── Related articles ──────────────────────────────────────────────────── */
.related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; font-size: 22px; }
.related ul { list-style: none; padding: 0; margin-top: .6rem; }
.related li { margin: .4rem 0; }
.related a { font-size: 15px; font-weight: 500; }

/* ─── Category page ─────────────────────────────────────────────────────── */
.category-page .cat-grid { grid-template-columns: repeat(2, 1fr); margin-top: 6px; }
.cat-sub { margin-top: 44px; }
.cat-sub .cat-head h2 { font-size: 21px; }

/* ─── Search page ───────────────────────────────────────────────────────── */
.page-search { margin: 10px 0 26px; max-width: 640px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.search-results a { font-size: 16.5px; font-weight: 600; }
.search-results p { font-size: 14px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.6; }
.search-results mark { background: #fef3c7; color: inherit; border-radius: 2px; padding: 0 1px; }
.no-results { color: var(--ink-3); font-size: 15px; margin-top: .5rem; }

/* ─── Not found / error ─────────────────────────────────────────────────── */
.nofound { padding: 90px 56px; max-width: 560px; margin: 0 auto; }
.nofound h1 { margin-bottom: 12px; }

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .grid, .category-page .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hdr-search { display: none; }
  .hero h1 { font-size: 34px; }
  .article-shell { grid-template-columns: 1fr; }
  .article { padding: 30px 22px 70px; }
  /* Sidebar becomes an off-canvas drawer opened by the header burger. */
  body.has-sidebar .nav-burger { display: flex; }
  .side-close { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; z-index: 80;
    width: min(92vw, 380px); background: #fff; border-right: 1px solid var(--line);
    box-shadow: 0 0 60px rgba(14, 23, 38, .25);
    transform: translateX(-105%); transition: transform .25s ease;
    padding: 14px 10px 40px;
  }
  body.nav-open .sidebar { transform: none; }
  .sidebar { background: #fff; }
}
@media (max-width: 560px) {
  .grid, .category-page .cat-grid { grid-template-columns: 1fr; }
  .brand .kb { display: none; }
  .hero-in { padding: 54px 20px 44px; }
  .hero h1 { font-size: 28px; }
  .wrap, .hdr-in, .quicknav-in { padding-left: 18px; padding-right: 18px; }
  .foot-in { flex-direction: column; align-items: stretch; }
  .foot-lang-drop { align-self: flex-end; }
}
