@charset "UTF-8";
/* ==========================================================================
   Crypto Digest — theme.css
   Тема: cryptodigest (классическая, самостоятельная)
   Источник правды по разметке: header.php, footer.php, index.php,
   template-parts/{ticker,sidebar,card,feed-item}.php
   Макеты: design/project/D-*.dc.html (v2, 24.09.2026)
   Порядок: токены → база → шапка → тикер → лэйаут → лента/карточки →
            сайдбар → футер → утилиты → print
   ========================================================================== */

/* ==========================================================================
   1. ТОКЕНЫ ПАЛИТРЫ / РАЗМЕРОВ
   ========================================================================== */

:root {
  color-scheme: light;           /* Ж-21 */
  /* Палитра, светлая (design/gen/common.py → L) */
  --bg:    #FFFFFF;
  --sf:    #F3F5F9;
  --sf2:   #E9EDF4;
  --tx:    #101828;
  --mu:    #586174;
  --ln:    #E4E7EC;
  --ac:    #0D6EFD;
  --fill:  #0B5ED7;
  /* Ж-20: заливка основных кнопок (с --onac контраст ≥ 4,5:1); #0D6EFD — только логотип и крупные акценты */
  --btn-fill:       #0B5ED7;
  --btn-fill-hover: #0A53BE;
  --acs:   #E8F0FF;
  --onac:  #FFFFFF;
  --lk:    #0A58CA;
  --up:    #15803D;
  --dn:    #B91C1C;
  --am:    #8A5A00;
  --am-fill: #D69E2E;   /* Ж-28: заливки (сектор шкалы, полосы); --am — для текста */
  --bd:    #8F98A8;
  --sk:    #E4E7EC;

  /* Геометрия */
  --r-sm:  .375rem;
  --r-md:  .625rem;
  --r-lg:  .875rem;
  --r-pill:.75rem;
  --tap:   2.75rem;         /* 44px — минимальная тап-зона */
  --tap-sm:2.5rem;          /* 40px — чипы */
  /* В-18: шкала вертикальных отступов */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  40px;
  --sp-5:  64px;
  --header-h: 3.25rem;      /* 52px — телефон */
  --shadow-pop: 0 .75rem 2rem rgba(16, 24, 40, .16);
  --ove:   rgba(16, 24, 40, .5); /* затемнение бэкдропа */

  /* Шрифты */
  --ff-head: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ff-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Ж-6: --font-data — только цены/проценты/таблицы/полоса курсов, --font-meta — даты и подписи */
  --font-data: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-meta: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 1024px) {
  :root { --header-h: 4rem; }  /* 64px — десктоп */
}

/* Тёмная тема (D) */
[data-theme="dark"] {
  color-scheme: dark;            /* Ж-21 */
  --bg:    #12141A;
  --sf:    #1A1D25;
  --sf2:   #222630;
  --tx:    #EEF0F5;
  --mu:    #A3ABB8;
  --ln:    #2A2F3A;
  --ac:    #3B8BFF;
  --fill:  #3B8BFF;
  /* Ж-20: #3B8BFF с --onac (#0B1220) даёт ≈5,6:1 — оставляем в тёмной теме */
  --btn-fill:       #3B8BFF;
  --btn-fill-hover: #2B7BEF;
  --acs:   #1B2A45;
  --onac:  #0B1220;
  --lk:    #7FB0FF;
  --up:    #34D399;
  --dn:    #FB7185;
  --am:    #F5B942;
  --am-fill: #F5B942;
  --bd:    #5B6373;
  --sk:    #2A2F3A;
  --ove:   rgba(0, 0, 0, .6);
  --shadow-pop: 0 .75rem 2rem rgba(0, 0, 0, .55);
}

/* Высокий контраст: рамки и приглушённый = основному, ссылки подчёркнуты */
[data-contrast="high"] {
  --tx: #000000;
  --mu: #000000;
  --ln: #000000;
  --bd: #000000;
  --sk: #000000;
}
[data-theme="dark"][data-contrast="high"] {
  --tx: #FFFFFF;
  --mu: #FFFFFF;
  --ln: #FFFFFF;
  --bd: #FFFFFF;
  --sk: #FFFFFF;
}
[data-contrast="high"] a,
[data-contrast="high"] a:hover,
[data-contrast="high"] a:focus {
  text-decoration: underline;
}
[data-contrast="high"] .cd-side,
[data-contrast="high"] .cd-header,
[data-contrast="high"] .cd-ticker,
[data-contrast="high"] .cd-footer,
[data-contrast="high"] .cd-view-panel {
  border-color: var(--bd);
}

/* Размер шрифта: A− / A / A+ */
html { font-size: 100%; }
html[data-fs="0"] { font-size: 87.5%; }
html[data-fs="1"] { font-size: 100%; }
html[data-fs="2"] { font-size: 125%; }

/* ==========================================================================
   2. БАЗА / RESET
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video { max-width: 100%; }

img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* Ж-21: нативные контролы в цвете акцента */
input[type="checkbox"],
input[type="radio"],
select,
progress {
  accent-color: var(--ac);
}

/* Ж-20: основная кнопка — заливка --btn-fill; hover/active темнее, не светлее */
.cd-btn--primary {
  background: var(--btn-fill);
  border-color: var(--btn-fill);
  color: var(--onac);
}
.cd-btn--primary:hover,
.cd-btn--primary:focus-visible,
.cd-btn--primary:active,
.cd-search__form button:hover,
.cd-search__form button:focus-visible,
.cd-fs__btn[aria-pressed="true"]:hover,
.cd-lang__item.is-active:hover,
.cd-contrast[aria-checked="true"]:hover .cd-contrast__track {
  background: var(--btn-fill-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-head);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 .5rem;
}

p { margin: 0 0 1rem; }

table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

