/* =========================================================================
 * TechCard — по дизайна „Начален екран“ (версия 2): чисто начало като търсачка, резултати
 * на отделна страница, каталог с меню. Onest и IBM Plex Mono, основен цвят #365692.
 * ========================================================================= */

@font-face { font-family: 'Onest'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plexmono-400-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plexmono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plexmono-500-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plexmono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F7F8FA;
  --panel: #FFFFFF;
  --side: #F1F3F6;
  --text: #1E2432;
  --body: #2E3547;
  --ink2: #4A5368;
  --muted: #6B7488;
  --placeholder: #8A93A6;
  --line: #DDE2EA;
  --line-soft: #E6EAF0;
  --line-strong: #C9D2E0;
  --grid: #EEF1F6;
  --brand: #365692;
  --brand-dark: #284374;
  --brand-50: #EBF0F7;
  --brand-100: #AEC3E7;
  --mark: #DCE6F7;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
input::placeholder { color: var(--placeholder); }
input:focus { outline: none; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
strong, b { font-weight: 600; }
code { font-family: var(--mono); }
i { font-style: normal; }
mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; }
.muted { color: var(--muted); }

/* ---------- Оформление ---------- */
.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.sidebar {
  grid-column: 1; grid-row: 1 / span 2;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--side); border-right: 1px solid var(--line);
}
.brand {
  height: 64px; flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
}
.brand .logo {
  width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.nav-main { padding: 14px 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-main a {
  display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 10px; border-radius: 9px;
  font-size: 16px; font-weight: 500;
}
.nav-main a:hover { background: rgba(255, 255, 255, .6); }
.nav-main a.active { background: #fff; color: var(--brand); }
.side-list { padding: 4px 10px 24px; display: flex; flex-direction: column; }
.side-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 18px 8px 8px;
}
.side-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 36px; padding: 6px 8px; border-radius: 8px;
}
.side-item:hover { background: rgba(255, 255, 255, .6); }
.side-item code { flex: none; width: 30px; font-size: 11px; color: var(--muted); }
.side-item span { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; }
.side-item i { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.side-item.active { background: #fff; box-shadow: 0 1px 2px rgba(20, 36, 74, .12); }
.side-item.active code { color: var(--brand); }

.topbar {
  grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 30;
  min-height: 64px; padding: 10px clamp(16px, 3vw, 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.page-title { margin: 0; font-size: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-search {
  display: flex; align-items: center; gap: 10px;
  width: min(420px, 70vw); height: 42px; padding: 0 12px; margin: 0;
  border: 1px solid var(--line); border-radius: 21px; background: var(--bg); color: var(--muted);
}
.top-search:focus-within { border-color: var(--brand); background: #fff; }
.top-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; color: var(--text); }
.top-search svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pe-link {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 14px; color: var(--brand-dark);
}
.pe-link:hover { border-color: var(--brand-100); background: var(--brand-50); }
.pe-link span {
  width: 20px; height: 20px; border-radius: 5px; background: var(--brand); color: #fff;
  font-size: 8px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.main { grid-column: 2; grid-row: 2; min-width: 0; display: flex; flex-direction: column; }
.page { max-width: 1180px; width: 100%; margin: 0 auto; padding: 32px clamp(16px, 3vw, 32px) 72px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- Началото ---------- */
body.home-page { background: #fff; }
.home { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.home-top { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 14px clamp(16px, 3vw, 28px); }
.home-stats { margin: 0 auto 0 0; font-size: 14px; color: var(--ink2); }
.home-stats b { font-weight: 600; color: var(--brand-dark); }
.home-top-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink2); font-size: 14px; }
.home-top-link:hover { background: var(--side); color: var(--text); }
/* Първият екран: търсачката е точно в средата му (половин екран без половин поле), лентата е в долния край, разделите са след него */
.home-main { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.home-brand { min-height: calc(50vh - 28px); min-height: calc(50svh - 28px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 14px; padding: 76px 0 26px; text-align: center; }
.home-logo-row { display: flex; align-items: center; gap: 16px; }
.home-logo {
  flex: none; width: 64px; height: 64px; border-radius: 17px; background: var(--brand);
  box-shadow: 0 10px 24px rgba(54, 86, 146, .28);
  display: flex; align-items: center; justify-content: center;
}
.home-word { font-size: clamp(42px, 6vw, 64px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.home-tag { font-size: clamp(18px, 1.8vw, 22px); font-weight: 400; line-height: 1.5; color: #3C4556; letter-spacing: -0.01em; }

.home-search-row { display: flex; align-items: flex-start; gap: 12px; width: min(790px, 100%); margin-bottom: 26px; }
.home-box { position: relative; flex: 1 1 auto; min-width: 0; }
.home-search-row .browse { min-height: 56px; border-radius: 28px; }
.home-search {
  display: flex; align-items: center; gap: 12px;
  height: 56px; margin: 0; padding: 0 8px 0 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 2px 10px rgba(20, 36, 74, .08);
  transition: box-shadow .15s;
}
.home-search > svg { flex: none; }
.home-search:focus-within { box-shadow: 0 4px 14px rgba(20, 36, 74, .12); }
.home-search label { flex: 1; min-width: 0; display: flex; }
.home-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; color: var(--text); }
.search-clear {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-clear:hover { background: var(--side); }
form:has(input:placeholder-shown) .search-clear { display: none; }
.home-box.open .home-search { border-color: var(--line-strong); border-radius: 28px 28px 0 0; box-shadow: 0 4px 14px rgba(20, 36, 74, .12); }
.suggest {
  margin-top: -1px; padding: 6px 0 10px; background: #fff;
  border: 1px solid var(--line); border-top-color: #EEF1F5; border-radius: 0 0 28px 28px;
  box-shadow: 0 12px 28px rgba(20, 36, 74, .12);
}
.sg { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 6px 20px; }
.sg:hover, .sg.on { background: var(--bg); }
.sg-icon { flex: none; width: 20px; display: flex; justify-content: center; color: var(--muted); }
.sg-name { flex: 1; min-width: 0; font-size: 15px; }
.sg-name mark { background: none; padding: 0; font-weight: 600; }
.sg code { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sg-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 20px 4px; }
.sg-none { padding: 10px 20px; font-size: 14px; color: var(--muted); }

.browse {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-height: 46px; padding: 0 22px; border: 1px solid var(--line); border-radius: 12px;
  background: #F5F7FA; font-size: 15px; font-weight: 500;
}
.browse:hover { border-color: var(--line-strong); background: var(--side); }
.browse.small { min-height: 42px; padding: 0 16px; font-size: 14px; gap: 8px; border-radius: 10px; }
.home-secs { width: min(1072px, 100%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 32px auto 40px; padding: 0 16px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-col-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px; }
.home-col a { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 4px 8px; border-radius: 8px; font-size: 14px; line-height: 1.25; }
.home-col a:hover { background: var(--bg); color: var(--brand-dark); }
.home-col code { flex: none; font-size: 11px; color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: 1px 7px; }
.home-col a span { min-width: 0; }
@media (max-width: 900px) { .home-secs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .home-secs { grid-template-columns: minmax(0, 1fr); } }
.home-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding: 14px clamp(16px, 3vw, 28px); border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted);
}
.home-foot-right { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.home-foot code { font-size: 12px; }

/* Лента от край до край; текстът пази ширината от карето: 1040 без по 24 вътрешен отстъп */
.home-band { align-self: stretch; margin: auto -16px 0; padding: 24px 16px; background: #F4F7FB; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.home-intro {
  width: min(992px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center;
}
.home-intro img { width: 100%; height: auto; border-radius: 12px; display: block; }
.home-intro h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.home-intro p { margin: 0 0 10px; font-size: 15px; color: var(--body); }
.home-intro-claim { font-weight: 600; color: var(--brand-dark) !important; }

/* Редът за хората, кацнали направо на вътрешна страница */
.orient {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 8px clamp(16px, 3vw, 32px); background: var(--brand-50); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--body);
}
.orient a { color: var(--brand); font-weight: 500; }
.orient a:hover { color: var(--brand-dark); }
.orient button { margin-left: auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.orient button:hover { background: rgba(255, 255, 255, .7); }

/* „За TechCard“ */
.about-hero { padding: clamp(18px, 2.4vw, 28px) clamp(16px, 3vw, 32px); background: var(--brand); color: #fff; }
.about-hero-in { max-width: 1116px; margin: 0 auto; }
.about-kicker { margin: 0 0 4px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #D5E0F2; }
.about-hero h1 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.about { gap: 40px; }
.about-lead { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: center; }
.about-lead p { margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--body); }
.about-lead img { width: 100%; height: auto; display: block; }
/* Текстът е направо върху страницата: без рамки и кутии */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 761px) {
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; }
  .about-card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1240px) {
  .about-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .about-card, .about-card:last-child { grid-column: span 2; }
  .about-card:nth-child(n+4) { grid-column: span 3; }
}
.about-fig { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; margin: 0 0 16px; }
.about-card h2 { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--brand-dark); margin-bottom: 8px; }
.about-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); }
.about-claim { margin: 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--brand-dark); font-size: clamp(18px, 2vw, 24px); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; text-wrap: balance; }
.about-use { display: flex; flex-direction: column; gap: 16px; }
.about-use h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.about-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px 40px; }
.about-steps a { display: flex; flex-direction: column; gap: 4px; }
.about-steps b { font-size: 16px; font-weight: 600; color: var(--brand); }
.about-steps a:hover b { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.about-steps span { font-size: 14px; line-height: 1.55; color: var(--ink2); }

/* ---------- Каталогът ---------- */
.catalog-page { gap: 28px; }
.catalog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.catalog-head > div { display: flex; flex-direction: column; gap: 6px; }
.catalog-head h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.catalog-head span { font-size: 15px; color: var(--ink2); }
.cat-group { display: flex; flex-direction: column; gap: 12px; }
.cat-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cat-group-head h2 { font-size: 18px; font-weight: 600; }
.cat-group-head h2 code { font-size: 13px; color: var(--brand); margin-right: 10px; }
.cat-group-head > span { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.cat-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.cat-item {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.cat-item:hover { border-color: var(--brand); }
.code-badge { flex: none; font-family: var(--mono); font-size: 13px; font-weight: 500; background: var(--brand); color: #fff; padding: 4px 8px; border-radius: 7px; }
.cat-item-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-item-text b { font-size: 15px; font-weight: 500; line-height: 1.25; }
.cat-item-text i { font-size: 12px; color: var(--muted); }
.cat-item > svg { flex: none; color: var(--muted); }

/* ---------- Разделът и групата ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
.crumbs a { color: var(--brand); padding: 6px 0; }
.crumbs a:hover { color: var(--brand-dark); }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.section-head h1 code { font-size: 17px; font-weight: 500; letter-spacing: 0; background: var(--brand); color: #fff; padding: 5px 10px; border-radius: 8px; }
.section-head > span { font-size: 15px; color: var(--ink2); }
.section-desc { margin: 0; font-size: 16px; color: var(--body); max-width: 46em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px;
}
.pill i { font-family: var(--mono); font-size: 11px; opacity: .7; }
.pill:hover { border-color: var(--brand); }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.theme { display: flex; flex-direction: column; gap: 12px; }
.theme-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.theme-head h2 { font-size: 18px; font-weight: 600; }
.theme-head h2 code { font-size: 14px; color: var(--brand); margin-right: 10px; }
.theme-head > span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.tile:hover { border-color: var(--brand); }
.tile-code { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--ink2); }
.tile-code svg { flex: none; color: var(--brand); }
.tile strong { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.tile-desc { font-size: 14px; line-height: 1.5; color: var(--ink2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* ---------- Двете страни: технологии и анализи ---------- */
.split-label { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
.split-none { margin: 0; font-size: 14px; color: var(--muted); }
.ana-set {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.ana-set:hover { border-color: var(--brand); }
.ana-set code { flex: none; font-size: 12px; color: var(--brand); background: var(--brand-50); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.ana-set > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ana-set b { font-size: 15px; font-weight: 500; line-height: 1.3; }
.ana-set i { font-size: 12px; color: var(--muted); }

/* Сборник и анализ: технологията отляво, анализите отдясно */
.set-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; }
.set-side .tile { padding: 14px; }
.set-side .tile strong { font-size: 14px; }
.set-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ana-branch { display: flex; flex-direction: column; gap: 8px; }
.ana-branch h2 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.ana-branch h2 code { font-size: 13px; font-weight: 400; color: var(--brand); margin-right: 8px; }
.ana-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ana-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 11px 14px; }
.ana-row + .ana-row { border-top: 1px solid var(--line-soft); }
.ana-row:hover { background: var(--bg); }
.ana-row code { font-size: 12px; color: var(--muted); }
.ana-row span { font-size: 14px; line-height: 1.35; }
.ana-row b { font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; }
.ana-row b i { font-weight: 400; color: var(--muted); font-size: 11px; }
.ana-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.ana-total div { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ana-total span { font-size: 12px; color: var(--muted); }
.ana-total b { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.ana-total .lead { background: var(--brand); color: #fff; }
.ana-total .lead span { color: rgba(255, 255, 255, .8); }
.tbl td.sub, .tbl th.sub { font-weight: 600; background: var(--bg); color: var(--text); }
.tbl td.n { font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* ---------- Резултатите ---------- */
.res-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 16px clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--line-soft); }
.res-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.res-brand .logo { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: flex; align-items: center; justify-content: center; }
.res-search {
  flex: 1 1 360px; max-width: 640px; margin: 0;
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 18px;
  border: 1px solid var(--line); border-radius: 23px; box-shadow: 0 1px 6px rgba(20, 36, 74, .08);
}
.res-search:focus-within { box-shadow: 0 2px 10px rgba(20, 36, 74, .14); }
.res-search label { flex: 1; min-width: 0; display: flex; }
.res-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--text); }
.res-search .search-clear { width: 36px; height: 36px; }
.res-go { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--brand); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.res-go:hover { background: var(--brand-50); }
.res-main { max-width: 1320px; margin: 0 auto; padding: 20px clamp(16px, 3vw, 28px) 72px; display: flex; flex-direction: column; gap: 26px; }
.res-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.res-col { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.res-col + .res-col { padding-left: 40px; border-left: 1px solid var(--line-soft); }
.res-summary { font-size: 13px; color: var(--muted); }
.res-secs { display: flex; flex-wrap: wrap; gap: 8px; }
.res-secs a {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px;
}
.res-secs a:hover { border-color: var(--brand); }
.res-secs code { font-size: 12px; background: var(--brand); color: #fff; padding: 3px 7px; border-radius: 6px; }
.res-secs i { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.res { display: flex; flex-direction: column; gap: 4px; }
.res-path { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink2); }
.res-icon { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--brand-50); display: inline-flex; align-items: center; justify-content: center; }
.res-path code { font-size: 12px; color: var(--muted); }
.res-title { font-size: 18px; line-height: 1.3; color: var(--brand-dark); overflow-wrap: anywhere; }
.res:hover .res-title { text-decoration: underline; text-underline-offset: 3px; }
.res-title mark, .res-text mark { background: none; padding: 0; font-weight: 600; }
.res-text { font-size: 14px; line-height: 1.55; color: var(--ink2); overflow-wrap: anywhere; }
.res-text mark { color: var(--text); }
.res-where { font-size: 12px; color: var(--muted); }
.res-none { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--body); }
.res-none span + span { font-size: 14px; color: var(--ink2); }
.res-none a { color: var(--brand); }
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }

/* ---------- Картата ---------- */
.card-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.card-side { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.card-layout > .tech-card:only-child { grid-column: 1 / -1; max-width: 960px; }
.tech-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px 40px; }
.tech-eyebrow { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.tech h1 { font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; overflow-wrap: anywhere; }
.tech-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-plain, .chip-link { padding: 4px 9px; border-radius: 6px; font-size: 12px; line-height: 1.35; }
.chip-plain { background: var(--side); color: var(--ink2); }
a.chip-plain:hover { background: var(--line-soft); }
.chip-link { background: var(--brand-50); color: var(--brand-dark); }
.chip-link:hover { background: var(--mark); }
.tech-meta { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.tech-note { font-size: 13px; color: var(--ink2); background: var(--side); border-radius: 8px; padding: 8px 12px; }
.tech-body { font-size: 15px; line-height: 1.62; color: var(--body); overflow-wrap: break-word; }
.tech-body h2 { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--text); margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--line-soft); scroll-margin-top: 78px; }
.tech-body > h2:first-child { margin-top: 20px; }
.tech-body h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 16px 0 6px; }
.tech-body p { margin: 0 0 10px; }
.tech-body ul { margin: 0 0 12px; padding: 0; list-style: none; }
.tech-body li { position: relative; padding-left: 18px; margin-bottom: 5px; }
.tech-body li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 5px; height: 5px; border-radius: 1.5px; background: var(--brand); }
.tech-body li.l2 { margin-left: 18px; }
.tech-body li.l3 { margin-left: 36px; }
.tech-body li.l4 { margin-left: 54px; }
.tech-body figure { margin: 6px 0 14px; }
.tech-body img { display: block; height: auto; border-radius: 6px; }
.tech-body mark.cur { background: #FFD27A; box-shadow: 0 0 0 2px #FFD27A; }
.tbl { overflow-x: auto; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.tbl table { width: 100%; min-width: 480px; table-layout: fixed; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.tbl th, .tbl td { padding: 7px 10px; text-align: left; vertical-align: top; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.tbl th { font-weight: 600; background: var(--side); color: var(--text); border-color: var(--line); }
.tbl tr > :last-child { border-right: 0; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.related { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.related a { font-size: 14px; line-height: 1.35; color: var(--brand); }
.related a:hover { color: var(--brand-dark); }
.tech-steps { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.tech-step { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.3; }
.tech-step small { font-size: 12px; color: var(--muted); }
.tech-step:hover span { color: var(--brand); }
.tech-step.right { text-align: right; }
.tech-pos { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.toc-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.toc nav { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.toc a { padding: 5px 10px; font-size: 13px; line-height: 1.35; color: var(--ink2); margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--brand-dark); font-weight: 500; border-left-color: var(--brand); }

/* Табовете на картата: технология и анализи */
.tabs.res-tabs { display: none; margin: 0; top: 0; }
button.tab { border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-family: inherit; }
button.tab.on { border-bottom-color: var(--brand); }
.res-more { font-size: 13px; color: var(--muted); text-align: center; padding: 8px 0 24px; }
.tab-other { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.tab-other h3 { font-size: 16px; font-weight: 600; }
.drawer-back-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--brand-dark); font-size: 14px; font-weight: 500; cursor: pointer; }
.drawer-back-btn:hover { border-color: var(--brand); }
.card-layout.wide { grid-template-columns: minmax(0, 1fr); }
.tabs { display: flex; gap: 4px; margin: 18px 0 0; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 64px; z-index: 5; }
.drawer-body .tabs { top: -28px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 500; color: var(--ink2); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab i { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: 1px 7px; }
.tab-title { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 22px 0 6px; }
.tab-note { margin: 0 0 6px; font-size: 14px; color: var(--ink2); }
.tab-set { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.tab-set h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 16px; font-weight: 600; line-height: 1.3; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.tab-set h3 code { font-size: 12px; font-weight: 400; color: var(--brand); background: var(--brand-50); border-radius: 6px; padding: 2px 7px; }
.tab-set h3 a:hover { color: var(--brand); }
.tab-set h3 i { font-size: 12px; font-weight: 400; color: var(--muted); }
.tab-set .ana-branch h4 { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink2); }
.set-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Панелът отдясно */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer-back { position: absolute; inset: 0; background: rgba(20, 36, 74, .28); animation: fade .16s ease-out; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(960px, 94vw); display: flex; flex-direction: column;
  background: #fff; box-shadow: -18px 0 40px rgba(20, 36, 74, .14);
  animation: slide .2s cubic-bezier(.2, .8, .3, 1);
}
.drawer-bar { flex: none; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.drawer-code { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-open { font-size: 13px; white-space: nowrap; margin-left: 4px; color: var(--brand); }
.drawer-step { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.drawer-pos { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 74px; text-align: center; }
.icon-btn { flex: none; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--side); }
.step-btn { border: 1px solid var(--line); }
.step-btn:hover { background: #fff; border-color: var(--brand); color: var(--brand); }
.step-btn.off { opacity: .35; pointer-events: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 28px 44px 56px; outline: 0; -webkit-overflow-scrolling: touch; }
.drawer-body.loading { opacity: .5; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(28px); opacity: 0; } }
body.no-scroll { overflow: hidden; }

/* Лентата със съвпаденията */
.hits {
  position: fixed; z-index: 120; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 14px;
  background: var(--text); color: #fff; border-radius: 999px; font-size: 13px; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(20, 36, 74, .28);
}
.hits button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.hits button:hover { background: rgba(255, 255, 255, .15); }
.hits span { margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Средни и малки екрани ---------- */
@media (max-width: 1180px) {
  .toc { display: none; }
  .card-layout { grid-template-columns: minmax(0, 1fr); }
  .card-side { position: static; max-height: none; }
  .tech-card { padding: 28px; }
}
/* Като в дизайна: менюто е отгоре, само с „Търсачка“ и „Каталог“, а разделите са в страницата */
@media (max-width: 760px) {
  .home-top { flex-wrap: wrap; }
  .home-brand { padding-top: 150px; }
  .home-stats { flex: 0 0 100%; margin: 0 0 4px; }
  .home-search-row { flex-direction: column; align-items: center; }
  .home-box { width: 100%; flex: none; }
  .home-search-row .browse { min-height: 46px; border-radius: 12px; }
  .home-intro { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-intro img { max-width: 170px; margin: 0 auto; }
  .about-lead { grid-template-columns: minmax(0, 1fr); }
  .about-lead img { max-width: 220px; }
  .tabs { top: 0; }
  .app { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-list { display: none; }
  .nav-main { padding: 10px; }
  .topbar { position: static; }
  .top-search { flex: 1 1 200px; width: auto; }
  .home-search input { font-size: 16px; }
  .res-split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .res-col + .res-col { padding-left: 0; border-left: 0; }
  .tabs.res-tabs { display: flex; }
  .res-col.off { display: none; }
  .res-col .split-label { display: none; }
  .set-layout { grid-template-columns: minmax(0, 1fr); }
  .set-side { position: static; max-height: none; order: 2; }
  .ana-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ana-row code { grid-column: 1 / -1; }
  .tech-card { padding: 20px 16px; }
  .drawer-panel { width: 100vw; }
  .drawer-body { padding: 20px 16px 72px; }
  .drawer-open { display: none; }
  .drawer-pos { min-width: 0; }
  .tech h1 { font-size: 24px; }
  .catalog-head h1, .section-head h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer-panel, .drawer-back { animation: none; }
  .home-search { transition: none; }
}
