/* Pochatok — внутрішні сторінки: шаблони (templates.html) і база знань (help.html).
   Figma шаблони: desktop 42:2, mobile 42:175, drop «Тип/Тема» 42:163, drop сортування 42:170.
   Figma база знань: desktop 43:314, mobile 43:433.
   Спільне для всього сайту (токени, шапка, меню, футер, кнопки, шрифт) — у style.css.
   Тут: спільний чорний верх із пошуком + пагінація → далі блоки кожної сторінки. */

/* ================= TOP: header + search (shared) ================= */
.page-top {
  position: relative;          /* .header from style.css is absolute inside */
  padding-top: 82px;           /* header row: 20 + 42 + 20 */
  background: var(--black);
  color: var(--white);
}

.page-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 60px var(--pad-wide) 0;
}
.page-search__title {
  font-size: var(--fs-xl);
  line-height: 1.1;
  text-align: center;
}
.page-search__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 622px;
  max-width: 100%;
  height: 64px;
  padding: 16px;
  border: 1px solid rgba(186, 185, 185, .5);
  transition: border-color .25s;
}
.page-search__box:focus-within { border-color: rgba(186, 185, 185, .9); }
.page-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 1.65;
}
.page-search__input::placeholder { color: #d9d9d9; opacity: 1; }
.page-search__input::-webkit-search-cancel-button { appearance: none; }
/* 28.10: знак лупи тепер інлайновий SVG нашого стилю (20, обведення 1.5, currentColor), а не біла картинка */
.page-search__submit { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: inherit; }
/* search hints (18.10): the drop list's look (black, 16 px rows, grey hover) under the box, on its border */
.page-search__box { position: relative; }
.search-hints {
  position: absolute;
  z-index: 20;
  top: calc(100% + 1px);
  left: -1px;
  right: -1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--black);
  color: var(--white);
  border: 1px solid rgba(186, 185, 185, .5);
  border-top: 0;
}
.search-hints[hidden] { display: none; }
.search-hints li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color .15s;
}
.search-hints li:hover,
.search-hints li[aria-selected="true"] { background: rgba(89, 89, 89, .5); }
.search-hints small { flex: none; font-size: 14px; color: #d9d9d9; }
/* no filters under the search (help.html): the black block closes 60px below the box */
.page-search--end { padding-bottom: 60px; }

.tpl-filters {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 40px var(--pad-wide) 20px;
}
.tpl-filters__group { display: flex; align-items: center; gap: 40px; }

/* ---------- dropdown ---------- */
.drop { position: relative; }
.drop__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
}
.drop__chevron { transition: transform .25s; }
.drop.is-open .drop__chevron { transform: rotate(180deg); }
.drop__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 20px);      /* starts right where the black block ends */
  left: calc(-1 * var(--pad)); /* item padding 20 → option text lines up with the button text */
  width: max-content;          /* 18.10: «З кабінетом для курсів чи уроків» is longer than the 185 of the design */
  min-width: 185px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.drop.is-open .drop__list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .2s, transform .2s;
}
.drop--right .drop__list { left: auto; right: calc(-1 * var(--pad)); }
.drop__list li {
  padding: 16px 20px;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  outline: 0;
  transition: background-color .15s;
}
.drop__list li[aria-selected="true"],
.drop__list li:hover,
.drop__list li:focus-visible { background: rgba(89, 89, 89, .5); }
/* a picked filter shows its value on the button (18.10: «З кабінетом для курсів чи уроків» is long) — cut with … */
.tpl-filters__group .drop__label { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .tpl-filters__group .drop__label { max-width: 80px; }
  .drop__list { max-width: calc(100vw - 2 * var(--pad)); }
  .drop__list li { white-space: normal; }
}

