/* Gramotix: site-level additions on top of the cvguide design system */

/* Category page: H1 on top, template cards, then SEO text.
   The description block holds <h1> + .gx-cat-text; display:contents lets them be ordered around the card list. */
.gx-cat { display: flex; flex-direction: column; gap: 24px; max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.gx-cat-desc { display: contents; }
.gx-crumbs { order: 0; font-size: 14px; color: #8a8a8a; }
.gx-crumbs a { color: #2f6bff; }
.gx-cat h1, .gx-cat-h1 { order: 1; margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; color: #141414; font-weight: 600; }
.gx-cat-lead { order: 2; margin: 0; max-width: 820px; font-size: 18px; }
.gx-cat-list { order: 3; }
.gx-cat-text { order: 4; max-width: 860px; }
.gx-cat-text h2 { margin: 32px 0 12px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; color: #141414; font-weight: 600; }
.gx-cat-text h3 { margin: 24px 0 8px; font-size: 20px; color: #141414; font-weight: 600; }
.gx-cat-text p { margin: 0 0 14px; }
.gx-cat-text ul, .gx-cat-text ol { margin: 0 0 14px 22px; }
.gx-cat-text li { margin: 4px 0; }
.gx-cat-text table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.gx-cat-text th, .gx-cat-text td { border: 1px solid #e6e8ef; padding: 10px 12px; text-align: left; vertical-align: top; }
.gx-cat-text th { background: #f5f7ff; color: #141414; font-weight: 600; }
.gx-cat-text .gx-table-wrap { overflow-x: auto; }
.gx-subcats { order: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gx-subcats a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #f2f5ff; color: #2f6bff; font-size: 15px; }
.gx-subcats a:hover { background: #e3eaff; }
/* Catalog grid and cards (cvguide .templates/.tpl styles apply under .cv-old) */
.cv-templates { padding: 24px 0 56px; }
.gx-catalog__title { margin: 0 0 20px; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.2; color: #141414; font-weight: 600; text-align: center; }
.gx-tabs, .gx-subtabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; }
.gx-tabs__node { display: contents; }
.cv-old .gx-catalog a.gx-tab { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--stx-line, rgba(27,36,48,.14)); border-radius: 999px; background: #fff; color: #141414; font-size: 15px; line-height: 1.2; transition: background .15s, color .15s, border-color .15s; }
.cv-old .gx-catalog a.gx-tab:hover { border-color: #2f6bff; color: #2f6bff; }
.cv-old .gx-catalog a.gx-tab.is-active { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.cv-old .gx-catalog a.gx-tab:focus-visible { outline: 3px solid rgba(47,107,255,.35); outline-offset: 2px; }
.cv-old .gx-catalog .gx-subtabs a.gx-tab { min-height: 34px; padding: 6px 14px; font-size: 14px; background: #f5f7ff; border-color: transparent; }
.cv-old .gx-catalog .gx-subtabs a.gx-tab.is-active { background: #e3eaff; color: #1a45b8; border-color: #1a45b8; }
.gx-grid { margin-top: 24px; }
.gx-catalog[aria-busy="true"] .gx-grid { opacity: .35; transition: opacity .2s; pointer-events: none; }
.gx-catalog[aria-busy="true"] .gx-status::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2px solid #c9d6ff; border-top-color: #2f6bff; border-radius: 50%; animation: gx-spin .8s linear infinite; }
@keyframes gx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gx-catalog[aria-busy="true"] .gx-status::before { animation: none; } }
.gx-status { min-height: 1em; margin: 12px 0 0; text-align: center; font-size: 14px; }
.gx-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.gx-empty { grid-column: 1 / -1; text-align: center; padding: 32px 0; }
.cv-old .gx-card .tpl-preview img { aspect-ratio: 3508 / 2480; }
.gx-card__noimg { display: block; aspect-ratio: 3508 / 2480; background: #eef2ff; border-radius: 8px; }
.gx-card .tpl-meta h3 { font-size: 18px; line-height: 1.3; margin-bottom: 6px; }
.gx-card .tpl-meta h3 a { color: #141414; }
.gx-card__cat { font-size: 13px; color: #8a8a8a; margin: 0 0 16px; }
.gx-card__cat a { color: inherit; }

@media (max-width: 767px) {
  .gx-tabs, .gx-subtabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .cv-old .gx-catalog a.gx-tab { flex: 0 0 auto; }
  .gx-cat { padding-top: 12px; gap: 16px; }
  .gx-cat-text table { font-size: 14px; }
}

/* Template full page: crumbs, back link, H1, editor, SEO text */
.gx-tplpage { max-width: 1280px; margin: 0 auto; padding: 20px 16px 56px; }
.gx-tplpage .gx-crumbs { margin-bottom: 10px; }
.gx-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; color: #2f6bff; font-size: 15px; }
.gx-back:hover { text-decoration: underline; }
.gx-tplpage__h1 { margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; color: #141414; font-weight: 600; }
.gx-tplpage__lead { max-width: 860px; margin: 0 0 24px; }
.gx-tplpage__text { max-width: 860px; margin-top: 40px; }
.gx-tplpage__text h2 { margin: 32px 0 12px; font-size: clamp(22px, 3vw, 30px); color: #141414; font-weight: 600; }
.gx-tplpage__text h3 { margin: 22px 0 8px; font-size: 20px; color: #141414; font-weight: 600; }
.gx-tplpage__text p { margin: 0 0 14px; }
.gx-tplpage__text ol, .gx-tplpage__text ul { margin: 0 0 14px 22px; }

/* SEO text tables (home, konstruktor): scroll inside their wrapper on narrow screens */
.cvh-table, .gx-page__seo .cvh-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gx-page__seo table { max-width: 100%; }
@media (max-width: 767px) { .gx-page__seo table { display: block; overflow-x: auto; } }

/* Owner edits round 2: lost password / registration — wider form, more air */
.stx-lost { width: min(760px, calc(100% - 32px)); padding: 150px 0 96px; }
.stx-lost__card { padding: 40px 44px 36px; }
.stx-lost__group { margin: 0 0 20px; }
.stx-lost__input { min-height: 52px; padding: 0 18px; font-size: 16px; }
.stx-lost__btn { min-height: 54px; margin-top: 8px; }
.stx-lost__steps { margin-top: 36px; }
@media (max-width: 600px) { .stx-lost { padding: 110px 0 64px; } .stx-lost__card { padding: 24px 20px; } }

/* Partners strip: audience chips instead of review-site logos */
.gx-partner { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 999px; background: rgba(47,107,255,.08); color: #1a45b8; font-size: 15px; white-space: nowrap; }

/* Template page description (no illustrations): clean, readable typography */
.gx-tplpage__text { max-width: 860px; margin: 48px auto 0; padding: 32px 36px; background: #fff; border: 1px solid #e9edf7; border-radius: 20px; }
.gx-tplpage__text h2:first-child { margin-top: 0; }
.gx-tplpage__text ol { counter-reset: gx-step; list-style: none; margin-left: 0; padding: 0; }
.gx-tplpage__text ol > li { counter-increment: gx-step; position: relative; padding: 0 0 14px 48px; }
.gx-tplpage__text ol > li::before { content: counter(gx-step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: #eef3ff; color: #2f6bff; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.gx-tplpage__text ul { padding-left: 20px; }
.gx-tplpage__text ul > li::marker { color: #2f6bff; }
.gx-tplpage__text table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.gx-tplpage__text th, .gx-tplpage__text td { border: 1px solid #e6e8ef; padding: 10px 12px; text-align: left; vertical-align: top; }
.gx-tplpage__text th { background: #f5f7ff; color: #141414; font-weight: 600; }
.gx-tplpage__text img { display: none; }
@media (max-width: 767px) { .gx-tplpage__text { padding: 20px 16px; border-radius: 16px; } }

/* Illustrations in SEO texts (home, konstruktor): never wider than their column */
.cvh-fig img, .gx-page__seo img, .cvh-sec img { max-width: 100%; height: auto; }
.cvh-fig { margin: 20px 0; }
.cvh-fig figcaption { margin-top: 8px; font-size: 14px; color: #8a8a8a; text-align: center; }

/* Breadcrumbs (gx-crumbs.js): Главная › Категория › Подкатегория › Страница */
.gx-bc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.4; color: #8a8a8a; }
.gx-bc li { display: inline-flex; align-items: center; min-width: 0; margin: 0; }
.gx-bc li::before { content: none; }
.gx-bc li + li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px; border-top: 1.5px solid #b6bccb; border-right: 1.5px solid #b6bccb; transform: rotate(45deg); }
.gx-bc a { color: #2f6bff; text-decoration: none; }
.gx-bc a:hover { text-decoration: underline; }
.gx-bc li[aria-current] { color: #5b6070; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) { .gx-bc li[aria-current] { max-width: 100%; white-space: normal; } .gx-bc { font-size: 13px; } }

/* ===== Round 3 ===== */
/* Catalog section-head (cvguide .section-head) */
.cv-templates .section-head { max-width: 900px; margin: 0 auto 32px; text-align: center; }
.cv-templates .section-title { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; font-weight: 600; color: #141414; letter-spacing: -.01em; }
.cv-templates .section-head .sub { margin: 0; font-size: 17px; line-height: 1.55; color: #6d6d6d; }

/* Category tab icons */
.cv-old .gx-catalog a.gx-tab { gap: 8px; }
.gx-tab__ico { flex: 0 0 auto; width: 20px; height: 20px; }
.gx-tab__ico svg { display: block; width: 20px; height: 20px; }

/* Partners strip: neutral wordmark look, same markup/animation as cvguide */
.gx-partner { background: none; padding: 0 22px; border-radius: 0; color: #6d6d6d; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.gx-partner span { white-space: nowrap; }

/* Konstruktor hero: same as home */
.gx-kon-hero { margin-bottom: 8px; }


/* Pagination (DLE .navigation): pills, big touch targets, wraps on phones */
.navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin: 36px auto 8px; padding: 0 !important; max-width: 1200px; }
.navigation .pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.navigation .pages a, .navigation .pages > span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #e3e8f4; background: #fff; color: #141414; font-size: 16px; line-height: 1; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.navigation .pages a:hover { border-color: #2f6bff; color: #2f6bff; }
.navigation .pages > span { background: #2f6bff; border-color: #2f6bff; color: #fff; font-weight: 600; }
.navigation .pages > span.nav_ext { background: none; border: 0; color: #8a8a8a; min-width: 24px; padding: 0; }
.navigation .page_next-prev { display: flex; gap: 8px; order: 0; }
.navigation .page_prev, .navigation .page_next { display: inline-flex; }
.navigation .page_prev a, .navigation .page_next a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid #e3e8f4; background: #fff; color: #2f6bff; }
.navigation .page_prev a:hover, .navigation .page_next a:hover { border-color: #2f6bff; background: #f3f6ff; }
.navigation .stx-i { width: 20px; height: 20px; }
@media (max-width: 767px) { .navigation { margin-top: 24px; gap: 10px; } .navigation .pages a, .navigation .pages > span { min-width: 40px; height: 40px; padding: 0 10px; font-size: 15px; } .navigation .pages { order: 2; width: 100%; } }

/* Template page description: air after sub-headings, calmer rhythm */
.gx-tplpage__text h2 { margin: 40px 0 18px; padding-top: 4px; }
.gx-tplpage__text h2:first-child { margin-top: 0; }
.gx-tplpage__text h3 { margin: 30px 0 14px; }
.gx-tplpage__text h2 + p, .gx-tplpage__text h3 + p, .gx-tplpage__text h2 + ol, .gx-tplpage__text h2 + ul, .gx-tplpage__text h3 + ul, .gx-tplpage__text h3 + ol { margin-top: 0; }
.gx-tplpage__text p { margin: 0 0 18px; line-height: 1.65; }
.gx-tplpage__text li { margin-bottom: 8px; line-height: 1.6; }
.gx-tplpage__text ol > li { padding-bottom: 16px; }

/* Pagination v2: one row  ‹ 1 2 3 4 ›  (prev / pages / next), disabled arrows dimmed */
.navigation .page_next-prev { display: contents; }
.navigation .page_prev { order: 1; } .navigation .pages { order: 2; width: auto; } .navigation .page_next { order: 3; }
.navigation .page_prev, .navigation .page_next { align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid #e3e8f4; background: #fff; color: #b6bccb; }
.navigation .page_prev a, .navigation .page_next a { width: 100%; height: 100%; border: 0; background: none; border-radius: 12px; color: #2f6bff; }
.navigation .page_prev:has(a), .navigation .page_next:has(a) { color: #2f6bff; }
.navigation .page_prev:has(a):hover, .navigation .page_next:has(a):hover { border-color: #2f6bff; background: #f3f6ff; }
.navigation .page_prev:not(:has(a)) .stx-i, .navigation .page_next:not(:has(a)) .stx-i { opacity: .5; }
@media (max-width: 767px) { .navigation .pages { order: 2; width: auto; } .navigation .page_prev, .navigation .page_next { width: 40px; height: 40px; } }

.navigation { grid-column: 1 / -1; width: 100%; }

.wrapper { overflow-x: clip; }
.gx-kon-hero { position: relative; }
.gx-kon-hero .hero__partners.cv-studentix-partners { overflow: hidden; }

/* Konstruktor hero starts at the very top, like the home hero */
.not-main:has(.gx-kon-hero), .cv-inner:has(.gx-kon-hero) { padding-top: 0 !important; }
.cv-old:has(> .gx-kon-hero) { padding: 0 !important; }

/* ===== Round 4 ===== */
/* Template page header: centered crumbs, H1 (section-title) and lead */
.gx-tplpage .gx-crumbs { display: flex; justify-content: center; }
.gx-tplpage .gx-bc { justify-content: center; }
.gx-tplpage__h1 { text-align: center; max-width: 980px; margin: 0 auto 14px; }
.gx-tplpage__lead { text-align: center; max-width: 820px; margin: 0 auto 28px; font-size: 17px; line-height: 1.6; color: #6d6d6d; }
.gx-tplpage__lead p { margin: 0; }

/* Lists everywhere (descriptions, categories, template pages, legal): numbered circles + bullet dots; only plain lists (no class) */
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ul:not([class]), :is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ol:not([class]) { list-style: none; margin: 4px 0 22px; padding: 0; }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) :is(ul, ol):not([class]) > li { position: relative; margin: 0 0 12px; line-height: 1.65; }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ul:not([class]) > li { padding-left: 30px; }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ul:not([class]) > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 9px; height: 9px; border-radius: 50%; background: #2f6bff; box-shadow: 0 0 0 4px rgba(47,107,255,.14); }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ol:not([class]) { counter-reset: gx-ol; }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ol:not([class]) > li { counter-increment: gx-ol; padding: 3px 0 0 50px; min-height: 36px; }
:is(.gx-cat-text, .gx-tplpage__text, .gx-page__seo, .cvh__wrap, .cvh-sec, .gx-legal, .gx-legal__body) ol:not([class]) > li::before { content: counter(gx-ol); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: #eef3ff; color: #2f6bff; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
/* Home description inside cvh__wrap (cvguide proportions) */
.cvh { padding: 24px 0 96px; }
.cvh__wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 767px) { .cvh { padding: 8px 0 64px; } .cvh__wrap { padding: 0 16px; } }

/* ===== Round 5 ===== */
/* Konstruktor H1: strictly centered; hero background fades out like on the home page (no overflow clipping) */
.gx-kon-hero h1 { text-align: center; }
.gx-kon-hero .container { text-align: center; }

/* Template cards: equal height, button pinned to the same line, full width */
.gx-grid, .gx-cat-list.templates { align-items: stretch; }
.cv-old .gx-card { height: 100%; }
.cv-old .gx-card .tpl-meta { display: flex; flex-direction: column; align-items: stretch; flex: 1; padding: 22px; }
.gx-card__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.cv-old .gx-card .tpl-meta .stx-btn { width: 100%; margin: 0; flex: 0 0 auto; justify-content: center; text-align: center; }
.cv-old .gx-card .tpl-meta h3 { min-height: 0; }
/* Lost password / registration: the card brings its own top padding, so the page wrapper adds none */
.not-main:has(.stx-lost), .cv-inner:has(.stx-lost) { padding-top: 0 !important; }

/* ===== Round 6 ===== */
/* Equal card height across all rows is set by gx-site.js (min-height); a CSS 1fr row would also stretch the pagination row */
.cv-old .gx-card .tpl-meta { padding: 22px; }
.cv-old .gx-card .tpl-meta .stx-btn { width: 100%; margin: 0; }

/* Mobile pagination: pages wrap on their own row, arrows sit together below */
@media (max-width: 767px) {
  .navigation { flex-direction: column; gap: 14px; }
  .navigation .pages { order: 1; width: 100%; justify-content: center; gap: 6px; }
  .navigation .pages a, .navigation .pages > span { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; font-size: 15px; }
  .navigation .page_next-prev { display: flex; order: 2; gap: 12px; justify-content: center; }
  .navigation .page_prev, .navigation .page_next { order: 0; width: 44px; height: 44px; }
}

/* ===== Round 7 ===== */
/* cvguide hero stats heading (owner's exact rule) */
.cv-exact-hero .cv-trust .cv-stat-copy > strong { display: block; margin: 0 0 6px; font: 600 20px/1.2 Inter, sans-serif; letter-spacing: -.035em; color: var(--stx-text, #1B2430); white-space: nowrap; }

/* Card: title (2 lines reserved, 3 max) and the button right below, no category line */
.gx-card__body { flex: 0 0 auto; min-height: 56px; }
.gx-card .tpl-meta h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 18px; }
.cv-old .gx-card .tpl-meta .stx-btn { margin-top: auto; }
.cv-old .gx-card .tpl-meta { gap: 0; }
.gx-card__cat { display: none; }

/* Pagination row: natural height (it lives in the card grid) */
.navigation { align-self: start; height: auto; min-height: 0; }

/* hero-bg fade behind template pages and category pages, same as the home/konstruktor hero */
.not-main:has(.gx-tplpage), .not-main:has(.gx-cat) { position: relative; }
.not-main:has(.gx-tplpage)::before, .not-main:has(.gx-cat)::before { content: ""; position: absolute; left: 0; top: 0; width: 190%; height: 1446px; background: url("../images/hero-bg.svg"); z-index: 0; pointer-events: none; }
.not-main:has(.gx-tplpage) > *, .not-main:has(.gx-cat) > * { position: relative; z-index: 1; }
/* Превью карточки: готовая мини-картинка 272x385 (images/templates/mini/<alt>.webp), текст уже нарисован в картинке */
.gx-card .tpl-preview { display: block; padding: 0; }
.cv-old .gx-card .tpl-meta { padding: 16px 22px 22px; }
.gx-card .tpl-preview a { display: block; width: 272px; max-width: 100%; margin: 0 auto; line-height: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(27,36,48,.12); background: #eef1f7; }
.cv-old .gx-card .tpl-preview img, .gx-card .tpl-preview img { display: block; width: 272px; max-width: 100%; height: auto; aspect-ratio: 272 / 385; border-radius: 0; margin: 0 auto; object-fit: fill; transform: none; filter: none; image-rendering: auto; }
.gx-card .tpl-preview .gx-card__noimg { width: 272px; max-width: 100%; aspect-ratio: 272 / 385; border-radius: 0; }

/* TZ2 #12: names of templates in cards are not selectable */
.gx-card h3, .gx-card h3 a, .gx-card .tpl-meta { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* TZ2 #16: no shine on "Заполнить" */
.gx-card .stx-btn::before, .gx-card .stx-btn::after { animation: none !important; }
.gx-card .shine::before { display: none !important; }
/* TZ2 #9: [hidden] must win over .stx-btn display */
.gx-more[hidden], .gx-subtabs[hidden] { display: none !important; }
/* TZ2 #10: tabs of sibling subcategories on category pages */
.gx-cattabs { order: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.gx-cattabs[hidden] { display: none; }
.gx-cattabs a.gx-tab { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border: 1px solid var(--stx-line, rgba(27,36,48,.14)); border-radius: 999px; background: #f5f7ff; color: #141414; font-size: 14px; line-height: 1.2; text-decoration: none; transition: border-color .15s, color .15s; }
.gx-cattabs a.gx-tab:hover { border-color: #2f6bff; color: #2f6bff; }
@media (max-width: 767px) { .gx-cattabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; } .gx-cattabs a.gx-tab { flex: 0 0 auto; } }
/* TZ2 #15: more templates of the category (4 per row) */
.gx-more-tpls { margin: 40px 0 8px; }
.gx-more-tpls__h { margin: 0 0 20px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; color: #141414; font-weight: 600; }
.gx-more-tpls__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.gx-more-tpls__grid > .tpl { margin: 0; }
@media (max-width: 991px) { .gx-more-tpls__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
/* TZ2 #8: SEO image of the template (example fill + blue button) */
.gx-og { margin: 0 0 24px; }
.gx-og a { display: block; line-height: 0; }
.gx-og img { display: block; width: 100%; max-width: 800px; height: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(27,36,48,.12); }

/* gx-nosel: названия шаблонов нельзя выделять, картинки — перетаскивать */
.tpl-meta h3, .tpl-meta h3 a, .gx-cat-list .tpl-meta, .gx-grid .tpl-meta, article.tpl h3 { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
article.tpl .tpl-preview img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.gx-cattabs-src, .gx-cattabs-src[hidden], .gx-speedbar-src { display: none !important; }

/* подборки шаблонов */
.gx-coll-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #E6EAF0; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(20,40,80,.06); }
.gx-coll-card__img { display: block; aspect-ratio: 1200 / 848; background: #F1F4FA; }
.gx-coll-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-coll-card__body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; flex: 1; justify-content: space-between; }
.gx-coll-card__body h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.gx-coll-card__body h3 a { color: inherit; text-decoration: none; }
.gx-coll-card .stx-btn { align-self: flex-start; }
.gx-cat-list.templates:has(.gx-coll-card) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 899px) { .gx-cat-list.templates:has(.gx-coll-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gx-cat-list.templates:has(.gx-coll-card) { grid-template-columns: 1fr; } }
.gx-collpage__grid { margin-bottom: 32px; }
/* слайдер подборок на главной */
.gx-coll-slider { position: relative; margin: 20px 0 8px; }
.gx-coll-slider__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.gx-coll-slider__track::-webkit-scrollbar { display: none; }
.gx-coll-slider__track > * { scroll-snap-align: start; }
.gx-coll-slider__btn { position: absolute; top: 40%; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(20,40,80,.2); font-size: 22px; cursor: pointer; z-index: 2; }
.gx-coll-slider__btn--prev { left: -12px; } .gx-coll-slider__btn--next { right: -12px; }
@media (max-width: 899px) { .gx-coll-slider__track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 560px) { .gx-coll-slider__track { grid-auto-columns: 86%; } .gx-coll-slider__btn { display: none; } }

/* страница подборки */
.gx-collhero { display: grid; grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); gap: 24px; align-items: stretch; margin: 0 0 32px; }
.gx-collpage__cover { margin: 0; }
.gx-collpage__cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; display: block; box-shadow: 0 8px 28px rgba(20,40,80,.14); }
.gx-collinfo { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 20px; background: linear-gradient(160deg, #F4F7FF, #FFF7EC); border: 1px solid #E6EAF0; }
.gx-collinfo__t { margin: 0; font-size: 20px; font-weight: 700; }
.gx-collinfo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gx-collinfo__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; }
.gx-collinfo__list li::before { content: none; }
.gx-collinfo__list b { display: block; font-weight: 600; }
.gx-collinfo__ic { flex: none; width: 36px; height: 36px; border-radius: 12px; background: #fff; color: #3B6BF0; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(20,40,80,.1); }
.gx-collinfo__ic svg { width: 20px; height: 20px; }
.gx-collinfo__btn { margin-top: auto; justify-content: center; text-align: center; }
.gx-collpage__grid.templates { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 32px; }
.gx-collpage__grid.templates > article { flex: 0 0 272px; max-width: 100%; }
@media (max-width: 899px) { .gx-collhero { grid-template-columns: 1fr; } .gx-collpage__cover img { height: auto; } }
/* наведение на карточки */
article.tpl.gx-card, .gx-coll-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
article.tpl.gx-card:hover, article.tpl.gx-card:focus-within, .gx-coll-card:hover, .gx-coll-card:focus-within { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(20,40,80,.18); border-color: #9DB6F5; }
.gx-card .tpl-preview a, .gx-coll-card__img { position: relative; overflow: hidden; }
.gx-card .tpl-preview img, .gx-coll-card__img img { transition: transform .35s ease; }
article.tpl.gx-card:hover .tpl-preview img, .gx-coll-card:hover .gx-coll-card__img img { transform: scale(1.05); }
article.tpl.gx-card:hover h3 a, .gx-coll-card:hover h3 a { color: #3B6BF0; }
article.tpl.gx-card:hover .stx-btn, .gx-coll-card:hover .stx-btn { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(59,107,240,.35); }
@media (hover: none) { article.tpl.gx-card:hover, .gx-coll-card:hover { transform: none; } }

/* подборки на главной: по ширине текста */
.gx-podborki { margin: 36px 0 12px; }
.gx-podborki__h { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }
.gx-podborki .gx-coll-slider { margin: 18px 0 8px; }
.gx-podborki .gx-coll-slider__track { grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; }
.gx-podborki .gx-coll-card__body { padding: 10px 12px 12px; gap: 10px; }
.gx-podborki .gx-coll-card__body h3 { font-size: 14px; }
.gx-podborki .gx-coll-card .stx-btn { font-size: 13px; padding: 8px 12px; }
.gx-podborki .gx-coll-slider__btn--prev { left: 6px; } .gx-podborki .gx-coll-slider__btn--next { right: 6px; }
@media (max-width: 767px) { .gx-podborki .gx-coll-slider__track { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 560px) { .gx-podborki .gx-coll-slider__track { grid-auto-columns: 82%; } }

/* подборки на главной v2: ширина как у сетки шаблонов, оформление */
.gx-podborki .gx-coll-slider { width: min(1180px, calc(100vw - 40px)); position: relative; left: 50%; transform: translateX(-50%); margin: 22px 0 10px; padding: 22px 26px 18px; border-radius: 28px; background: linear-gradient(135deg, #EEF3FF 0%, #FFF4E6 100%); box-shadow: inset 0 0 0 1px rgba(47,107,255,.08); box-sizing: border-box; }
.gx-podborki .gx-coll-slider__track { grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; padding: 6px 2px 14px; }
.gx-podborki .gx-coll-card { border: 0; border-radius: 20px; box-shadow: 0 6px 20px rgba(27,36,48,.10); }
.gx-podborki .gx-coll-card__img { border-radius: 20px 20px 0 0; }
.gx-podborki .gx-coll-card__body { padding: 14px 16px 16px; }
.gx-podborki .gx-coll-card__body h3 { font-size: 16px; line-height: 1.3; }
.gx-podborki .gx-coll-card .stx-btn { font-size: 14px; padding: 9px 16px; }
.gx-podborki .gx-coll-slider__btn { width: 44px; height: 44px; top: calc(50% - 40px); background: #fff; color: #2f6bff; font-size: 26px; line-height: 1; box-shadow: 0 6px 18px rgba(27,36,48,.22); transition: transform .15s, background .15s, color .15s; }
.gx-podborki .gx-coll-slider__btn:hover { background: #2f6bff; color: #fff; transform: scale(1.08); }
.gx-podborki .gx-coll-slider__btn--prev { left: -14px; } .gx-podborki .gx-coll-slider__btn--next { right: -14px; }
.gx-podborki__more { display: flex; justify-content: center; margin: 4px 0 8px; }
@media (max-width: 899px) { .gx-podborki .gx-coll-slider__track { grid-auto-columns: calc((100% - 20px) / 2); } .gx-podborki .gx-coll-slider { padding: 16px 14px 12px; } }
@media (max-width: 560px) { .gx-podborki .gx-coll-slider__track { grid-auto-columns: 84%; } .gx-podborki .gx-coll-slider__btn { display: none; } }

/* подборки на главной v3 */
.gx-podborki { text-align: center; margin: 48px 0 24px; }
.gx-podborki__h { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; font-weight: 600; color: #141414; letter-spacing: -.01em; text-align: center; }
.gx-podborki > p:not(.gx-podborki__more) { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.55; color: #6d6d6d; text-align: center; }
.gx-podborki .gx-coll-slider { width: min(1200px, calc(100vw - 40px)); padding: 8px 0 6px; background: none; box-shadow: none; border-radius: 0; margin: 28px 0 14px; text-align: left; }
.gx-podborki .gx-coll-slider::before { content: ""; position: absolute; inset: -14px -18px -6px; border-radius: 30px; background: linear-gradient(135deg, #EEF3FF 0%, #FFF4E6 100%); z-index: -1; }
.gx-podborki .gx-coll-slider__track { padding: 6px 0 14px; }
.gx-podborki .gx-coll-slider__btn--prev { left: -22px; } .gx-podborki .gx-coll-slider__btn--next { right: -22px; }
.gx-podborki__more { margin: 18px 0 56px; }
@media (max-width: 1260px) { .gx-podborki .gx-coll-slider__btn--prev { left: 6px; } .gx-podborki .gx-coll-slider__btn--next { right: 6px; } }
@media (max-width: 560px) { .gx-podborki .gx-coll-slider::before { inset: -10px -8px -4px; } }

/* кнопка «Скачать все шаблоны» */
.gx-collinfo__dl { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 20px; border: 0; border-radius: 14px; cursor: pointer; font: 700 17px/1.2 "Inter", Arial, sans-serif; color: #fff; background: linear-gradient(180deg, #4CC05A 0%, #2FA24A 100%); box-shadow: 0 6px 16px rgba(47,162,74,.35), inset 0 -2px 0 rgba(0,0,0,.12); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.gx-collinfo__dl::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: gx-dl-shine 3.2s ease-in-out infinite; }
.gx-collinfo__dl:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(47,162,74,.45), inset 0 -2px 0 rgba(0,0,0,.12); filter: brightness(1.06); }
.gx-collinfo__dl:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(47,162,74,.4); }
.gx-collinfo__dl:disabled { opacity: .7; cursor: progress; }
.gx-collinfo__dl-ic { display: inline-flex; width: 22px; height: 22px; }
.gx-collinfo__dl.is-loading { opacity: .85; transform: none; filter: none; box-shadow: 0 6px 16px rgba(47,162,74,.35), inset 0 -2px 0 rgba(0,0,0,.12); }
.gx-collinfo__dl.is-loading::before { animation: none; display: none; }
.gx-collinfo__dl.is-loading .gx-collinfo__dl-ic svg { display: none; }
.gx-collinfo__dl.is-loading .gx-collinfo__dl-ic::before { content: ""; box-sizing: border-box; width: 100%; height: 100%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: gx-spin .8s linear infinite; }
.gx-collinfo__dl-ic svg { width: 100%; height: 100%; }
.gx-collinfo__dlnote { margin: 8px 0 0; text-align: center; font-size: 12.5px; line-height: 1.4; color: #6d6d6d; }
.gx-collinfo__btn { margin-top: auto; }
@keyframes gx-dl-shine { 0%, 55% { left: -60%; } 100% { left: 140%; } }
@media (prefers-reduced-motion: reduce) { .gx-collinfo__dl::before { animation: none; } }

