/* ===================================================================================================
   Редакционный стиль (16.09.2026): сайт должен выглядеть как справочник, а не как шаблон стартапа.
   Бумажный фон, чернильный текст, один акцент цвета сургучной печати, заголовки с засечками,
   тонкие линейки вместо теней и скруглений, никаких градиентов и таблеток-кнопок.
   Подключается после app.css и переопределяет его.
   =================================================================================================== */
:root {
  --bg: #f6f2ea; --surface: #fffdf8; --surface-2: #efe9dd; --text: #1c1a17; --muted: #6b645a; --line: #ddd4c4;
  --accent: #8a1f24; --accent-2: #a52a2a; --accent-soft: #f3e4df; --link: #1d4a74;
  --ok: #2f6b3a; --ok-bg: #e6efe2; --warn: #86600c; --warn-bg: #f6ecd3; --bad: #9c2a22; --bad-bg: #f6e1dc;
  --mark: #f2e3a6; --hl: #f7edc8;
  --radius: 0; --shadow: none;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "PT Serif", "Times New Roman", serif;
  --font-law: Georgia, "PT Serif", "Times New Roman", serif;
  --tg: #2a9bd8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16140f; --surface: #1d1a15; --surface-2: #262219; --text: #ebe4d6; --muted: #a39a8a; --line: #3a342a;
    --accent: #e0857c; --accent-2: #ec9b92; --accent-soft: #3a2320; --link: #93b9df;
    --ok: #86c28f; --ok-bg: #1f2b1f; --warn: #e2bd67; --warn-bg: #332a14; --bad: #f09288; --bad-bg: #3a1f1b;
    --mark: #5a4a14; --hl: #332c16;
  }
}
:root[data-theme="dark"] {
  --bg: #16140f; --surface: #1d1a15; --surface-2: #262219; --text: #ebe4d6; --muted: #a39a8a; --line: #3a342a;
  --accent: #e0857c; --accent-2: #ec9b92; --accent-soft: #3a2320; --link: #93b9df;
  --ok: #86c28f; --ok-bg: #1f2b1f; --warn: #e2bd67; --warn-bg: #332a14; --bad: #f09288; --bad-bg: #3a1f1b;
  --mark: #5a4a14; --hl: #332c16;
}
body { line-height: 1.6; }
a { text-underline-offset: 2px; }
h1, h2, h3, .page-title, .dochead__title, .hero__title, .block__head h2, .card__title, .group-card__name, .clf__name, .tgp__title {
  font-family: var(--font-head); font-weight: 700; letter-spacing: 0;
}
.page-title { font-size: clamp(28px, 3.2vw, 38px); margin-top: 22px; }