::selection {
  background: var(--acs);
  color: var(--tx);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Блокировка прокрутки страницы, пока открыт drawer (ставится JS на <html>/<body>) */
html.cd-drawer-open,
body.cd-drawer-open,
body.cd-no-scroll,
html.cd-no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Скрытые скроллбары для свайп-лент */
.cd-swipe { scrollbar-width: none; -ms-overflow-style: none; }
.cd-swipe::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Кастомный скроллбар панелей */
.cd-scroll { scrollbar-width: thin; scrollbar-color: var(--bd) transparent; }
.cd-scroll::-webkit-scrollbar { width: .375rem; }
.cd-scroll::-webkit-scrollbar-track { background: transparent; }
.cd-scroll::-webkit-scrollbar-thumb {
  background: var(--bd);
  border-radius: .1875rem;
}

/* ==========================================================================
   3. КОНТЕЙНЕР И SKIP-LINK
   ========================================================================== */

.cd-container {
  width: 100%;
  max-width: 80rem;              /* 1280 */
  margin-inline: auto;
  padding-inline: 1.5rem;        /* 24 */
}

.cd-skip {
  position: fixed;
  top: -100vh;
  left: 1rem;
  z-index: 200;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--fill);
  color: var(--onac);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.cd-skip:focus {
  top: 1rem;
  text-decoration: none;
}

/* ==========================================================================
   4. ШАПКА
   ========================================================================== */

.cd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--ln);
}

.cd-header__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: var(--header-h);
}

/* --- Логотип --- */
.cd-logo {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}
.cd-logo:hover { text-decoration: none; }

.cd-logo__icon {
  display: block;
  width: 2.25rem;                /* 36 */
  height: 2.25rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.cd-logo__text {
  display: inline-block;
  font-family: var(--ff-head);
  font-size: 1.3125rem;          /* 21 */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.cd-logo__crypto { color: var(--tx); }
.cd-logo__digest { color: var(--ac); }

/* --- Бургер --- */
.cd-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  flex: 0 0 auto;
  min-width: var(--tap);         /* 44px — тап-зона (Ж-18) */
  height: var(--tap);
  padding: 0 .625rem;
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  background: var(--sf);
  color: var(--tx);
}
.cd-burger:hover { background: var(--sf2); }

/* Ж-18: видимая подпись «Меню» рядом с иконкой */
.cd-burger__label {
  font-family: var(--ff-body);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* --- Навигация --- */
.cd-nav { min-width: 0; }

/* Мобильный дефолт: десктопное меню скрыто, включается на ≥1024px */
.cd-nav--primary { display: none; }

.cd-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.cd-nav__list > li { position: relative; }

.cd-nav__list > li > a,
.cd-nav__list > li > .cd-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .5rem .4375rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx);
  font-size: .8125rem;           /* 13 */
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.cd-nav__list > li > a:hover,
.cd-nav__list > li > a:focus-visible,
.cd-nav__list > li > .cd-nav__toggle:hover,
.cd-nav__list > li > .cd-nav__toggle:focus-visible {
  background: var(--acs);
  color: var(--lk);
  text-decoration: none;
}
.cd-nav__list .current-menu-item > a,
.cd-nav__list .current-menu-ancestor > a {
  background: var(--acs);
  color: var(--lk);
}

/* Стрелка-индикатор подменю */
.cd-nav__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: .75rem;
  height: .75rem;
  color: currentColor;
  transition: transform .15s ease;
}
.cd-nav__toggle[aria-expanded="true"] .cd-nav__arrow,
.cd-nav__list > li:hover > .cd-nav__toggle .cd-nav__arrow,
.cd-nav__list > li:focus-within > .cd-nav__toggle .cd-nav__arrow,
.cd-nav__list > li:hover > a .cd-nav__arrow,
.cd-nav__list > li:focus-within > a .cd-nav__arrow {
  transform: rotate(180deg);
}

/* В-19 (консилиум 25.09): стрелка подменю видимая и одного размера, промежутки меню ровные.
   Раньше кнопка-стрелка шириной 12px имела поля 7+7px — svg сжимался до нуля, оставалась пустая «дыра». */
.cd-nav__list > li > .cd-nav__toggle.cd-nav__arrow {
  width: auto;
  height: auto;
  padding: .5rem .375rem .5rem 0;
  margin-left: -.25rem;
}
.cd-nav__arrow svg { display: block; flex: 0 0 11px; width: 11px; height: 11px; }

/* Подменю 2-го уровня: класс .sub-menu (WP) и .cd-nav__sub (walker) */
.cd-nav__list .sub-menu,
.cd-nav__list .cd-nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  min-width: 12rem;
  margin: 0;
  padding: .375rem;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}
.cd-nav__list > li:hover > .sub-menu,
.cd-nav__list > li:focus-within > .sub-menu,
.cd-nav__list > li:hover > .cd-nav__sub,
.cd-nav__list > li:focus-within > .cd-nav__sub,
.cd-nav__list > li > .cd-nav__toggle[aria-expanded="true"] ~ .sub-menu,
.cd-nav__list > li > .cd-nav__toggle[aria-expanded="true"] ~ .cd-nav__sub {
  display: flex;
}

.cd-nav__list .sub-menu a,
.cd-nav__list .cd-nav__sub a {
  display: block;
  padding: .5rem .625rem;
  border-radius: var(--r-sm);
  color: var(--tx);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
}
.cd-nav__list .sub-menu a:hover,
.cd-nav__list .sub-menu a:focus-visible,
.cd-nav__list .cd-nav__sub a:hover,
.cd-nav__list .cd-nav__sub a:focus-visible {
  background: var(--acs);
  color: var(--lk);
}

/* --- Действия справа --- */
.cd-header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.cd-search { position: relative; }