/* ================= LIST ================= */
.tpl-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 40px var(--pad-wide) 140px;
}
.tpl-list__title { font-size: var(--fs-xl); line-height: 1.1; }
/* one category of the catalogue (templates.html + the cabinet's cabinet.html) */
.tpl-group { display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 100px; }
.tpl-group[hidden] { display: none; }
.tpl-card[hidden] { display: none; }
.tpl-empty { font-size: 16px; line-height: 1.65; color: var(--grey-text); }
.tpl-empty[hidden] { display: none; }
/* «з кабінетом для курсів» before such templates exist: an info plate (yellow = hints only), not «nothing found» */
.tpl-empty--soon { align-self: flex-start; padding: 14px 20px; background: var(--accent); color: var(--black); }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 20px;
}
.tpl-card { display: flex; flex-direction: column; }
.tpl-card__preview {
  aspect-ratio: 1440 / 900;   /* 1440 × 900 like every site preview (user 06.10: «усі превью — під пропорції 1440×900») */
  background: var(--grey-bg) center top / cover no-repeat;
  transition: filter .3s;
}
/* real template: a full-page screenshot, the site's full width from the top (never zoomed into) */
.tpl-card__preview.has-shot { background: #111 var(--pv) center top / 100% auto no-repeat; transition: background-position 1.2s ease, filter .3s; }
.tpl-card:hover .tpl-card__preview { filter: brightness(.96); }
/* desktop: the preview scrolls down the page while the card is hovered, back up on leave (user 10.10: «щоб він
   прокручувався у превью автоматично на десктопі») */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .tpl-card:hover .tpl-card__preview.has-shot { background-position: center bottom; transition: background-position 8s linear, filter .3s; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-card__preview.has-shot, .tpl-card:hover .tpl-card__preview.has-shot { transition: none; background-position: center top; }
}
/* the name + the landing's diagonal arrow — the card is a link (user 10.10: «не зовсім зрозуміло що воно має посилання») */
.tpl-card__name { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 20px; line-height: 1.1; }
.tpl-card__name img { flex: none; width: 16px; height: 16px; transition: transform .2s; }
.tpl-card:hover .tpl-card__name img { transform: translate(2px, -2px); }
.tpl-card__desc { margin-top: 6px; font-size: 16px; line-height: 1.65; color: var(--grey-text); }

/* ---------- pagination ---------- */
.pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}
.pag__num {
  width: 27px;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  transition: background-color .2s;
}
.pag__num:hover,
.pag__num.is-current { background: var(--grey-bg); }
.pag__num.is-current { color: var(--grey-text); }
.pag__arrow { display: flex; align-items: center; justify-content: center; height: 27px; }
.pag__arrow img { flex: none; }
/* the Figma icons are drawn pointing down / left — turned the same way the design turns them */
.pag__arrow--prev, .pag__arrow--next { width: 9px; }
.pag__arrow--prev img { transform: rotate(90deg); }
.pag__arrow--next img { transform: rotate(-90deg); }
.pag__arrow--last img { transform: scaleX(-1); }
.pag__arrow:hover { opacity: .6; }

/* ================= HELP / knowledge base (help.html) ================= */
.faq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  padding: 140px var(--pad-wide);
}
.faq__list { display: flex; flex-direction: column; gap: 40px; width: 808px; max-width: 100%; }
.faq__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--black);
}
/* 18.10 (owner: «шрифтами як друга секція головної»): the article titles = the «Обирай тему» items (.h-l, 32 at 1440 / 28 on
   phones), not the section title size; the arrow = one text line, like the accordion's icon */
.faq__title { font-size: var(--fs-l); line-height: 1.1; }
.faq__title a { display: flex; align-items: center; justify-content: space-between; gap: 40px; transition: opacity .2s; }
.faq__title a:hover { opacity: .6; }
/* the diagonal arrow on the right, like «Обирай тему» (user 10.10: «тут треба додати іконку … як тут») */
.faq__title a::after { content: ""; flex: none; width: 1.1em; height: 1.1em; background: url("/assets/arrow-24-black.svg") center / contain no-repeat; transition: transform .35s ease; }
/* 18.10 (owner: «при наведенні вона повинна рівною ставати»): ↗ turns 45° into → on hover */
.faq__title a:hover::after { transform: rotate(45deg); }
.faq__text { font-size: 16px; line-height: 1.65; }
.faq .pag { width: 100%; }

/* ================= MOBILE (templates 42:175, help 43:433) ================= */
@media (max-width: 900px) {
  .page-top { padding-top: 60px; }   /* header row: 16 + 28 + 16 */
  .page-search { padding-top: 40px; }
  .page-search__title { font-size: 28px; }
  .page-search__box { width: 100%; height: 60px; }
  .page-search__input { font-size: 16px; }

  .tpl-list { gap: 40px; }
  .tpl-list__title { font-size: 28px; }
  .tpl-group { gap: 20px; }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
  .tpl-card__preview { aspect-ratio: 390 / 740; }   /* phone-screen previews */
  .tpl-card__preview.has-shot { background-image: var(--pv-phone, var(--pv)); }
  .tpl-card__desc { display: none; }
  /* 25.10 (owner: «чого на мобайлі тільки 19 шаблонів бачу»): the old mock hid every card after the 6th in each section
     («6 per page on mobile, as in the design»), which with five sections showed 6+6+4+2+1 = 19 of the 32 and had no
     next page to go to (the catalogue is one page, main.js removes the pager). Every template shows on the phone now. */
  .pag__num--wide { display: none; }                  /* pages 1–3 on mobile */

  .page-search--end { padding-bottom: 40px; }
  .faq { gap: 40px; padding: 40px var(--pad) 140px; }
  .faq__title { font-size: 28px; }
  .faq__title a { gap: 20px; }
  .faq__title a::after { width: 24px; height: 24px; }
  .faq__text { font-size: 16px; }
}