/* шапка: газетная линейка сверху, знак и название с засечками */
.top { border-top: 4px solid var(--accent); background: var(--surface); }
.top__in { height: 66px; }
.logo { gap: 10px; font-size: 22px; }
.logo__mark { width: 36px; height: 36px; border-radius: 0; background: none; display: block; }
.logo__text { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.logo__text span { color: var(--accent); }
.nav a { border-radius: 0; padding: 8px 9px; border-bottom: 2px solid transparent; }
.nav a:hover { background: none; border-bottom-color: var(--accent); }
.toptg { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid var(--line); color: var(--text); font-size: 14px; white-space: nowrap; }
.toptg svg { color: var(--tg); }
.toptg:hover { border-color: var(--tg); text-decoration: none; }
.theme { border-radius: 0; }
.search__input { border-radius: 0; background: var(--surface); }
.search__input:focus { box-shadow: none; border-color: var(--text); }
.suggest { border-radius: 0; box-shadow: 0 8px 24px rgba(40, 30, 10, .12); }

/* главная */
.hero { background: none; border-bottom: 1px solid var(--line); padding: 54px 0 34px; }
.hero__title { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.12; max-width: 900px; margin: 0 auto 14px; }
.hero__title span { color: var(--accent); font-style: italic; }
.search--hero .search__input { height: 58px; border: 1px solid var(--text); box-shadow: none; }
.search__btn--text { border-radius: 0; background: var(--text); color: var(--bg); letter-spacing: .02em; }
.search__btn--text:hover { background: var(--accent); }
.chips { gap: 4px 0; }
.chip { border: 0; background: none; border-radius: 0; padding: 2px 10px; color: var(--link); font-size: 15px; position: relative; }
.chip + .chip::before { content: "·"; position: absolute; left: -2px; color: var(--muted); }
.chip:hover { text-decoration: underline; }
.chip--on { background: var(--text); color: var(--bg); }
.block__head { border-bottom: 2px solid var(--text); padding-bottom: 6px; }
.block__head h2 { font-size: 24px; }
.tiles { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.tile:hover { background: var(--accent-soft); }
.tile__code { font-family: var(--font-head); font-size: 18px; color: var(--accent); }

/* карточки: линейка сверху вместо коробки с тенью */
.card { border-radius: 0; box-shadow: none; border-top: 3px solid var(--text); }
.card--accent { border-top-color: var(--accent); }
.card__title { font-size: 18px; }
.group-card, .pcal__m, .toc__box, .table, .pdfview, .calgrid__d, .pre-table, .cmp__side, .toast { border-radius: 0; }
.group-card { border-top: 3px solid var(--line); }
.group-card:hover { border-top-color: var(--accent); }
.group-card__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.btn { border-radius: 0; background: var(--text); border-color: var(--text); color: var(--bg); }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.badge { border-radius: 0; height: 22px; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.badge--plain, .badge--muted { text-transform: none; letter-spacing: 0; }
.pages a, .pages span { border-radius: 0; }
.pages span[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.alert { border-radius: 0; }
.filters input[type=search], .filters select, .calc__row input, .calc__row select, .ondate input[type=date], .toc__filter, .toc__item a { border-radius: 0; }
.big-value { font-family: var(--font-head); color: var(--text); }
.u, .u:target, .blk:target, .u.is-hl, mark { border-radius: 0; }
.law .h { font-family: var(--font-head); }
.dochead__kind { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.foot { border-top: 4px solid var(--text); }
.foot__brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 20px; }
.foot__in { grid-template-columns: 1.2fr 1fr; }

/* ---------- Telegram-канал ---------- */
.tgicon { flex: none; }
.tgp__btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; background: var(--tg); color: #fff; font-weight: 600; }
.tgp__btn:hover { background: #1d86c0; text-decoration: none; }
.tgp__btn--sm { height: 36px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.tgp--wide { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; margin: 30px 0 6px;
  padding: 30px 34px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--tg); }
.tgp__kicker { display: flex; align-items: center; gap: 6px; color: var(--tg); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tgp__title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; margin: 8px 0 10px; }
.tgp__lead { color: var(--muted); margin: 0 0 18px; max-width: 560px; }
.tgp__post { margin: 0; background: #dfe8ef; padding: 16px; border-radius: 12px; font-size: 14px; color: #1c1a17; }
.tgp__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tgp__head img { border-radius: 50%; }
.tgp__head b { display: block; font-size: 14px; }
.tgp__head small { color: #5f6f7c; }
.tgp__bubble { background: #fff; border-radius: 4px 12px 12px 12px; padding: 10px 12px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.tgp__bubble p { margin: 4px 0 6px; }
.tgp__link { color: #2a7fc0; }
:root[data-theme="dark"] .tgp__post { background: #243240; color: #e8edf1; }
:root[data-theme="dark"] .tgp__bubble { background: #182533; }
:root[data-theme="dark"] .tgp__head small { color: #93a4b3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tgp__post { background: #243240; color: #e8edf1; }
  :root:not([data-theme="light"]) .tgp__bubble { background: #182533; }
  :root:not([data-theme="light"]) .tgp__head small { color: #93a4b3; }
}
.tgp--inline { display: flex; align-items: center; gap: 14px; margin: 22px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tg); }
.tgp--inline p { margin: 0; flex: 1; font-size: 15px; }
.tgp__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--tg); color: #fff; }
.tgp--foot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); color: var(--text); }
.tgp--foot:hover { border-color: var(--tg); text-decoration: none; }
.tgp--foot b { display: block; }
.tgp--foot small { color: var(--muted); }
@media (max-width: 760px) {
  .tgp--wide { grid-template-columns: 1fr; padding: 22px 18px; gap: 20px; }
  .tgp--inline { flex-wrap: wrap; }
  .toptg span { display: none; }
  .toptg { padding: 0 9px; }
  .foot__in { grid-template-columns: 1fr; }
}