.cd-hdr-icon,
.cd-search__toggle,
.cd-view-toggle,
.cd-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  background: var(--sf);
  color: var(--tx);
  flex: 0 0 auto;
  text-decoration: none;
}
.cd-search__toggle:hover,
.cd-view-toggle:hover,
.cd-theme-toggle:hover { background: var(--sf2); }

.cd-view-toggle {
  font-family: var(--ff-head);
  font-size: .9375rem;
  font-weight: 800;
}

.cd-search__form {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .375rem;
  min-width: 17rem;
  padding: .25rem;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}
.cd-search__form[hidden] { display: none; }

.cd-search__form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.5rem;
  padding: 0 .5rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx);
  font-size: .875rem;
  outline: none;
}
.cd-search__form input[type="search"]::placeholder { color: var(--mu); }

.cd-search__form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--btn-fill);
  color: var(--onac);
}

/* --- RU / UA --- */
.cd-lang {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: .1875rem;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  font-size: .8125rem;
  font-weight: 700;
}
.cd-lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);         /* 44px */
  min-width: 2.5rem;
  padding: 0 .75rem;
  border-radius: var(--r-sm);
  color: var(--mu);
  line-height: 1;
  text-decoration: none;
}
.cd-lang__item:hover { color: var(--tx); text-decoration: none; }
.cd-lang__item.is-active {
  background: var(--fill);
  color: var(--onac);
}

/* --- Панель «Вид» (popover шапки) --- */
.cd-view-panel {
  position: absolute;
  top: calc(100% - .25rem);
  right: 1.5rem;
  z-index: 80;
  width: 20rem;
  max-width: calc(100vw - 3rem);
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
}
.cd-view-panel[hidden] { display: none; }

/* --- Общие контролы «Вид» --- */
.cd-view {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.cd-view__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.cd-view__title {
  font-family: var(--ff-head);
  font-size: .9375rem;
  font-weight: 800;
}
.cd-view__hint {
  font-size: .8125rem;
  color: var(--mu);
}
.cd-view__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.cd-view__label { font-size: .875rem; }

.cd-fs {
  display: inline-flex;
  align-items: center;
  padding: .1875rem;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
}
.cd-fs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  height: var(--tap);
  padding: 0 .75rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx);
  font-family: var(--ff-head);
  font-size: .9375rem;
  font-weight: 800;
}
.cd-fs__btn[aria-pressed="true"] {
  background: var(--btn-fill);
  color: var(--onac);
}

/* Переключатель «Высокий контраст» (role="switch") */
.cd-contrast {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-height: var(--tap);
  padding: 0 .25rem;
  border: 0;
  background: transparent;
  color: var(--tx);
  font-size: .875rem;
  font-weight: 600;
  text-align: left;
}
.cd-contrast__track {
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: .75rem;
  background: var(--sf2);
  border: 1px solid var(--bd);
}
.cd-contrast__knob {
  position: absolute;
  top: .0625rem;
  left: .0625rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.cd-contrast[aria-checked="true"] .cd-contrast__track { background: var(--fill); }
.cd-contrast[aria-checked="true"] .cd-contrast__knob { transform: translateX(1.25rem); }
.cd-contrast__label {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
}

/* Кнопки темы: в панели (.cd-view__theme) и в шапке (.cd-theme-toggle) */
.cd-view__theme,
.cd-view-panel .cd-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0 .25rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx);
  font-size: .875rem;
  font-weight: 600;
  text-align: left;
}
.cd-view__theme:hover,
.cd-view-panel .cd-theme-toggle:hover { background: var(--acs); }

/* ==========================================================================
   5. ВЫДВИЖНОЕ МЕНЮ (drawer, < 1024px)
   ========================================================================== */

.cd-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(22rem, 88vw);
  max-width: 100%;
  padding: 1rem 1.25rem 2rem;
  background: var(--bg);
  border-right: 1px solid var(--ln);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* бэкдроп как растянутая тень — работает без доп. элементов */
  box-shadow: 0 0 0 100vmax var(--ove);
}
.cd-drawer[hidden] { display: none; }
.cd-drawer.is-open { display: flex; }

/* Бэкдроп-элемент (если JS создаёт/показывает) */
.cd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ove);
  opacity: 1;
}
.cd-backdrop[hidden] { display: none; }

.cd-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--ln);
}

.cd-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  background: var(--sf);
  color: var(--tx);
  flex: 0 0 auto;
}

.cd-drawer__search {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  color: var(--mu);
}
.cd-drawer__search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tx);
  font-size: 1rem;
  outline: none;
}
.cd-drawer__search input[type="search"]::placeholder { color: var(--mu); }

.cd-nav--drawer { display: block; }

.cd-nav--drawer .cd-nav__list {
  flex-direction: column;
  align-items: stretch;
  gap: .125rem;
  white-space: normal;
}
.cd-nav--drawer .cd-nav__list > li > a,
.cd-nav--drawer .cd-nav__list > li > .cd-nav__toggle {
  justify-content: space-between;
  width: 100%;
  min-height: var(--tap);
  padding: .75rem .625rem;
  font-size: 1rem;
}
.cd-nav--drawer .sub-menu,
.cd-nav--drawer .cd-nav__sub {
  position: static;
  display: flex;
  min-width: 0;
  margin: .125rem 0 .25rem;
  padding: .125rem 0 .125rem 1rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.cd-nav--drawer .sub-menu a,
.cd-nav--drawer .cd-nav__sub a {
  min-height: var(--tap-sm);
  display: flex;
  align-items: center;
  font-size: .9375rem;
}

.cd-drawer__view {
  padding-top: .75rem;
  border-top: 1px solid var(--ln);
}

/* ==========================================================================
   6. ПОЛОСА КУРСОВ (НЕ липкая)
   ========================================================================== */

.cd-ticker {
  position: static;
  background: var(--sf);
  border-bottom: 1px solid var(--ln);
}

.cd-ticker__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
}

