/* ============================================================
   Дело № 12602070011000039 — система стилей
   Mobile-first: базовая вёрстка = 360px, десктоп — расширение.
   ============================================================ */

/* ---------- 1. Токены ---------- */

:root {
  /* Светлая тема — бумага и графит */
  --paper:        #f7f5f1;
  --paper-raised: #ffffff;
  --paper-sunken: #eeebe4;
  --ink:          #16181c;
  --ink-soft:     #4a4f57;
  --ink-faint:    #656a73;   /* ≥ 4.5:1 на бумаге, карточке и подложке */
  --rule:         #d8d3c8;
  --rule-strong:  #b9b2a3;

  /* Канцелярский красный — штампы, нарушения. Умеренно. */
  --stamp:        #a3231f;
  --stamp-soft:   #f3e2e0;

  /* Плашки статуса сведений */
  --doc:          #1f6b45;
  --doc-bg:       #e4f0e8;
  --note:         #8a5a08;
  --note-bg:      #f8eed8;
  --said:         #4a4f57;
  --said-bg:      #e8e6e1;
  --rumor:        #5b4a6b;   /* слух — отличим от «со слов» */
  --rumor-bg:     #ece7f1;
  --family:       #3a5a7d;   /* линия семьи: жалобы и обращения */
  --family-bg:    #eef2f7;

  --focus:        #1a4f8a;

  --font-ui:    "Golos Text", Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-doc:   "PT Serif", Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --w-text:  38rem;
  --w-wide:  66rem;
  --pad:     1rem;
  --radius:  3px;

  color-scheme: light;
}

/* Тёмная тема — только режим «История». Не чисто-чёрный (OLED). */
.t-dark {
  --paper:        #0e1116;
  --paper-raised: #171b22;
  --paper-sunken: #0a0d11;
  --ink:          #f2ede4;
  --ink-soft:     #c2c8d2;
  --ink-faint:    #949cab;
  --rule:         #2a313c;
  --rule-strong:  #3d4653;

  --stamp:        #ff8d84;
  --stamp-soft:   #2b1614;

  --doc:          #7fd8a4;
  --doc-bg:       #12251b;
  --note:         #f2c46b;
  --note-bg:      #2a2110;
  --said:         #b6bdc9;
  --said-bg:      #1c2129;
  --rumor:        #c9b3dd;
  --rumor-bg:     #221a2b;
  --family:       #9dc2e8;
  --family-bg:    #141c26;

  --focus:        #8ab6f0;

  color-scheme: dark;
}

/* ---------- 2. База ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;        /* юридический текст мельче нечитаем */
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.011em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem;  margin-top: 2.2em; }
h3 { font-size: 1.075rem; margin-top: 1.8em; }
p  { margin: 0 0 .9em; }          /* межабзацный отступ ≥ .8em */
ul, ol { margin: 0 0 .9em; padding-left: 1.25em; }
li { margin-bottom: .45em; }
strong { font-weight: 650; }

