@charset "UTF-8";
/* ==========================================================================
   Вики инструкций. Структура визуального языка взята с gosuslugi.ru
   (пастельные плашки, мягкая тень, радиусы 12/8, шрифт Lato),
   акцентный оттенок — красный.
   ========================================================================== */

/* Lato подхватится, если положить файлы в static/fonts/. Если их нет —
   браузер молча берёт следующий шрифт из стека, ничего не ломается. */
@font-face {
  font-family: "Lato";
  src: url("/static/fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/static/fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- токены --- */
:root {
  --font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Коралловый — только точки внимания. Три ступени, потому что #ff4e4e
     на белом даёт 3.2:1: этого хватает иконкам, рамкам и крупным цифрам,
     но не тексту. */
  --accent: #ff4e4e;        /* иконки, рамки, полосы, крупные числа */
  --accent-ink: #d93a3a;    /* текст ссылок и заливка кнопок — 4.6:1 на белом */
  --accent-strong: #b92f2f; /* мелкий текст на розовых плашках — 5.3:1 */
  --accent-hover: #b92f2f;  /* ховер и нажатие */

  --tint: #fdecee;          /* карточки, плашки, callout-блоки */
  --tint-soft: #fff9f9;     /* область контента, ховер, код в тексте */
  --tint-strong: #fadce0;   /* активный пункт меню */

  --text: #16181a;
  --muted: #8a8f98;
  --bg: #fefffe;
  --surface: #ffffff;
  --cool: #fff9f9;
  --line: #f3dcdf;
  --line-strong: #ebc9cd;   /* производный: рамка при наведении, клавиши */

  --yellow: #fef0cc;
  --yellow-ink: #7a5a0d;
  --green: #e3f3e8;
  --green-ink: #2f7d4f;
  --red: #f8d3d6;
  --red-ink: #8e1219;
  --lilac: #ece9fb;
  --lilac-ink: #5b4ba8;
  --teal: #e0f2f4;
  --teal-ink: #14706e;

  --shadow: 0 1px 4px #f7e5e7, 0 24px 48px rgba(246, 231, 233, 0.5);
  --shadow-hover: 0 2px 10px rgba(255, 78, 78, 0.12), 0 24px 48px rgba(246, 231, 233, 0.65);

  --r-card: 12px;
  --r-btn: 10px;
  --r-image: 18px;          /* скриншоты — скругление заметно крупнее карточек */
  --r-sm: 4px;
  --r-pill: 999px;

  --topbar-h: 64px;
  --content-w: 800px;
  --sidebar-w: 288px;

  --code-bg: #fff9f9;
  --code-line: #f3dcdf;
}

:root[data-theme="dark"] {
  --accent: #ff6b6b;
  --accent-ink: #ff8080;
  --accent-strong: #ffa3a3;
  --accent-hover: #ff8080;

  --tint: #38232a;
  --tint-soft: #261e22;
  --tint-strong: #462b33;

  --text: #f2f3f5;
  --muted: #9aa0a8;
  --bg: #16181a;
  --surface: #1e2124;
  --cool: #24272b;
  --line: #33373c;
  --line-strong: #474c53;

  --yellow: #3a2f14;
  --yellow-ink: #e7c67a;
  --green: #16301f;
  --green-ink: #86c9a0;
  --red: #43191d;
  --red-ink: #f2a3aa;
  --lilac: #251f3d;
  --lilac-ink: #b3a6ec;
  --teal: #102b2c;
  --teal-ink: #7ec9c6;

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 18px 36px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.5), 0 20px 40px rgba(0, 0, 0, 0.4);

  --code-bg: #1b1e21;
  --code-line: #33373c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #ff6b6b;
    --accent-ink: #ff8080;
    --accent-strong: #ffa3a3;
    --accent-hover: #ff8080;

    --tint: #38232a;
    --tint-soft: #261e22;
    --tint-strong: #462b33;

    --text: #f2f3f5;
    --muted: #9aa0a8;
    --bg: #16181a;
    --surface: #1e2124;
    --cool: #24272b;
    --line: #33373c;
    --line-strong: #474c53;

    --yellow: #3a2f14;
    --yellow-ink: #e7c67a;
    --green: #16301f;
    --green-ink: #86c9a0;
    --red: #43191d;
    --red-ink: #f2a3aa;
    --lilac: #251f3d;
    --lilac-ink: #b3a6ec;
    --teal: #102b2c;
    --teal-ink: #7ec9c6;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 18px 36px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.5), 0 20px 40px rgba(0, 0, 0, 0.4);

    --code-bg: #1b1e21;
    --code-line: #33373c;
  }
}