.cd-ticker__list {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: .5rem;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-data);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

.cd-ticker__list > * {
  flex: 0 0 auto;
}

/* Чип-курс (использует ticker.js) */
.cd-ticker__chip {
  display: inline-flex;
  align-items: baseline;
  gap: .375rem;
  min-width: 8rem;
  min-height: var(--tap-sm);
  padding: .375rem .625rem;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-sm);
  color: var(--tx);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font-data);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.cd-ticker__chip:hover { background: var(--sf2); text-decoration: none; }

.cd-ticker__symbol {
  font-weight: 600;
  color: var(--tx);
  letter-spacing: .01em;
}
.cd-ticker__price {
  color: var(--tx);
  white-space: nowrap;
}
.cd-ticker__delta {
  font-weight: 600;
  white-space: nowrap;
}
/* Атрибут hidden всегда скрывает: иначе display у класса (grid/flex) перебивает его (поле уровня на /signals). */
[hidden] { display: none !important; }
.cd-ticker__delta.up { color: var(--up); }
.cd-ticker__delta.down { color: var(--dn); }
/* Единые классы знака изменения (В-11/Ж-4, 25.09): полоса курсов, «Топ монет», таблицы; ноль — серый без стрелки */
.cd-up { color: var(--up); }
.cd-dn { color: var(--dn); }
.cd-flat { color: var(--mu); }

/* Легаси-совместимость (a / .cd-ticker__item / __sym / __chg--*) */
.cd-ticker__list > a,
.cd-ticker__item {
  display: inline-flex;
  align-items: baseline;
  gap: .375rem;
  min-width: 8rem;
  min-height: var(--tap-sm);
  padding: .375rem .625rem;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-sm);
  color: var(--tx);
  white-space: nowrap;
  text-decoration: none;
}
.cd-ticker__list > a:hover { text-decoration: none; background: var(--sf2); }

.cd-ticker__list .cd-ticker__sym,
.cd-ticker__list > a > span:first-child { font-weight: 600; }
.cd-ticker__list .cd-ticker__chg--up { color: var(--up); }
.cd-ticker__list .cd-ticker__chg--down { color: var(--dn); }

.cd-ticker__updated {
  flex: 0 0 auto;
  font-size: .8125rem;
  color: var(--mu);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cd-ticker__source { color: var(--mu); }
.cd-ticker__time { color: inherit; }

/* ==========================================================================
   7. ЛЭЙАУТ: MAIN + SIDEBAR
   ========================================================================== */

.cd-main { display: block; min-width: 0; }

/* Внешний контейнер-обёртка из header.php — не грид */

.cd-layout {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  column-gap: 1.5rem;
  align-items: start;
  padding-block: 1.25rem 2.5rem;
}
.cd-layout > * { min-width: 0; }

/* К-1 (консилиум 24.09): шаблоны инструментов и сервисов вкладывали свою сетку «контент + сайдбар» в первую колонку
   сетки из header.php — правая колонка темы пустовала, контент сжимался до ~490px, отступы удваивались.
   Обёртки растягиваются на обе колонки и сами дают ту же сетку 8fr/4fr, без своих полей. */
.cd-layout > .cd-layout,
.cd-layout > .cd-tool-layout,
.cd-layout > .cd-tool-page { grid-column: 1 / -1; max-width: none; margin: 0; padding: 0; }
.cd-layout > .cd-tool-page > .cd-layout { padding: 0; }

/* ==========================================================================
   8. ЗАГОЛОВОК СТРАНИЦЫ / ПУСТОЕ СОСТОЯНИЕ / ПАГИНАЦИЯ
   ========================================================================== */

.cd-pagehead {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

/* В-18: отступ перед заголовком секции главной после hero */
.home .cd-pagehead { margin-top: var(--sp-4); }
.cd-pagehead__title {
  margin: 0;
  font-family: var(--ff-head);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.375rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.02em;
}

.cd-empty {
  padding: 2rem 1.5rem;
  border: 1px dashed var(--bd);
  border-radius: var(--r-lg);
  color: var(--mu);
  text-align: center;
  font-size: 1rem;
}
.cd-empty p { margin: 0; }

.cd-main .nav-links,
.cd-main .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.75rem;
  justify-content: flex-start;
}
.cd-main .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 .75rem;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  color: var(--tx);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.cd-main .page-numbers:hover { background: var(--sf2); text-decoration: none; }
.cd-main .page-numbers.current {
  background: var(--fill);
  border-color: var(--fill);
  color: var(--onac);
}

/* ==========================================================================
   9. ЛЕНТА (feed-item) И КАРТОЧКИ (card)
   ========================================================================== */

.cd-feed {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.cd-feed-item {
  border-bottom: 1px solid var(--ln);
}
.cd-feed-item:last-child { border-bottom: 0; }

.cd-feed-item__link {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .75rem 0;
  color: inherit;
  text-decoration: none;
}
.cd-feed-item__link:hover { text-decoration: none; }
.cd-feed-item__link:hover .cd-feed-item__title { color: var(--lk); }

.cd-feed-item__media {
  display: block;
  flex: 0 0 auto;
  width: 9rem;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--sf2);
}
.cd-feed-item__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 208 / 117;
  object-fit: cover;
}

.cd-feed-item__body {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  min-width: 0;
}

.cd-feed-item__title {
  font-family: var(--ff-head);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.005em;
}

.cd-feed-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--mu);
}
.cd-feed-item__time {
  font-family: var(--font-meta);   /* Ж-6: даты — не моно */
  font-variant-numeric: tabular-nums;
}
.cd-feed-item__sep { color: var(--mu); }
.cd-feed-item__cat { color: var(--mu); }
.cd-feed-item__lang {
  font-family: var(--font-meta);   /* Ж-6: подпись языка — не моно */
  font-weight: 600;
  text-transform: uppercase;
}
.cd-feed-item__lang--ru { color: var(--mu); }
.cd-feed-item__lang--uk { color: var(--lk); }