a { color: var(--focus); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* ---------- 3. Каркас ---------- */

.wrap { width: 100%; max-width: var(--w-text); margin: 0 auto; padding: 0 var(--pad); }
.wrap-wide { max-width: var(--w-wide); }

main { padding: 1.5rem 0 2rem; }

/* ---------- 4. Шапка и переключатель режимов ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.top-in {
  max-width: var(--w-wide); margin: 0 auto; padding: .5rem var(--pad) .55rem;
}
.case-no {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .02em;
  color: var(--ink-faint);
  margin: 0 0 .4rem;
  display: block;
  text-decoration: none;
}
.case-no b { color: var(--ink-soft); font-weight: 600; }

/* Сегмент-контрол: четыре режима, влезает в 360px */
.modes {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; padding: 2px;
  background: var(--paper-sunken);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.modes a {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: .2rem .1rem;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15;
  color: var(--ink-soft); text-decoration: none;
  border-radius: 2px; text-align: center;
}
@media (max-width: 22.5rem) { .modes a { font-size: 13px; } }
.modes a[aria-current="page"] {
  background: var(--paper-raised); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
}
.t-dark .modes a[aria-current="page"] { box-shadow: 0 0 0 1px var(--rule-strong); }

/* «Ещё» — без бургер-лабиринтов */
.more { margin-top: .45rem; }
.more summary {
  list-style: none; cursor: pointer;
  font-size: 13px; color: var(--ink-faint);
  min-height: 44px; display: flex; align-items: center; gap: .35em;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "▾"; font-size: 10px; }
.more[open] summary::after { content: "▴"; }
.more-links { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem 0 .2rem; }
.more-links a {
  font-size: 14px; text-decoration: none; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .5rem .7rem; min-height: 44px; display: flex; align-items: center;
}
.more-links a[aria-current="page"] { border-color: var(--rule-strong); color: var(--ink); font-weight: 600; }

/* ---------- 5. Заголовок страницы ---------- */

.lede { max-width: var(--w-text); margin: 0 auto 1.5rem; padding: 0 var(--pad); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--stamp); margin: 0 0 .5rem;
}
.deck { color: var(--ink-soft); font-size: 1.02rem; }
.headlines {
  font-size: 1.15rem; line-height: 1.45; font-weight: 500;
  letter-spacing: -.006em; color: var(--ink-soft); margin: 0 0 1rem;
}
h1.boxed {
  font-size: 2rem;
  background: var(--paper-sunken);
  border-left: 3px solid var(--stamp);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  margin-bottom: .8rem;
}

/* ---------- 6. Три цифры ---------- */

.figures { display: grid; gap: .6rem; margin: 1.5rem 0 2rem; }
.figure {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--stamp);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.figure b {
  display: block; font-size: 1.65rem; line-height: 1.1;
  font-weight: 680; letter-spacing: -.02em; margin-bottom: .2rem;
}
.figure span { display: block; font-size: .93rem; color: var(--ink-soft); }
@media (min-width: 44rem) {
  .figures { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}

/* ---------- 6a. Видеообращение (плеер VK Видео) ---------- */

.video-post { margin: .6rem 0 1.6rem; }
/* Видео вертикальное: рамка 9:16 по центру; на компьютере не выше 80% экрана, на телефоне — во всю ширину */
.video-frame { position: relative; width: min(100%, calc(80vh * 9 / 16)); aspect-ratio: 9 / 16; margin: 0 auto; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-fallback { font-size: .95rem; color: var(--ink-soft); margin: .5rem 0 0; }

/* ---------- 6b. Таблицы разборов ---------- */

.tbl-wrap { overflow-x: auto; margin: 1rem 0 1.2rem; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
.tbl th, .tbl td { border: 1px solid var(--rule); padding: .5rem .6rem; vertical-align: top; text-align: left; }
.tbl th { background: var(--paper-sunken); font-weight: 650; font-size: 13px; }
.tbl td:first-child { white-space: nowrap; }
@media (max-width: 600px) { .tbl td:first-child { white-space: normal; } .tbl th, .tbl td { padding: .4rem .45rem; } }

/* ---------- 7. Цитата из документа (антиква) ---------- */

.quote {
  font-family: var(--font-doc);
  font-size: 18px; line-height: 1.55;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius);
  margin: 1.1rem 0; padding: .9rem 1rem .75rem;
}
.quote p { margin-bottom: .6em; }
.quote p:last-of-type { margin-bottom: 0; }
.quote cite {
  display: block; margin-top: .6rem; padding-top: .5rem;
  border-top: 1px dotted var(--rule);
  font-family: var(--font-mono); font-size: 13px; font-style: normal;
  color: var(--ink-faint);
}
/* Жёлтый маркер по ключевой фразе — как в факсимиле */
mark {
  background: #ffe680; color: inherit;
  padding: .06em .12em; border-radius: 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.t-dark mark { background: #6b5510; color: #fff6d8; }

/* ---------- 8. Факсимиле-вырезка ---------- */

.facsimile { margin: 1.2rem 0; }
.facsimile figure { margin: 0; }
.facsimile img {
  display: block; width: 100%; height: auto;
  max-width: 600px;                 /* не резать шире 600px оригинала */
  border: 1px solid var(--rule-strong);
  background: #fff;
  border-radius: var(--radius);
}
.facsimile figcaption {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-faint); margin-top: .45rem;
}
/* --- Нумерованная вырезка -----------------------------------------
   <object> сам показывает то, что внутри него, если файла нет.
   Значит: положил f-003.webp в assets/faksimile/ — картинка появилась,
   ничего пересобирать не нужно, и всё это работает без JS.        */

.fax { margin: .8rem 0; }
.fax object {
  display: block; width: 100%; max-width: 600px;
}
.fax object img,
.fax > object {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #fff;
}
.fax-cap {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45;
  color: var(--ink-faint); margin: .4rem 0 0;
}

/* Заглушка вместо неготовой вырезки */
.fax-pending {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-sunken);
  padding: .75rem .85rem; margin: 0;
  font-size: 14px; line-height: 1.5; color: var(--ink-faint);
}
.fax-pending b { color: var(--ink-soft); font-weight: 600; }
.fax-pending code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--paper-raised); color: var(--ink-soft);
  padding: .1em .35em; border-radius: 2px;
  border: 1px solid var(--rule); white-space: nowrap;
}
.fax-num {
  display: inline-block; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .08em;
  color: var(--stamp); border: 1px solid var(--stamp);
  padding: .1rem .35rem; border-radius: 2px; margin-right: .4em;
}

@media print {
  .fax-pending { border-style: solid; }
}

/* ---------- 9. Врезки: три типа ---------- */

.insets { display: flex; flex-direction: column; gap: 8px; margin: .7rem 0 0; }

.inset { border-radius: var(--radius); border: 1px solid transparent; }
.inset > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: .45em;
  min-height: 44px;                       /* зона касания */
  padding: .5rem .75rem;
  font-size: 14px; font-weight: 600; line-height: 1.3;
  border-radius: var(--radius);
}
.inset > summary::-webkit-details-marker { display: none; }
.inset > summary .tag { white-space: nowrap; }   /* текст кнопки не обрезать */
.inset > summary .chev { margin-left: auto; font-size: 11px; opacity: .7; }
.inset[open] > summary .chev { transform: rotate(180deg); }

