/* Сайт BidPoint: главная и документы приложения.
   Без скриптов и внешних ресурсов: шрифт и иконки лежат здесь же, CSP разрешает только свой домен. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #f6f8fc;
  --bg-elev: #ffffff;
  --bg-soft: #edf2fb;
  --text: #0b1324;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cfd8e6;
  --brand: #0e46a4;
  --brand-2: #2f6fe4;
  --brand-soft: #e6effc;
  --on-brand: #ffffff;
  --link: #1d5bd0;
  --ring: rgba(47, 111, 228, 0.4);
  --note-bg: #eef4ff;
  --note-border: #c9dbfb;
  --glow-1: rgba(47, 111, 228, 0.18);
  --glow-2: rgba(56, 189, 248, 0.16);
  --grid-line: rgba(14, 70, 164, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.05), 0 30px 70px rgba(14, 70, 164, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080d18;
    --bg-elev: #0f1626;
    --bg-soft: #121c31;
    --text: #e8edf6;
    --text-2: #c2cbdb;
    --muted: #8a96ab;
    --border: #1c2740;
    --border-strong: #2a3756;
    --brand: #7eaaff;
    --brand-2: #3f7cf2;
    --brand-soft: #14244a;
    --on-brand: #ffffff;
    --link: #8db4ff;
    --ring: rgba(126, 170, 255, 0.45);
    --note-bg: #101d38;
    --note-border: #22386a;
    --glow-1: rgba(63, 124, 242, 0.22);
    --glow-2: rgba(56, 189, 248, 0.12);
    --grid-line: rgba(126, 170, 255, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 70px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01" on;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Набор иконок в начале страницы: правило браузера для hidden на SVG не действует. */
[hidden] {
  display: none !important;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-2);
  color: var(--on-brand);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* Иконки: контурные, цвет берут от текста. */
.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

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

.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav .nav-optional {
  display: none;
}

@media (min-width: 760px) {
  .nav .nav-optional {
    display: inline-block;
  }
}

/* ---------- Кнопки и метки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), #1647b8);
  color: var(--on-brand);
  box-shadow: 0 10px 24px -10px rgba(31, 85, 214, 0.65);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px -10px rgba(31, 85, 214, 0.75);
}

.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--note-border);
  background: var(--note-bg);
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.pill .dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-2);
  color: #fff;
}

.pill .dot .ic {
  width: 13px;
  height: 13px;
}

/* ---------- Главная: первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 380px at 85% 10%, var(--glow-1), transparent 70%),
    radial-gradient(520px 340px at 5% 90%, var(--glow-2), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    padding: 88px 0 104px;
  }

  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 56px;
  }
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.grad {
  background: linear-gradient(120deg, var(--brand-2) 10%, #22a6e8 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 20px;
  max-width: 560px;
  color: var(--text-2);
  font-size: clamp(17px, 2.1vw, 19px);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.platforms span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platforms .ic {
  width: 16px;
  height: 16px;
}

/* Макет чата: показывает, как выглядит ответ со ссылками на источники. */
.chat-mock {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid var(--border);
}

.chat-top .brand-mark {
  width: 30px;
  height: 30px;
}

.chat-top b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.chat-top small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.chat-body {
  display: grid;
  gap: 12px;
  padding: 16px 2px 14px;
}

.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
}

.bubble-user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, var(--brand-2), #1647b8);
  color: #fff;
  font-weight: 600;
}

.bubble-bot {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
}

.skeleton {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.skeleton i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--muted) 22%, transparent);
}

.skeleton i:nth-child(1) {
  width: 96%;
}
.skeleton i:nth-child(2) {
  width: 88%;
}
.skeleton i:nth-child(3) {
  width: 62%;
}

.sources-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
}

.chip .ic {
  width: 13px;
  height: 13px;
  color: var(--brand-2);
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}

.chat-input span {
  flex: 1;
}

.chat-input .send {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--brand-2);
  color: #fff;
}

.chat-input .send .ic {
  width: 16px;
  height: 16px;
}

.float-badge {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.float-badge .ic {
  color: #16a34a;
}

@media (min-width: 1100px) {
  .float-badge {
    display: inline-flex;
  }
  /* На краях карточки, чтобы не закрывать текст чата. */
  .float-badge.fb-1 {
    right: -36px;
    top: -20px;
  }
  .float-badge.fb-2 {
    left: -48px;
    bottom: -22px;
  }
}

/* ---------- Секции главной ---------- */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin-bottom: 40px;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 17px;
}

.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .cards-2,
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .cards-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.section-alt .card {
  background: var(--bg);
  box-shadow: none;
}

.card h3 {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 800;
}

.card p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 15px;
}

.icon-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
}

.icon-tile .ic {
  width: 22px;
  height: 22px;
}

/* Шаги «как это работает» */
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  counter-increment: step;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  color: var(--brand-2);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.step h3 {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 800;
}

.step p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 15px;
}

/* Карточки документов */
.doc-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-2);
  box-shadow: var(--shadow-lg);
}

.doc-card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--link);
  font-size: 15px;
  font-weight: 700;
}

.doc-card .more .ic {
  width: 17px;
  height: 17px;
  transition: transform 0.15s ease;
}