/* ================= lists inside a document section (help articles, offer — 10.10) =================
   .doc-sec / .doc-sec p live in pages.css; a bulleted / numbered list reads like the paragraphs around it */
.doc-sec ul, .doc-sec ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 24px; font-size: 16px; line-height: 1.65; color: var(--grey-text); }
.doc-sec li::marker { color: var(--black); }
@media (max-width: 900px) {
  .doc-sec ul, .doc-sec ol { font-size: 16px; }
}

/* 28.10 (власник: «кожен курс має бути карткою … картинка курсу, автор з аватаркою, назва та опис … індикатор
   скільки пройдено у відсотках та візуально»): плитки з проміжком 40 (телефон 20). Сітка за ШИРИНОЮ ВІКНА:
   понад 1920 — 4 в ряд, 1440…1920 — 3, вузче — 2, телефон — 1. Написано одразу в новій системі (біла картка
   радіусом 30), тож `ui.css` її не перефарбовує. */
.learn-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.learn-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border-radius: var(--r-card, 30px);
  overflow: hidden;
  transition: transform .2s;
}
.learn-card:hover { transform: translateY(-4px); }
.learn-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--grey-bg); }
.learn-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* заглушка обкладинки: знак картинки по центру сірого поля */
.learn-card__media.is-ph { display: grid; place-items: center; color: var(--grey-soft); }
.learn-card__media.is-ph > svg { width: 56px; height: 56px; }   /* тільки сам знак заглушки: у кутку ще стоїть закладка */
.learn-card__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 20px; padding: 20px; }
.learn-card__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.learn-card__ava {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  line-height: 1;
  overflow: hidden;
}
.learn-card__ava img { width: 100%; height: 100%; object-fit: cover; }
.learn-card__author { font-size: 14px; line-height: 1.35; color: var(--grey-text); overflow-wrap: anywhere; }
.learn-card__title { font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; overflow-wrap: anywhere; }
.learn-card__desc { font-size: 14px; line-height: 1.5; color: var(--grey-text); }
.learn-card__desc[hidden] { display: none; }
/* прогрес: смуга + відсотки; «з N уроків» поруч сірим */
.learn-card__prog { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.learn-card__bar { display: block; height: 6px; border-radius: 50px; background: var(--grey-bg); overflow: hidden; }
.learn-card__bar i { display: block; height: 100%; border-radius: 50px; background: var(--black); }
.learn-card__note { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; line-height: 1.35; color: var(--grey-text); }
.learn-card__note b { font-weight: 500; color: var(--black); }
@media (min-width: 1921px) { .learn-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1439px) { .learn-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .learn-list { grid-template-columns: 1fr; gap: 20px; } }

/* ================= Пошук курсів (courses.html, 28.10) =================
   Плитка курсу — та сама, що в кабінеті («Навчання»), плюс тема, уроки, учні, зірочки з відгуків,
   ціна, «Купити» / «Детальніше» і серденько з числом тих, хто зберіг курс.
   Другий вигляд — довгі картки: обкладинка ліворуч, текст праворуч. Перемикач вигляду стоїть
   поруч із сортуванням; вибір запам'ятовується (localStorage pochatok-cat-view). */
.cat-main { width: calc(var(--content-max) + 2 * var(--pad)); max-width: 100%; margin: 0 auto; padding: 60px var(--pad) 120px; }
.cat-card[hidden] { display: none; }
/* рядок вирівняний по ТЕКСТУ, а не по коробці пігулки (власник 28.10) */
.cat-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--grey-text); }
.cat-card__theme { padding: 4px 12px; border-radius: 50px; background: var(--grey-bg); color: var(--black); }
.cat-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.cat-card__price { font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.cat-card__acts { display: flex; gap: 10px; }
/* другорядна кнопка публічного шару (сірої .btn тут не було) */
.cat-card__soft { background: var(--grey-bg); color: var(--black); }
/* 16.11 (owner: «відцентруй, зроби ієрархію»): a title on the --fs-l scale and a grey line under it, in the middle */
.cat-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; padding: 120px 0; text-align: center; }
.cat-empty p { margin: 0; }
.cat-empty__t { font-size: var(--fs-l, 32px); font-weight: 900; line-height: 1.1; letter-spacing: -.04em; color: var(--black, #000); }
.cat-empty__d { font-size: 16px; line-height: 1.5; color: var(--grey-text); }
@media (max-width: 900px) { .cat-empty { padding: 80px 0; } .cat-empty__t { font-size: 28px; } }
.cat-empty[hidden] { display: none; }

/* зірочки = оцінка з відгуків: сірий ряд, поверх нього чорний, обрізаний по частці */
.cat-card__rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 1.35; color: var(--grey-text); }
.cat-card__rate--none { color: var(--grey-text); }
.cat-card__score { font-weight: 500; color: var(--black); }
.cat-stars { position: relative; display: inline-block; height: 16px; white-space: nowrap; }
.cat-stars__off, .cat-stars__on { display: block; height: 16px; }
.cat-stars__off { color: var(--grey-soft); }
.cat-stars__on { position: absolute; inset: 0; overflow: hidden; color: var(--black); }
.cat-stars svg { width: 16px; height: 16px; vertical-align: top; }

/* серденько в кутку обкладинки: число = скільки людей зберегли курс */
.cat-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 50px;
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  line-height: 1;
  transition: color .2s;
}
.cat-fav svg { width: 20px; height: 20px; }   /* як решта наших знаків: 20, обведення 1.5 */
.cat-fav:hover { opacity: .75; }
/* збережений курс: закладка заливається чорним (червоного в системі немає, він лише для небезпечних дій) */
.cat-fav[aria-pressed="true"] svg { fill: currentColor; }