.inset-body {
  padding: .3rem .75rem .8rem;
  font-size: 15.5px; line-height: 1.55;
  animation: reveal 150ms ease-out;
}
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
.inset-body p:last-child { margin-bottom: 0; }

.inset.doc  > summary { background: var(--doc-bg);  color: var(--doc);  }
.inset.doc  { border-color: var(--doc); }
.inset.note > summary { background: var(--note-bg); color: var(--note); }
.inset.note { border-color: var(--note); }
.inset.said > summary { background: var(--said-bg); color: var(--said); }
.inset.said { border-color: var(--rule-strong); }
.inset.rumor > summary { background: var(--rumor-bg); color: var(--rumor); }
.inset.rumor { border-color: var(--rumor); }

/* Обязательная строка для «Со слов» и «Слуха» */
.said-warning {
  font-size: 13px; color: var(--ink-faint);
  border-top: 1px dotted var(--rule); padding-top: .45rem; margin-top: .6rem;
}

.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.5rem; font-size: 13px; }
.legend span {
  padding: .3rem .55rem; border-radius: var(--radius);
  border: 1px solid currentColor;
}
.legend .l-doc   { background: var(--doc-bg);   color: var(--doc); }
.legend .l-note  { background: var(--note-bg);  color: var(--note); }
.legend .l-said  { background: var(--said-bg);  color: var(--said); }
.legend .l-rumor { background: var(--rumor-bg); color: var(--rumor); }
.legend .l-fam   { background: var(--family-bg); color: var(--family); }

/* ---------- 10. Таймлайн ---------- */

.timeline { position: relative; margin: 0; padding: 0 0 0 1rem; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: .4rem; bottom: 0;
  width: 2px; background: var(--rule);
}
.tnode { position: relative; margin: 0 0 2rem; }
.tnode::before {
  content: ""; position: absolute; left: -1rem; top: .55rem;
  width: 9px; height: 9px; margin-left: -3.5px;
  border-radius: 50%; background: var(--stamp);
  box-shadow: 0 0 0 3px var(--paper);
}
.tnode .tdate {
  display: block;                    /* на мобиле дата НАД заголовком */
  font-family: var(--font-mono); font-size: 13px;
  color: var(--stamp); letter-spacing: .01em; margin-bottom: .15rem;
}
.tnode h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.tnode > p { font-size: 15.5px; color: var(--ink-soft); margin-bottom: .3rem; }