/* ----------------------------------------------------------------- база --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

/* колонка на всю высоту экрана — чтобы подвал всегда был прижат к низу */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: 0 0 var(--r-btn) 0;
}
.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------- шапка ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  min-height: var(--topbar-h);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
  color: var(--text);
}
.brand__name {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: var(--r-card);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--tint-soft);
}

/* бургер — только на узких экранах (правило ниже .icon-btn не случайно:
   одинаковая специфичность, побеждает порядок) */
.topbar__burger {
  display: none;
}

.icon-moon {
  display: none;
}
:root[data-theme="dark"] .icon-sun {
  display: none;
}
:root[data-theme="dark"] .icon-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: block;
  }
}

/* ------------------------------------------------- поиск: свёрнут в лупу -- */
.topbar__search {
  margin-left: auto;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.topbar__search .search {
  display: none;
}
.topbar__search.is-open {
  flex: 1 1 auto;
  max-width: 480px;
}
.topbar__search.is-open .search {
  display: flex;
  width: 100%;
}
.topbar__search.is-open .search__open {
  display: none;
}

/* --------------------------------------------------------------- поиск ---- */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cool);
  border: 1px solid transparent;
  border-radius: var(--r-card);
  padding: 4px 4px 4px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.search:focus-within {
  background: var(--surface);
  border-color: var(--accent);
}
.search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 9px 0;
  font: inherit;
  color: var(--text);
}
.search__input::placeholder {
  color: var(--muted);
}
.search__input:focus {
  outline: none;
}
.search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.search__submit {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--accent-ink);
  color: #fff;
  cursor: pointer;
}
.search__submit:hover {
  background: var(--accent-hover);
}
:root[data-theme="dark"] .search__submit {
  color: #16181a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .search__submit {
    color: #16181a;
  }
}

.search__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 8px;
  max-height: min(60vh, 460px);
  overflow-y: auto;
}
.search__panel[hidden] {
  display: none;
}
.sugg {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-btn);
  color: var(--text);
}
.sugg:hover,
.sugg.is-active {
  background: var(--tint-strong);
  text-decoration: none;
}
.sugg__section {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.sugg__title {
  display: block;
  font-weight: 700;
}
.sugg__snippet {
  display: block;
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sugg__empty {
  padding: 12px;
  color: var(--muted);
}
.sugg mark,
.result__snippet mark,
.result__title mark {
  background: var(--yellow);
  color: inherit;
  border-radius: var(--r-sm);
  padding: 0 2px;
}
:root[data-theme="dark"] mark {
  color: var(--yellow-ink);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark {
    color: var(--yellow-ink);
    font-weight: 700;
  }
}

/* ---------------------------------------------------------------- герой --- */
.hero {
  flex: none;
  background: var(--tint);
}
.hero__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px;
}
.hero__title {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.hero__text {
  margin: 12px 0 0;
  font-size: 17px;
  color: var(--text);
  max-width: 640px;
}

/* --------------------------------------------------------------- каркас --- */
.shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.shell--with-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
}

.main {
  min-width: 0;
  padding: 40px 32px 96px;
}
.shell--plain .main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 96px;
  width: 100%;
}

/* -------------------------------------------------------------- сайдбар --- */
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 12px 48px 20px;
  border-right: 1px solid var(--line);
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sidebar__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 12px;
}
.sidebar__close {
  display: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list--d2,
.nav-list--d3 {
  padding-left: 12px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-btn);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}
.nav-link:hover {
  background: var(--tint-soft);
  color: var(--text);
  text-decoration: none;
}
.nav-link.is-active {
  background: var(--tint-strong);
  color: var(--text);
  font-weight: 700;
}
.nav-link--overview {
  color: var(--muted);
}