/* --- Карточки --- */
.cd-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.cd-card { display: block; }

.cd-card__link {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  color: inherit;
  text-decoration: none;
}
.cd-card__link:hover { text-decoration: none; }
.cd-card__link:hover .cd-card__title { color: var(--lk); }

.cd-card__media {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--sf2);
}
.cd-card__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 510 / 287;
  object-fit: cover;
}

.cd-card__body {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.cd-card__title {
  font-family: var(--ff-head);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cd-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--mu);
}
.cd-card__cat {
  font-size: .8125rem;
  color: var(--mu);
  font-weight: 600;
}
.cd-card__sep { color: var(--mu); }
.cd-card__date {
  font-family: var(--font-meta);   /* Ж-6: даты — не моно */
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   10. САЙДБАР
   ========================================================================== */

.cd-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cd-side__block {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  min-width: 0;
}

.cd-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.cd-side__title {
  margin: 0;
  font-family: var(--ff-head);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mu);
}

.cd-side__more {
  flex: 0 0 auto;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--lk);
  text-decoration: none;
}
.cd-side__more:hover { text-decoration: underline; }

/* ---------- 10.1 Индексы рынка ---------- */

.cd-indices {
  gap: .75rem;
  padding: 1rem 1.125rem;
  background: var(--sf);
  border-radius: var(--r-lg);
}

.cd-indices__date {
  font-family: var(--font-meta);   /* Ж-6: дата — не моно */
  font-size: .8125rem;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
}

/* Страх и жадность: SVG 150×84 + крупное значение */
.cd-fng {
  display: flex;
  align-items: center;
  gap: .875rem;
  color: inherit;
  text-decoration: none;
}
.cd-fng:hover { text-decoration: none; }
.cd-fng:hover .cd-fng__label { color: var(--tx); }

.cd-fng__gauge {
  display: block;
  flex: 0 0 auto;
  width: 9.375rem;   /* 150 */
  height: 5.25rem;   /* 84 */
  overflow: visible;
}
.cd-fng__gauge text {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* Стрелка индекса страха: атрибут transform="rotate(угол 100 100)" задаётся из JS.
   К-5 (консилиум 24.09): transform-origin здесь НЕ задавать — он складывается с центром в rotate()
   и уводит стрелку за дугу (крутилась вокруг 200,200). */
.cd-fng__needle {
  transition: transform .35s ease;
  stroke: var(--tx);
}

.cd-fng__info {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  min-width: 0;
}

.cd-fng__label {
  font-size: .8125rem;
  color: var(--mu);
}

.cd-fng__value {
  font-family: var(--font-data);
  font-size: 2.125rem;      /* 34 */
  font-weight: 600;
  line-height: 1;
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

.cd-fng__caption {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--up);
}
.cd-fng__caption.is-fear { color: var(--dn); }
.cd-fng__caption.is-neutral { color: var(--am); }

/* Альтсезон: полоса заливки + легенда */
.cd-alt {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding-top: .625rem;
  border-top: 1px solid var(--ln);
  color: inherit;
  text-decoration: none;
}
.cd-alt:hover { text-decoration: none; }

.cd-alt__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8125rem;
}
.cd-alt__name { color: var(--mu); }
.cd-alt__value {
  font-family: var(--font-data);
  font-weight: 600;
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}
.cd-alt__dot { color: var(--mu); }

.cd-alt__bar {
  position: relative;
  display: block;
  height: .5rem;
  border-radius: .25rem;
  background: var(--sf2);
  overflow: hidden;
}
.cd-alt__fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 0;
  background: var(--am);
  border-radius: .25rem;
  transition: width .4s ease;
}

.cd-alt__legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--mu);
}

/* ---------- 10.2 Топ монет ---------- */

.cd-topcoins-block {
  gap: 0;
  background: var(--sf);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cd-topcoins-block .cd-side__head {
  padding: .875rem 1.125rem .5rem;
}

.cd-topcoins {
  display: flex;
  flex-direction: column;
}

.cd-topcoins > *,
.cd-topcoins__row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 4.75rem 6rem; /* 52 / 1fr / 76 / 96 */
  gap: .5rem;
  align-items: center;
  padding: .5rem 1.125rem;
  border-top: 1px solid var(--ln);
  font-size: .8125rem;
  color: inherit;
  text-decoration: none;
}
.cd-topcoins > *:hover { background: var(--bg); text-decoration: none; }

.cd-topcoins > * > *:nth-child(1),
.cd-topcoins__sym { font-weight: 700; letter-spacing: .01em; }