/* --- Вторая линия: что делала семья ------------------------------
   Основной ход дела ведут следствие, суд и защита. Обращения семьи
   идут параллельно и почти ни на что не влияют — поэтому они
   отбиты фоном, а не вписаны в общий ряд.                        */

.tnode.family {
  background: var(--family-bg);
  border-left: 2px solid var(--family);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .7rem .85rem .8rem;
  margin-left: -.85rem;
}
.tnode.family::before { background: var(--family); left: -.15rem; }
.tnode.family .tdate { color: var(--family); }
.tnode.family .fam-tag {
  display: inline-block; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--family); border: 1px solid var(--family);
  border-radius: 2px; padding: .08rem .35rem;
  margin-bottom: .35rem;
}
@media (min-width: 56rem) {
  .tnode.family { margin-left: -1.6rem; padding-left: 1.6rem; }
  .tnode.family::before { left: -1rem; }
}

@media (min-width: 56rem) {
  .timeline { padding-left: 9.5rem; }
  .timeline::before { left: 8.5rem; }
  .tnode::before { left: -1rem; }
  .tnode .tdate { position: absolute; left: -9.5rem; top: .35rem; width: 8rem; text-align: right; }
}

/* ---------- 11. Карточка документа ---------- */

.doclist { display: grid; gap: .7rem; margin: 1.2rem 0; }
.doccard {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .85rem .9rem;
}
.doccard .meta {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .25rem .7rem; margin-bottom: .35rem;
}
.doccard h3 { margin: 0 0 .3rem; font-size: 1.02rem; }
.doccard .organ { font-size: 13.5px; color: var(--ink-soft); margin-bottom: .35rem; }
.doccard .sum { font-size: 15px; margin-bottom: .6rem; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: .4em;
  width: 100%; min-height: 44px; padding: .55rem .8rem;
  font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--paper-sunken); color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink-faint); }
.btn[aria-disabled="true"] {
  opacity: .72; cursor: not-allowed;
  border-style: dashed; font-weight: 500;
  color: var(--ink-faint);
}
.btn .weight { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--ink-faint); }

.hash { margin-top: .5rem; }
.hash summary {
  list-style: none; cursor: pointer;
  font-size: 13px; color: var(--ink-faint); min-height: 44px;
  display: flex; align-items: center;
}
.hash summary::-webkit-details-marker { display: none; }
.hash code {
  display: block; font-family: var(--font-mono); font-size: 12px;
  word-break: break-all; color: var(--ink-soft);
  background: var(--paper-sunken); padding: .4rem .5rem;
  border-radius: 2px; margin-top: .3rem;
}

/* ---------- 12. Таблицы → карточки-стопки на мобиле ---------- */

.cards { display: grid; gap: .7rem; margin: 1.2rem 0; }
.card {
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .85rem .9rem;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.card dl { margin: 0; display: grid; gap: .5rem; }
.card dt {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint);
}
.card dd { margin: .1rem 0 0; font-size: 15px; }

/* Пара «утверждение / документ» */
.pair { display: grid; gap: 0; }
.pair > div { padding: .8rem .9rem; }
.pair > div:first-child { border-bottom: 1px solid var(--rule); }
.pair .lbl {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: .3rem; display: block;
}
.pair .claim .lbl { color: var(--stamp); }
.pair .fact  .lbl { color: var(--doc); }
.pair .claim { background: var(--stamp-soft); }
.pair p:last-child { margin-bottom: 0; }
@media (min-width: 44rem) {
  .pair { grid-template-columns: 1fr 1fr; }
  .pair > div:first-child { border-bottom: 0; border-right: 1px solid var(--rule); }
}

/* ---------- 13. Карточка действующего лица ---------- */