.nav-details {
  margin-top: 4px;
}
.nav-group__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-btn);
  cursor: pointer;
  list-style: none;
  color: var(--text);
}
.nav-group__head::-webkit-details-marker {
  display: none;
}
.nav-group__head:hover {
  background: var(--tint-soft);
}
.nav-group__title {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 15px;
}
.nav-group__count {
  flex: none;
  min-width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--tint);
  border-radius: var(--r-pill);
  padding: 2px 7px;
}
.chevron {
  flex: none;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.nav-details[open] > .nav-group__head .chevron {
  transform: rotate(90deg);
}
.nav-group__body {
  padding-bottom: 6px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(22, 24, 26, 0.45);
  border: 0;
}
.drawer-backdrop[hidden] {
  display: none;
}

/* ------------------------------------------------------------- контейнер -- */
.block {
  margin-bottom: 48px;
}
.block__title {
  font-size: 24px;
  line-height: 1.33;
  font-weight: 700;
  margin: 0 0 20px;
}
.block__text {
  color: var(--muted);
  margin: -12px 0 20px;
}
.block--sub {
  margin-top: 40px;
}

.empty {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 32px;
}
.empty__title {
  margin: 0 0 12px;
  font-size: 22px;
}
.empty__code {
  background: var(--code-bg);
  border-radius: var(--r-card);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
}

/* ---------------------------------------------------------------- плитки -- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 20px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tile:hover {
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.tile__count {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--tint);
  border-radius: var(--r-pill);
  padding: 3px 12px;
}
.tile__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}
.tile__text {
  color: var(--muted);
  font-size: 15px;
  flex: 1 1 auto;
}
.tile__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 15px;
}

/* -------------------------------------------------------------- карточки -- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
/* Плашка с иконкой платформы. Появляется только если в frontmatter задан
   icon: — карточки без него выглядят как раньше. */
.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-btn);
  background: var(--tint);
  color: var(--accent-strong);
  transition: background-color 0.15s ease;
}
.card:hover .card__icon {
  background: var(--tint-strong);
}
.card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.card__kicker {
  font-size: 13px;
  color: var(--muted);
}
.card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.card__text {
  color: var(--muted);
  font-size: 15px;
}
.card__arrow {
  flex: none;
  color: var(--accent);
  display: flex;
}

/* --------------------------------------------------------------- кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-btn);
  padding: 11px 22px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent-ink);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}
:root[data-theme="dark"] .btn--primary {
  color: #16181a;
}
.btn--ghost {
  border-color: var(--accent-ink);
  color: var(--accent);
  background: var(--surface);
}
.btn--ghost:hover {
  background: var(--tint-soft);
  text-decoration: none;
}

/* --------------------------------------------------------------- статья --- */
.article {
  max-width: var(--content-w);
  margin: 0 auto;
}
.article__head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.article__headmain {
  flex: 1 1 auto;
  min-width: 0;
}
.article__kicker {
  display: inline-block;
  font-size: 14px;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.article__kicker--plain {
  color: var(--muted);
}
.article__title {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.article__lead {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}
.article__tools {
  flex: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- типографика */
.prose {
  font-size: 17px;
  line-height: 1.65;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.3;
  font-weight: 700;
  scroll-margin-top: calc(var(--topbar-h) + 20px);
}
.prose h1 {
  font-size: 28px;
  margin: 44px 0 16px;
}
.prose h2 {
  font-size: 24px;
  margin: 40px 0 16px;
}
.prose h3 {
  font-size: 20px;
  margin: 32px 0 12px;
}
.prose h4 {
  font-size: 17px;
  margin: 24px 0 8px;
}
.prose p {
  margin: 0 0 16px;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--tint);
  color: var(--muted);
}
.prose strong {
  font-weight: 700;
}
.prose abbr {
  text-decoration: underline dotted;
  cursor: help;
}

/* списки: нумерованный — «шаги» кружками */
.prose ul {
  list-style: none;
  margin: 0 0 20px;
  padding-left: 0;
}
.prose ul > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose ol {
  counter-reset: step;
  list-style: none;
  margin: 0 0 24px;
  padding-left: 0;
}
.prose ol > li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}
.prose ol > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.prose li > ul,
.prose li > ol {
  margin-top: 10px;
  margin-bottom: 4px;
}
.prose li > ol > li {
  padding-left: 36px;
}
.prose li > ol > li::before {
  width: 24px;
  height: 24px;
  font-size: 13px;
}
.prose dl {
  margin: 0 0 20px;
}
.prose dt {
  font-weight: 700;
  margin-top: 14px;
}
.prose dd {
  margin: 4px 0 0 0;
  color: var(--muted);
}

/* чек-листы */
.prose .task-list {
  padding-left: 0;
}
.prose .task-list-item {
  padding-left: 32px;
}
.prose .task-list-item::before {
  display: none;
}
.prose .task-list-control {
  position: relative;
}
.prose .task-list-control input {
  position: absolute;
  opacity: 0;
}
.prose .task-list-indicator {
  position: absolute;
  left: -32px;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: var(--r-sm);
  border: 2px solid var(--line-strong);
  background: var(--surface);
}
.prose .task-list-control input:checked + .task-list-indicator {
  background: var(--accent);
  border-color: var(--accent);
}
.prose .task-list-control input:checked + .task-list-indicator::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 8px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

/* сноски */
.prose .footnote {
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* картинки: по центру колонки вместе с подписью */
.prose .figure {
  margin: 28px 0;
  text-align: center;
}
.prose .figure img {
  border-radius: var(--r-image);
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
}
.prose figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* таблицы */
.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--surface);
}
.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  background: var(--cool);
  font-weight: 700;
  white-space: nowrap;
}
.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* ссылки в тексте */
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.prose a.link-broken {
  color: var(--red-ink);
  text-decoration-style: dashed;
}