.cd-topcoins > * > *:nth-child(2),
.cd-topcoins__price {
  font-family: var(--font-data);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-topcoins > * > *:nth-child(3),
.cd-topcoins__chg {
  font-family: var(--font-data);
  font-size: .8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cd-topcoins__chg--up,
.cd-topcoins .is-up { color: var(--up); }
.cd-topcoins__chg--down,
.cd-topcoins .is-down { color: var(--dn); }

.cd-topcoins > * > *:nth-child(4),
.cd-topcoins__spark {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.cd-topcoins__spark svg { display: block; overflow: visible; }

.cd-topcoins__empty,
.cd-topcoins__error {
  padding: .75rem 1.125rem;
  font-size: .8125rem;
  color: var(--mu);
}

/* ---------- 10.3 Дайджест ---------- */

.cd-digest {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .875rem 1.125rem;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  color: inherit;
  text-decoration: none;
}
.cd-digest:hover { text-decoration: none; }
.cd-digest:hover .cd-digest__more { text-decoration: underline; }

.cd-digest__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.cd-digest__title {
  font-family: var(--ff-head);
  font-size: .9375rem;
  font-weight: 800;
}
.cd-digest__date {
  font-family: var(--font-meta);   /* Ж-6: дата — не моно */
  font-size: .8125rem;
  color: var(--mu);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cd-digest__list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.cd-digest__item {
  display: flex;
  gap: .5rem;
  font-size: .8125rem;
  line-height: 1.4;
}
.cd-digest__bullet {
  flex: 0 0 auto;
  color: var(--lk);
}

.cd-digest__more {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--lk);
}

/* ---------- 10.4 «Свежее | Популярное» ---------- */

.cd-side-feed {
  gap: 0;
  padding: .25rem;
  background: var(--sf);
  border-radius: var(--r-lg);
}

.cd-tabs {
  display: flex;
  gap: .25rem;
}
.cd-tabs__tab {
  flex: 1 1 0;
  min-height: var(--tap);
  padding: .5rem 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--mu);
  font-size: .8125rem;
  font-weight: 600;
  text-align: center;
}
.cd-tabs__tab:hover { color: var(--tx); }
.cd-tabs__tab.is-active,
.cd-tabs__tab[aria-selected="true"] {
  background: var(--bg);
  color: var(--tx);
}

/* Ж-19: активная вкладка — жирный текст и подчёркивание 3px цветом --ac */
[role="tab"][aria-selected="true"] {
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--ac);
}

/* Ж-19: выбранный чип фильтра — рамка 2px --ac в дополнение к заливке */
.cd-chip[aria-pressed="true"],
.cd-chips__item[aria-pressed="true"],
.cd-chip.is-active,
.cd-chips__item.is-active {
  border-color: var(--ac);
  box-shadow: inset 0 0 0 2px var(--ac);
}

.cd-tabs__panel {
  display: flex;
  flex-direction: column;
  height: 20rem;
  padding: .25rem .625rem .375rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--bd) transparent;
}
.cd-tabs__panel[hidden] { display: none; }
.cd-tabs__panel::-webkit-scrollbar { width: .375rem; }
.cd-tabs__panel::-webkit-scrollbar-thumb {
  background: var(--bd);
  border-radius: .1875rem;
}

.cd-side-feed__item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .5625rem 0;
  border-bottom: 1px solid var(--ln);
  color: inherit;
  text-decoration: none;
}
.cd-side-feed__item:last-child { border-bottom: 0; }
.cd-side-feed__item:hover { text-decoration: none; }
.cd-side-feed__item:hover .cd-side-feed__title { color: var(--lk); }

.cd-side-feed__num {
  font-family: var(--font-data);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
}

.cd-side-feed__title {
  font-size: .8125rem;
  line-height: 1.35;
  font-weight: 500;
}

.cd-side-feed__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--mu);
}
.cd-side-feed__lang {
  font-family: var(--font-meta);   /* Ж-6: подпись языка — не моно */
  font-weight: 600;
  text-transform: uppercase;
}
.cd-side-feed__lang--ru { color: var(--mu); }
.cd-side-feed__lang--uk { color: var(--lk); }
.cd-side-feed__date { color: var(--mu); }
.cd-side-feed__empty {
  margin: 0;
  padding: .75rem .25rem;
  font-family: var(--font-meta);   /* Ж-6: статус — не моно */
  font-size: .8125rem;
  color: var(--mu);
}

/* ---------- 10.5 Инструменты 3×3 ---------- */

.cd-tools-block { gap: .625rem; }

.cd-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}

.cd-tools__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  min-height: 5.25rem;
  padding: .625rem;
  background: var(--sf);
  border-radius: var(--r-md);
  color: inherit;
  text-decoration: none;
}
.cd-tools__item:hover {
  background: var(--sf2);
  text-decoration: none;
}
.cd-tools__item:hover .cd-tools__label { color: var(--lk); }

.cd-tools__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: var(--r-md);
  background: var(--acs);
  color: var(--lk);
}
.cd-tools__icon svg { display: block; }

.cd-tools__label {
  font-size: .8125rem;      /* 13 */
  line-height: 1.3;
  font-weight: 600;
}

/* ---------- 10.6 Метки ---------- */

.cd-tags-block { gap: .5rem; }

.cd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}

.cd-tags__item {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-sm);
  padding: .4375rem .6875rem;
  background: var(--sf);
  border-radius: var(--r-md);
  color: var(--tx);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
}
.cd-tags__item:hover {
  background: var(--acs);
  color: var(--lk);
  text-decoration: none;
}

.cd-tags__note {
  margin: 0;
  font-size: .8125rem;
  color: var(--mu);
}

/* ==========================================================================
   11. ФУТЕР
   ========================================================================== */

.cd-footer {
  margin-top: 2.5rem;
  padding: 2rem 0 1.5rem;
  background: var(--sf);
  border-top: 1px solid var(--ln);
}

.cd-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cd-footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.cd-footer__col {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 0;
  font-size: .8125rem;
}

/* Якорные модификаторы колонок — общая раскладка, без изменений вида */
.cd-footer__col--tools,
.cd-footer__col--about { min-width: 0; }

.cd-footer__title {
  margin: 0 0 .25rem;
  font-family: var(--ff-head);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mu);
}

.cd-footer__link {
  color: var(--tx);
  font-size: .8125rem;
  line-height: 1.4;
  text-decoration: none;
}
.cd-footer__link:hover { color: var(--lk); text-decoration: underline; }

.cd-footer__col--brand { gap: .625rem; }
.cd-footer__col--brand .cd-logo__text { font-size: 1.125rem; }

.cd-footer__desc {
  margin: 0;
  max-width: 20rem;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--mu);
}