/* ряд каталогу курсів (власник 28.10): поле пошуку ліворуч, фільтри праворуч, усе по центру одне
   відносно одного, між пунктами фільтрів наш стандартний проміжок 40 */
.cat-filters { align-items: center; gap: 40px; padding-top: 60px; }   /* 60 від заголовка (власник 28.10) */
.cat-tools { display: flex; align-items: center; gap: 40px; margin-left: auto; }
/* закладка «Збережені» і перемикач вигляду — одна пара, між ними 10 (власник 28.10) */
.cat-tools .cat-fav-btn + .cat-view { margin-left: -30px; }
/* поле пошуку: третина ширини контенту, заввишки як кнопки фільтрів (перемикач вигляду 50) */
.cat-search { flex: 0 0 calc(100% / 3); width: auto; height: 50px; }
/* поле пошуку лишається прозорим і в активному стані: автозаповнення браузера більше не заливає його
   своїм кольором (довгий перехід тла + власний колір тексту) */
.page-search__input:-webkit-autofill,
.page-search__input:-webkit-autofill:hover,
.page-search__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--black);
  transition: background-color 600000s 0s;
}
.page-search__box, .page-search__box:focus-within { background: transparent; }

/* закладка в шапці сторінок курсів (той, хто увійшов): стоїть перед іменем і веде на «Збережені».
   Знак 20, як решта наших, коробка 44, як інші іконки шапки; число показується, лише коли є збережені. */
.header__saved { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--black); }
.header__saved:hover { opacity: .75; }
.header__saved-n {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 50px;
  background: var(--black);
  color: var(--white);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.header__saved-n[hidden] { display: none; }

/* інструменти праворуч: сортування + перемикач вигляду. Перемикач стоїть на ЖОВТІЙ смузі,
   тож контейнер прозорий з чорною межею (світла плашка виглядала чужою, а білого на жовтому не буває) */
/* поле пошуку «Навчання» = поле сторінки пошуку курсів: третина ширини колонки, висота 50,
   межа й радіус поля, знак лупи всередині праворуч */
.cat-find { flex: 0 1 calc(100% / 3); min-width: 140px; height: 50px; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border: 1px solid var(--ink-line, rgba(0, 0, 0, .2)); border-radius: var(--r-field, 6px); }
.cat-find:focus-within { border-color: var(--black); }
.cat-find[hidden] { display: none; }
.cat-find__input { flex: 1 1 auto; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent;
  color: var(--black); font: inherit; font-size: 16px; line-height: 1.35; }
.cat-find__input::placeholder { color: var(--grey-text); opacity: 1; }
.cat-find__input::-webkit-search-cancel-button { appearance: none; }
.cat-find__lens { flex: none; display: grid; place-items: center; width: 20px; height: 20px; color: var(--black); }

/* «Збережені»: кружечок з межею того самого розміру, що й перемикач вигляду (50) */
.cat-fav-btn { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--black); border-radius: 50%; color: var(--black); transition: background .2s, color .2s; }
.cat-fav-btn:hover { background: rgba(0, 0, 0, .08); }
.cat-fav-btn[aria-pressed="true"] { background: var(--black); color: var(--white); }
.cat-fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.cat-view { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--black); border-radius: 50px; }
.cat-view__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50px; color: var(--black); transition: background .2s, color .2s; }
.cat-view__btn:hover { background: rgba(0, 0, 0, .08); }
.cat-view__btn.is-on { background: var(--black); color: var(--white); }