.people { display: grid; gap: .8rem; margin: 1.2rem 0; }
.person {
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .9rem;
}
.person-head { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .5rem; }
.avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-sunken); border: 1px solid var(--rule);
  display: grid; place-items: center; color: var(--ink-faint);
}
.avatar svg { width: 24px; height: 24px; }
.person-head h3 { margin: 0; font-size: 1.02rem; }
.person-head .role { font-size: 13.5px; color: var(--ink-faint); }
.person .quote { margin: .6rem 0; font-size: 17px; }
.person .docs-of { font-size: 14px; color: var(--ink-soft); }
.person .docs-of li { margin-bottom: .3em; }
@media (min-width: 50rem) { .people { grid-template-columns: 1fr 1fr; } }

/* ---------- 14. Плашки ---------- */

.callout {
  border: 1px solid var(--rule-strong); border-left: 3px solid var(--stamp);
  background: var(--paper-raised); border-radius: var(--radius);
  padding: .85rem 1rem; margin: 1.4rem 0; font-size: 15.5px;
}
.callout.plain { border-left-color: var(--rule-strong); }
.callout.alert { border-color: var(--stamp); background: color-mix(in srgb, var(--stamp) 14%, var(--paper-raised)); }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }

.stamp-label {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--stamp); border: 1px solid var(--stamp);
  padding: .12rem .4rem; border-radius: 2px;
  transform: rotate(-1.5deg);
}

/* ---------- 15. Ссылки-разделы ---------- */

.tiles { display: grid; gap: .6rem; margin: 1.4rem 0; }
.tile {
  display: block; padding: .85rem .9rem; text-decoration: none;
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); color: inherit;
}
.tile:hover { border-color: var(--rule-strong); }
.tile b { display: block; font-size: 1rem; margin-bottom: .2rem; color: var(--ink); }
.tile span { font-size: 14px; color: var(--ink-soft); }
@media (min-width: 44rem) { .tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- 16. Футер ---------- */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem; padding: 1.2rem 0 2rem;
  background: var(--paper-sunken);
}
.foot .wrap { font-size: 14px; color: var(--ink-soft); }
.foot .disclaimer {
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--paper-raised); padding: .75rem .85rem; margin-bottom: 1rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-bottom: .8rem; }
.foot a { color: var(--ink-soft); }
.foot .social { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin: .2rem 0 .8rem; font-size: 14px; }
.foot .social .social-lbl { color: var(--ink-faint); margin-right: .3rem; }
.foot .social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--ink-soft); text-decoration: none; border: 0;
}
.foot .social a:hover { color: var(--ink); }
.foot .social a svg { width: 32px; height: 32px; display: block; }
.foot .social a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot .site-version { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper-raised); padding: .6rem .9rem; z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- 17. Печать (для «Архива») ---------- */

@media print {
  :root { --paper: #fff; --paper-raised: #fff; --paper-sunken: #fff;
          --ink: #000; --ink-soft: #222; --ink-faint: #555; --rule: #999; }
  .top, .foot nav, .skip, .more { display: none !important; }
  body { font-size: 10.5pt; background: #fff; }
  main { padding: 0; }
  .wrap, .wrap-wide { max-width: none; padding: 0; }
  .inset[open] .inset-body, .inset-body { display: block !important; }
  .inset > summary .chev { display: none; }
  .hash[open] code, .hash code { display: block !important; }
  .doccard, .card, .quote, .callout { break-inside: avoid; border: 1px solid #999; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  mark { background: none; box-shadow: inset 0 -.55em 0 #eee; }
}

/* Ссылка на обезличенный PDF в карточке каталога */
.doc-file {
  display: inline-flex; align-items: center; gap: .35em;
  margin: 0 0 .5rem; padding: .18rem .5rem .18rem .4rem;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .02em;
  color: var(--ink-soft); text-decoration: none;
  border: 1px solid var(--rule-strong); border-radius: 2px;
  background: var(--paper-sunken);
}
.doc-file svg { width: 14px; height: 14px; flex: none; }
.doc-file:hover, .doc-file:focus-visible { color: var(--ink); border-color: var(--ink-faint); }
.doc-file span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media print { .doc-file { border-color: #999; background: none; } .doc-file::after { content: " " attr(href); } }