/* --------------------------------------------------------- блоки-подсказки */
.prose .admonition,
.callout {
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: var(--r-card);
  background: var(--tint);
}
.prose .admonition > *:last-child,
.callout > *:last-child {
  margin-bottom: 0;
}
.prose .admonition-title,
.callout__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent-strong);
}
.prose .admonition-title::before,
.callout__title::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><circle cx='10' cy='10' r='7.6'/><path d='M10 9v5' stroke-linecap='round'/><circle cx='10' cy='6.3' r='.5' fill='%23000' stroke='none'/></svg>");
}

.prose .admonition.tip,
.prose .admonition.success,
.callout--tip {
  background: var(--green);
}
.prose .admonition.tip > .admonition-title,
.prose .admonition.success > .admonition-title,
.callout--tip > .callout__title {
  color: var(--green-ink);
}
.prose .admonition.tip > .admonition-title::before,
.callout--tip > .callout__title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><path d='M7.2 12.4a4.6 4.6 0 115.6 0V14.5H7.2z' stroke-linejoin='round'/><path d='M8.4 17h3.2' stroke-linecap='round'/></svg>");
}
.prose .admonition.success > .admonition-title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><circle cx='10' cy='10' r='7.6'/><path d='M6.4 10.3l2.6 2.5 4.6-4.9' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.prose .admonition.warning,
.callout--warning {
  background: var(--yellow);
}
.prose .admonition.warning > .admonition-title,
.callout--warning > .callout__title {
  color: var(--yellow-ink);
}
.prose .admonition.warning > .admonition-title::before,
.callout--warning > .callout__title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><path d='M10 3.4L18 16.9H2z' stroke-linejoin='round'/><path d='M10 8.2v3.6' stroke-linecap='round'/><circle cx='10' cy='14.2' r='.55' fill='%23000' stroke='none'/></svg>");
}

.prose .admonition.danger,
.callout--danger {
  background: var(--red);
}
.prose .admonition.danger > .admonition-title,
.callout--danger > .callout__title {
  color: var(--red-ink);
}
.prose .admonition.danger > .admonition-title::before,
.callout--danger > .callout__title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><path d='M7.1 2.6h5.8l4.5 4.5v5.8l-4.5 4.5H7.1L2.6 12.9V7.1z' stroke-linejoin='round'/><path d='M10 6.2v5' stroke-linecap='round'/><circle cx='10' cy='13.6' r='.55' fill='%23000' stroke='none'/></svg>");
}

.prose .admonition.important,
.callout--important {
  background: var(--lilac);
}
.prose .admonition.important > .admonition-title,
.callout--important > .callout__title {
  color: var(--lilac-ink);
}
.prose .admonition.important > .admonition-title::before,
.callout--important > .callout__title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><path d='M5.5 2.8h9v14.4L10 13.6l-4.5 3.6z' stroke-linejoin='round'/></svg>");
}

.prose .admonition.example,
.prose .admonition.question {
  background: var(--cool);
}
.prose .admonition.example > .admonition-title,
.prose .admonition.question > .admonition-title {
  color: var(--text);
}
.prose .admonition.example > .admonition-title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'><path d='M4.5 5.5h11M4.5 10h11M4.5 14.5h7'/></svg>");
}
.prose .admonition.question > .admonition-title::before {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7'><circle cx='10' cy='10' r='7.6'/><path d='M8.1 7.7a2 2 0 113.2 1.7c-.7.5-1.3 1-1.3 2' stroke-linecap='round'/><circle cx='10' cy='14' r='.55' fill='%23000' stroke='none'/></svg>");
}