.cd-footer__lang-link {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--lk);
  text-decoration: none;
}
.cd-footer__lang-link:hover { text-decoration: underline; }

.cd-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ln);
  font-size: .8125rem;
  color: var(--mu);
}
.cd-footer__copy,
.cd-footer__data { min-width: 0; }

/* ==========================================================================
   12. АДАПТИВ
   ========================================================================== */

/* --- Телефон < 640px --- */
@media (max-width: 639px) {
  .cd-container { padding-inline: 1rem; }

  .cd-header__inner { gap: .5rem; }
  .cd-logo { gap: .5rem; }
  .cd-logo__icon { width: 1.75rem; height: 1.75rem; }
  .cd-logo__text { font-size: 1.0625rem; }

  /* Ж-18: подпись «Меню» на телефоне — компактнее, чтобы шапка не вылезала */
  .cd-burger { gap: .25rem; padding: 0 .5rem; }
  .cd-burger__label { font-size: .75rem; }

  .cd-header__actions { gap: .375rem; }
  .cd-lang__item {
    min-width: 2.25rem;
    min-height: var(--tap);
    padding: 0 .5rem;
  }

  .cd-view-panel {
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
  }

  .cd-search__form {
    right: -.25rem;
    min-width: 0;
    width: calc(100vw - 2rem);
  }

  .cd-ticker__updated { display: none; }
  .cd-ticker__list > a,
  .cd-ticker__item,
  .cd-ticker__chip { min-width: 7.5rem; }

  .cd-layout { padding-block: 1rem 2rem; }

  .cd-feed-item__media { width: 6.5rem; }
  .cd-feed-item__title { font-size: .9375rem; }

  .cd-cards { grid-template-columns: minmax(0, 1fr); }

  .cd-footer__bottom {
    flex-direction: column;
    gap: .5rem;
  }
}