.doc-card:hover .more .ic {
  transform: translateX(3px);
}

.deletion-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  color: var(--text-2);
  font-size: 15px;
}

.deletion-note .ic {
  margin-top: 2px;
  color: var(--muted);
}

/* ---------- Подвал ---------- */

.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 14.5px;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1.2fr;
  }
}

.footer-grid h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--link);
  text-decoration: underline;
}

.footer-about p {
  margin-top: 12px;
  max-width: 340px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}

.footer-bottom:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ---------- Страницы документов ---------- */

.doc-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.doc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 260px at 90% 0%, var(--glow-1), transparent 70%);
  pointer-events: none;
}

.doc-hero .container {
  position: relative;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--link);
}

.doc-hero h1 {
  margin-top: 14px;
  max-width: 820px;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.doc-hero .lead {
  max-width: 720px;
  margin-top: 14px;
  font-size: 17px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.meta .chip {
  padding: 6px 12px;
  font-size: 13.5px;
}

.doc-layout {
  display: grid;
  gap: 32px;
  padding: 36px 20px 80px;
}

@media (min-width: 1000px) {
  .doc-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
    padding-top: 48px;
  }
}

/* Короткий документ без оглавления. */
.doc-layout-single {
  display: block;
}

@media (min-width: 1000px) {
  .doc-layout-single {
    padding-top: 48px;
  }
}

.toc {
  align-self: start;
  font-size: 14.5px;
}

.toc details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.toc summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.toc details[open] summary::after {
  content: "▴";
}

.toc ol {
  margin: 0;
  padding: 0 8px 12px;
  list-style: none;
  counter-reset: toc;
}

.toc li a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.4;
}

.toc li a::before {
  counter-increment: toc;
  content: counter(toc);
  min-width: 18px;
  color: var(--muted);
  font-weight: 700;
}

.toc li a:hover {
  background: var(--bg-soft);
  color: var(--text);
}

@media (min-width: 1000px) {
  .toc {
    position: sticky;
    top: 88px;
  }

  .toc details {
    border: 0;
    background: transparent;
  }

  .toc summary {
    padding: 0 10px 10px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .toc summary::after,
  .toc details[open] summary::after {
    content: none;
  }

  .toc ol {
    padding: 0;
  }
}

/* Текст документа */
.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.7;
  counter-reset: sec;
}

.prose > section {
  padding-top: 8px;
}

.prose > * + section {
  margin-top: 40px;
}

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  counter-increment: sec;
}

.prose h2::before {
  content: counter(sec);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 15px;
  transform: translateY(-3px);
}

.prose h3 {
  margin-top: 24px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose .table-wrap {
  margin-top: 14px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::marker {
  color: var(--brand-2);
}

.prose strong {
  color: var(--text);
}

.prose .clauses {
  padding-left: 0;
  list-style: none;
}

.prose .clauses > li {
  display: grid;
  grid-template-columns: 44px 1fr;
}

.prose .clauses > li > .num {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prose .clauses ul {
  margin-top: 8px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.prose th {
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  color: var(--text);
  font-weight: 700;
  min-width: 150px;
}

/* На телефоне строка таблицы — карточка: название сверху, пояснение под ним. */
@media (max-width: 599px) {
  .prose thead {
    display: none;
  }

  .prose table,
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
  }

  .prose tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .prose tr:last-child {
    border-bottom: 0;
  }

  .prose td,
  .prose tr:last-child td {
    padding: 0;
    border: 0;
  }

  .prose td + td {
    margin-top: 4px;
  }
}

.facts {
  display: grid;
  gap: 1px;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--border);
}

.facts > div {
  display: grid;
  gap: 2px 16px;
  padding: 12px 16px;
  background: var(--bg-elev);
}

@media (min-width: 640px) {
  .facts > div {
    grid-template-columns: 190px 1fr;
  }
}

.facts dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.facts dd {
  margin: 0;
  color: var(--text);
}

.box {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--note-border);
  background: var(--note-bg);
}

.box > :first-child {
  margin-top: 0;
}

.box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.box-title .ic {
  color: var(--brand-2);
}

.no-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .no-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prose .no-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.no-list .ic {
  color: #16a34a;
}

.doc-end {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

.doc-end p + p {
  margin-top: 6px;
}

.related {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .related {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.related a:hover {
  border-color: var(--brand-2);
}

.related small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.related .ic {
  color: var(--link);
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px - 220px);
  padding: 80px 20px;
  text-align: center;
}

.not-found .code {
  color: var(--brand-2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.not-found h1 {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
}

.not-found p {
  margin-top: 12px;
  color: var(--text-2);
}

.not-found .cta-row {
  justify-content: center;
}

/* ---------- Печать документов ---------- */

@media print {
  .site-header,
  .site-footer,
  .toc,
  .related,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .doc-hero,
  .doc-hero::before {
    background: none;
    border: 0;
    padding: 0 0 12pt;
  }

  .doc-layout {
    display: block;
    padding: 0 20px;
  }

  .prose {
    max-width: none;
    color: #000;
  }

  .prose h2::before {
    background: none;
    width: auto;
  }

  a {
    color: #000;
  }
}