/* раскрывающиеся блоки (???) */
.prose details {
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 4px 20px;
}
.prose details > summary {
  padding: 14px 0;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent-ink);
  list-style: none;
}
.prose details > summary::-webkit-details-marker {
  display: none;
}
.prose details[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

/* ------------------------------------------------------------- вложения --- */
.attach-card {
  margin: 20px 0;
}
.attach {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* .prose a перебивает .attach по специфичности — поэтому явно гасим подчёркивание */
.prose a.attach,
.prose a.attach:hover,
.attach,
.attach:hover {
  text-decoration: none;
}
.attach:hover {
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.attach-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--cool);
  color: var(--muted);
}
.attach-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.attach-name {
  font-weight: 700;
  line-height: 1.35;
}
.attach-meta {
  font-size: 14px;
  color: var(--muted);
}
.attach-action {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  border-radius: var(--r-btn);
  color: var(--accent);
}
.attach-action::before {
  content: "";
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M10 3v9'/><path d='M6.2 8.4L10 12.2l3.8-3.8'/><path d='M3.8 14.6v1.1c0 .7.6 1.3 1.3 1.3h9.8c.7 0 1.3-.6 1.3-1.3v-1.1'/></svg>");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}
.attach:hover .attach-action {
  background: var(--tint-soft);
}

.attach-pdf {
  background: var(--red);
  color: var(--red-ink);
}
.attach-doc,
.attach-app {
  background: var(--tint);
  color: var(--accent-strong);
}
.attach-sheet {
  background: var(--green);
  color: var(--green-ink);
}
.attach-slides {
  background: var(--yellow);
  color: var(--yellow-ink);
}
.attach-archive,
.attach-media {
  background: var(--lilac);
  color: var(--lilac-ink);
}
.attach-image {
  background: var(--teal);
  color: var(--teal-ink);
}
.attach-cert {
  background: var(--tint);
  color: var(--accent-strong);
}

.prose a.attach-inline::after {
  content: " " attr(data-ext);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ код --- */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--tint-soft);
  border-radius: var(--r-sm);
  padding: 2px 6px;
  overflow-wrap: break-word;
}
.prose pre {
  margin: 24px 0;
  padding: 0;
  background: transparent;
}
.prose .highlight,
.prose pre > code {
  display: block;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.prose .highlight {
  position: relative;
  margin: 24px 0;
}
.prose .highlight pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose .highlight code,
.prose pre > code {
  background: transparent;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.6;
  border: 0;
  border-radius: 0;
}
.prose pre > code {
  padding: 18px 20px;
  overflow-x: auto;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--code-line);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--r-btn);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.prose .highlight:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}
.copy-btn.is-done {
  color: var(--green-ink);
  border-color: var(--green-ink);
  opacity: 1;
}
@media (hover: none) {
  .copy-btn {
    opacity: 1;
  }
}

/* клавиши ++ctrl+c++ */
.prose .keys kbd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 2px 6px;
  color: var(--text);
}
.prose .keys > span {
  color: var(--muted);
  margin: 0 3px;
  font-size: 13px;
}

/* ------------------------------------------------------ страница ошибки --- */
.errorpage {
  max-width: 640px;
  margin: 24px auto 0;
}
.errorpage__card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 36px 40px 40px;
}
.errorpage__badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--tint);
  border-radius: var(--r-pill);
  padding: 3px 12px;
}
.errorpage__title {
  margin: 16px 0 12px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.errorpage__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.errorpage__hint {
  margin: 16px 0 0;
  padding: 14px 18px;
  background: var(--yellow);
  border-radius: var(--r-card);
  font-size: 15px;
  line-height: 1.55;
}
.errorpage__search {
  margin-top: 24px;
}
.errorpage__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.errorpage__nav {
  margin-top: 32px;
  padding: 0 4px;
}
.errorpage__navtitle {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}
.chip:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.chip__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--tint);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

