/* ============================================================
   figurative.ru — тема DLE «lerne» (редакционная, бренд Red)
   Источник: прототип figurative-prototype (направление A · Редакционный).
   Сборка из site.css + proto.css. Загружать ПОСЛЕ engine.css.
   Контейнер вёрстки = .page (container-query, mobile-first).
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #faf8f5; font-family: "Spline Sans", system-ui, sans-serif; }
img { max-width: 100%; height: auto; }
/* контентные таблицы статьи — адаптивные */
.art-body table, .static .prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.art-body img { border-radius: 8px; }

/* ============================================================
   figurative.ru — визуальные макеты направлений
   Дизайн-система САЙТА (не справочника).
   Каждый .page — контейнер (container-query): mobile-first,
   @container (min-width:760px) разворачивает десктоп.
   ============================================================ */

.page {
  container-type: inline-size;
  min-height: 100vh;
  font-family: "Spline Sans", system-ui, sans-serif;
  color: #1c1a17;
  background: #faf8f5;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.page * { box-sizing: border-box; margin: 0; }
.page a { color: inherit; text-decoration: none; }

/* бренд (тема Red) + акценты разделов */
.page { --brand: oklch(0.55 0.19 27); --brand-ink: oklch(0.48 0.20 27); --brand-bg: oklch(0.96 0.03 27);
  --photo: oklch(0.64 0.145 52); --soft: oklch(0.55 0.14 248); --ai: oklch(0.56 0.16 305); --travel: oklch(0.55 0.12 165); }
.is-photo  { color: var(--photo); }
.is-soft   { color: var(--soft); }
.is-ai     { color: var(--ai); }
.is-travel { color: var(--travel); }
.bgphoto { background: var(--photo); } .bgsoft { background: var(--soft); }
.bgai { background: var(--ai); } .bgtravel { background: var(--travel); }

/* placeholder под фото */
.ph { position: relative; background:
  repeating-linear-gradient(135deg, #e8e4dc, #e8e4dc 7px, #f0ede7 7px, #f0ede7 14px);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ph > span { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.04em;
  color: #9a9182; background: rgba(250,248,245,0.72); padding: 3px 8px; border-radius: 4px; text-align: center; }
.ph--dark { background: repeating-linear-gradient(135deg, #20222b, #20222b 7px, #262934 7px, #262934 14px); }
.ph--dark > span { color: #6f7488; background: rgba(13,14,18,0.6); }
/* реальная картинка поверх заглушки; при ошибке загрузки прячется и видна заглушка */
.ph .rimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ════════════════════════════════════════════════════════════
   1 · РЕДАКЦИОННЫЙ
   ════════════════════════════════════════════════════════════ */
.ed { background: #faf8f5; }
.ed-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #e7e2d9; }
.ed-logo { display: flex; align-items: center; gap: 12px; }
.ed-f { font-family: "Newsreader", serif; font-weight: 600; font-size: 38px; line-height: 0.72; letter-spacing: -0.03em; color: var(--brand); flex: none; }
.ed-word { display: flex; flex-direction: column; line-height: 1; border-left: 1px solid #e0dace; padding-left: 12px; }
.ed-word b { font-family: "Newsreader", serif; font-weight: 600; font-size: 21px; letter-spacing: -0.02em; }
.ed-word small { display: block; font-family: "JetBrains Mono", monospace; font-size: 8px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #9a9182; margin-top: 4px; }
.ed-burger { margin-left: auto; width: 40px; height: 40px; border: 1px solid #e0dace; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ed-nav { display: none; gap: 20px; font-size: 14.5px; font-weight: 500; }
.ed-nav a { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .12s, border-color .12s; }
.ed-nav a:hover { color: var(--brand-ink); }
.ed-nav a.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.ed-tools { display: none; align-items: center; gap: 12px; margin-left: auto; }
.ed-tools button { width: 38px; height: 38px; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font-size: 15px; cursor: pointer; }
.ed-login { font-weight: 600; font-size: 14px; color: var(--brand-ink); }

.ed-hero { padding: 20px; display: grid; gap: 16px; }
.ed-hero__img { aspect-ratio: 16/10; border-radius: 12px; }
.ed-kicker { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--brand-ink); }
.ed-kicker .sep { color: #cfc6b6; margin: 0 5px; }
.ed-hero h1 { font-family: "Newsreader", serif; font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; font-size: 30px; margin-top: 10px; }
.ed-hero .ed-dek { font-size: 16px; color: #5b554c; margin-top: 10px; max-width: 56ch; }
.ed-meta { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: #8a8273; margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.ed-main { padding: 8px 20px 24px; display: grid; gap: 28px; }
.ed-sec { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #1c1a17; padding-bottom: 10px; border-bottom: 1px solid #1c1a17; margin-bottom: 4px; }
.ed-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e9e4db; align-items: start; }
.ed-row .ph { aspect-ratio: 4/3; border-radius: 8px; }
.ed-row h3 { font-family: "Newsreader", serif; font-weight: 600; font-size: 18px; line-height: 1.15; letter-spacing: -0.01em; margin-top: 6px; }
.ed-row .ed-rmeta { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #8a8273; margin-top: 8px; }
.ed-rdek { display: none; font-size: 14px; line-height: 1.5; color: #5b554c; margin-top: 8px; max-width: 62ch; }
/* карточка без изображения — текстовый вариант */
.ed-row--text { grid-template-columns: 1fr; border-left: 3px solid var(--brand); padding-left: 16px; }
.ed-row--text h3 { font-size: 20px; margin-top: 0; }
.ed-row--text .ed-rdek { display: block; }

.ed-rail { display: grid; gap: 18px; align-content: start; }
.rail-blk { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 18px; }
.rail-blk h3 { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: #8a8273; margin-bottom: 12px; }
.rank { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #efeae1; align-items: baseline; }
.rank:first-of-type { border-top: 0; }
.rank b { font-family: "Newsreader", serif; font-size: 20px; color: var(--brand); width: 22px; flex: none; opacity: 0.85; }
.rank span { font-size: 14px; font-weight: 500; line-height: 1.25; }
.rank:hover span { color: var(--brand-ink); }
.rail-cta { background: #1c1a17; color: #faf8f5; }
.rail-cta h3 { color: #b6ad9c; }
.rail-cta p { font-size: 13.5px; color: #d8d2c6; margin: 6px 0 14px; }
.rail-cta .btn { display: block; text-align: center; background: var(--brand); color: #fff; font-weight: 600; padding: 11px; border-radius: 9px; font-size: 14px; }
.ed-more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--brand-ink); border-bottom: 2px solid var(--brand); padding-bottom: 2px; }
.ed-foot { padding: 22px 20px; border-top: 1px solid #e7e2d9; font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; }

/* блок пейджинга / подгрузки перед футером */
.ed-pager { padding: 6px 20px 36px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ed-progress { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 260px; }
.ed-progress .bar { width: 100%; height: 4px; border-radius: 100px; background: #e7e2d9; overflow: hidden; }
.ed-progress .bar i { display: block; height: 100%; width: 18%; background: var(--brand); border-radius: 100px; }
.ed-progress span { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; }
.ed-more-btn { font-weight: 600; font-size: 15px; color: #fff; background: var(--brand); border: 0; padding: 13px 28px; border-radius: 100px; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; box-shadow: 0 3px 10px oklch(0.55 0.19 27 / 0.22); transition: transform .12s, box-shadow .12s; }
.ed-more-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px oklch(0.55 0.19 27 / 0.28); }
.ed-more-btn svg { width: 15px; height: 15px; }
.ed-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pg { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font-family: "JetBrains Mono", monospace; font-size: 13px; color: #1c1a17; cursor: pointer; transition: border-color .12s, color .12s; }
.pg:hover { border-color: var(--brand); color: var(--brand-ink); }
.pg.on { background: #1c1a17; color: #fff; border-color: #1c1a17; }
.pg-dots { color: #b6ad9c; padding: 0 2px; font-family: "JetBrains Mono", monospace; }
.ed-pager-hint { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #b0a896; letter-spacing: 0.02em; }

/* заголовок страницы-раздела (категория, выглядит как главная) */
.ed-cathead { padding: 4px 20px 6px; }
.ed-cathead .mark { display: inline-block; width: 30px; height: 3px; background: var(--brand); border-radius: 2px; margin-bottom: 12px; }
.ed-cathead h1 { font-family: "Newsreader", serif; font-weight: 600; font-size: 30px; letter-spacing: -0.02em; line-height: 1.05; }
.ed-cathead p { color: #5b554c; font-size: 15px; margin-top: 9px; max-width: 62ch; }
.ed-cathead .cnt { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; margin-top: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
@container (min-width: 760px) { .ed-cathead { padding: 10px 36px 12px; } .ed-cathead h1 { font-size: 40px; } }
/* шапка категории внутри .ed-main (grid): на всю ширину над колонками, без своих гориз. отступов */
.ed-main > .ed-cathead { grid-column: 1 / -1; padding-left: 0; padding-right: 0; position: relative; }
.ed-cathead .lede { color: #5b554c; font-size: 17px; line-height: 1.4; margin-top: 9px; max-width: 929px; position: relative; }
.ed-cathead .lede p { margin: 0 0 8px; }
.ed-cathead .lede > :last-child { margin-bottom: 0; }
/* «под кат»: длинное описание сворачивается (JS вешает .is-clamped, если текст не влез); короткий тэглайн остаётся как есть */
.ed-cathead .lede.is-clamped { max-height: 4.4em; overflow: hidden; }
.ed-cathead .lede.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5em; background: linear-gradient(rgba(250,248,245,0), #faf8f5); pointer-events: none; }
.ed-cathead .lede.is-open { max-height: none; }
/* тяжёлые блоки (таблицы/списки/спойлеры) прячем только пока свёрнуто */
.ed-cathead .lede.is-clamped h2, .ed-cathead .lede.is-clamped h3, .ed-cathead .lede.is-clamped table, .ed-cathead .lede.is-clamped ul, .ed-cathead .lede.is-clamped ol, .ed-cathead .lede.is-clamped .title_spoiler, .ed-cathead .lede.is-clamped .text_spoiler { display: none; }
.ed-cathead .lede-toggle { display: inline-block; margin-top: 9px; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-ink); background: none; border: 0; border-bottom: 2px solid var(--brand); padding: 0 0 1px; cursor: pointer; }
.ed-cathead .lede-toggle:hover { color: var(--brand); }
.ed-cathead .ed-cedit { position: absolute; top: 2px; right: 0; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; color: var(--brand-ink); background: #fff; border: 1px solid #e6dfd0; border-radius: 8px; padding: 5px 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.ed-cathead .ed-cedit:hover { border-color: var(--brand); }
/* разделитель «Все материалы» над списком */
.ed-call { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #1c1a17; padding-bottom: 12px; border-bottom: 1.5px solid #1c1a17; margin: 0 0 22px; }

/* дата в списке «Популярное» */
.rank span small { display: block; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 400; color: #a59c8c; margin-top: 3px; }

@container (min-width: 760px) {
  .ed-top { padding: 18px 36px; gap: 28px; }
  .ed-f { font-size: 44px; }
  .ed-word b { font-size: 23px; }
  .ed-burger { display: none; }
  .ed-nav { display: flex; }
  .ed-tools { display: flex; }
  .ed-hero { grid-template-columns: 1.15fr 1fr; align-items: center; padding: 36px 36px 28px; gap: 32px; }
  .ed-hero h1 { font-size: 44px; }
  .ed-hero__img { aspect-ratio: 4/3; }
  .ed-main { grid-template-columns: 1fr 300px; padding: 12px 36px 40px; gap: 40px; }
  .ed-row { grid-template-columns: 168px 1fr; gap: 20px; }
  .ed-row h3 { font-size: 21px; }
  .ed-row--text { grid-template-columns: 1fr; }
  .ed-foot { padding: 28px 36px; }
}
@container (min-width: 1100px) {
  .ed-list { columns: 1; }
  .ed-hero h1 { font-size: 52px; }
}

/* ════════════════════════════════════════════════════════════
   5 · СТАТЬЯ (fullstory) — редакционный лид
   ════════════════════════════════════════════════════════════ */
.art { background: #faf8f5; }
.art-crumb, .ed-crumb { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: #8a8273; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.45; }
.art-crumb a, .ed-crumb a { color: #8a8273; }
.art-crumb a:hover, .ed-crumb a:hover { color: var(--brand-ink); }
.art-crumb b, .ed-crumb b { color: var(--brand-ink); font-weight: 600; }
.art-crumb .sep, .ed-crumb .sep { color: #cfc6b6; }
.art-crumb .cur { color: #8a8273; }
.art-crumb { padding: 14px 20px 2px; }
.ed-crumb { padding: 16px 20px 2px; }
.art-wrap { padding: 14px 20px 30px; display: grid; gap: 22px; }
.art-head .ed-kicker { display: inline-block; }
.art-head h1 { font-family: "Newsreader", serif; font-weight: 600; font-size: 30px; line-height: 1.07; letter-spacing: -0.02em; margin-top: 10px; }
.art-sub { font-size: 17px; color: #5b554c; margin-top: 12px; }
.art-metabar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 0; border-top: 1px solid #e7e2d9; border-bottom: 1px solid #e7e2d9; }
.art-author { display: flex; align-items: center; gap: 10px; }
.art-author .av { width: 36px; height: 36px; border-radius: 50%; }
.art-author b { font-size: 14px; } .art-author span { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; display: block; }
.art-rate { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.art-rate button { width: 40px; height: 40px; border-radius: 9px; border: 1px solid #e0dace; background: #fff; font-size: 15px; cursor: pointer; }
.art-rate b { font-family: "JetBrains Mono", monospace; font-size: 14px; min-width: 28px; text-align: center; color: var(--brand-ink); }
.art-star { width: 40px; height: 40px; border-radius: 9px; border: 1px solid #e0dace; background: #fff; font-size: 16px; }
.art-hero { aspect-ratio: 16/9; border-radius: 12px; }
.art-cap { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #8a8273; margin-top: 8px; }
.art-body { font-size: 17px; line-height: 1.7; color: #2a2722; }
.art-body p { margin-bottom: 18px; max-width: 68ch; }
.art-body h2 { font-family: "Newsreader", serif; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin: 26px 0 12px; }
.art-pull { font-family: "Newsreader", serif; font-size: 23px; line-height: 1.3; color: #1c1a17; border-left: 3px solid var(--brand); padding: 6px 0 6px 20px; margin: 26px 0; font-style: italic; }
.art-inline { aspect-ratio: 3/2; border-radius: 10px; margin: 8px 0 22px; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.art-tag { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: #5b554c; background: #fff; border: 1px solid #e7e2d9; border-radius: 100px; padding: 5px 12px; }
.art-related { border-top: 1px solid #e7e2d9; padding-top: 20px; }
.art-related h2 { font-family: "JetBrains Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #8a8273; margin-bottom: 14px; }
.art-rel-grid { display: grid; gap: 2px; grid-template-columns: 1fr; }
.relc { display: grid; grid-template-columns: 88px 1fr; gap: 13px; align-items: center; padding: 11px 0; border-bottom: 1px solid #efeae1; }
.relc__ph { aspect-ratio: 1/1; border-radius: 8px; }
.relc__cat { font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--brand-ink); }
.relc h3 { font-family: "Newsreader", serif; font-size: 16px; font-weight: 600; margin-top: 4px; line-height: 1.2; letter-spacing: -0.01em; }
.relc__m { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #9a9182; margin-top: 5px; }
.relc--text { grid-template-columns: 1fr; border-left: 2px solid var(--brand); padding-left: 12px; }
.art-foot { padding: 22px 20px; border-top: 1px solid #e7e2d9; font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; }

@container (min-width: 760px) {
  .art-crumb { max-width: 1080px; margin: 0 auto; padding: 22px 36px 0; }
  .ed-crumb { padding: 20px 36px 2px; }
  .art-wrap { max-width: 1080px; margin: 0 auto; padding: 18px 36px 44px; grid-template-columns: minmax(0,1fr) 240px; gap: 40px; align-items: start; }
  .art-head, .art-hero, .art-body, .art-related { grid-column: 1; }
  .art-rail { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 20px; display: grid; gap: 14px; }
  .art-head h1 { font-size: 44px; }
  .art-rel-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .relc { display: block; padding: 0; border-bottom: 0; }
  .relc__ph { aspect-ratio: 16/10; border-radius: 10px; margin-bottom: 9px; }
  .relc h3 { font-size: 17px; }
  .relc--text { border-left: 0; padding-left: 0; background: #fff; border: 1px solid #e9e4db; border-radius: 12px; padding: 16px; }
  .art-foot { padding: 28px 36px; }
}

/* мета-сайдбар статьи: на мобиле скрыт (всё в metabar), на десктопе виден */
.art-rail { display: none; }
.art-rail .rblk { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 16px; }
.art-rail .rblk h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 10px; }
.art-rail .share { display: flex; gap: 8px; }
.art-rail .share button { flex: 1; height: 38px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; cursor: pointer; }
@container (min-width: 760px) { .art-rail { display: grid; } }


/* ===== страницы (формы/профиль/поиск/футер) ===== */
/* ============================================================
   figurative.ru — ПРОТОТИП: доп. стили страниц поверх site.css
   Редакционный стиль (бренд Red). Реальный адаптив через @container
   (#app — container). Загружать ПОСЛЕ site.css.
   ============================================================ */

/* #app выступает контейнером и скроллится нормально */
.page { overflow: visible; min-height: 100vh; }
html, body { margin: 0; background: #faf8f5; }

/* липкая шапка для удобной навигации по прототипу */
.ed-top { position: sticky; top: 0; z-index: 50; background: rgba(250,248,245,0.92); backdrop-filter: saturate(1.3) blur(10px); }

/* активный пункт меню */
.ed-nav a { cursor: pointer; }

/* ───────── общий заголовок страницы (как ed-cathead) ───────── */
.ed-crumb a, .ed-nav a, .ed-login, .rank, .ed-row, .ed-more, .pg, .relc, .ga-card, rank { cursor: pointer; }

/* ───────── ФОРМЫ (вход/регистрация/пароль/обратная связь) ───────── */
.formpage { padding: 26px 20px 70px; display: flex; justify-content: center; }
.cardform { width: 100%; max-width: 440px; background: #fff; border: 1px solid #e9e4db; border-radius: 16px; padding: 26px 24px 28px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 40px rgba(0,0,0,.05); }
.cardform.wide { max-width: 620px; }
.cardform h1 { font-family: "Newsreader", serif; font-weight: 600; font-size: 27px; letter-spacing: -0.02em; }
.cardform .sub { color: #8a8273; font-size: 14px; margin-top: 6px; }
.cardform .err { background: oklch(0.96 0.04 25); border: 1px solid oklch(0.86 0.08 25); color: oklch(0.46 0.14 25); font-size: 13px; border-radius: 9px; padding: 10px 12px; margin-top: 16px; }
.field { margin-top: 15px; }
.field > label { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; font-family: inherit; font-size: 16px; color: #1c1a17; background: #faf8f5; border: 1px solid #e0dace; border-radius: 10px; padding: 12px 13px; outline: none; transition: border-color .12s, background .12s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 0; }
@container (min-width: 620px) { .row2 { grid-template-columns: 1fr 1fr; gap: 14px; } }
.captcha { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.captcha .box { flex: none; width: 110px; height: 44px; border-radius: 9px; background:
  repeating-linear-gradient(60deg, #e8e4dc, #e8e4dc 5px, #f0ede7 5px, #f0ede7 10px);
  display: flex; align-items: center; justify-content: center; font-family: "JetBrains Mono", monospace; letter-spacing: 0.3em; color: #6b6457; font-weight: 600; }
.btn-primary { width: 100%; margin-top: 20px; font-weight: 600; font-size: 15px; color: #fff; background: var(--brand); border: 0; padding: 13px; border-radius: 10px; cursor: pointer; box-shadow: 0 3px 10px oklch(0.55 0.19 27 / 0.2); transition: transform .12s; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { font-weight: 600; font-size: 14px; color: var(--brand-ink); background: #fff; border: 1px solid #e0dace; padding: 11px 16px; border-radius: 10px; cursor: pointer; }
.formlinks { margin-top: 18px; padding-top: 16px; border-top: 1px solid #efeae1; font-family: "JetBrains Mono", monospace; font-size: 12px; color: #8a8273; display: flex; gap: 14px; flex-wrap: wrap; }
.formlinks a { color: var(--brand-ink); }
.checkrow { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13.5px; color: #5b554c; }
.checkrow input { width: 17px; height: 17px; accent-color: var(--brand); }
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.oauth button { font-size: 14px; }

/* ───────── ADDNEWS (редактор) ───────── */
.addnews { padding: 8px 20px 50px; display: grid; gap: 18px; grid-template-columns: 1fr; }
@container (min-width: 900px) { .addnews { grid-template-columns: 1fr 280px; padding: 12px 36px 60px; align-items: start; } }
.addnews .ed-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fff; border: 1px solid #e0dace; border-radius: 10px 10px 0 0; border-bottom: 0; }
.addnews .ed-toolbar span { width: 34px; height: 34px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: "JetBrains Mono", monospace; font-size: 13px; color: #5b554c; background: #faf8f5; cursor: pointer; }
.addnews .editor { min-height: 180px; border: 1px solid #e0dace; border-radius: 0 0 10px 10px; padding: 14px; background: #fff; color: #5b554c; font-size: 15px; line-height: 1.6; }
.addnews .uploader { border: 1.5px dashed #d6cfc0; border-radius: 12px; padding: 26px; text-align: center; color: #8a8273; font-size: 14px; background: #fff; }
.addnews .uploader b { color: var(--brand-ink); }
.addnews .side { display: grid; gap: 12px; align-content: start; }
.addnews .side .blk { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 16px; }
.addnews .side h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 10px; }

/* ───────── ЛИЧНЫЕ СООБЩЕНИЯ ───────── */
.pm { padding: 8px 20px 50px; display: grid; gap: 14px; grid-template-columns: 1fr; }
@container (min-width: 900px) { .pm { grid-template-columns: 300px 1fr; padding: 12px 36px 60px; align-items: start; } }
.pm-list { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; overflow: hidden; }
.pm-folders { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid #efeae1; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.pm-folders a { padding: 6px 10px; border-radius: 7px; color: #8a8273; }
.pm-folders a.on { background: var(--brand-bg); color: var(--brand-ink); }
.pm-item { display: grid; grid-template-columns: 40px 1fr; gap: 11px; padding: 13px 14px; border-bottom: 1px solid #efeae1; cursor: pointer; align-items: center; }
.pm-item:hover { background: #faf8f5; }
.pm-item.on { background: var(--brand-bg); }
.pm-item .av { width: 40px; height: 40px; border-radius: 50%; }
.pm-item b { font-size: 14px; } .pm-item span { font-size: 12.5px; color: #8a8273; display: block; margin-top: 2px; }
.pm-read { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 20px; }
.pm-read .msg { font-size: 15px; line-height: 1.65; color: #2a2722; margin: 14px 0; }

/* ───────── ПРОФИЛЬ ───────── */
.profile { padding: 8px 20px 50px; }
@container (min-width: 760px) { .profile { padding: 12px 36px 60px; } }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 20px 0 18px; border-bottom: 1px solid #e7e2d9; }
@container (min-width: 760px) { .profile-head { flex-direction: row; text-align: left; align-items: flex-end; } }
.profile-head .av { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.profile-head h1 { font-family: "Newsreader", serif; font-weight: 600; font-size: 30px; letter-spacing: -0.02em; }
.profile-head .grp { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #fff; background: var(--brand); padding: 3px 9px; border-radius: 100px; display: inline-block; margin-top: 6px; }
.profile-head .pa { margin-left: 0; display: flex; gap: 8px; margin-top: 8px; }
@container (min-width: 760px) { .profile-head .pa { margin-left: auto; } }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
@container (min-width: 620px) { .profile-stats { grid-template-columns: repeat(4, 1fr); } }
.profile-stats li { list-style: none; background: #fff; border: 1px solid #e9e4db; border-radius: 12px; padding: 16px; text-align: center; }
.profile-stats b { font-family: "Newsreader", serif; font-size: 28px; font-weight: 600; display: block; }
.profile-stats small { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8273; }
.profile-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e7e2d9; margin-bottom: 6px; overflow-x: auto; }
.profile-tabs a { padding: 10px 14px; font-size: 14px; font-weight: 500; color: #8a8273; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.profile-tabs a.on { color: var(--brand-ink); border-bottom-color: var(--brand); }

/* ───────── СТАТИСТИКА ───────── */
.stats { padding: 8px 20px 50px; }
@container (min-width: 760px) { .stats { padding: 12px 36px 60px; } }
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
@container (min-width: 760px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-cards li { list-style: none; background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 18px; }
.stat-cards b { font-family: "Newsreader", serif; font-size: 32px; font-weight: 600; display: block; letter-spacing: -0.01em; }
.stat-cards .d { font-family: "JetBrains Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8273; margin-top: 4px; }
.stat-cards .up { color: var(--brand-ink); font-size: 12px; font-family: "JetBrains Mono", monospace; }
.stat-tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e9e4db; border-radius: 14px; overflow: hidden; font-size: 14px; }
.stat-tbl th { text-align: left; font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8273; padding: 12px 14px; border-bottom: 1px solid #e7e2d9; background: #faf8f5; }
.stat-tbl td { padding: 12px 14px; border-bottom: 1px solid #efeae1; }
.stat-tbl tr:last-child td { border-bottom: 0; }
.stat-tbl .num { font-family: "JetBrains Mono", monospace; color: var(--brand-ink); text-align: right; }

/* ───────── СТАТИЧЕСКАЯ / 404 ───────── */
.static { padding: 8px 20px 60px; }
@container (min-width: 760px) { .static { max-width: 760px; margin: 0 auto; padding: 14px 36px 70px; } }
.static h1 { font-family: "Newsreader", serif; font-weight: 600; font-size: 32px; letter-spacing: -0.02em; margin: 8px 0 6px; }
@container (min-width: 760px) { .static h1 { font-size: 42px; } }
.static .prose { font-size: 17px; line-height: 1.7; color: #2a2722; margin-top: 16px; }
.static .prose p { margin-bottom: 16px; }
.static .prose h2 { font-family: "Newsreader", serif; font-size: 23px; font-weight: 600; margin: 24px 0 10px; }
.notfound { padding: 60px 20px 90px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.notfound .code { font-family: "Newsreader", serif; font-size: 96px; font-weight: 600; color: var(--brand); line-height: 1; }
.notfound h1 { font-family: "Newsreader", serif; font-size: 28px; font-weight: 600; }
.notfound p { color: #5b554c; max-width: 44ch; }
.notfound .sbar { display: flex; gap: 8px; margin-top: 8px; }

/* ───────── ПОИСК ───────── */
.search-bar { padding: 10px 20px 14px; }
@container (min-width: 760px) { .search-bar { padding: 14px 36px 16px; } }
.search-bar form { display: flex; gap: 8px; max-width: 680px; }
.search-bar input { flex: 1; font-size: 16px; padding: 13px 15px; border: 1px solid #e0dace; border-radius: 10px; background: #fff; outline: none; }
.search-bar input:focus { border-color: var(--brand); }
.search-info { font-family: "JetBrains Mono", monospace; font-size: 12px; color: #8a8273; margin-top: 10px; }
.search-info b { color: #1c1a17; }

/* ───────── ТЕГИ ───────── */
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 14px; }
.tagcloud a { font-family: "JetBrains Mono", monospace; padding: 6px 12px; border-radius: 100px; border: 1px solid #e0dace; background: #fff; color: #5b554c; cursor: pointer; }
.tagcloud a:hover { border-color: var(--brand); color: var(--brand-ink); }
.tagcloud a.s1 { font-size: 12px; } .tagcloud a.s2 { font-size: 14px; } .tagcloud a.s3 { font-size: 16px; font-weight: 600; }

/* ───────── КОММЕНТАРИИ (на статье) ───────── */
.comments { border-top: 1px solid #e7e2d9; padding-top: 20px; margin-top: 4px; }
.comments h2 { font-family: "JetBrains Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #8a8273; margin-bottom: 14px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #efeae1; }
.comment .av { width: 40px; height: 40px; border-radius: 50%; }
.comment .ch { display: flex; align-items: baseline; gap: 8px; }
.comment .ch b { font-size: 14px; } .comment .ch time { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #9a9182; }
.comment .ct { font-size: 14.5px; line-height: 1.55; color: #2a2722; margin-top: 5px; }
.comment .cf { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; margin-top: 7px; display: flex; gap: 14px; }
.comment.reply { margin-left: 40px; }
.addcomment { margin-top: 18px; background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 16px; }
.addcomment textarea { width: 100%; min-height: 90px; border: 1px solid #e0dace; border-radius: 10px; padding: 12px; font-family: inherit; font-size: 15px; resize: vertical; outline: none; }
.addcomment textarea:focus { border-color: var(--brand); }
.addcomment .arow { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.addcomment .arow .checkrow { margin: 0; }

/* ───────── КАРТА ПРОТОТИПА ───────── */
.sitemap { padding: 10px 20px 60px; }
@container (min-width: 760px) { .sitemap { padding: 16px 36px 70px; max-width: 1080px; margin: 0 auto; } }
.sitemap .lead { font-size: 16px; color: #5b554c; max-width: 64ch; margin: 4px 0 22px; }
.sm-group { margin-bottom: 26px; }
.sm-group h2 { font-family: "JetBrains Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-ink); padding-bottom: 8px; border-bottom: 1px solid #e7e2d9; margin-bottom: 14px; }
.sm-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container (min-width: 620px) { .sm-grid { grid-template-columns: 1fr 1fr; } }
@container (min-width: 980px) { .sm-grid { grid-template-columns: 1fr 1fr 1fr; } }
.sm-card { display: block; background: #fff; border: 1px solid #e9e4db; border-radius: 12px; padding: 15px 16px; cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; }
.sm-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.06); }
.sm-card .r { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #b0a896; }
.sm-card h3 { font-family: "Newsreader", serif; font-size: 19px; font-weight: 600; margin: 4px 0 4px; letter-spacing: -0.01em; }
.sm-card p { font-size: 13px; color: #8a8273; line-height: 1.45; }
.sm-card .av-type { font-family: "JetBrains Mono", monospace; font-size: 9.5px; color: var(--brand-ink); background: var(--brand-bg); padding: 2px 7px; border-radius: 5px; display: inline-block; margin-top: 8px; }

/* ───────── ФУТЕР-МЕНЮ (footmenu) ───────── */
.pf { border-top: 1px solid #e7e2d9; margin-top: 30px; background: #f3f1ec; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; padding: 30px 20px 24px; }
@container (min-width: 760px) { .pf-cols { grid-template-columns: repeat(4, 1fr); padding: 36px 36px 26px; max-width: 1180px; margin: 0 auto; } }
.pf-cols h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 12px; }
.pf-cols a { display: block; font-size: 14px; color: #5b554c; padding: 5px 0; cursor: pointer; }
.pf-cols a:hover { color: var(--brand-ink); }
.pf-copy { border-top: 1px solid #e7e2d9; padding: 16px 20px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: #9a9182; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
@container (min-width: 760px) { .pf-copy { padding: 16px 36px; } }
.pf-copy .lg { display: flex; align-items: center; gap: 8px; }
.pf-copy .lg b { font-family: "Newsreader", serif; color: var(--brand); font-size: 16px; }

/* список общий padding для list-страниц без hero */
.list-head { padding: 6px 20px 4px; }
@container (min-width: 760px) { .list-head { padding: 10px 36px 4px; } }

/* мобильное выпадающее меню (бургер) */
.ed-top { position: sticky; }
@container (max-width: 759px) {
  .ed-top.open .ed-nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid #e7e2d9; box-shadow: 0 14px 28px rgba(0,0,0,.08); padding: 6px 0; }
  .ed-top.open .ed-nav a { padding: 13px 20px; font-size: 16px; border-bottom: 1px solid #f1ece3; }
  .ed-top.open .ed-burger { color: var(--brand); }
}
/* загрузка-индикатор для подгрузки */
.ed-more-btn.loading { opacity: .65; pointer-events: none; }

/* ===== wiring DLE → редакционный дизайн (lerne) ===== */
/* нумерация «Популярного» (DLE {custom} не нумерует — считаем счётчиком) */
.rail-blk { counter-reset: rk; }
.rail-blk .rank { counter-increment: rk; }
.rail-blk .rank b:empty::before { content: counter(rk); }
/* меню = плоские <a> (без ul-маркеров, если тема/движок добавит) */
.ed-nav ul { display: contents; margin: 0; padding: 0; list-style: none; }
.ed-nav li { display: contents; }
/* DLE-вывод логина в шапке */
.ed-login a { color: var(--brand-ink); font-weight: 600; }
.ed-login img { vertical-align: middle; border-radius: 50%; }
/* пагинация {pages}: DLE отдаёт <a>/<span> — стилизуем как .pg */
.ed-pages a, .ed-pages span.thispage { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font-family: "JetBrains Mono", monospace; font-size: 13px; color: #1c1a17; }
.ed-pages a:hover { border-color: var(--brand); color: var(--brand-ink); }
.ed-pages span.thispage { background: #1c1a17; color: #fff; border-color: #1c1a17; }
.ed-pages .nav_ext { border: 0; background: none; min-width: 0; padding: 0 2px; color: #b6ad9c; }
/* шеринг (DLE {social-list}) в сайдбаре статьи */
.art-rail .share { display: flex; gap: 8px; flex-wrap: wrap; }
.art-rail .share a, .art-rail .share li { list-style: none; }
.art-rail .share img { width: 34px; height: 34px; border-radius: 8px; }
/* prev/next под статьёй */
.art-nav { display: flex; justify-content: space-between; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 0 20px 24px; }
@container (min-width: 760px) { .art-nav { padding: 0 36px 30px; } }
.art-nav a { text-decoration: none; }
/* метка «важное» */
.fixed_label { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--brand); padding: 3px 9px; border-radius: 5px; }
.editdate { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; margin-top: 14px; }
/* тело статьи: типографика контента DLE */
.art-body h2, .art-body h3 { font-family: "Newsreader", serif; }
.art-body a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.art-body ul, .art-body ol { margin: 0 0 18px 22px; }
.art-body li { margin-bottom: 6px; }
.art-body table td, .art-body table th { border: 1px solid #e7e2d9; padding: 8px 10px; text-align: left; }
.art-body thead td, .art-body thead th { background: #f3f1ec; font-weight: 600; }
/* теги статьи (DLE {tags} → ссылки) */
.art-tags a { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: #5b554c; background: #fff; border: 1px solid #e7e2d9; border-radius: 100px; padding: 5px 12px; text-decoration: none; }
.art-tags a:hover { border-color: var(--brand); color: var(--brand-ink); }

/* ===== фиксы по ревью v1 (2026-06-13) ===== */
/* аккаунт-виджет DLE {login} в шапке — компактно, не ломая шапку */
.ed-tools { align-self: center; }
.ed-login { font-size: 12px; line-height: 1.4; color: #5b554c; text-align: right; max-width: 210px; }
.ed-login a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.ed-login a:hover { text-decoration: underline; }
.ed-login ul { list-style: none; margin: 3px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.ed-login li { white-space: nowrap; }
.ed-login br { display: none; }
.ed-login img { width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; }
@container (max-width: 759px) { .ed-login { display: none; } }
/* кнопки шеринга в мета-сайдбаре статьи */
.art-rail .share a { flex: 1; min-width: 46px; text-align: center; height: 38px; line-height: 36px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; color: var(--brand-ink); font-weight: 600; font-size: 13px; text-decoration: none; }
.art-rail .share a:hover { border-color: var(--brand); }

/* ===== аккаунт-дропдаун в шапке (прячет DLE-форму {login}) v3 ===== */
.ed-account { position: relative; }
.ed-acc-btn { font-weight: 600; font-size: 14px; color: var(--brand-ink); background: #fff; border: 1px solid #e0dace; border-radius: 9px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.ed-acc-btn:hover { border-color: var(--brand); }
.ed-acc-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 300px; max-height: 80vh; overflow: auto; background: #fff; border: 1px solid #e7e2d9; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.12); padding: 18px; z-index: 80; font-size: 13.5px; color: #5b554c; text-align: left; }
.ed-account.open .ed-acc-panel { display: block; }
/* содержимое {login}: и форма гостя, и панель юзера */
.ed-acc-panel b, .ed-acc-panel strong { color: #1c1a17; }
.ed-acc-panel a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.ed-acc-panel a:hover { text-decoration: underline; }
.ed-acc-panel label { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8a8273; margin: 10px 0 4px; }
.ed-acc-panel input[type=text], .ed-acc-panel input[type=password], .ed-acc-panel input[type=email] { width: 100%; padding: 10px 11px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; font-size: 15px; font-family: inherit; outline: none; }
.ed-acc-panel input:focus { border-color: var(--brand); background: #fff; }
.ed-acc-panel input[type=submit], .ed-acc-panel button[type=submit], .ed-acc-panel .btn { width: 100%; margin-top: 12px; background: var(--brand); color: #fff; border: 0; padding: 11px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.ed-acc-panel input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); vertical-align: middle; margin-right: 6px; }
.ed-acc-panel ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid #efeae1; display: flex; flex-direction: column; gap: 6px; }
.ed-acc-panel li { padding: 0; }
.ed-acc-panel img { max-width: 44px; height: auto; border-radius: 50%; }
.ed-acc-panel svg { max-width: 44px; height: auto; }
/* мобила: аккаунт прячем (вход через футер/меню) — как и весь .ed-tools */

/* ===== превью в ленте (v4): нет картинки → градиент-заглушка вместо no_image.jpg ===== */
.ed-row .rimg[src*="no_image"] { display: none; }
.ed-row .ph { background-repeat: repeat; }

/* ===== фикс переполнения карточек на мобиле (v5) ===== */
.ed-body { overflow-x: hidden; }
.ed-row__b { min-width: 0; }              /* ячейка контента в grid может сжиматься → текст переносится */
.ed-row h3 { overflow-wrap: anywhere; }   /* длинные слова не вылезают за край */
.ed-row .ed-rmeta, .ed-row .ed-kicker { min-width: 0; overflow-wrap: anywhere; }

/* ===== v6: аккаунт = <details> (ссылка, не коробка) ===== */
.ed-account { position: relative; }
.ed-acc-btn { list-style: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; color: var(--brand-ink); cursor: pointer; padding: 8px 2px; user-select: none; background: none; border: 0; }
.ed-acc-btn::-webkit-details-marker { display: none; }
.ed-acc-btn::marker { content: ""; }
.ed-acc-btn .caret { font-size: 10px; transition: transform .15s; }
.ed-account[open] .ed-acc-btn .caret { transform: rotate(180deg); }
.ed-account[open] .ed-acc-panel { display: block; }
/* поиск-кнопка: ровно как иконка-бокс дизайна */
.ed-tools > a > button { width: 38px; height: 38px; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font-size: 15px; cursor: pointer; color: #1c1a17; }
.ed-tools > a > button:hover { border-color: var(--brand); }

/* ===== v6: пагинация — без пустых боксов, корректная текущая ===== */
.ed-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; }
.ed-pages a, .ed-pages span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font-family: "JetBrains Mono", monospace; font-size: 13px; color: #1c1a17; text-decoration: none; }
.ed-pages a:hover { border-color: var(--brand); color: var(--brand-ink); }
.ed-pages span { background: #1c1a17; color: #fff; border-color: #1c1a17; }
.ed-pages .nav_ext, .ed-pages span.nav_ext { border: 0; background: none; color: #b6ad9c; min-width: 0; padding: 0 2px; }
.ed-pages a:empty, .ed-pages span:empty { display: none; }

/* ===== v7: чистим гостевую форму логина в дропдауне ===== */
.ed-acc-btn:focus, .ed-acc-btn:focus-visible { outline: none; }
.ed-acc-panel .h_btn.login { display: none; }            /* убрать дублирующий toggle с большой иконкой-человеком */
.ed-acc-panel .droptopbar { position: static; background: none; box-shadow: none; padding: 0; margin: 0; }
.ed-acc-panel .droptopbar .wrp { padding: 0; max-width: none; margin: 0; }
.ed-acc-panel .login_form { list-style: none; margin: 0; padding: 0; }
.ed-acc-panel .login_form li { margin: 0 0 12px; }
.ed-acc-panel .login_form label { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8a8273; margin-bottom: 5px; }
.ed-acc-panel .login_form input.wide, .ed-acc-panel .login_form input { width: 100%; padding: 10px 11px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; font-size: 15px; font-family: inherit; }
.ed-acc-panel .login_form input:focus { border-color: var(--brand); background: #fff; outline: none; }
.ed-acc-panel .login_form .btn { width: 100%; background: var(--brand); color: #fff; border: 0; padding: 11px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.ed-acc-panel .login_form .btn b { font-weight: 600; }
.ed-acc-panel .soc_links:empty { display: none; }
.ed-acc-panel .login_form_links { display: flex; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #efeae1; font-family: "JetBrains Mono", monospace; font-size: 12px; }
.ed-acc-panel .login_form_links a { color: var(--brand-ink); font-weight: 600; }

/* ===== v8: ФИКС grid-карточек на широких экранах ===== */
.ed-list { columns: auto !important; }   /* убираем multicol из прототипа — ломал grid карточек >1100px */
.ed-row .ed-rdek { display: block; margin-top: 8px; }  /* лид-описание в карточках с фото */

/* ===== v9: .ed-row → flexbox (grid авто-размещение рассыпало контент в live) ===== */
.ed-row { display: flex !important; align-items: flex-start; gap: 14px; grid-template-columns: none; }
.ed-row > .ph { flex: 0 0 96px; }
.ed-row > .ed-row__b { flex: 1 1 auto; min-width: 0; }
@container (min-width: 760px) {
  .ed-row { gap: 20px; }
  .ed-row > .ph { flex-basis: 168px; }
}

/* ===== v10: пост БЕЗ заглавной картинки → текстовая карточка с красной линией (как в дизайне) ===== */
.ed-row:has(.rimg[src*="no_image"]) > .ph { display: none; }
.ed-row:has(.rimg[src*="no_image"]) { border-left: 3px solid var(--brand); padding-left: 16px; }
.ed-row:has(.rimg[src*="no_image"]) .ed-row__b { padding-left: 0; }

/* ===== v11: комментарии под дизайн ===== */
.comment__b { min-width: 0; }
.comment .av { overflow: hidden; }
.comment .av .rimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comment .cf { align-items: center; }
.comment .cf a { color: var(--brand-ink); cursor: pointer; text-decoration: none; font-weight: 600; }
.comment .cf a:hover { text-decoration: underline; }
.comment .cf span { color: #8a8273; }
.comment .ct .signature { color: #9a9182; font-size: 12px; margin-top: 8px; }
.comment .ct-title { display: block; color: var(--brand-ink); margin-bottom: 4px; }
/* форма добавления коммента: подписка-чекбокс DLE */
.addcomment .checkrow input { width: 17px; height: 17px; accent-color: var(--brand); }
.addcomment .captcha { margin-top: 12px; }
.addcomment .captcha img { border-radius: 8px; }
.addcomment .row2 { margin-bottom: 10px; }

/* ===== v12: дерево комментов (вложенность через DLE comments-tree) ===== */
.comments-tree-list { list-style: none; margin: 0; padding: 0; }
.comments-tree-list .comments-tree-list { margin-left: 40px; }
.com_list form { margin: 0; }
.comment .cf a { color: var(--brand-ink); cursor: pointer; text-decoration: none; font-weight: 600; }
.comment .cf .cf-rate { color: #8a8273; font-weight: 400; }
.comment .cf .cf-rate a { font-weight: 700; }

/* ===== v13: капча в форме коммента — контейнер ровно по картинке ===== */
.captcha a { display: inline-block; line-height: 0; }
.captcha #dle-captcha { display: inline-block; padding: 0; margin: 0; background: none; border: 0; line-height: 0; }
.captcha #dle-captcha img, .captcha img[src*="antibot"] { display: block; width: 160px; height: 80px; border: 1px solid #e0dace; border-radius: 9px; }

/* ===== v14: похожие статьи без фото → текстовый вариант (как .relc--text дизайна) ===== */
.relc:has(.rimg[src*="no_image"]) > .relc__ph { display: none; }
.relc:has(.rimg[src*="no_image"]) { border-left: 2px solid var(--brand); padding-left: 12px; }
@container (min-width: 760px) {
  .relc:has(.rimg[src*="no_image"]) { border-left: 0; padding-left: 0; background: #fff; border: 1px solid #e9e4db; border-radius: 12px; padding: 16px; }
}

/* ===== v15: действия коммента = кнопки (без ссылок/краулинга) ===== */
.comment .cf button.cf-act { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; color: var(--brand-ink); cursor: pointer; line-height: inherit; }
.comment .cf button.cf-act:hover { text-decoration: underline; }
.comment .cf .cf-rate button.cf-act { font-weight: 700; }

/* ===== v16: типографика тела статьи .art-body из дизайна v2 (отступы списков LI и пр.) ===== */
.art-body h3 { font-family: "Newsreader", serif; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 10px; }
.art-body a { color: var(--brand-ink); text-decoration: underline; text-decoration-color: oklch(0.55 0.19 27 / 0.35); text-underline-offset: 2px; }
.art-body a:hover { text-decoration-color: var(--brand); }
.art-body strong, .art-body b { font-weight: 600; color: #1c1a17; }
.art-body ul, .art-body ol { margin: 14px 0 20px; padding-left: 22px; max-width: 68ch; }
.art-body li { margin-bottom: 9px; padding-left: 4px; }
.art-body li::marker { color: var(--brand); }
.art-body ul ul, .art-body ol ol, .art-body ul ol, .art-body ol ul { margin: 9px 0; }
.art-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0 20px; }
/* картинка с подписью (figure/figcaption) — по дизайну: фото на всю ширину, подпись курсив-сериф с красной полосой */
.art-body figure { margin: 26px 0 28px; }
.art-body figure.image, .art-body figure { text-align: left; }
.art-body figure img { width: 100%; height: auto; display: block; margin: 0; border-radius: 10px; }
.art-body figcaption { font-family: "Newsreader", serif; font-style: italic; font-size: 17px; line-height: 1.4; color: #6b645a; border-left: 3px solid var(--brand); padding-left: 16px; margin-top: 16px; }
/* CKEditor оборачивает подпись в .dle-borders (инлайн-рамка) + .contenteditable (центр) — нейтрализуем */
.art-body figcaption .dle-borders { border: 0 !important; padding: 0 !important; }
.art-body figcaption .contenteditable { text-align: left !important; font-family: "Newsreader", serif; font-style: italic; color: #6b645a; }
.art-body blockquote { font-family: "Newsreader", serif; font-size: 21px; line-height: 1.35; color: #1c1a17; border-left: 3px solid var(--brand); padding: 4px 0 4px 18px; margin: 22px 0; font-style: italic; }
.art-body code { font-family: "JetBrains Mono", monospace; font-size: 0.86em; background: #f1ece3; border: 1px solid #e7e2d9; border-radius: 5px; padding: 1px 6px; }
.art-body pre { background: #1c1a17; color: #f0ede7; border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 18px 0; font-size: 13.5px; line-height: 1.55; }
.art-body pre code { background: none; border: 0; padding: 0; color: inherit; }
.art-body hr { border: 0; border-top: 1px solid #e7e2d9; margin: 26px 0; }
.art-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.art-body th, .art-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #efeae1; }
.art-body thead td, .art-body th { font-weight: 600; color: #1c1a17; background: #f3f1ec; border-bottom: 1px solid #e7e2d9; }


/* ===== v21: СОДЕРЖАНИЕ (TOC) + расширенный шаринг — дизайн v3 ===== */
html { scroll-behavior: smooth; }
.art-body :where(h2, h3)[id] { scroll-margin-top: 130px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.toc { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; margin: 4px 0 22px; padding: 0; max-width: none; overflow: hidden; }
.toc__sum { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; list-style: none; margin: 0; }
.toc__sum::-webkit-details-marker { display: none; }
.toc__ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-bg); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; }
.toc__ic svg { width: 16px; height: 16px; }
.toc__t { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.toc__t small { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 500; color: #8a8273; letter-spacing: 0.02em; margin-top: 2px; }
.toc__chev { margin-left: auto; flex: none; width: 20px; height: 20px; color: #b0a896; transition: transform .22s ease; }
.toc[open] .toc__chev { transform: rotate(180deg); color: var(--brand); }
.toc__body { padding: 2px 10px 12px; border-top: 1px solid #f1ece3; }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 6px 0 0; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: flex; gap: 11px; align-items: baseline; padding: 8px 12px; border-radius: 9px; font-size: 14.5px; line-height: 1.35; color: #2a2722; text-decoration: none; transition: background .12s, color .12s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--brand-ink); flex: none; padding-top: 2px; }
.toc a:hover { background: #faf8f5; color: var(--brand-ink); }
.toc a.active { background: var(--brand-bg); color: var(--brand-ink); font-weight: 500; }
.toc li.lvl3 a { font-size: 13.5px; color: #5b554c; padding-left: 12px; }
.toc li.lvl3 a::before { content: "\2014"; color: #cfc6b6; }

.sharebar { display: flex; flex-wrap: wrap; gap: 8px; }
.sharebar a, .sharebar button { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 13.5px; font-weight: 500; color: #2a2722; background: #fff; border: 1px solid #e0dace; border-radius: 10px; padding: 9px 13px; cursor: pointer; text-decoration: none; transition: border-color .12s, transform .1s, color .12s; }
.sharebar a:hover, .sharebar button:hover { transform: translateY(-1px); border-color: var(--brand); }
.sharebar .ic { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; font-family: "JetBrains Mono", monospace; flex: none; }
.ic-vk { background: #07f; } .ic-tg { background: #29a9eb; } .ic-wa { background: #25d366; }
.ic-ok { background: #ee8208; } .ic-x { background: #111; } .ic-cp { background: #8a8273; }
.sharebar .copy.done { border-color: #25a35a; color: #25a35a; }
.art-rail .sharebar { flex-direction: column; }
.art-rail .sharebar a, .art-rail .sharebar button { width: 100%; }
.share-inline { margin: 24px 0 8px; padding: 18px 0; border-top: 1px solid #e7e2d9; border-bottom: 1px solid #e7e2d9; }
.share-inline h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 12px; }
@container (min-width: 760px) { .share-inline { display: none; } }

/* ===== v22: поджать вертикальный отступ между мета-блоком и TOC (был 40px grid-gap) ===== */
@container (min-width: 760px) {
  .art-wrap { column-gap: 40px; row-gap: 22px; }
}
.art-body #toc-box:first-child .toc { margin-top: 0; }

/* ===== v23: врезки (.notice) + эмодзи-заголовки (.emo) — дизайн v4 ===== */
/* ── врезки-уведомления (notice / callout) — авторский блок в тексте ── */
.art-body .notice { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  margin: 24px 0; padding: 16px 18px; border-radius: 12px; border: 1px solid #e7e2d9;
  border-left: 4px solid var(--brand); background: #fff; }
.art-body .notice__ic { flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1;
  background: var(--brand-bg); }
.art-body .notice__b { min-width: 0; }
.art-body .notice__t { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: #1c1a17; margin-bottom: 4px; }
.art-body .notice p { font-size: 15.5px; line-height: 1.6; color: #2a2722; max-width: none; margin: 0; }
.art-body .notice p + p { margin-top: 10px; }
.art-body .notice a { color: var(--brand-ink); }
/* варианты по смыслу */
.art-body .notice.warn   { border-left-color: oklch(0.7 0.15 65);  background: oklch(0.985 0.02 70); }
.art-body .notice.warn .notice__ic   { background: oklch(0.93 0.06 70); }
.art-body .notice.info   { border-left-color: oklch(0.6 0.12 248); background: oklch(0.98 0.015 248); }
.art-body .notice.info .notice__ic   { background: oklch(0.93 0.04 248); }
.art-body .notice.ok     { border-left-color: oklch(0.6 0.12 155); background: oklch(0.98 0.02 155); }
.art-body .notice.ok .notice__ic     { background: oklch(0.93 0.05 155); }
.art-body .notice.danger { border-left-color: oklch(0.58 0.2 25);  background: oklch(0.98 0.02 25); }
.art-body .notice.danger .notice__ic { background: oklch(0.93 0.06 25); }

/* ── заголовки с эмодзи: ровняем эмодзи в «иконку», не ломая базлайн ── */
.art-body h2 .emo, .art-body h3 .emo { display: inline-flex; align-items: center; justify-content: center;
  width: 1.3em; height: 1.3em; margin-right: 0.34em; font-size: 0.82em; vertical-align: -0.16em;
  background: var(--brand-bg); border-radius: 7px; font-style: normal; }

/* ===== v24: страница автора (.profile-*) + попап (.author-pop) — дизайн v3/v4 ===== */
/* ═══════════ ПОПАП АВТОРА ═══════════ */
.js-author { cursor: pointer; }
.author-pop { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.author-pop.open { display: flex; }
.author-pop__scrim { position: absolute; inset: 0; background: oklch(0.2 0.01 60 / 0.42); backdrop-filter: blur(2px); }
.author-pop__card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,0.3); animation: popin .18s ease; }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.author-pop__cover { height: 78px; background: linear-gradient(120deg, var(--brand), oklch(0.5 0.16 12)); position: relative; }
.author-pop__close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,0.22); color: #fff; cursor: pointer; font-size: 15px; }
.author-pop__body { padding: 0 22px 18px; margin-top: -36px; }
.author-pop__av { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background:
  repeating-linear-gradient(135deg, #e8e4dc, #e8e4dc 6px, #f0ede7 6px, #f0ede7 12px); }
.author-pop__name { font-family: "Newsreader", serif; font-weight: 600; font-size: 22px; letter-spacing: -0.01em; margin-top: 10px; }
.author-pop__real { font-size: 13.5px; color: #8a8273; margin-top: 1px; }
.author-pop__grp { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 10px; color: #fff; background: var(--brand); padding: 3px 9px; border-radius: 100px; margin-top: 9px; }
.author-pop__grp.adm { background: #1c1a17; }
.author-pop__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #efeae1; border: 1px solid #efeae1; border-radius: 12px; overflow: hidden; margin-top: 16px; }
.author-pop__meta div { background: #fff; padding: 11px 13px; }
.author-pop__meta b { font-family: "Newsreader", serif; font-size: 19px; font-weight: 600; display: block; }
.author-pop__meta small { font-family: "JetBrains Mono", monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8273; }
.author-pop__meta a { font-size: 11px; color: var(--brand-ink); display: inline-block; margin-top: 2px; }
.author-pop__info { font-size: 12.5px; color: #8a8273; margin-top: 12px; font-family: "JetBrains Mono", monospace; display: flex; gap: 12px; flex-wrap: wrap; }
.author-pop__act { display: flex; gap: 8px; margin-top: 16px; }
.author-pop__act a, .author-pop__act button { flex: 1; text-align: center; font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 11px; border-radius: 10px; cursor: pointer; border: 1px solid #e0dace; background: #fff; color: #1c1a17; }
.author-pop__act .primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.author-pop__act .adm { background: #1c1a17; color: #fff; border-color: #1c1a17; }

/* ═══════════ ПРОФИЛЬ (userinfo) — переоформление ═══════════ */
.profile-cover { height: 120px; border-radius: 16px 16px 0 0; background: linear-gradient(120deg, var(--brand), oklch(0.48 0.16 8)); position: relative; overflow: hidden; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06) 9px, transparent 9px, transparent 18px); }
@container (min-width: 760px) { .profile-cover { height: 150px; } }
.profile-head { background: #fff; border: 1px solid #e9e4db; border-top: 0; border-radius: 0 0 16px 16px; padding: 0 22px 20px; margin-top: 0; }
.profile-head .av { width: 96px; height: 96px; border: 4px solid #fff; margin-top: -52px; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.profile-status { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #25a35a; display: inline-flex; align-items: center; gap: 6px; }
.profile-status i { width: 7px; height: 7px; border-radius: 50%; background: #25a35a; display: inline-block; }
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
@container (min-width: 900px) { .profile-grid { grid-template-columns: 300px 1fr; align-items: start; } }
.profile-info { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 4px 16px; }
.profile-info .ir { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #efeae1; font-size: 14px; }
.profile-info .ir:last-child { border-bottom: 0; }
.profile-info .ir .k { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #8a8273; }
.profile-info .ir .v { color: #1c1a17; text-align: right; font-weight: 500; }
.profile-info .ir .v.rep { color: #25a35a; }
.profile-about { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 18px; margin-top: 14px; }
.profile-about h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8a8273; margin-bottom: 10px; }
.profile-about p { font-size: 14.5px; line-height: 1.6; color: #2a2722; }
.profile-main { min-width: 0; }


/* userinfo: аватар, статусы, ссылки, форма правки, попап-карточка */
.profile { padding: 8px 20px 50px; }
@container (min-width: 760px) { .profile { padding: 12px 36px 60px; max-width: 1080px; margin: 0 auto; } }
.profile .av.ph { position: relative; border-radius: 50%; overflow: hidden; flex: none; }
.profile .av .rimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile .grp { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #fff; background: var(--brand); padding: 3px 9px; border-radius: 100px; }
.profile-status.off { color: #8a8273; }
.profile .pa { display: flex; gap: 8px; flex-wrap: wrap; }
.profile .pa a, .profile .pa .pm a { text-decoration: none; }
.profile-links { font-family: "JetBrains Mono", monospace; font-size: 12px; color: #8a8273; margin-top: 14px; }
.profile-links a { color: var(--brand-ink); }
.profile-edit { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; margin-top: 18px; padding: 0 16px; }
.profile-edit > summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600; color: var(--brand-ink); }
.profile-edit > summary::-webkit-details-marker { display: none; }
.profile-edit .ui-form { list-style: none; margin: 0; padding: 0 0 16px; }
.profile-edit .form-group { margin-bottom: 12px; }
.profile-edit label { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8a8273; margin-bottom: 5px; }
.profile-edit input.wide, .profile-edit textarea.wide, .profile-edit select { width: 100%; padding: 10px 11px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; font: inherit; font-size: 15px; }
.profile-edit .form-sep { border-top: 1px solid #efeae1; margin: 8px 0; }

/* попап автора (ShowProfile -> profile_popup.tpl) — карточка внутри DLE-модала */
.poppro { font-family: "Spline Sans", system-ui, sans-serif; }
.poppro__top { display: flex; align-items: center; gap: 13px; }
.poppro__av { width: 56px; height: 56px; border-radius: 50%; position: relative; overflow: hidden; flex: none; }
.poppro__av .rimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poppro__name { font-family: "Newsreader", serif; font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.poppro__sub { font-size: 12.5px; color: #8a8273; margin-top: 3px; }
.poppro__grp { color: #fff; background: var(--brand); font-family: "JetBrains Mono", monospace; font-size: 10px; padding: 2px 8px; border-radius: 100px; }
.poppro__live { color: #25a35a; }
.poppro__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #efeae1; border: 1px solid #efeae1; border-radius: 12px; overflow: hidden; margin: 14px 0; }
.poppro__meta div { background: #fff; padding: 10px 13px; }
.poppro__meta b { font-family: "Newsreader", serif; font-size: 19px; font-weight: 600; display: block; }
.poppro__meta small { font-family: "JetBrains Mono", monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: #8a8273; }
.poppro__rows { list-style: none; margin: 0 0 12px; padding: 0; }
.poppro__rows li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #efeae1; font-size: 13.5px; }
.poppro__rows li span { color: #8a8273; }
.poppro__links { font-family: "JetBrains Mono", monospace; font-size: 12px; color: #8a8273; }
.poppro__links a { color: var(--brand-ink); }

/* ===== v25: полировка форм (registration / addnews / login-dropdown) ===== */
.cardform .field select, .cardform select { width: 100%; padding: 12px 13px; border: 1px solid #e0dace; border-radius: 10px; background: #faf8f5; font: inherit; font-size: 16px; }
#result-registration { font-size: 12.5px; margin-top: 6px; }
.addnews .field select, .addnews .field > input[type=text] { width: 100%; padding: 10px 11px; border: 1px solid #e0dace; border-radius: 9px; background: #faf8f5; font: inherit; font-size: 15px; }
.addnews .field textarea, .addnews .editor, .addnews .bbcodes ~ textarea { width: 100%; border: 1px solid #e0dace; border-radius: 9px; background: #fff; font: inherit; }
.addnews .admin_checkboxs label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 6px 0; color: #2a2722; }
.addnews .admin_checkboxs input { accent-color: var(--brand); }
.addnews .field .bbcodes { border: 1px solid #e0dace; border-bottom: 0; border-radius: 9px 9px 0 0; background: #faf8f5; }
.addnews .field .bbcodes + textarea, .addnews .field .bbcodes ~ .editor { border-radius: 0 0 9px 9px; }
/* login-дропдаун: меню вошедшего + соц-иконки */
.ed-acc-panel .name { font-size: 15px; margin-bottom: 6px; }
.ed-acc-panel .login_menu { list-style: none; margin: 6px 0 0; padding: 8px 0 0; border-top: 1px solid #efeae1; }
.ed-acc-panel .login_menu li a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; color: #2a2722; text-decoration: none; }
.ed-acc-panel .login_menu li a:hover { color: var(--brand-ink); }
.ed-acc-panel .login_menu .lm_num { color: var(--brand-ink); font-weight: 600; }
.ed-acc-panel .soc_links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ed-acc-panel .soc_links a { width: 34px; height: 34px; border: 1px solid #e0dace; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.ed-acc-panel .soc_links a:hover { border-color: var(--brand); }
.ed-acc-panel .soc_links svg.icon { width: 18px; height: 18px; }

/* ===== v26: админ-бар статьи + вход в шапке на мобиле ===== */
.art-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #1c1a17; color: #faf8f5; border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; }
@container (min-width: 760px) { .art-admin { grid-column: 1; } }
.art-admin__lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; color: oklch(0.8 0.12 30); margin-right: 2px; }
.art-admin a { font-size: 13px; font-weight: 500; color: #1c1a17; background: #faf8f5; border: 0; border-radius: 8px; padding: 7px 12px; text-decoration: none; cursor: pointer; }
.art-admin a:hover { transform: translateY(-1px); }
/* мобильная шапка: показывать поиск + вход (был display:none) */
.ed-tools { display: flex !important; }
@container (max-width: 759px) {
  .ed-account .ed-acc-panel { width: min(320px, calc(100vw - 24px)); right: 0; }
  .ed-tools > a[aria-label="Поиск"] button { width: 38px; height: 38px; }
}

/* ===== v27: админ-карандаш на карточках (только для админа, gated [group] в шаблоне) ===== */
.ed-row .row-edit { position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 7px; background: rgba(28,26,23,0.86); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; }
.ed-row .row-edit:hover { background: var(--brand); }
/* ===== v27: мобильный аккаунт = компактная иконка (бургер не вытесняется) ===== */
.ed-acc-btn .acc-ico { display: none; }
.ed-acc-btn .acc-ico svg { width: 20px; height: 20px; }
@container (max-width: 759px) {
  .ed-tools > a[aria-label="Поиск"] { display: none; }       /* поиск прячем на мобиле */
  .ed-acc-btn .acc-txt, .ed-acc-btn .caret { display: none; }
  .ed-acc-btn .acc-ico { display: inline-flex; }
  .ed-acc-btn { width: 40px; height: 40px; justify-content: center; padding: 0; border: 1px solid #e0dace; border-radius: 9px; color: var(--brand-ink); }
  .ed-account .ed-acc-panel { width: min(320px, calc(100vw - 24px)); right: 0; }
  .ed-tools { gap: 8px; }
}

/* ===== v28: фикс — бургер не уезжает за край (убираем второй margin-left:auto) ===== */
.ed-burger { margin-left: 8px; }

/* ===== v29: мобильная шапка — лого толкает кластер вправо (без двойного margin-auto) ===== */
@container (max-width: 759px) {
  .ed-logo { margin-right: auto; }
  .ed-tools { margin-left: 0 !important; }
  .ed-burger { margin-left: 8px; }
}

/* ===== v30: единая ширина контента 1240 + выравнивание шапки (ТЗ ширина-контента) ===== */
:root { --wrap: 1240px; }
.ed-top__inner { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
@container (min-width: 760px) { .ed-top__inner { gap: 28px; } }
@container (min-width: 1024px) {
  .ed-top { padding-left: 0; padding-right: 0; }
  .ed-top__inner { max-width: var(--wrap); margin-inline: auto; padding-inline: 36px; }
  .ed-crumb { max-width: var(--wrap); margin-inline: auto; }
  .ed-main { max-width: var(--wrap); margin-inline: auto; }
  .art-wrap { max-width: var(--wrap); grid-template-columns: minmax(0,1fr) 264px; }
  .art-body > p, .art-body .text > p, .art-body ul, .art-body ol { max-width: 70ch; }
  .pf-cols, .pf-copy { max-width: var(--wrap); }
  .profile, .sitemap, .stats { max-width: var(--wrap); margin-inline: auto; }
}

/* ===== v31: цитата (DLE [quote] -> div.quote, и blockquote) по ТЗ ===== */
.art-body .quote, .art-body blockquote {
  font-family: "Newsreader", serif; font-size: 21px; line-height: 1.35; color: #1c1a17;
  border: 0; border-left: 3px solid var(--brand); background: none; box-shadow: none;
  padding: 4px 0 4px 18px; margin: 22px 0; font-style: italic; border-radius: 0; max-width: 70ch;
}
.art-body .quote:before, .art-body blockquote:before { content: none !important; display: none !important; }
.art-body .title_quote { display: none !important; }
.art-body .quote p, .art-body blockquote p { max-width: none; margin: 0 0 8px; }

/* ===== v32: типографика статьи v6 (цитата-карточка, спойлер, видео, h4/h5, kbd) + кикер-ссылки ===== */
.art-body blockquote > p { margin: 0; max-width: none; }
.art-body blockquote > p + p { margin-top: 12px; }
.art-body blockquote cite { display: block; margin-top: 10px; font-family: "Spline Sans", sans-serif; font-style: normal; font-size: 14px; color: #8a8273; }
.art-body blockquote cite::before { content: "— "; }
.art-body h4 { font-family: "Spline Sans", system-ui, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #1c1a17; margin: 20px 0 8px; }
.art-body h5 { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8273; margin: 18px 0 6px; }
.art-body kbd { font-family: "JetBrains Mono", monospace; font-size: 0.82em; color: #1c1a17; background: #fff; border: 1px solid #d8d1c2; border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; }
.art-body abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.art-body p:empty { display: none; }
/* DLE цитата (кнопка «Цитата»): div.quote (+ .title) — карточка */
.art-body .quote, .art-body .bbcodequote { background: #fff; border: 1px solid #e7e2d9; border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 18px; margin: 22px 0; font-size: 16px; line-height: 1.6; color: #2a2722; font-style: normal; max-width: none; }
.art-body .quote .title, .art-body .title_quote { font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--brand-ink); margin-bottom: 8px; display: block; background: none; padding: 0; }
.art-body .quote::before, .art-body .bbcodequote::before { content: none !important; }
/* DLE спойлер: div.spoiler > .spoiler-head + .spoiler-body */
.art-body .spoiler { border: 1px solid #e7e2d9; border-radius: 12px; margin: 22px 0; overflow: hidden; background: #fff; }
.art-body .spoiler-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: 15px; color: #1c1a17; user-select: none; background: #faf8f5; }
.art-body .spoiler-head::before { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .2s; }
.art-body .spoiler-head.folded::before { transform: rotate(-45deg); }
.art-body .spoiler-body { padding: 14px 16px; border-top: 1px solid #efeae1; font-size: 16px; line-height: 1.6; }
/* адаптивное видео 16:9 */
.art-body .responsive-video, .art-body .video-shadow { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; margin: 22px 0; border-radius: 12px; overflow: hidden; background: #1c1a17; }
.art-body .responsive-video iframe, .art-body .video-shadow iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.art-body > iframe { max-width: 100%; border-radius: 12px; margin: 22px 0; }
/* обтекание картинок из редактора */
.art-body img[align="left"], .art-body img[style*="float:left"], .art-body img[style*="float: left"] { float: left; margin: 4px 18px 12px 0; max-width: 50%; border-radius: 10px; }
.art-body img[align="right"], .art-body img[style*="float:right"], .art-body img[style*="float: right"] { float: right; margin: 4px 0 12px 18px; max-width: 50%; border-radius: 10px; }
/* эмодзи-заголовки: бейдж по центру строки */
.art-body h2:has(.emo), .art-body h3:has(.emo) { display: flex; align-items: center; flex-wrap: wrap; gap: 0.34em; }
.art-body h2 .emo, .art-body h3 .emo { width: 1.4em; height: 1.4em; flex: none; font-size: 0.8em; line-height: 1; }
/* кикер разделов в статье = ссылки на разделы ({link-category}) */
.ed-kicker a { color: inherit; text-decoration: none; }
.ed-kicker a:hover { color: var(--brand); }

/* ===== v33: прятать пустые заголовки статьи (артефакты редактора) ===== */
.art-body h2:empty, .art-body h3:empty, .art-body h4:empty { display: none; }

/* ===== v34: низ статьи вне grid (фикс «опрос ломает комменты») + опрос ===== */
.art-foot { padding: 0 20px 30px; }
@container (min-width: 760px) { .art-foot { max-width: 1080px; margin-inline: auto; padding: 0 36px 40px; } }
@container (min-width: 1024px) { .art-foot { max-width: var(--wrap); } }
.art-foot .art-related { border-top: 1px solid #e7e2d9; padding-top: 20px; }
.art-foot .art-nav { display: flex; justify-content: space-between; gap: 12px; max-width: none; margin: 20px 0 0; padding: 0; }
/* опрос (poll.tpl/vote.tpl) — редакционная карточка */
.m-poll { background: #fff; border: 1px solid #e9e4db; border-radius: 14px; padding: 18px; margin: 24px 0; }
.m-poll__h { display: flex; align-items: center; gap: 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8a8273; margin-bottom: 10px; }
.m-poll__q { font-family: "Newsreader", serif; font-size: 19px; font-weight: 600; margin-bottom: 14px; line-height: 1.25; }
.m-poll .vote_list { margin-bottom: 12px; }
.m-poll .vote_list label { display: block; padding: 7px 0; cursor: pointer; }
.m-poll .vote_list input { accent-color: var(--brand); margin-right: 8px; }
.m-poll__meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #8a8273; margin-top: 8px; }
.m-poll__act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m-poll__more { display: inline-block; margin-top: 10px; color: var(--brand-ink); font-size: 13px; text-decoration: none; }

/* ═══ профиль v39: раскладка под дизайн (аватар→H1→действия, табы, список публикаций) ═══ */
.profile-head { display: block; }
.profile-head .av { display: block; margin: -52px 0 0; }
.profile-head h1 { margin: 14px 0 0; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.profile-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile .grp { background: var(--brand-bg); color: var(--brand-ink); border: 1px solid oklch(0.86 0.06 27); }
.btn-fill { display: inline-block; font-weight: 600; font-size: 14px; color: #fff; background: var(--brand); border: 1px solid var(--brand); padding: 10px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-fill:hover { background: var(--brand-ink); }
.profile .pa .btn-ghost { padding: 10px 16px; line-height: 1.2; }
.profile-pubs { margin-top: 16px; }
.profile-pubs .ed-row { padding: 16px 0; border-bottom: 1px solid #efeae1; }
.profile-pubs .ed-row:last-child { border-bottom: 0; }
.profile-pubs:empty { color: #8a8273; font-size: 14px; padding: 18px 0; }
.profile-pubs:empty::before { content: "Пока нет публикаций."; }

/* бейдж черновика в метабаре статьи (только при approve=0; см. [draft] в show.full.php) */
.art-draft { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.art-draft::before { content: "🚧"; font-size: 28px; line-height: 1; }
.art-draft::after { content: "Черновик"; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-ink); }

/* страница «Комментарии пользователя» (do=lastcomments) — в стиле профиля/категории */
#content:has(#dle-comments-list) { max-width: var(--wrap); margin-inline: auto; padding: 12px 20px 44px; }
@container (min-width: 760px) { #content:has(#dle-comments-list) { padding: 16px 36px 56px; } }
.lc-head { padding: 4px 0 16px; }
#dle-comments-list .comment { padding: 18px 0; border-bottom: 1px solid #efeae1; margin: 0; }
#dle-comments-list .comment:last-child { border-bottom: 0; }
#dle-comments-list .ct-title a { font-family: "Newsreader", serif; font-weight: 600; }