/* довгі картки (спільний вигляд каталогу й «Навчання») */
.learn-list--rows { display: flex; flex-direction: column; gap: 20px; }
.learn-list--rows .learn-card { flex-direction: row; }
.learn-list--rows .learn-card__media { flex: none; width: 320px; aspect-ratio: auto; }
.learn-list--rows .learn-card__body { padding: 20px 40px 20px 20px; }
.learn-list--rows .learn-card__desc { max-width: 720px; }
.learn-list--rows .learn-card__title { font-size: 32px; }
/* «Навчання»: той самий ряд, що на сторінці пошуку курсів, але всередині колонки кабінету, тож без
   бічних полів сторінки (їх дає .acc-main) і без верхніх 60 — відступ тримає власний проміжок сторінки */
/* ряд кабінету не має класу .tpl-filters (він дає display:flex і поля сторінки), тож flex тут свій */
.learn-filters { display: flex; align-items: center; flex-wrap: nowrap; gap: 40px; padding: 0; }
.learn-filters[hidden] { display: none; }
/* колонка кабінету вужча за сторінку каталогу, тож ряд не переносимо: напис сортування при потребі
   обрізається, як у фільтрах каталогу шаблонів */
.learn-filters .cat-tools { flex-wrap: nowrap; min-width: 0; }
.learn-filters .drop__btn { min-width: 0; }
.learn-filters .drop__label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* у вузькій колонці кабінету проміжок ряду 20, інакше кнопки не вміщаються (на широкій лишається 40) */
@media (max-width: 1400px) { .learn-filters, .learn-filters .cat-tools { gap: 20px; } }
@media (max-width: 1400px) { .learn-filters .cat-tools .cat-fav-btn + .cat-view { margin-left: -10px; } }
@media (max-width: 900px) {
  /* на телефоні ряд переноситься: іконка пошуку (або поле) зверху, фільтри під нею на всю ширину */
  .learn-filters { flex-wrap: wrap; gap: 20px; }
  .learn-filters .cat-find { flex: 1 1 auto; max-width: none; }
  .learn-filters .cat-tools { width: 100%; flex-wrap: wrap; justify-content: space-between; margin-left: 0; }
}
@media (max-width: 900px) {
  .cat-main { padding: 40px var(--pad) 80px; }
  /* на телефоні ряд знову стає колонкою: поле пошуку зверху, фільтри під ним */
  .cat-filters { flex-direction: column; align-items: stretch; gap: 20px; }
  .cat-search { flex: none; width: 100%; }
  .cat-tools { width: 100%; gap: 12px; margin-left: 0; }
  .cat-tools .cat-fav-btn + .cat-view { margin-left: -2px; }
  .cat-card__acts { width: 100%; }
  .cat-card__acts > * { flex: 1 1 0; }
  .learn-list--rows .learn-card { flex-direction: column; }
  .learn-list--rows .learn-card__media { width: auto; aspect-ratio: 16 / 10; }
  .learn-list--rows .learn-card__body { padding: 20px; }
  .learn-list--rows .learn-card__title { font-size: 20px; }
}

/* 16.11 (owner: «в каталозі теж треба лоадер, бо іноді довго вантажиться»): the logo loader in the catalogue's place until the
   cards are drawn (templates.html and the cabinet's cabinet.html; main.js removes [data-tpl-ldr]) */
.tpl-ldr { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 360px; padding: 80px 20px; color: var(--black, #000); text-align: center; }
.tpl-ldr__text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--grey-text); }