/* ------------------------------------------------------------ результаты -- */
.search-page {
  max-width: 640px;
  margin-bottom: 28px;
}
.search-stat {
  color: var(--muted);
  margin-bottom: 20px;
}
.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result {
  padding: 16px 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.result__link {
  display: block;
}
.result__link:hover {
  text-decoration: none;
}
.result__section {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.result__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.result__link:hover .result__title {
  color: var(--accent-ink);
}
.result__snippet {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ----------------------------------------------------------- статистика --- */
.stat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.stat-tab {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.stat-tab:hover {
  text-decoration: none;
  border-color: var(--accent-ink);
  color: var(--accent);
}
.stat-tab.is-active {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}
:root[data-theme="dark"] .stat-tab.is-active {
  color: #16181a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stat-tab.is-active {
    color: #16181a;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stat__value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
}
.stat__label {
  color: var(--muted);
  font-size: 14px;
}

/* приписка к заголовку блока: «последние 14 дней» */
.block__note {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* столбики просмотров по дням: высота задаётся инлайн, в процентах */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 0;
  -webkit-overflow-scrolling: touch;
}
.chart__col {
  flex: 1 1 0;
  min-width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 200px;
  justify-content: flex-end;
}
.chart__value {
  font-size: 12px;
  color: var(--muted);
}
.chart__bar {
  width: 100%;
  max-width: 40px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--tint);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
}
.chart__col.is-today .chart__bar {
  background: var(--accent);
  border-color: var(--accent);
}
.chart__label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.chart__col.is-today .chart__label {
  color: var(--text);
  font-weight: 700;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--surface);
}
.stat-table th,
.stat-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.stat-table th {
  background: var(--cool);
  font-weight: 700;
  white-space: nowrap;
}
.stat-table tbody tr:last-child td {
  border-bottom: 0;
}
.stat-table__num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-table__section {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.stat-table__link {
  font-weight: 700;
}
.stat-table__track {
  display: block;
  margin-top: 6px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--cool);
  overflow: hidden;
}
.stat-table__fill {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* --------------------------------------------------------------- подвал --- */
.footer {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
}

/* ---------------------------------------------------------- адаптивность -- */
@media (max-width: 1100px) {
  .main {
    padding: 32px 24px 80px;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-h: 56px;
  }
  .shell--with-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
  .topbar__inner {
    padding: 6px 12px;
    gap: 8px;
  }
  .topbar__burger {
    display: inline-flex;
  }
  .brand__name {
    font-size: 17px;
  }
  /* раскрытый поиск занимает всю строку шапки */
  .topbar__search.is-open {
    position: absolute;
    left: 8px;
    right: 8px;
    max-width: none;
    background: var(--surface);
    z-index: 3;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(330px, 88vw);
    height: 100%;
    max-height: none;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 16px 12px 40px;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }
  body.drawer-open .sidebar {
    transform: none;
    box-shadow: 0 0 40px rgba(22, 24, 26, 0.3);
  }
  .sidebar__close {
    display: inline-flex;
  }
  .sidebar__title {
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
  }

  .hero__inner {
    padding: 32px 16px 36px;
  }
  .hero__title {
    font-size: 26px;
  }
  .hero__text {
    font-size: 16px;
  }

  .main,
  .shell--plain .main {
    padding: 28px 16px 72px;
  }
  .article__head {
    gap: 8px;
  }
  .article__title {
    font-size: 26px;
    letter-spacing: -0.2px;
  }
  .article__lead {
    font-size: 17px;
  }
  .block__title {
    font-size: 21px;
  }
  .prose {
    font-size: 16px;
  }
  .prose h1 {
    font-size: 23px;
    margin-top: 36px;
  }
  .prose h2 {
    font-size: 21px;
    margin-top: 32px;
  }
  .prose h3 {
    font-size: 18px;
  }
  .prose .admonition,
  .callout {
    padding: 16px 18px;
    margin: 22px 0;
  }
  .prose ol > li {
    padding-left: 38px;
  }
  .prose ol > li::before {
    width: 26px;
    height: 26px;
  }
  .tiles {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tile {
    padding: 20px;
  }
  .card {
    padding: 16px;
    gap: 12px;
  }
  /* на узком экране плашка отнимает ощутимую часть ширины у описания */
  .card__icon {
    width: 38px;
    height: 38px;
  }
  /* уменьшаем пропорционально, а не фиксированным размером: у иконок разные
     поправки на пропорции, жёсткий width их бы обнулил */
  .card__icon svg {
    transform: scale(0.875);
  }

  .attach {
    gap: 12px;
    padding: 12px;
  }
  .attach-icon {
    width: 42px;
    height: 42px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat {
    padding: 16px;
  }
  .stat__value {
    font-size: 25px;
  }
  .chart__col {
    height: 160px;
    min-width: 44px;
  }
  .chart__value {
    display: none;
  }
  .stat-table th,
  .stat-table td {
    padding: 10px 12px;
    font-size: 15px;
  }

  .errorpage__card {
    padding: 24px 20px 28px;
  }
  .errorpage__title {
    font-size: 23px;
  }
  .errorpage__text {
    font-size: 16px;
  }
  .errorpage__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .footer__inner {
    padding: 18px 16px;
    font-size: 14px;
  }
}

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

/* --------------------------------------------------------------- печать --- */
@media print {
  :root {
    --text: #000;
    --muted: #333;
    --accent: #000;
  }
  .topbar,
  .sidebar,
  .footer,
  .drawer-backdrop,
  .article__tools,
  .copy-btn,
  .search,
  .hero .search,
  .card__arrow {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11.5pt;
    display: block;
  }
  .shell,
  .shell--with-sidebar,
  .shell--plain .main,
  .main {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .article,
  .prose {
    max-width: none;
  }
  .article__title {
    font-size: 20pt;
  }
  .prose h1,
  .prose h2,
  .prose h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
  .prose .admonition,
  .attach,
  .table-wrap,
  .prose .highlight,
  .prose figure {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .prose .admonition,
  .callout {
    border: 1px solid #999;
    background: #fff !important;
  }
  .attach {
    border: 1px solid #999;
  }
  .prose .highlight,
  .prose pre > code {
    background: #f6f6f6 !important;
    border: 1px solid #ccc;
  }
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
    word-break: break-all;
  }
  .prose a {
    text-decoration: none;
  }
  .prose details {
    border: 1px solid #ccc;
  }
  .prose details > summary {
    color: #000;
  }
}

/* ======================================================= подсветка кода === */
.highlight .c, .highlight .ch, .highlight .cm, .highlight .c1, .highlight .cs,
.highlight .cpf {
  color: #8a7b7c;
  font-style: italic;
}
.highlight .cp {
  color: #9a5b12;
}
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp,
.highlight .kr, .highlight .kt {
  color: #d93a3a;
  font-weight: 600;
}
.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl,
.highlight .sd, .highlight .s2, .highlight .sh, .highlight .si, .highlight .sx,
.highlight .s1, .highlight .ss, .highlight .se, .highlight .sr {
  color: #1f7a4d;
}
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi,
.highlight .il, .highlight .mo {
  color: #9a5b12;
}
.highlight .nf, .highlight .fm {
  color: #6b3fa0;
}
.highlight .nc, .highlight .nn, .highlight .ne {
  color: #6b3fa0;
  font-weight: 600;
}
.highlight .nb, .highlight .bp {
  color: #14706e;
}
.highlight .nt {
  color: #c73b48;
}
.highlight .na, .highlight .no, .highlight .nv, .highlight .vc, .highlight .vg,
.highlight .vi, .highlight .vm {
  color: #9a5b12;
}
.highlight .nd, .highlight .ni, .highlight .nl, .highlight .py {
  color: #6b5c5d;
}
.highlight .o, .highlight .ow, .highlight .p {
  color: #6b5c5d;
}
.highlight .err {
  color: #8e1219;
  background: #f8d3d6;
}
.highlight .gd {
  color: #8e1219;
  background: #f8d3d6;
}
.highlight .gi {
  color: #1f7a4d;
  background: #e3f3e8;
}
.highlight .gh, .highlight .gu {
  color: #d93a3a;
  font-weight: 600;
}
.highlight .ge {
  font-style: italic;
}
.highlight .gs {
  font-weight: 700;
}
.highlight .gl {
  text-decoration: underline;
}
.highlight .gt {
  color: #8e1219;
}

:root[data-theme="dark"] .highlight .c,
:root[data-theme="dark"] .highlight .ch,
:root[data-theme="dark"] .highlight .cm,
:root[data-theme="dark"] .highlight .c1,
:root[data-theme="dark"] .highlight .cs {
  color: #9a8a8b;
}
:root[data-theme="dark"] .highlight .k,
:root[data-theme="dark"] .highlight .kc,
:root[data-theme="dark"] .highlight .kd,
:root[data-theme="dark"] .highlight .kn,
:root[data-theme="dark"] .highlight .kp,
:root[data-theme="dark"] .highlight .kr,
:root[data-theme="dark"] .highlight .kt {
  color: #f58a92;
}
:root[data-theme="dark"] .highlight .s,
:root[data-theme="dark"] .highlight .s1,
:root[data-theme="dark"] .highlight .s2,
:root[data-theme="dark"] .highlight .sb,
:root[data-theme="dark"] .highlight .sd,
:root[data-theme="dark"] .highlight .se,
:root[data-theme="dark"] .highlight .sh,
:root[data-theme="dark"] .highlight .si,
:root[data-theme="dark"] .highlight .sr,
:root[data-theme="dark"] .highlight .ss,
:root[data-theme="dark"] .highlight .sx,
:root[data-theme="dark"] .highlight .dl {
  color: #8fd0a7;
}
:root[data-theme="dark"] .highlight .m,
:root[data-theme="dark"] .highlight .mf,
:root[data-theme="dark"] .highlight .mh,
:root[data-theme="dark"] .highlight .mi,
:root[data-theme="dark"] .highlight .mo,
:root[data-theme="dark"] .highlight .il,
:root[data-theme="dark"] .highlight .na,
:root[data-theme="dark"] .highlight .nv,
:root[data-theme="dark"] .highlight .no,
:root[data-theme="dark"] .highlight .cp {
  color: #e0b072;
}
:root[data-theme="dark"] .highlight .nf,
:root[data-theme="dark"] .highlight .fm,
:root[data-theme="dark"] .highlight .nc,
:root[data-theme="dark"] .highlight .nn,
:root[data-theme="dark"] .highlight .ne {
  color: #c3a6f0;
}
:root[data-theme="dark"] .highlight .nb,
:root[data-theme="dark"] .highlight .bp {
  color: #7ec9c6;
}
:root[data-theme="dark"] .highlight .nt {
  color: #f2a3aa;
}
:root[data-theme="dark"] .highlight .o,
:root[data-theme="dark"] .highlight .ow,
:root[data-theme="dark"] .highlight .p {
  color: #b5a4a6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .highlight .c,
  :root:not([data-theme="light"]) .highlight .ch,
  :root:not([data-theme="light"]) .highlight .cm,
  :root:not([data-theme="light"]) .highlight .c1,
  :root:not([data-theme="light"]) .highlight .cs {
    color: #9a8a8b;
  }
  :root:not([data-theme="light"]) .highlight .k,
  :root:not([data-theme="light"]) .highlight .kc,
  :root:not([data-theme="light"]) .highlight .kd,
  :root:not([data-theme="light"]) .highlight .kn,
  :root:not([data-theme="light"]) .highlight .kp,
  :root:not([data-theme="light"]) .highlight .kr,
  :root:not([data-theme="light"]) .highlight .kt {
    color: #f58a92;
  }
  :root:not([data-theme="light"]) .highlight .s,
  :root:not([data-theme="light"]) .highlight .s1,
  :root:not([data-theme="light"]) .highlight .s2,
  :root:not([data-theme="light"]) .highlight .sb,
  :root:not([data-theme="light"]) .highlight .sd,
  :root:not([data-theme="light"]) .highlight .se,
  :root:not([data-theme="light"]) .highlight .sh,
  :root:not([data-theme="light"]) .highlight .si,
  :root:not([data-theme="light"]) .highlight .sr,
  :root:not([data-theme="light"]) .highlight .ss,
  :root:not([data-theme="light"]) .highlight .sx,
  :root:not([data-theme="light"]) .highlight .dl {
    color: #8fd0a7;
  }
  :root:not([data-theme="light"]) .highlight .m,
  :root:not([data-theme="light"]) .highlight .mf,
  :root:not([data-theme="light"]) .highlight .mh,
  :root:not([data-theme="light"]) .highlight .mi,
  :root:not([data-theme="light"]) .highlight .mo,
  :root:not([data-theme="light"]) .highlight .il,
  :root:not([data-theme="light"]) .highlight .na,
  :root:not([data-theme="light"]) .highlight .nv,
  :root:not([data-theme="light"]) .highlight .no,
  :root:not([data-theme="light"]) .highlight .cp {
    color: #e0b072;
  }
  :root:not([data-theme="light"]) .highlight .nf,
  :root:not([data-theme="light"]) .highlight .fm,
  :root:not([data-theme="light"]) .highlight .nc,
  :root:not([data-theme="light"]) .highlight .nn,
  :root:not([data-theme="light"]) .highlight .ne {
    color: #c3a6f0;
  }
  :root:not([data-theme="light"]) .highlight .nb,
  :root:not([data-theme="light"]) .highlight .bp {
    color: #7ec9c6;
  }
  :root:not([data-theme="light"]) .highlight .nt {
    color: #f2a3aa;
  }
  :root:not([data-theme="light"]) .highlight .o,
  :root:not([data-theme="light"]) .highlight .ow,
  :root:not([data-theme="light"]) .highlight .p {
    color: #b5a4a6;
  }
}