/* --- Планшет / мобильный: до 1023px --- */
@media (max-width: 1023px) {
  /* Одна колонка: сайдбар под лентой */
  .cd-layout { grid-template-columns: minmax(0, 1fr); }

  /* Бургер видим, десктопное меню скрыто */
  .cd-burger { display: inline-flex; }
  .cd-nav--primary { display: none; }

  /* В шапке только: бургер · логотип · RU/UA · поиск */
  .cd-view-toggle,
  .cd-theme-toggle { display: none; }

  /* Панель вкладок — без внутренней прокрутки */
  .cd-tabs__panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

/* --- Десктоп ≥ 640px --- */
@media (min-width: 640px) {
  .cd-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Десктоп ≥ 1024px --- */
@media (min-width: 1024px) {
  .cd-header__inner { gap: 1rem; }

  /* Бургер скрыт, меню — в одну строку между логотипом и кнопками */
  .cd-burger { display: none; }
  .cd-nav--primary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
  }
  .cd-nav--primary .cd-nav__list {
    justify-content: center;
    max-width: 100%;
  }

  /* Drawer на десктопе не используется */
  .cd-drawer { display: none; }
  .cd-backdrop { display: none; }

  .cd-logo__icon { width: 2.25rem; height: 2.25rem; }
  .cd-logo__text { font-size: 1.3125rem; }

  .cd-lang__item { min-height: var(--tap); }

  .cd-footer__cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Тело статьи в колонке 45rem — крупнее */
  .cd-main { font-size: 1.125rem; }
}

/* ==========================================================================
   13. PRINT
   ========================================================================== */

@media print {
  @page { margin: 1.5cm; }

  html,
  html[data-fs] { font-size: 100%; }

  body {
    background: #FFFFFF;
    color: #000000;
    font-size: 12pt;
  }

  .cd-skip,
  .cd-header,
  .cd-ticker,
  .cd-drawer,
  .cd-backdrop,
  .cd-side,
  .cd-footer,
  .cd-view-panel,
  .cd-search__form,
  .cd-burger,
  .cd-view-toggle,
  .cd-theme-toggle,
  .cd-lang,
  .cd-search,
  .cd-tabs { display: none !important; }

  .cd-container,
  .cd-container.cd-layout {
    display: block !important;
    max-width: none;
    padding: 0;
  }

  .cd-layout {
    display: block !important;
    padding: 0;
  }

  a { color: #000000; text-decoration: underline; }

  .cd-card,
  .cd-feed-item { break-inside: avoid; page-break-inside: avoid; }

  .cd-card__img,
  .cd-feed-item__img {
    max-width: 100%;
    filter: grayscale(100%);
  }

  .cd-pagehead__title { font-size: 20pt; }
  .cd-feed-item__title,
  .cd-card__title { font-size: 12pt; }
}

/* Бургер-меню: крестик стоит там же, где кнопка меню (слева), — второе нажатие в ту же точку закрывает */
.cd-drawer__head { display: flex; align-items: center; gap: 0.5rem; padding: 0 0.5rem 0 0.25rem; height: 3.25rem; border-bottom: 1px solid var(--ln); }
.cd-drawer__head .cd-drawer__close { order: 0; margin: 0; width: 2.75rem; height: 2.75rem; }
.cd-drawer__head > :not(.cd-drawer__close) { order: 1; }

/* В-19: значки «Мои монеты» / «Непрочитанное» в шапке — только на широком экране (на телефоне они в подвале) */
.cd-hdr-icon { display: none; }
.cd-hdr-icon:hover, .cd-hdr-icon:focus-visible { color: var(--lk); text-decoration: none; }
@media (min-width: 1024px) {
  .cd-hdr-icon { display: inline-flex; }
  .cd-footer__cols { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Узкий телефон (390 px и уже): шапка вылезала на 17 px, «UA» обрезалось, страница
   ездила вбок (сквозная проверка 26.09.2026). Ужимаем логотип, зазоры и переключатель языка;
   уже 390 px — прячем картинку логотипа, надпись остаётся. */
@media (max-width: 419px) {
  .cd-header__inner { gap: .375rem; }
  .cd-header__actions { gap: .25rem; }
  .cd-burger { padding: 0 .375rem; }
  .cd-logo { gap: .375rem; }
  .cd-logo__text { font-size: .9375rem; }
  .cd-lang { padding: .125rem; }
  .cd-lang__item { min-width: 2rem; padding: 0 .375rem; }
}
@media (max-width: 389px) {
  .cd-logo__icon { display: none; }
}

/* Проверка на телефонах 26.09.2026 (по скриншотам владельца).
   1) Шторка меню: кнопка-стрелка подменю «Обзоры»/«Инструменты» переносилась отдельной строкой со стрелкой слева —
      ставим ссылку и стрелку в одну строку. */
.cd-nav--drawer .cd-nav__list > li:has(> .cd-nav__toggle) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.cd-nav--drawer .cd-nav__list > li > .cd-nav__toggle {
  width: var(--tap);
  justify-content: center;
  padding: 0;
}
.cd-nav--drawer .cd-nav__list > li:has(> .cd-nav__toggle) > .sub-menu,
.cd-nav--drawer .cd-nav__list > li:has(> .cd-nav__toggle) > .cd-nav__sub { grid-column: 1 / -1; }
/* 2) Выпадающий поиск в шапке на телефоне уезжал за левый край («к по сайту» вместо «Поиск по сайту»). */
@media (max-width: 639px) {
  .cd-search__form {
    position: fixed;
    top: calc(var(--header-h) + .5rem);
    left: 1rem;
    right: 1rem;
    width: auto;
    min-width: 0;
  }
}
/* 3) Экраны уже 360 px (Galaxy Fold снаружи — 344, старые Android — 320): шапка не помещалась — у кнопки меню
      остаётся только значок (подпись «Меню» есть у кнопки для экранных чтецов через aria-label). */
@media (max-width: 359px) {
  .cd-burger__label { display: none; }
  .cd-burger { width: var(--tap); padding: 0; }
}

/* ==========================================================================
   14. ПРАВКИ 27.09.2026 (второй список владельца)
   ========================================================================== */

/* 1. Переключатель RU/UA: внешняя высота ровно var(--tap) (44px) на всех ширинах.
      Пункты заполняют высоту (height:100%; min-height:0 перебивает все
      min-height:var(--tap) из медиазапросов выше), тап-зона остаётся ≥ 44px
      за счёт ::after с inset: -4px 0. Ширину и полосу шапки не меняем. */
.cd-header .cd-lang {
  height: var(--tap);
  box-sizing: border-box;
}
.cd-header .cd-lang .cd-lang__item {
  height: 100%;
  min-height: 0;
  position: relative;
}
.cd-header .cd-lang .cd-lang__item::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}

/* 2. Подгонка верхнего меню: классы ставит initNavFit() в theme.js.
      Уровень 1 — cd-nav-tight (плотнее пункты), уровень 2 — cd-nav-compact
      (верхнее меню скрыто, бургер показан, меню открывается шторкой). */
html.cd-nav-tight .cd-nav--primary .cd-nav__list > li > a,
html.cd-nav-tight .cd-nav--primary .cd-nav__list > li > .cd-nav__toggle {
  padding-inline: .1875rem;
}
/* 27.09: на 1280 меню RU с «Топ-100 криптовалют» в плотном режиме было шире навигации на 15 px —
   добираем место зазорами шапки (логотип · меню · кнопки) */
@media (min-width: 1024px) {
  html.cd-nav-tight .cd-header__inner { gap: .5rem; }
}
html.cd-nav-compact .cd-nav--primary { display: none; }
html.cd-nav-compact .cd-burger { display: inline-flex; }
/* В медиазапросе ≥1024 стоят .cd-drawer { display:none } — перебиваем при compact */
html.cd-nav-compact .cd-drawer.is-open { display: flex; }

/* 3а. Подложка шторки меню (элемент создаёт initDrawer).
      Затемнение даёт box-shadow шторки, подложка прозрачная и ловит тап «мимо». */
.cd-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;           /* шторка — 100 */
  background: transparent;
}
.cd-drawer-backdrop[hidden] { display: none; }

/* 3б. Шторка: сворачивание/разворачивание подменю (класс is-collapsed на <li>). */
.cd-nav--drawer li.is-collapsed > .cd-nav__sub,
.cd-nav--drawer li.is-collapsed > .sub-menu { display: none; }

.cd-nav--drawer .cd-nav__list > li.is-collapsed > a .cd-nav__arrow,
.cd-nav--drawer .cd-nav__list > li.is-collapsed > .cd-nav__toggle .cd-nav__arrow,
.cd-nav--drawer .cd-nav__list > li.is-collapsed > .cd-nav__toggle.cd-nav__arrow {
  transform: none;
}
.cd-nav--drawer .cd-nav__list > li:not(.is-collapsed) > a .cd-nav__arrow,
.cd-nav--drawer .cd-nav__list > li:not(.is-collapsed) > .cd-nav__toggle .cd-nav__arrow,
.cd-nav--drawer .cd-nav__list > li:not(.is-collapsed) > .cd-nav__toggle.cd-nav__arrow {
  transform: rotate(180deg);
}


/* 27.09.2026: знак логотипа — встроенный SVG (пара № 3 «Газета с ₿»). «Чернила» — цвет текста шапки, синий — акцент темы,
   лист газеты — белый в светлой теме и цвета поверхности в тёмной. */
.cd-logo { --cd-mark-ac: var(--ac); --cd-mark-paper: #FFFFFF; }
[data-theme="dark"] .cd-logo { --cd-mark-paper: var(--sf); }
svg.cd-logo__icon { color: var(--tx); overflow: visible; }
