/* =====================================================================
   TellMi — платформа статей. Единый файл стилей (светлая тема).
   Разделы:
   1. Дизайн-токены      5. Шапка, навигация, подвал   9. Страницы
   2. Сброс и база       6. Карточки публикаций       10. Состояния (скелетоны, пусто)
   3. Типографика        7. Боковая колонка           11. Адаптив
   4. Кнопки, формы      8. Статья (prose, TOC)
   ===================================================================== */

/* Выпадающее меню «Поделиться», общее для всех кнопок статьи. */
.share-menu { position: fixed; inset: auto; z-index: 120; width: min(300px, calc(100vw - 24px)); margin: 0; padding: 8px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); font: 14px/1.45 var(--font-body); }
.share-menu[hidden], .share-menu [hidden] { display: none !important; }
.share-menu__title { display: block; padding: 8px 12px; font-family: var(--font-head); font-size: 13px; }
.share-menu__links { display: grid; gap: 2px; }
.share-menu__links button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: var(--r-xs); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.share-menu__links button:hover { background: var(--surface-2); }
.share-menu__links button:focus-visible, .share-menu input:focus-visible, .share-menu__continue:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share-menu__links button:disabled { opacity: .55; cursor: wait; }
.share-menu__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; height: 28px; background: var(--surface-2); border-radius: var(--r-xs); color: var(--text-2); font-size: 11px; font-weight: 700; }
.share-menu__reader { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 14px 12px 8px; border-top: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.share-menu__reader input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.share-menu__message { margin: 6px 12px; color: var(--text-2); }
.share-menu__result { display: grid; gap: 6px; padding: 6px 12px; }
.share-menu__result input { width: 100%; min-width: 0; font-size: 12px; }
.share-menu__continue { display: block; padding: 10px 12px; color: var(--accent); }

/* ---------- 1. Дизайн-токены ---------- */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --surface-3: #e9ecf4;
  --border: #e4e7ef;
  --border-strong: #cfd4e2;

  --text: #151b2b;
  --text-2: #3f4759;
  --muted: #767f97;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eceefe;
  --accent-ring: rgba(79, 70, 229, .22);
  --on-text: #ffffff;           /* текст на фоне var(--text) */
  --header-bg: rgba(255, 255, 255, .92);
  --badge-bg: rgba(255, 255, 255, .92);
  --promo-end: #ffffff;
  --soft-hover: #dfe2fd;
  --mark: #fff2a8;
  --pros-text: #14532d;
  --cons-text: #7c2d12;
  --editor-bar-bg: rgba(255, 255, 255, .95);
  --cover-grad: linear-gradient(110deg, #e9ebfd 0%, #f4f0ff 45%, #e3f3ef 100%);
  --auth-grad: linear-gradient(160deg, #eceefe 0%, #f6f4ff 50%, #e7f5f0 100%);

  --success: #15803d;
  --success-soft: #e6f6ec;
  --danger: #c2410c;
  --danger-soft: #fdece4;
  --warn: #a16207;
  --warn-soft: #fdf4df;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(21, 27, 43, .05);
  --shadow: 0 10px 30px -14px rgba(21, 27, 43, .18);
  --shadow-lg: 0 30px 60px -24px rgba(21, 27, 43, .22);

  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Montserrat", var(--font-body);

  --container: 1280px;
  --gutter: 24px;
  --header-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: .35s var(--ease);
}

/* ---------- 2. Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--accent-hover); }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i--xs { width: 14px; height: 14px; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 24px; height: 24px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 920px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 3. Типографика ---------- */
.h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.h2 { font-size: clamp(22px, 2.2vw, 28px); }
.h3 { font-size: 20px; }
.h4 { font-size: 17px; }
.lead { font-size: 18px; color: var(--text-2); line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 4. Кнопки, поля, чипы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  transition: background var(--t), color var(--t), border-color var(--t), transform .15s var(--ease), box-shadow var(--t);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .6); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--soft { background: var(--accent-soft); color: var(--accent-hover); }
.btn--soft:hover { background: var(--soft-hover); }
.btn--ghost { background: transparent; border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); border-color: var(--border-strong); }
.btn--white { background: var(--surface); border-color: var(--border); }
.btn--white:hover { border-color: var(--border-strong); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn--xs { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn__tail { display: inline-flex; width: 26px; height: 26px; margin-right: -8px; border-radius: 50%; background: rgba(255, 255, 255, .18); align-items: center; justify-content: center; transition: transform var(--t); }
.btn:hover .btn__tail { transform: translate(2px, -1px); }
.btn--ghost .btn__tail, .btn--white .btn__tail, .btn--soft .btn__tail { background: rgba(21, 27, 43, .06); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--text-2);
  border: 1px solid transparent; transition: background var(--t), color var(--t), border-color var(--t);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn--border { border-color: var(--border); background: var(--surface); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--on-text); }
.chip--soft { background: var(--surface-2); border-color: transparent; }
.chip__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-active .chip__count { color: rgba(255, 255, 255, .7); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips--scroll::-webkit-scrollbar { display: none; }

.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.tag:hover { background: var(--accent-soft); color: var(--accent-hover); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill--accent { background: var(--accent-soft); color: var(--accent-hover); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--neutral { background: var(--surface-2); color: var(--text-2); }

.field { display: grid; gap: 6px; align-content: start; }
.field__label { font-size: 14px; font-weight: 600; color: var(--text); }
.field__label small { font-weight: 400; color: var(--muted); }
.field__hint { font-size: 13px; color: var(--muted); }
.field__error { display: none; font-size: 13px; color: var(--danger); }
.field.has-error .field__error { display: block; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.input, .textarea, .select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23767f97' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select--sm { height: 36px; font-size: 14px; }
.input-wrap { position: relative; }
.input-wrap .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 42px; }
.input-wrap__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
.input-wrap__btn .i { position: static; transform: none; pointer-events: auto; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); }

/* ---------- 5. Шапка, навигация, подвал ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(21, 27, 43, .3); }
.header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.header__burger { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -.03em; }
.logo__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.logo b { color: var(--accent); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.nav__link:hover, .nav__item.is-open > .nav__link { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { color: var(--text); font-weight: 600; }
.nav__link .i--xs { transition: transform var(--t); }
.nav__item.is-open > .nav__link .i--xs { transform: rotate(180deg); }

.mega {
  position: absolute; left: 0; top: calc(100% + 10px); width: 820px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 24px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), visibility 0s linear .35s;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega__group a { display: block; font-size: 14px; color: var(--text-2); padding: 4px 0; }
.mega__group a:hover { color: var(--accent-hover); }
.mega__title { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.mega__title small { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 12px; }
.mega__footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }

.search { position: relative; flex: 1; max-width: 360px; margin-left: auto; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__input { width: 100%; height: 42px; padding: 0 56px 0 42px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); transition: background var(--t), border-color var(--t), box-shadow var(--t); }
.search__input:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); font-family: var(--font-body); font-size: 12px; color: var(--muted); display: inline-grid; place-items: center; }
.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 769px) { .search + .header__actions { margin-left: 0; } }
.header__search-btn { display: none; }

.subbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.subbar__inner { display: flex; align-items: center; gap: 12px; height: 54px; }
.subbar__label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* выдвижное меню (мобильное) */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.is-open { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(21, 27, 43, .45); backdrop-filter: blur(4px); }
.drawer__panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: var(--surface); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; animation: drawerIn .4s var(--ease); }
@keyframes drawerIn { from { transform: translateX(-30px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__nav a { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px; border-radius: var(--r-sm); font-weight: 500; font-size: 16px; }
.drawer__nav a:hover { background: var(--surface-2); }
.drawer__group { border-top: 1px solid var(--border); padding-top: 14px; }
.drawer__group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 10px; font-weight: 600; cursor: pointer; border-radius: var(--r-sm); }
.drawer__group summary::-webkit-details-marker { display: none; }
.drawer__group[open] summary .i { transform: rotate(180deg); }
.drawer__group ul { padding: 4px 10px 8px 22px; display: grid; gap: 6px; }
.drawer__group ul a { font-size: 14px; color: var(--text-2); }
.drawer__auth { display: grid; gap: 8px; margin-top: auto; }

.footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--border); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer__grid--no-categories { grid-template-columns: 1.6fr 1fr 1fr; }
.footer__grid > * { min-width: 0; overflow-wrap: anywhere; }

.feedback-form { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 32px; }
.feedback-form > p { margin: 10px 0 24px; }
.feedback-form form { display: grid; gap: 20px; }
.feedback-form .field { margin: 0; min-width: 0; }
.feedback-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feedback-form__captcha { max-width: 360px; }
.feedback-form__captcha .input { max-width: 120px; }
.feedback-form__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.feedback-form__consent input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }
.feedback-form__consent a, .feedback-message a { color: var(--accent); }
.feedback-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-form .alert { margin: 16px 0; }
.feedback-form .alert ul { padding-left: 18px; }
.feedback-message { display: grid; gap: 14px; overflow-wrap: anywhere; }
.feedback-message__text { white-space: pre-wrap; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.feedback-message > .btn { justify-self: start; }
@media (max-width: 768px) { .feedback-form__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .page--notifications .header__actions > .btn--primary { width: 36px; padding: 0; font-size: 0; gap: 0; } }
.footer__brand p { margin-top: 14px; font-size: 14px; color: var(--text-2); max-width: 36ch; }
.footer__social { display: flex; gap: 8px; margin-top: 18px; }
.footer h4 { font-size: 14px; margin-bottom: 14px; letter-spacing: .02em; }
.footer__col a { display: block; font-size: 14px; color: var(--text-2); padding: 4px 0; }
.footer__col a:hover { color: var(--accent-hover); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.footer__bottom a:hover { color: var(--text); }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.age { display: inline-grid; place-items: center; width: 30px; height: 22px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 11px; font-weight: 700; }

/* ---------- 6. Карточки публикаций ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card--pad { padding: 22px; }
.card--hover { transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.avatar { position: relative; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; font-family: var(--font-head); font-weight: 700; font-size: 13px; color: #fff; background: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 26px; height: 26px; font-size: 10px; }
.avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.avatar--xl { width: 96px; height: 96px; font-size: 32px; border: 4px solid var(--surface); box-shadow: var(--shadow); overflow: visible; }
.av-1 { background: linear-gradient(135deg, #5b54f0, #8b85ff); }
.av-2 { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.av-3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.av-4 { background: linear-gradient(135deg, #be185d, #f472b6); }
.av-5 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.av-6 { background: linear-gradient(135deg, #3f3f46, #71717a); }
.avatar__status { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }

.post { display: grid; position: relative; }
.post__cover { position: relative; display: block; overflow: hidden; background: var(--surface-2); border-radius: var(--r); }
.post__cover img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover .post__cover img { transform: scale(1.03); }
.post__badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--badge-bg); backdrop-filter: blur(6px); font-size: 12px; font-weight: 600; color: var(--text); }
.post__cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-hover); }
.post__cat:hover { text-decoration: underline; }
.post__top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.post__top .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.post__title { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.post__title a { display: block; }
.post__title a:hover { color: var(--accent-hover); }
.post__excerpt { color: var(--text-2); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post__author { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.post__author b { font-weight: 600; }
.post__author span { color: var(--muted); }
.post__actions { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.post__actions .spacer { flex: 1; }

.act { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: background var(--t), color var(--t); font-variant-numeric: tabular-nums; }
.act:hover { background: var(--surface-2); color: var(--text); }
.act.is-active { background: var(--accent-soft); color: var(--accent-hover); }
.act--up { border: 1px solid var(--border); padding: 0 12px 0 8px; font-weight: 600; }
.act--up.is-active { border-color: transparent; }
.act--icon { width: 32px; padding: 0; justify-content: center; }
.act .i { width: 17px; height: 17px; }

/* ряд: обложка слева */
.post--row { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding: 18px; }
.post--row .post__body { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.post--row .post__cover img { aspect-ratio: 4 / 3; }

/* сетка: обложка сверху */
.post--grid { gap: 0; overflow: hidden; }
.post--grid .post__cover { border-radius: 0; }
.post--grid .post__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 18px; flex: 1; }
.post--grid .post__title { font-size: 18px; }

/* главная карточка ленты */
.post--lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
.post--lead .post__cover { border-radius: 0; min-height: 100%; }
.post--lead .post__cover img { aspect-ratio: auto; height: 100%; min-height: 320px; }
.post--lead .post__body { display: flex; flex-direction: column; gap: 14px; padding: 28px 30px; }
.post--lead .post__title { font-size: 28px; letter-spacing: -.02em; }
.post--lead .post__excerpt { -webkit-line-clamp: 4; font-size: 16px; }

/* компактная (боковая, нумерованная) */
.post--mini { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.post--mini:first-child { border-top: 0; padding-top: 0; }
.post--mini .post__num { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--border-strong); line-height: 1.1; }
.post--mini .post__title { font-size: 15px; font-family: var(--font-body); font-weight: 600; }
.post--mini .post__top { margin-top: 4px; font-size: 12px; }

/* с миниатюрой справа (поиск, похожие) */
.post--thumb { grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.post--thumb:first-child { border-top: 0; }
.post--thumb .post__cover img { aspect-ratio: 4 / 3; }
.post--thumb .post__title { font-size: 17px; }
.post--thumb .post__body { display: grid; gap: 8px; }

.post.is-pinned .post__top { padding-right: 110px; }
.post.is-pinned::before { content: "Закреплено"; position: absolute; top: 12px; right: 14px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hover); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; }
/* у главной карточки метка лежит на обложке слева, чтобы не тесниться с метаданными */
.post--lead.is-pinned .post__top { padding-right: 0; }
.post--lead.is-pinned::before { right: auto; left: 14px; }

.feed { display: grid; gap: 18px; }
/* переключение «список» для сеточных карточек (страница рубрики) */
.grid[data-view="list"] { grid-template-columns: minmax(0, 1fr); }
.feed[data-view="list"] .post--grid, .grid[data-view="list"] .post--grid { grid-template-columns: 260px minmax(0, 1fr); }
.feed[data-view="list"] .post--grid .post__cover, .grid[data-view="list"] .post--grid .post__cover { border-radius: var(--r); margin: 18px 0 18px 18px; align-self: start; }
.feed[data-view="list"] .post--grid .post__cover img, .grid[data-view="list"] .post--grid .post__cover img { aspect-ratio: 4 / 3; }
.feed[data-view="list"] .post--grid .post__excerpt, .grid[data-view="list"] .post--grid .post__excerpt { display: -webkit-box; }
.grid--2[data-view="grid"] .post--grid .post__excerpt { -webkit-line-clamp: 2; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------- 7. Макет с боковой колонкой ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.layout--wide-side { grid-template-columns: minmax(0, 1fr) 360px; }
.sidebar { display: grid; gap: 20px; }
.sidebar--sticky { position: sticky; top: calc(var(--header-h) + 20px); }
.side { padding: 20px 22px; }
.side__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side__head h3 { font-size: 16px; }
.side__head a { font-size: 13px; color: var(--muted); }
.side__head a:hover { color: var(--accent-hover); }
.cat-list { display: grid; }
.cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14.5px; font-weight: 500; border-top: 1px solid var(--border); }
.cat-list a:first-child { border-top: 0; padding-top: 0; }
.cat-list a:hover { color: var(--accent-hover); }
.cat-list span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.people { display: grid; gap: 12px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.person b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.person span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo { background: linear-gradient(160deg, var(--accent-soft), var(--promo-end) 70%); border-color: var(--soft-hover); }
.promo p { font-size: 14px; color: var(--text-2); margin: 8px 0 16px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head a { font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.section-head a:hover { color: var(--accent-hover); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; font-weight: 500; font-size: 15px; color: var(--muted); transition: color var(--t); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); font-weight: 600; }
.tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab__count { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 7px; }
.tab-panel[hidden] { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.toolbar__group { display: flex; align-items: center; gap: 8px; }
.toolbar__label { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.seg button, .seg a { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background var(--t), color var(--t), box-shadow var(--t); display: inline-flex; align-items: center; gap: 6px; }
.seg button.is-active, .seg a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.seg button .i { width: 16px; height: 16px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .i { width: 14px; height: 14px; color: var(--border-strong); }
.breadcrumbs span[aria-current] { color: var(--text-2); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; transition: background var(--t), color var(--t); }
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination .is-current { background: var(--text); color: var(--on-text); }
.pagination .gap { color: var(--muted); }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.load-more small { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); }
.stats > div { padding: 18px 22px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.stats > div:nth-child(-n + 2) { border-top: 0; }
.stats > div:nth-child(odd) { border-left: 0; }
.stats b { display: block; font-family: var(--font-head); font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- 8. Статья ---------- */
.article-wrap { display: grid; grid-template-columns: 56px minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.rail { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 6px; justify-items: center; }
.rail__vote { display: grid; justify-items: center; gap: 2px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.rail__vote b { font-size: 14px; font-variant-numeric: tabular-nums; }
.rail__vote .icon-btn { width: 36px; height: 36px; }
.rail__vote .icon-btn.is-active { background: var(--accent-soft); color: var(--accent-hover); }
.rail .icon-btn--border { width: 44px; height: 44px; }
.rail .icon-btn--border.is-active { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; }
.rail__count { font-size: 11px; color: var(--muted); margin-top: -4px; }

.article { max-width: 760px; }
.article__head { display: grid; gap: 18px; margin-bottom: 26px; }
.article__title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.14; letter-spacing: -.025em; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; color: var(--muted); }
.article__meta .post__author { font-size: 14px; }
.article__meta .btn { margin-left: 4px; }
.article__cover { border-radius: var(--r-lg); overflow: hidden; margin: 0 0 30px; background: var(--surface-2); }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article__cover figcaption { padding: 10px 2px 0; font-size: 13px; color: var(--muted); background: var(--bg); }
.article__footer { display: grid; gap: 22px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.article__nav a { display: grid; gap: 6px; padding: 16px 18px; }
.article__nav a span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.article__nav a b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.article__nav a:last-child { text-align: right; }

.prose { font-size: 18px; line-height: 1.72; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 20px); letter-spacing: -.02em; }
.prose h3 { font-size: 21px; margin-top: 1.6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose p { color: var(--text-2); }
.prose p strong { color: var(--text); }
.prose a { color: var(--accent-hover); text-decoration: underline; text-decoration-color: var(--accent-ring); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--text-2); display: grid; gap: .45em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--accent); font-weight: 600; }
.prose figure { margin: 1.8em 0; }
.prose figure img { border-radius: var(--r); width: 100%; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-size: 20px; font-family: var(--font-head); font-weight: 600; color: var(--text); line-height: 1.45; }
.prose blockquote cite { display: block; margin-top: 10px; font: 500 14px var(--font-body); color: var(--muted); font-style: normal; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); margin: 1.6em 0; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.toc { padding: 18px 20px; }
.toc__title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { display: grid; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 0 7px 12px; font-size: 14px; color: var(--text-2); border-left: 2px solid transparent; margin-left: -1px; line-height: 1.4; transition: color var(--t), border-color var(--t); }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; font-weight: 600; color: var(--border-strong); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--accent-hover); border-color: var(--accent); font-weight: 600; }
.toc--inline { display: none; margin: 1.5em 0; }
.toc--inline summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline ol { margin-top: 10px; }
.prose .toc ol { list-style: none; padding-left: 0; gap: 0; }
.prose .toc a { text-decoration: none; color: var(--text-2); }
.prose .toc a:hover { color: var(--text); }
.prose .toc a.is-active { color: var(--accent-hover); }

.product { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--border); margin-top: 1.6em !important; }
.product + .product { margin-top: 0 !important; }
.product__num { width: 44px; height: 44px; border-radius: 12px; background: var(--text); color: var(--on-text); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.product__name { font-family: var(--font-head); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.product__spec { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.product__spec b { color: var(--text); font-weight: 600; }
.product__price { margin-left: auto; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.product p { margin-top: 10px; font-size: 16px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pros-cons > div { padding: 12px 14px; border-radius: var(--r-sm); font-size: 15px; line-height: 1.5; }
.pros-cons b { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.pros-cons .pros { background: var(--success-soft); color: var(--pros-text); }
.pros-cons .pros b { color: var(--success); }
.pros-cons .cons { background: var(--danger-soft); color: var(--cons-text); }
.pros-cons .cons b { color: var(--danger); }

.callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-hover); font-size: 16px; margin: 1.8em 0; }
.callout .i { margin-top: 2px; }
.callout b { display: block; margin-bottom: 4px; }
.callout--warn { background: var(--warn-soft); color: var(--warn); }
.summary { padding: 24px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); margin: 2em 0; }
.summary h3 { margin: 0 0 12px; font-size: 18px; }
.summary ol { padding-left: 1.3em; font-size: 16px; gap: .5em; }

.author-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 22px; }
.author-card__name { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.author-card__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.author-card p { font-size: 14.5px; color: var(--text-2); margin-top: 10px; }
.author-card__stats { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.author-card__stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.author-card__actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.comments { margin-top: 48px; }
.comments__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.comment-form { display: grid; gap: 12px; padding: 18px; }
.comment-form__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-form--locked { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface-2); border-style: dashed; }
.comment-list { display: grid; gap: 4px; margin-top: 20px; }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.comment--reply { margin-left: 50px; border-top: 1px dashed var(--border); }
.comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.comment__head b { font-weight: 600; }
.comment__head time { color: var(--muted); font-size: 13px; }
.comment__body { margin-top: 6px; font-size: 15px; color: var(--text-2); line-height: 1.55; }
.comment__actions { display: flex; gap: 2px; margin-top: 8px; margin-left: -10px; }

/* ---------- 9. Страницы ---------- */
.page { padding: 28px 0 0; }
.page--tight { padding-top: 20px; }
.section { margin-top: 44px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 8px 0 28px; }
.hero__title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; max-width: 16ch; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__text { margin-top: 16px; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__panel { overflow: hidden; }
.hero__panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--success); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(21, 128, 61, .4); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .45); } 70% { box-shadow: 0 0 0 9px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }

.cat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tile { position: relative; display: grid; align-content: end; gap: 4px; min-height: 120px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); scroll-snap-align: start; overflow: hidden; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cat-tile b { font-family: var(--font-head); font-size: 16px; }
.cat-tile span { font-size: 12px; color: var(--muted); }
.cat-tile__icon { position: absolute; top: 14px; left: 16px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-hover); background: var(--accent-soft); }
.cat-tile:nth-child(3n) .cat-tile__icon { background: var(--success-soft); color: var(--success); }
.cat-tile:nth-child(3n+2) .cat-tile__icon { background: var(--warn-soft); color: var(--warn); }

/* рубрика */
.cat-head { display: grid; gap: 14px; padding: 8px 0 26px; }
.cat-head__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cat-head__title { display: flex; align-items: center; gap: 14px; }
.cat-head__title .cat-tile__icon { position: static; width: 48px; height: 48px; border-radius: 14px; }
.cat-head__title small { display: block; font: 500 13px var(--font-body); color: var(--muted); margin-top: 4px; }
.cat-head p { max-width: 70ch; color: var(--text-2); }
.seo-text { margin-top: 36px; padding: 24px 26px; }
.seo-text summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.seo-text summary::-webkit-details-marker { display: none; }
.seo-text[open] summary .i { transform: rotate(180deg); }
.seo-text .prose { font-size: 15px; margin-top: 14px; }

/* каталог рубрик */
.rubricator { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.rub-group { padding: 22px 0 26px; border-top: 1px solid var(--border); break-inside: avoid; }
.rub-group__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rub-group__head h3 { font-size: 18px; }
.rub-group__head small { color: var(--muted); font-size: 13px; }
.rub-group__head .cat-tile__icon { position: static; }
.rub-group ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.rub-group li a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 14px; color: var(--text-2); }
.rub-group li a:hover { color: var(--accent-hover); }
.rub-group li a span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rub-group li.more a { color: var(--accent-hover); font-weight: 500; }

/* профиль автора */
.profile { overflow: hidden; }
.profile__cover { height: 160px; background: var(--cover-grad); position: relative; }
.profile__cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(79, 70, 229, .14) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent); mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent); }
.profile__body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; padding: 0 28px 26px; align-items: end; }
.profile__avatar { margin-top: -48px; }
.profile__name { font-size: 26px; display: flex; align-items: center; gap: 8px; }
.profile__name .i { color: var(--accent); }
.profile__handle { font-size: 14px; color: var(--muted); margin-top: 2px; }
.profile__bio { margin-top: 10px; max-width: 64ch; color: var(--text-2); font-size: 15px; }
.profile__actions { display: flex; gap: 8px; padding-bottom: 4px; }
.profile__stats { display: flex; gap: 0; padding: 0 28px; border-top: 1px solid var(--border); }
.profile__stats div { padding: 16px 28px 16px 0; margin-right: 28px; border-right: 1px solid var(--border); }
.profile__stats div:last-child { border-right: 0; }
.profile__stats b { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.profile__stats span { font-size: 13px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 500; }
.badge i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); }

/* рейтинг авторов */
.board { display: grid; }
.board__row { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) 110px 110px 110px 140px; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--border); transition: background var(--t); }
.board__row:hover { background: var(--surface-2); }
.board__row--head { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.board__row--head:hover { background: transparent; }
.board__rank { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--muted); text-align: center; }
.board__row:nth-child(2) .board__rank, .board__row:nth-child(3) .board__rank, .board__row:nth-child(4) .board__rank { color: var(--accent); }
.board__name b { display: block; font-weight: 600; }
.board__name span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board__num { font-variant-numeric: tabular-nums; font-weight: 500; }
.board__num small { display: block; font-weight: 400; font-size: 12px; color: var(--success); }
.board__num small.down { color: var(--danger); }

/* поиск */
.search-head { padding: 10px 0 24px; display: grid; gap: 16px; }
.search-big { position: relative; max-width: 760px; }
.search-big .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big .input { height: 56px; padding-left: 52px; padding-right: 120px; border-radius: 999px; font-size: 17px; }
.search-big .btn { position: absolute; right: 6px; top: 6px; }
.search-meta { font-size: 14px; color: var(--muted); }
.facets { display: grid; gap: 4px; }
.facet { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; cursor: pointer; }
.facet input { accent-color: var(--accent); width: 16px; height: 16px; }
.facet span { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* редактор */
.editor-bar { position: sticky; top: var(--header-h); z-index: 40; background: var(--editor-bar-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.editor-bar__inner { display: flex; align-items: center; gap: 12px; height: 56px; }
.editor-bar__status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.editor-bar__status .i { color: var(--success); }
.editor-bar__actions { display: flex; gap: 8px; margin-left: auto; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding: 28px 0 0; }
.editor__sheet { padding: 40px 56px 60px; min-height: 70vh; }
.editor__title { width: 100%; border: 0; background: transparent; font-family: var(--font-head); font-weight: 800; font-size: 36px; letter-spacing: -.025em; line-height: 1.15; resize: none; }
.editor__title:focus { outline: 0; }
.editor__title::placeholder { color: var(--border-strong); }
.editor__lead { width: 100%; border: 0; background: transparent; font-size: 19px; color: var(--text-2); line-height: 1.5; margin-top: 14px; resize: none; }
.editor__lead:focus { outline: 0; }
.editor__lead::placeholder { color: var(--muted); }
.editor__toolbar { display: flex; flex-wrap: wrap; gap: 2px; margin: 26px 0 18px; padding: 6px; border-radius: 12px; background: var(--surface-2); position: sticky; top: calc(var(--header-h) + 56px + 10px); z-index: 30; box-shadow: 0 0 0 6px var(--surface); }
.editor__toolbar .icon-btn { width: 36px; height: 36px; border-radius: 8px; }
.editor__toolbar .sep { width: 1px; height: 22px; background: var(--border-strong); margin: 7px 6px; }
.editor__toolbar .icon-btn.is-active { background: var(--surface); color: var(--accent-hover); box-shadow: var(--shadow-xs); }
.editor__body { font-size: 17px; line-height: 1.7; }
.editor__body [contenteditable]:focus { outline: 0; }
.block { position: relative; padding: 4px 0 4px 0; border-radius: 8px; transition: background var(--t); }
.block:hover { background: var(--surface-2); }
.block::before { content: "⋮⋮"; position: absolute; left: -28px; top: 10px; font-size: 12px; letter-spacing: -2px; color: var(--border-strong); opacity: 0; transition: opacity var(--t); }
.block:hover::before { opacity: 1; }
.block + .block { margin-top: 10px; }
.block h2 { font-size: 24px; }
.block p { color: var(--text-2); }
.block ul { list-style: disc; padding-left: 1.4em; color: var(--text-2); display: grid; gap: .3em; }
.block figure { margin: 0; }
.block figure img { border-radius: var(--r); }
.block figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.block--add { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 10px 0; }
.block--add .icon-btn { width: 28px; height: 28px; border: 1px dashed var(--border-strong); }
.editor__side { display: grid; gap: 16px; align-content: start; position: sticky; top: calc(var(--header-h) + 56px + 20px); max-height: calc(100vh - var(--header-h) - 56px - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 24px 2px; margin-right: -6px; scrollbar-width: thin; }
.editor__side .side { display: grid; gap: 14px; }
.dropzone { display: grid; place-items: center; gap: 8px; text-align: center; padding: 26px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-size: 13px; transition: border-color var(--t), background var(--t); cursor: pointer; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.dropzone b { font-size: 14px; color: var(--text); }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.tag-input .tag { height: 26px; gap: 6px; }
.tag-input input { flex: 1; min-width: 80px; border: 0; background: transparent; }
.tag-input input:focus { outline: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background var(--t); flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--t); box-shadow: var(--shadow-xs); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.checklist { display: grid; gap: 8px; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.checklist li.is-done { color: var(--text-2); }
.checklist li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.checklist li.is-done i { background: var(--success); border-color: var(--success); color: #fff; }

/* вход / регистрация */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
.auth__aside { background: var(--auth-grad); padding: 64px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth__aside h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.025em; max-width: 18ch; line-height: 1.15; }
.auth__points { display: grid; gap: 14px; margin-top: 28px; }
.auth__points li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--text-2); }
.auth__points li i { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-xs); }
.auth__quote { font-size: 15px; color: var(--text-2); border-left: 2px solid var(--accent); padding-left: 16px; max-width: 46ch; }
.auth__quote b { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.auth__main { display: grid; place-items: center; padding: 48px 24px; }
.auth__form { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.auth__form h1 { font-size: 28px; letter-spacing: -.02em; }
.auth__social { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth__foot { font-size: 14px; color: var(--muted); text-align: center; }
.auth__foot a { color: var(--accent-hover); font-weight: 500; }

/* 404 */
.notfound { min-height: calc(100dvh - var(--header-h) - 120px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 0; }
.notfound__code { font-family: var(--font-head); font-size: clamp(100px, 16vw, 200px); font-weight: 800; letter-spacing: -.06em; line-height: .9; color: var(--surface-3); -webkit-text-stroke: 1px var(--border-strong); }

/* ---------- 10. Состояния ---------- */
.skeleton { pointer-events: none; }
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.6s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk--line { height: 14px; }
.sk--title { height: 22px; width: 80%; }
.sk--cover { aspect-ratio: 4 / 3; border-radius: var(--r); }
.sk--circle { width: 30px; height: 30px; border-radius: 50%; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.empty__art { width: 88px; height: 88px; border-radius: 28px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); margin-bottom: 8px; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 42ch; font-size: 15px; }
.empty .btn { margin-top: 8px; }

.alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--success { background: var(--success-soft); color: var(--success); }
.alert--info { background: var(--accent-soft); color: var(--accent-hover); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .live::before { animation: none; } }

.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 60; max-width: 420px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--text-2); }
.cookie.is-hidden { display: none; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity var(--t), transform var(--t), visibility 0s linear .35s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* ---------- 11. Адаптив ---------- */
@media (max-width: 1200px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr) 280px; }
  .rail { display: none; }
  .board__row { grid-template-columns: 36px auto minmax(0, 1fr) 90px 90px 120px; }
  .board__row > :nth-child(6) { display: none; }
}
@media (max-width: 1024px) {
  .nav { display: none; }
  .header__burger { display: inline-flex; }
  .search { max-width: 260px; }
  .layout, .layout--wide-side { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sidebar--sticky { position: static; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar > .side--full { grid-column: 1 / -1; }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .article { max-width: none; }
  .toc--side { display: none; }
  .toc--inline { display: block; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero__panel { max-width: 560px; }
  .rubricator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__side { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor__toolbar { top: calc(var(--header-h) + 56px); }
  .editor__sheet { padding: 32px 36px 48px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__aside { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --gutter: 16px; --header-h: 58px; }
  .search { display: none; }
  .header__search-btn { display: inline-flex; }
  .header__actions .btn--ghost { display: none; }
  .logo__text { display: none; }
  .page { padding-top: 20px; }
  .post--row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
  .post--row .post__cover img { aspect-ratio: 16 / 10; }
  .post--lead { grid-template-columns: minmax(0, 1fr); }
  .post--lead .post__cover img { min-height: 0; aspect-ratio: 16 / 10; height: auto; }
  .post--lead .post__body { padding: 20px; }
  .post--lead .post__title { font-size: 22px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .stats b { font-size: 24px; }
  .hero { padding: 4px 0 20px; }
  .profile__body { grid-template-columns: minmax(0, 1fr); padding: 0 18px 20px; }
  .profile__avatar { margin-top: -40px; }
  .profile__actions { padding: 0; }
  .profile__stats { padding: 0 18px; flex-wrap: wrap; }
  .profile__stats div { padding: 12px 16px 12px 0; margin-right: 16px; }
  .board__row { grid-template-columns: 32px auto minmax(0, 1fr) 100px; padding: 12px 14px; }
  .board__row > :nth-child(4), .board__row > :nth-child(5) { display: none; }
  .rubricator { grid-template-columns: minmax(0, 1fr); }
  .rub-group ul { grid-template-columns: 1fr; }
  .editor__side { grid-template-columns: minmax(0, 1fr); }
  .editor__sheet { padding: 24px 18px 40px; }
  .editor-bar__inner { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 8px; }
  .editor-bar__status { white-space: nowrap; }
  .editor-bar__actions { width: 100%; justify-content: flex-end; }
  .editor-bar__actions .btn--ghost { display: none; }
  .editor__title { font-size: 28px; }
  .article__nav { grid-template-columns: minmax(0, 1fr); }
  .article__nav a:last-child { text-align: left; }
  .pros-cons { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 17px; }
  .comment--reply { margin-left: 24px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 40px 0 28px; }
  .footer { margin-top: 48px; }
  .notfound { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .auth__main { padding: 32px 16px; }
  .auth__social { grid-template-columns: 1fr; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .to-top { bottom: 84px; }
  .post--thumb { grid-template-columns: minmax(0, 1fr) 96px; }
  .feed[data-view="list"] .post--grid, .grid[data-view="list"] .post--grid { grid-template-columns: minmax(0, 1fr); }
  .feed[data-view="list"] .post--grid .post__cover { margin: 0; border-radius: 0; }
  .feed[data-view="list"] .post--grid .post__cover img { aspect-ratio: 16 / 10; }
}

/* Уведомления действий (app.js) */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--text); color: var(--on-text); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 90; box-shadow: 0 10px 30px rgba(21, 27, 43, .25); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.comment-form--reply { margin: 10px 0 18px 48px; }
.icon-btn.is-active, .act.is-active { color: var(--accent); }
.rail__vote .icon-btn.is-active { background: var(--accent-soft); }

/* Редактор: единое contenteditable-тело и обложка */
.page--editor { padding-top: 20px; }
.editor__body[contenteditable] { outline: none; min-height: 240px; font-size: 17px; }
.editor__body[contenteditable]:empty::before, .editor__body[contenteditable] > p:only-child:empty::before { content: attr(data-placeholder); color: var(--muted); }
.editor__body[contenteditable] > * + * { margin-top: 14px; }
.editor__body[contenteditable] > p:hover, .editor__body[contenteditable] > h2:hover, .editor__body[contenteditable] > h3:hover, .editor__body[contenteditable] > ul:hover, .editor__body[contenteditable] > ol:hover, .editor__body[contenteditable] > blockquote:hover, .editor__body[contenteditable] > figure:hover, .editor__body[contenteditable] > .callout:hover, .editor__body[contenteditable] > .table-wrap:hover { box-shadow: -3px 0 0 var(--accent-soft); }
.editor__body figure.video iframe, .prose figure.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); }
.dropzone { position: relative; overflow: hidden; }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone img[data-cover-preview] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.dropzone.has-image > svg, .dropzone.has-image > b, .dropzone.has-image > span { opacity: 0; }
.dropzone.has-image { min-height: 150px; }
.pill--danger { background: var(--danger-soft); color: var(--danger); }

/* Аватары-картинки и обложка профиля */
.avatar--img { overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(21, 27, 43, .08); }
.avatar--img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar--xl.avatar--img { overflow: hidden; }
.profile__cover.has-image { background-size: cover; background-position: center; }
.profile__cover.has-image::after { background-image: none; background: linear-gradient(to top, rgba(21, 27, 43, .25), transparent 60%); }
.file-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.file-btn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-btn__name { font-size: 13px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-preview { width: 100%; aspect-ratio: 3 / 1; border-radius: var(--r); object-fit: cover; display: block; background: var(--surface-2); }

/* ===== Режим чтения: та же страница, класс reader на <html>, настройки в cookie/localStorage ===== */
.reader-bar { display: none; }
html.reader { --reader-font: 20px; scroll-padding-top: 64px; }
html.reader .site-header, html.reader .subbar, html.reader .drawer, html.reader .rail, html.reader .breadcrumbs,
html.reader .article-wrap > .sidebar, html.reader .page > .container > .section, html.reader .footer, html.reader .cookie, html.reader .to-top,
html.reader .toc--inline, html.reader [data-reader-toggle="on"] { display: none !important; }
html.reader .reader-bar { display: block; position: sticky; top: 0; z-index: 40; padding: 0 var(--gutter, 20px); background: var(--surface); border-bottom: 1px solid var(--border); }
html.reader .reader-bar__inner { display: flex; align-items: center; gap: 10px; min-height: 56px; max-width: 920px; margin: 0 auto; }
html.reader .reader-bar__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); transition: width .08s linear; }
html.reader .reader-bar__group { display: inline-flex; align-items: center; gap: 2px; }
html.reader .reader-bar .spacer { flex: 1; }
html.reader .reader-bar .icon-btn { width: 34px; height: 34px; font-weight: 700; font-size: 13px; font-family: var(--font-head); }
.article__meta .reader-btn { margin-left: auto; }
@media (max-width: 768px) { .article__meta .reader-btn { margin-left: 0; width: 100%; justify-content: center; } }
html.reader .page { padding-top: 0; }
html.reader .page > .container { padding-top: 32px; }
html.reader .article-wrap { grid-template-columns: minmax(0, 1fr); max-width: 920px; margin: 0 auto; gap: 0; }
html.reader .article { width: 100%; max-width: none; }
html.reader .article__head { margin-bottom: 28px; }
html.reader .article__title { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; }
html.reader .article__head .lead { font-size: calc(var(--reader-font) + 1px); line-height: 1.6; }
html.reader .prose { font-size: var(--reader-font); line-height: 1.75; }
html.reader .prose p, html.reader .prose ul, html.reader .prose ol, html.reader .prose blockquote, html.reader .prose .callout, html.reader .prose .table-wrap, html.reader .prose figure { margin-top: 1.1em; }
html.reader .prose h2 { font-size: calc(var(--reader-font) + 9px); margin-top: 1.7em; }
html.reader .prose h3 { font-size: calc(var(--reader-font) + 4px); margin-top: 1.4em; }
html.reader .prose img { width: 100%; height: auto; }
html.reader .article__cover img { max-height: 400px; object-fit: cover; }
html.reader .comments .comment__body { font-size: calc(var(--reader-font) - 3px); line-height: 1.6; }
html.reader[data-reader-theme="sepia"] { --bg: #f4ecdf; --surface: #faf4e8; --surface-2: #efe5d4; --border: #e2d6c0; --text: #2a241c; --text-2: #4a4136; --muted: #7d7262; --accent-soft: #ebe1f6; }
@media (max-width: 768px) { html.reader .reader-bar { padding: 0 12px; gap: 6px; } html.reader .reader-bar__label { display: none; } html.reader .reader-bar .logo__text { display: none; } }

/* ===== Тёмная тема сайта: data-theme="dark", либо "auto" при тёмной системной теме ===== */
html[data-theme="dark"] { color-scheme: dark; --bg: #121419; --surface: #1a1d24; --surface-2: #232732; --surface-3: #2b303c; --border: #2d323d; --border-strong: #3d4350;
    --text: #e7e9ef; --text-2: #c3c7d1; --muted: #8b91a0; --on-text: #151b2b;
    --accent: #8b84ff; --accent-hover: #a39dff; --accent-soft: #2a2b4a; --accent-ring: rgba(139, 132, 255, .3);
    --success: #4ade80; --success-soft: #16301f; --danger: #fb923c; --danger-soft: #3a2316; --warn: #facc15; --warn-soft: #3a2f10;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, .7);
    --promo-end: #1a1d24; --soft-hover: #343660; --mark: #5a4a0e; --pros-text: #bbf7d0; --cons-text: #fed7aa; --editor-bar-bg: rgba(26, 29, 36, .95);
    --header-bg: rgba(26, 29, 36, .92); --badge-bg: rgba(26, 29, 36, .9); --cover-grad: linear-gradient(110deg, #22263a 0%, #2a2440 45%, #1d2e2a 100%); --auth-grad: linear-gradient(160deg, #1f2236 0%, #24223a 50%, #1b2a26 100%); }
html[data-theme="dark"] img:not(.avatar--img img) { filter: brightness(.92); }
html[data-theme="dark"] .btn--primary, html[data-theme="dark"] .logo__mark, html[data-theme="dark"] .checklist li.is-done i { color: #fff; }
html[data-theme="dark"] .btn--white, html[data-theme="dark"] .icon-btn--border, html[data-theme="dark"] .input, html[data-theme="dark"] .textarea, html[data-theme="dark"] .select { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
html[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
html[data-theme="dark"] .switch input::after { background: #cfd4e2; }
html[data-theme="dark"] .drawer__backdrop { background: rgba(0, 0, 0, .6); }
html[data-theme="dark"] .site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .8); }
html[data-theme="dark"] .prose table th, html[data-theme="dark"] .reader-bar .seg button.is-active { background: var(--surface-2); }
html[data-theme="dark"] .theme-icon--moon { display: none; } html[data-theme="dark"] .theme-icon--sun { display: inline-block; }
@media (prefers-color-scheme: dark) {
html[data-theme="auto"] { color-scheme: dark; --bg: #121419; --surface: #1a1d24; --surface-2: #232732; --surface-3: #2b303c; --border: #2d323d; --border-strong: #3d4350;
    --text: #e7e9ef; --text-2: #c3c7d1; --muted: #8b91a0; --on-text: #151b2b;
    --accent: #8b84ff; --accent-hover: #a39dff; --accent-soft: #2a2b4a; --accent-ring: rgba(139, 132, 255, .3);
    --success: #4ade80; --success-soft: #16301f; --danger: #fb923c; --danger-soft: #3a2316; --warn: #facc15; --warn-soft: #3a2f10;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, .7);
    --promo-end: #1a1d24; --soft-hover: #343660; --mark: #5a4a0e; --pros-text: #bbf7d0; --cons-text: #fed7aa; --editor-bar-bg: rgba(26, 29, 36, .95);
    --header-bg: rgba(26, 29, 36, .92); --badge-bg: rgba(26, 29, 36, .9); --cover-grad: linear-gradient(110deg, #22263a 0%, #2a2440 45%, #1d2e2a 100%); --auth-grad: linear-gradient(160deg, #1f2236 0%, #24223a 50%, #1b2a26 100%); }
html[data-theme="auto"] img:not(.avatar--img img) { filter: brightness(.92); }
html[data-theme="auto"] .btn--primary, html[data-theme="auto"] .logo__mark, html[data-theme="auto"] .checklist li.is-done i { color: #fff; }
html[data-theme="auto"] .btn--white, html[data-theme="auto"] .icon-btn--border, html[data-theme="auto"] .input, html[data-theme="auto"] .textarea, html[data-theme="auto"] .select { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
html[data-theme="auto"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
html[data-theme="auto"] .switch input::after { background: #cfd4e2; }
html[data-theme="auto"] .drawer__backdrop { background: rgba(0, 0, 0, .6); }
html[data-theme="auto"] .site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .8); }
html[data-theme="auto"] .prose table th, html[data-theme="auto"] .reader-bar .seg button.is-active { background: var(--surface-2); }
html[data-theme="auto"] .theme-icon--moon { display: none; } html[data-theme="auto"] .theme-icon--sun { display: inline-block; }
}
/* Иконка переключателя: луна в светлой теме, солнце в тёмной */
.theme-icon--sun { display: none; } .theme-icon--moon { display: inline-block; }
/* Сепия в режиме чтения поверх любой темы */
html.reader[data-reader-theme="sepia"] { color-scheme: light; --on-text: #ffffff; --promo-end: #faf4e8; --mark: #f3e2a0; --pros-text: #14532d; --cons-text: #7c2d12; --accent: #4f46e5; --accent-hover: #4338ca; }

/* Полоса рубрик перед подвалом: карусель */
.rubrics { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--border); padding: 22px 0 24px; }
.rubrics__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rubrics__label { font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.rubrics__row { display: flex; align-items: center; gap: 10px; }
.rubrics__track { flex: 1; min-width: 0; scroll-behavior: smooth; scroll-snap-type: x proximity; padding: 4px 2px; }
.rubrics__track .chip { scroll-snap-align: start; }
.rubrics__btn { flex: none; display: none; }
.rubrics.has-overflow .rubrics__btn { display: inline-grid; }
.rubrics__btn:disabled { opacity: .35; cursor: default; }
.chip--section { font-weight: 600; background: var(--accent-soft); border-color: transparent; color: var(--accent-hover); gap: 6px; }
.chip--section.is-active { background: var(--text); color: var(--on-text); }
.chip--section .i { width: 14px; height: 14px; }
html.reader .rubrics { display: none !important; }
.rubrics + .footer { margin-top: 0; }
@media (max-width: 768px) { .rubrics { margin-top: 36px; padding: 18px 0; } .rubrics__btn { display: none !important; } }

/* Модальные окна (<dialog>) */
.modal { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 24px)); width: 100%; color: var(--text); }
.modal::backdrop { background: rgba(21, 27, 43, .5); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .25s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__box { display: grid; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal .field__error[data-report-error] { display: block; }
.modal .field__error[hidden] { display: none; }
.report-reasons { display: grid; gap: 6px; }
.report-reason { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: border-color var(--t), background var(--t); }
.report-reason:hover { border-color: var(--border-strong); }
.report-reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.report-reason input { margin-top: 3px; accent-color: var(--accent); }
.report-reason b { display: block; font-size: 14px; }
.report-reason small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Админка рубрик ---------- */
.cat-admin { margin-bottom: 10px; padding: 0; overflow: hidden; }
.cat-admin__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.cat-admin__head::-webkit-details-marker { display: none; }
.cat-admin__head .cat-tile__icon { position: static; flex: none; }
.cat-admin__name { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.cat-admin__actions { display: flex; gap: 6px; align-items: center; }
.cat-admin__list { border-top: 1px solid var(--border); }
.cat-admin__row { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 66px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cat-admin__row:last-child { border-bottom: 0; }
.cat-admin__row:hover { background: var(--surface-2, var(--bg)); }
.cat-admin__count { margin-left: auto; font-variant-numeric: tabular-nums; }
.cat-admin__empty { padding: 0 18px 14px 66px; }
.cat-form { display: grid; gap: 18px; }
.cat-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.cat-form__seo { border-top: 1px solid var(--border); padding-top: 14px; }
.cat-form__seo summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.cat-form__seo-body { display: grid; gap: 16px; margin-top: 14px; }
.cat-form__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-form__move { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.cat-form__move .field { flex: 1; min-width: 240px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker label { cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.icon-picker span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2, var(--muted)); font-size: 12px; transition: border-color var(--t), background var(--t), color var(--t); }
.icon-picker label:hover span { border-color: var(--border-strong); }
.icon-picker input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.icon-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .cat-form__grid { grid-template-columns: 1fr; }
  .cat-admin__row, .cat-admin__empty { padding-left: 18px; }
  .cat-admin__actions { width: 100%; }
}

/* ---------- Просмотр картинок статьи ---------- */
.prose img.is-zoomable, .article__cover img.is-zoomable { cursor: zoom-in; }
html.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 14, 20, .94); color: #fff; overflow: hidden; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: lb-in .22s cubic-bezier(.16, 1, .3, 1); }
.lightbox::backdrop { background: transparent; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 64px; }
.lightbox__count { font-size: 14px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.lightbox__btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; transition: background .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.lightbox__btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox__btn:active { transform: scale(.94); }
.lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: 0 72px; touch-action: pan-y pinch-zoom; user-select: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); transition: opacity .2s; }
.lightbox.can-zoom .lightbox__img { cursor: zoom-in; }
.lightbox.is-zoomed .lightbox__stage { overflow: auto; place-items: start; padding: 0; touch-action: auto; cursor: grab; }
.lightbox.is-zoomed .lightbox__img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; }
.lightbox.is-loading .lightbox__img { opacity: .55; }
.lightbox__spin { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; pointer-events: none; animation: lb-spin .8s linear infinite; transition: opacity .2s .25s; }
.lightbox.is-loading .lightbox__spin { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lightbox__nav { position: absolute; top: 50%; margin-top: -22px; z-index: 1; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox.is-single .lightbox__nav, .lightbox.is-zoomed .lightbox__nav { display: none; }
.lightbox__bottom { display: grid; gap: 10px; padding: 12px 16px 16px; }
.lightbox__caption { margin: 0 auto; max-width: 760px; text-align: center; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.lightbox__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; margin: 0 auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.lightbox__thumbs:empty { display: none; }
.lightbox__thumb { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .08); cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__thumb:hover { opacity: .85; }
.lightbox__thumb.is-active { opacity: 1; border-color: #fff; }
.lightbox.is-zoomed .lightbox__bottom { display: none; }
@media (max-width: 768px) {
  .lightbox__stage { padding: 0 8px; }
  .lightbox__nav { top: auto; bottom: 0; margin: 0; display: none; }
  .lightbox__thumb { width: 52px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox[open] { animation: none; }
}

/* ---------- Оценка статьи: палец вверх / вниз ---------- */
.article-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 28px 0 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); }
.article-rate__q { font-weight: 600; font-size: 15px; margin-right: 6px; }
.article-rate .act { height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.article-rate .act:hover { border-color: var(--border-strong); }
.act__num { color: var(--muted); font-weight: 500; }
.act--up.is-active, .article-rate .act--up.is-active { background: var(--success-soft); color: var(--success); border-color: transparent; }
.act--up.is-active .act__num { color: inherit; }
.act--down.is-active, .article-rate .act--down.is-active { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.act--like.is-active { background: var(--success-soft); color: var(--success); }
.rail__vote .icon-btn.vote-up.is-active { background: var(--success-soft); color: var(--success); }
.rail__vote .icon-btn.vote-down.is-active { background: var(--danger-soft); color: var(--danger); }
.act.is-active .i, .icon-btn.is-active .i { fill: currentColor; fill-opacity: .18; }
.is-pop .i { animation: vote-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes vote-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-8deg); } 100% { transform: scale(1); } }
.toast--action { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast--action a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) {
  .article-rate__q { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .is-pop .i { animation: none; }
}

/* Описание автора: сохраняем переносы строк */
.bio-text { white-space: pre-line; }

/* ---------- Компании ---------- */
.avatar--org { border-radius: 28%; }
.avatar--org.avatar--xs { border-radius: 6px; }
.avatar--org img { border-radius: inherit; }
.post__org { color: var(--muted); font-weight: 400; }
.post__org a { color: var(--text-2); font-weight: 500; }
.post__org a:hover { color: var(--accent-hover); }
.post__verified { display: inline; vertical-align: -2px; margin-left: 3px; color: var(--accent); }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.org-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 20px; align-items: start; }
.org-card__body { display: grid; gap: 6px; min-width: 0; }
.org-card__name { font-size: 17px; line-height: 1.3; display: flex; align-items: center; gap: 6px; }
.org-card__name .i { color: var(--accent); flex: none; }
.org-card__headline { font-size: 14px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.org-card__stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.member-row:last-child { border-bottom: 0; }
.member-row__who { display: grid; gap: 2px; flex: 1; min-width: 180px; }
.member-row__role .select { width: auto; }
.member-invite { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 12px; align-items: end; padding-top: 6px; }
.side__people { display: grid; gap: 12px; }
.profile__orgs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.profile__orgs .chip { display: inline-flex; align-items: center; gap: 8px; padding-left: 4px; }
.author-card--org { margin-top: 14px; }
@media (max-width: 768px) {
  .member-invite { grid-template-columns: 1fr; }
  .org-grid { grid-template-columns: 1fr; }
}

/* Аналитика ссылок в модерации */
.share-analytics { display: grid; gap: 24px; min-width: 0; }
.analytics-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.analytics-heading .h1 { margin: 8px 0 10px; }
.analytics-heading p { max-width: 64ch; }
.analytics-filters { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(130px, 1fr) repeat(2, minmax(135px, 1fr)) auto; align-items: end; gap: 12px; }
.analytics-filters .field { margin: 0; min-width: 0; display: grid; gap: 6px; }
.analytics-filters .input, .analytics-filters .select { width: 100%; min-width: 0; height: 44px; }
.analytics-filters > .btn { height: 44px; }
.analytics-filter-meta, .analytics-periods { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.analytics-filter-meta { justify-content: space-between; margin-top: -12px; }
.analytics-selection { padding: 12px 16px; background: var(--accent-soft); border-radius: var(--r-sm); overflow-wrap: anywhere; }
.analytics-selection a { margin-left: 12px; color: var(--accent); }
.analytics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.analytics-summary > div { padding: 22px 24px; border-left: 1px solid var(--border); }
.analytics-summary > div:first-child { border-left: 0; }
.analytics-summary dt { font-size: 13px; color: var(--text-2); }
.analytics-summary dd { margin: 12px 0 8px; font-family: var(--font-head); font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.analytics-summary span { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); }
.analytics-overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.analytics-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.analytics-panel__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.analytics-panel__head p { margin-top: 6px; }
.analytics-chart { display: block; width: 100%; height: 160px; overflow: visible; }
.analytics-chart__grid { fill: none; stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.analytics-chart__dot { fill: var(--accent); }
.analytics-chart-labels { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.analytics-daily { margin-top: 18px; }
.analytics-daily summary { cursor: pointer; font-size: 13px; color: var(--text-2); padding: 8px 0; }
.analytics-daily .analytics-scroll { max-height: 300px; }
.analytics-scroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.analytics-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.analytics-table th, .analytics-table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: top; }
.analytics-table thead th { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.analytics-table th:first-child, .analytics-table td:first-child { text-align: left; padding-left: 0; }
.analytics-table th:last-child, .analytics-table td:last-child { padding-right: 0; }
.analytics-table tbody th { font-weight: 500; }
.analytics-table tbody tr:last-child td, .analytics-table tbody tr:last-child th { border-bottom: 0; }
.analytics-table tbody tr:hover { background: var(--surface-2); }
.analytics-table a:hover { color: var(--accent); }
.analytics-table--wide { min-width: 720px; }
.analytics-article { width: 42%; min-width: 240px; max-width: 460px; overflow-wrap: anywhere; }
.analytics-article > a { font-weight: 600; }
.analytics-article > span { display: block; margin-top: 6px; }
.analytics-token { font-family: ui-monospace, monospace; color: var(--accent); }
.analytics-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.analytics-pagination > div { display: flex; gap: 8px; }
.analytics-note { margin-top: 16px; line-height: 1.65; }
.analytics-explanation { display: grid; gap: 8px; line-height: 1.7; max-width: 100ch; padding-bottom: 12px; }
.analytics-empty { border-left: 3px solid var(--accent); padding: 8px 20px; }
.analytics-empty p { margin-top: 8px; max-width: 70ch; }
@media (max-width: 1024px) {
  .analytics-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-filters .field:first-child { grid-column: 1 / -1; }
  .analytics-filters > .btn { justify-self: start; }
  .analytics-overview { grid-template-columns: minmax(0, 1fr); }
  .analytics-summary > div { padding: 20px 16px; }
}
@media (max-width: 768px) {
  .analytics-heading { flex-direction: column; gap: 12px; }
  .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-summary > div:nth-child(3) { border-left: 0; }
  .analytics-summary > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .analytics-summary dd { font-size: 28px; }
  .analytics-panel { padding: 16px; }
  .analytics-filters .field:nth-child(2) { grid-column: 1 / -1; }
  .analytics-filters > .btn { grid-column: 1 / -1; width: 100%; }
  .analytics-filter-meta { align-items: flex-start; gap: 14px; }
}
.analytics-mobile-hint { display: none; }
@media (max-width: 768px) {
  .analytics-mobile-hint { display: block; }
  .page--analytics .header__actions > .btn--primary { width: 36px; padding: 0; font-size: 0; gap: 0; }
}
