:root {
  --paper: #f1ece1;
  --sheet: #fffdf8;
  --ink: #17160f;
  --ink-2: #4f4a41;
  --ink-3: #6c665a;
  --rule: rgba(23, 22, 15, 0.14);
  --red: #c4300f;
  --red-deep: #a32508;
  --marker: #ffe35a;
  --grid: rgba(60, 94, 150, 0.11);
  --grid-hot: rgba(40, 72, 170, 0.45);
  --ruled: rgba(60, 94, 150, 0.22);
  --mw: 104px;
  --wrap: min(1180px, calc(100% - 48px));
  --shadow: 0 1px 1px rgba(23, 22, 15, 0.08), 0 18px 32px -22px rgba(23, 22, 15, 0.55);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--marker);
  color: var(--ink);
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  touch-action: manipulation;
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 99;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--sheet);
  padding: 8px 12px;
  border-radius: 6px;
}

.skip:focus {
  transform: none;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Бумага: клетка, поля, зерно */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((100% - var(--wrap)) / 2 + var(--mw) - 14px);
  width: 5px;
  border-left: 1px solid rgba(196, 48, 15, 0.5);
  border-right: 1px solid rgba(196, 48, 15, 0.5);
}

.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 0.8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.lens {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  width: 340px;
  height: 340px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-image:
    linear-gradient(var(--grid-hot) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-hot) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 100%);
  will-change: transform;
}

.pen {
  position: fixed;
  top: 0;
  left: calc((100% - var(--wrap)) / 2 + var(--mw) - 22px);
  z-index: 2;
  width: 21px;
  height: 2px;
  margin-top: -1px;
  background: var(--red);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pen::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.has-pointer .lens,
.has-pointer .pen {
  opacity: 1;
}

/* Шапка: жидкое стекло */

.nav {
  position: fixed;
  z-index: 40;
  top: 14px;
  left: 0;
  right: 0;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
}

.glass {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.2) 46%, rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 12px 32px -14px rgba(23, 22, 15, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(23, 22, 15, 0.07),
    inset 0 0 0 0.5px rgba(23, 22, 15, 0.06);
  backdrop-filter: blur(12px) saturate(1.9) contrast(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.9) contrast(1.04);
}

.nav-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(180px 70px at var(--hx, 30%) var(--hy, 0%), rgba(255, 255, 255, 0.85), transparent 70%);
  opacity: 0.8;
}

.nav > :not(.nav-shine) {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  text-decoration: none;
  color: var(--ink);
  font-family: Unbounded, "Golos Text", sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.07em;
  line-height: 1;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.menu a {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
  border-radius: 999px;
}

.menu a:hover,
.menu a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--red);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--red-deep);
}

.nav-cta .short {
  display: none;
}

.nav-burger {
  display: none;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 22, 15, 0.08);
  font-size: 15px;
  font-weight: 600;
}

/* Сетка страницы: поля слева, текст справа */

main {
  position: relative;
  z-index: 1;
  width: var(--wrap);
  margin: 0 auto;
  padding: 104px 0 24px;
}

.sec {
  display: grid;
  grid-template-columns: var(--mw) minmax(0, 1fr);
  padding: 56px 0;
}

.margin {
  position: relative;
}

.margin-in {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.no {
  color: var(--red);
  letter-spacing: 0.04em;
}

.tag {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.body {
  min-width: 0;
  padding-left: 28px;
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
  margin-bottom: 40px;
}

.typed {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

h1,
h2 {
  font-family: Unbounded, "Golos Text", sans-serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 6vw, 74px);
  font-weight: 800;
  line-height: 1;
}

h2 {
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.04;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
}

.sub {
  max-width: 640px;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(196, 48, 15, 0.9);
}

.btn-red:hover {
  background: var(--red-deep);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.btn-line:hover {
  background: var(--ink);
  color: var(--sheet);
}

.btn-paper {
  background: var(--sheet);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Термины и подсказки */

dfn {
  font-style: normal;
}

.term {
  white-space: nowrap;
}

.term dfn {
  padding: 0 0.12em;
  margin: 0 -0.04em;
  border-radius: 2px;
  background: linear-gradient(100deg, transparent 0 1.5%, var(--marker) 1.5% 98%, transparent 98%) 0 62% / 100% 64% no-repeat;
}

.what {
  position: relative;
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px 2px;
  border: 1px solid var(--red);
  border-radius: 4px;
  background: var(--sheet);
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: 0.3em;
  cursor: help;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.what::after {
  content: "";
  position: absolute;
  inset: -6px -3px;
}

.what:hover,
.what[aria-describedby] {
  background: var(--red);
  color: #fff;
}

.tip {
  position: fixed;
  z-index: 95;
  left: 0;
  top: 0;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  padding: 12px 14px 13px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sheet);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 16px 32px -14px rgba(23, 22, 15, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.tip.is-on {
  opacity: 1;
  transform: none;
}

.tip strong {
  display: block;
  margin-bottom: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--marker);
}

.tip::before {
  content: "";
  position: absolute;
  left: var(--arrow, 50%);
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.tip[data-side="below"]::before {
  top: -4px;
}

.tip[data-side="above"]::before {
  bottom: -4px;
}

/* Первый экран */

.hero {
  padding-top: 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px 40px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero .lede {
  max-width: 620px;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.5;
}

.hero .actions {
  margin-top: 6px;
}

.seal {
  justify-self: end;
  width: 300px;
  color: var(--red);
  mix-blend-mode: multiply;
  transform: rotate(calc(-12deg + var(--tilt, 0deg)));
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation: slam 0.5s 0.2s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.seal svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.seal-ring {
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 600;
  fill: currentColor;
}

.seal-word {
  font-family: Unbounded, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.04em;
  fill: var(--paper);
}

@keyframes slam {
  from {
    opacity: 0;
    scale: 1.35;
  }
  to {
    opacity: 0.92;
    scale: 1;
  }
}

.ledger {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.ledger div {
  padding: 16px 18px 18px 0;
}

.ledger div + div {
  padding-left: 18px;
  border-left: 1px dashed var(--rule);
}

.ledger dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ledger dd {
  margin-top: 6px;
  font-family: Unbounded, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

/* Задачи: карточки картотеки */

.tasks,
.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 50px 22px;
  padding-top: 24px;
}

.catalog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 26px;
}

.task {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px 20px;
  background: var(--sheet);
  border-radius: 4px 4px 6px 6px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.task:hover,
.task:focus-within {
  transform: translateY(-10px) rotate(-0.4deg);
  box-shadow: 0 2px 2px rgba(23, 22, 15, 0.06), 0 30px 44px -24px rgba(23, 22, 15, 0.55);
}

.task-tab {
  position: absolute;
  top: -24px;
  left: 18px;
  height: 25px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 6px 6px 0 0;
  background: var(--sheet);
  color: var(--red);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 -2px 3px -2px rgba(23, 22, 15, 0.12);
}

.tasks .task:nth-child(3n + 2) .task-tab,
.catalog .task:nth-child(2n) .task-tab {
  left: 50%;
  transform: translateX(-50%);
}

.tasks .task:nth-child(3n) .task-tab {
  left: auto;
  right: 18px;
}

.task-pain {
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--red);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.task-fix,
.task-text {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 28px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, var(--ruled) 27px 28px);
}

.task-fix b {
  color: var(--ink);
  font-weight: 600;
}

.card-meta {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.card-meta div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
}

.card-meta dt {
  padding-top: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card-meta dd {
  font-size: 15px;
  line-height: 1.45;
}

.catalog .task-pain {
  font-family: Unbounded, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.catalog .task-go {
  margin-top: 6px;
}

.task-go {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.task-go:hover {
  background: var(--ink);
  color: var(--sheet);
}

.stamp-mini {
  position: absolute;
  right: 16px;
  bottom: 18px;
  padding: 7px 10px 6px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  color: var(--red);
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  filter: url(#rough);
  pointer-events: none;
  opacity: 0;
  transform: rotate(-12deg) scale(1.6);
  transition: transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.14s ease;
}

.task:hover .stamp-mini,
.task:focus-within .stamp-mini {
  opacity: 0.9;
  transform: rotate(-12deg) scale(1);
}

.task-ask {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 24px 22px;
  border: 1.5px dashed var(--ink-3);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.55);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.task-ask span {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.task-ask b {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--red);
}

.task-ask:hover {
  border-color: var(--red);
  border-style: solid;
  background: var(--sheet);
}

/* Видеоаналитика: видоискатель */

.eye {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: start;
}

.eye-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.eye-hint {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eye-list {
  align-self: stretch;
  border-top: 2px solid var(--ink);
}

.eye-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 12px;
  width: 100%;
  padding: 15px 10px 15px 4px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  text-align: left;
  transition: background-color 0.2s ease;
}

.eye-item i {
  grid-row: span 2;
  padding-top: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--red);
}

.eye-item b {
  font-family: Unbounded, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.eye-item span {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}

.eye-item:hover,
.eye-item:focus-visible,
.eye-item.is-on {
  background: var(--sheet);
}

.eye-item.is-on b {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.eye-note {
  color: var(--ink-2);
  font-size: 15px;
}

.eye-terms {
  padding: 10px 14px;
  border-left: 3px solid var(--red);
  background: rgba(255, 227, 90, 0.28);
  line-height: 1.45;
}

.eye-terms b {
  color: var(--ink);
}

.vf {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #121109;
  box-shadow: 0 2px 2px rgba(23, 22, 15, 0.1), 0 30px 50px -28px rgba(23, 22, 15, 0.7);
}

.vf svg {
  display: block;
  width: 100%;
  height: auto;
}

.vf-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -60px;
  height: 60px;
  background: linear-gradient(transparent, rgba(255, 227, 90, 0.05) 70%, rgba(255, 227, 90, 0.14));
  pointer-events: none;
  animation: scan 5s linear infinite;
}

@keyframes scan {
  to {
    top: 100%;
  }
}

.vf .sc {
  fill: none;
  stroke: rgba(241, 236, 225, 0.62);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vf .sc-thin {
  fill: none;
  stroke: rgba(241, 236, 225, 0.14);
  stroke-width: 1.5;
}

.vf .helmet {
  fill: var(--marker);
  stroke: var(--marker);
}

.vf .hud {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: rgba(241, 236, 225, 0.85);
}

.vf .hud-red {
  fill: #ff7a5c;
}

.vf .hud-dim {
  font-size: 11px;
  fill: rgba(241, 236, 225, 0.45);
}

.vf .hud-line {
  fill: none;
  stroke: rgba(241, 236, 225, 0.7);
  stroke-width: 2;
}

.vf .rec {
  fill: #ff5a36;
  animation: blink 1.2s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.15;
  }
}

.vf .det {
  transition: opacity 0.25s ease;
}

.vf[data-focus] .det {
  opacity: 0.08;
}

.vf[data-focus="count"] .det-count,
.vf[data-focus="defect"] .det-defect,
.vf[data-focus="safety"] .det-safety,
.vf[data-focus="alert"] .det-alert {
  opacity: 1;
}

.vf .box-ok {
  fill: none;
  stroke: var(--marker);
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.vf .box-bad {
  fill: rgba(255, 90, 54, 0.1);
  stroke: #ff5a36;
  stroke-width: 3;
}

.vf .tag-ok rect {
  fill: var(--marker);
}

.vf .tag-bad rect {
  fill: #ff5a36;
}

.vf .tag-ok text,
.vf .tag-bad text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.vf .tag-ok text {
  fill: var(--ink);
}

.vf .tag-bad text {
  fill: #fff;
}

.vf .toast {
  fill: rgba(255, 253, 248, 0.97);
}

.vf .toast-k {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--red);
}

.vf .toast-t {
  font-family: "Golos Text", sans-serif;
  font-size: 14px;
  font-weight: 600;
  fill: var(--ink);
}

/* Порядок работы: маршрутный лист */

.route-sheet {
  padding: 4px 30px 8px;
  background: var(--sheet);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.route-head,
.route li {
  display: grid;
  grid-template-columns: 52px 210px minmax(0, 1fr) 160px 34px;
  gap: 20px;
  align-items: center;
}

.route-head {
  padding: 16px 0 12px;
  border-bottom: 2px solid var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.route li {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.route li:last-child {
  border-bottom: 0;
}

.route-no {
  font-family: Unbounded, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.3px var(--red);
}

.route h3 {
  font-family: Unbounded, sans-serif;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.route p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.5;
}

.route-time {
  justify-self: start;
  padding: 7px 10px;
  border: 1px dashed var(--ink-3);
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.tick {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
}

.tick svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tick path {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.6, 0, 0.3, 1);
}

.route li.is-done .tick path {
  stroke-dashoffset: 0;
}

/* Правила */

.rules {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--sheet);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.rules::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 0 8px 0 6px;
  background: linear-gradient(225deg, var(--paper) 50%, #e2dbcb 50%);
  box-shadow: -3px 3px 4px -2px rgba(23, 22, 15, 0.15);
}

.rule {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 30px 32px;
}

.rule:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.rule:nth-child(-n + 2) {
  border-bottom: 1px solid var(--rule);
}

.par {
  grid-row: span 2;
  font-family: Unbounded, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--red);
}

.rule p {
  color: var(--ink-2);
  font-size: 16px;
}

/* Цены: чеки */

.price-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: 40px;
}

.price-head .sec-head {
  margin-bottom: 0;
}

.price-stamp {
  margin-right: 12px;
  padding: 12px 18px 11px;
  border: 3px solid currentColor;
  border-radius: 10px;
  color: var(--red);
  font-family: Unbounded, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  filter: url(#rough);
  transform: rotate(-7deg);
}

.price-stamp small {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.receipts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.receipt-wrap {
  filter: drop-shadow(0 14px 16px rgba(23, 22, 15, 0.16));
}

.receipt {
  padding: 26px 28px 42px;
  background: var(--sheet);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
}

.receipt-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.receipt h3 {
  margin-top: 6px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  font-size: 21px;
}

.rates li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
}

.rates span {
  color: var(--ink-2);
}

.rates i {
  flex: 1;
  min-width: 16px;
  border-bottom: 2px dotted rgba(23, 22, 15, 0.3);
  transform: translateY(-4px);
}

.rates b {
  font-weight: 600;
  white-space: nowrap;
}

.receipt-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-3);
}

/* Работы: ящик картотеки */

.drawer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  min-height: 300px;
  padding: 44px 48px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  overflow: hidden;
}

.drawer h2 {
  color: var(--sheet);
}

.drawer .sub {
  margin-top: 14px;
  color: rgba(255, 253, 248, 0.74);
}

.drawer .btn {
  margin-top: 26px;
}

.drawer:hover .btn-paper {
  background: var(--marker);
}

.drawer-cards {
  position: relative;
  align-self: stretch;
  min-height: 210px;
}

.fan {
  position: absolute;
  left: 50%;
  bottom: -96px;
  width: 180px;
  height: 200px;
  margin-left: -90px;
  padding: 26px 14px 14px;
  border-radius: 6px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  background-image: repeating-linear-gradient(to bottom, transparent 0 63px, var(--ruled) 63px 64px);
  box-shadow: 0 -10px 24px -12px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 130%;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fan::before {
  content: attr(data-no);
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
}

.fan-1 {
  transform: rotate(-10deg) translateX(-104px);
}

.fan-2 {
  transform: translateY(-16px);
}

.fan-3 {
  transform: rotate(10deg) translateX(104px);
  text-align: right;
}

.fan-3::before {
  left: auto;
  right: 14px;
}

.drawer:hover .fan-1,
.drawer:focus-visible .fan-1 {
  transform: rotate(-13deg) translate(-122px, -14px);
}

.drawer:hover .fan-2,
.drawer:focus-visible .fan-2 {
  transform: translateY(-40px);
}

.drawer:hover .fan-3,
.drawer:focus-visible .fan-3 {
  transform: rotate(13deg) translate(122px, -14px);
}

/* Заявка: бланк */

.blank {
  position: relative;
  max-width: 880px;
  padding: 0 38px 36px;
  background: var(--sheet);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.blank-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 0 14px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.blank-head b {
  color: var(--red);
  font-weight: 600;
}

.lead {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 30px;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-note {
  position: absolute;
  z-index: 2;
  top: calc(100% + 3px);
  right: 0;
  max-width: 100%;
  padding: 3px 9px 4px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--marker);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 6px 14px -8px rgba(23, 22, 15, 0.5);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) rotate(-1.5deg) scale(0.9);
  transform-origin: 85% 0;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.field-note::before {
  content: "";
  position: absolute;
  top: -4.5px;
  right: 18px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  background: var(--marker);
  transform: rotate(45deg);
}

.field-note.is-on {
  opacity: 1;
  visibility: visible;
  transform: rotate(-1.5deg);
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.2, 1.5, 0.4, 1), visibility 0s;
}

.field-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 2px 9px;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background-color: transparent;
  font-size: 18px;
}

.field select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path fill='none' stroke='%23c4300f' stroke-width='2' d='M1 1.5 7 7.5 13 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}

.field textarea {
  min-height: 128px;
  padding: 0 2px;
  border-bottom: 0;
  line-height: 32px;
  resize: vertical;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ruled) 31px 32px);
  background-attachment: local;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 1.5px 0 var(--red);
  background-color: rgba(255, 227, 90, 0.2);
}

.field textarea:focus {
  box-shadow: inset 0 0 0 1.5px var(--red);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9a9384;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red);
  background-color: rgba(196, 48, 15, 0.06);
}

.field.is-flash select {
  animation: flash 1.2s ease;
}

@keyframes flash {
  0%,
  40% {
    background-color: var(--marker);
  }
  100% {
    background-color: transparent;
  }
}

.field-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--red);
}

.consent a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.consent a:hover {
  color: var(--red);
}

.consent .field-error {
  grid-column: 2;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-status {
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
}

.form-ok {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 0 8px;
}

.form-ok p {
  color: var(--ink-2);
}

.stamp-big {
  margin: 8px 0 22px 10px;
  padding: 14px 26px 12px;
  border: 5px solid currentColor;
  border-radius: 12px;
  color: var(--red);
  font-family: Unbounded, sans-serif;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  filter: url(#rough);
  transform: rotate(-8deg);
  animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

/* Подвал */

.foot {
  position: relative;
  z-index: 1;
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--mw) minmax(0, 1fr);
  padding: 28px 0 104px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding: 22px 0 0 28px;
  border-top: 2px solid var(--ink);
  color: var(--ink-2);
  font-size: 15px;
}

.foot-in p {
  flex: 1 1 320px;
}

.foot-links {
  display: flex;
  gap: 18px;
}

.foot-links a {
  font-weight: 600;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}

.foot-docs {
  display: flex;
  flex-wrap: wrap;
  flex-basis: 100%;
  gap: 8px 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.foot-docs a {
  color: var(--ink-3);
  text-decoration-color: rgba(108, 102, 90, 0.4);
  text-underline-offset: 4px;
}

.foot-docs a:hover,
.foot-docs a[aria-current="page"] {
  color: var(--red);
  text-decoration-color: var(--red);
}

/* Документы: политика, оферта, согласие */

.doc-hero .body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-title {
  max-width: 900px;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.05;
}

.doc-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-switch a {
  padding: 8px 14px 7px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.doc-switch a:hover {
  background: var(--marker);
}

.doc-switch a[aria-current="page"] {
  background: var(--ink);
  color: var(--sheet);
}

.doc {
  position: relative;
  max-width: 880px;
  padding: 0 48px 40px;
  background: var(--sheet);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 16px;
  line-height: 1.65;
}

.doc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 0 8px 0 6px;
  background: linear-gradient(225deg, var(--paper) 50%, #e2dbcb 50%);
  box-shadow: -3px 3px 4px -2px rgba(23, 22, 15, 0.15);
}

.doc a {
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc-head {
  padding: 22px 0 18px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.doc-name {
  margin-bottom: 14px;
  padding-right: 40px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.doc-meta {
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.doc-meta div {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 2px 18px;
}

.doc-meta dt {
  color: var(--ink-3);
}

.doc-meta dd {
  color: var(--ink);
  font-weight: 500;
}

.doc-intro {
  margin-bottom: 16px;
  color: var(--ink-2);
}

.doc-toc {
  margin: 6px 0 10px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
}

.doc-toc summary {
  padding: 10px 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.doc-toc summary::marker {
  color: var(--red);
}

.doc-toc[open] summary {
  border-bottom: 1px solid var(--rule);
}

.doc-toc ol {
  columns: 2 260px;
  column-gap: 28px;
  padding: 12px 16px 14px;
  list-style: none;
  font-size: 14px;
  line-height: 1.4;
}

.doc-toc li {
  break-inside: avoid;
  padding: 3px 0;
}

.doc-toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.doc-toc a:hover {
  color: var(--red);
  text-decoration: underline;
}

.doc-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 34px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: 110px;
}

.doc-h .doc-n {
  flex: none;
  min-width: 34px;
  color: var(--red);
  font-family: Unbounded, sans-serif;
  font-weight: 800;
}

.doc-p {
  margin: 0 0 10px;
  color: var(--ink);
}

.doc-p .doc-n,
.doc-list .doc-n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--red);
}

.doc-deep,
.doc-plain {
  padding-left: 24px;
}

.doc-list {
  margin: -2px 0 12px;
  padding-left: 24px;
  list-style: none;
}

.doc-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 4px;
}

.doc-list-deep {
  padding-left: 48px;
}

.doc-dash li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 9px;
  height: 2px;
  background: var(--red);
}

.doc-abc li {
  padding-left: 0;
}

.doc-note {
  margin: 12px 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--red);
  background: rgba(255, 227, 90, 0.28);
  font-weight: 500;
}

.doc code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(23, 22, 15, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
}

.doc-code {
  margin: 0 0 10px 24px;
  overflow-x: auto;
}

.doc-up {
  display: inline-block;
  margin-top: 24px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Чат: справочное бюро */

.chat {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  width: min(380px, calc(100vw - 24px));
  height: 60px;
  pointer-events: none;
}

.chat-toggle,
.chat-panel {
  pointer-events: auto;
}

.chat-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow:
    0 12px 24px -10px rgba(196, 48, 15, 0.75),
    inset 0 0 0 4px var(--red),
    inset 0 0 0 5.5px rgba(255, 255, 255, 0.55);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chat-toggle:hover {
  background: var(--red-deep);
}

.chat-toggle svg {
  width: 26px;
  height: 26px;
}

.icon-close,
.chat.is-open .icon-chat {
  display: none;
}

.chat.is-open .icon-close {
  display: block;
}

.chat-label {
  position: absolute;
  right: 72px;
  bottom: 16px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--sheet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat:has(.chat-toggle:hover) .chat-label,
.chat:has(.chat-toggle:focus-visible) .chat-label {
  opacity: 1;
  transform: none;
}

.chat.is-open .chat-label {
  opacity: 0;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 100%;
  max-height: min(580px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: 0 1px 2px rgba(23, 22, 15, 0.1), 0 30px 60px -24px rgba(23, 22, 15, 0.55);
  transform-origin: 100% 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.chat.is-open .chat-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 2px solid var(--ink);
}

.chat-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.chat-head h2 {
  margin-top: 4px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.chat-x {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 22, 15, 0.07);
  font-size: 22px;
  line-height: 1;
}

.chat-x:hover {
  background: rgba(23, 22, 15, 0.14);
}

.chat-log {
  flex: 1;
  min-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 10px;
}

.msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;
}

.msg-bot {
  align-self: flex-start;
  border-left: 3px solid var(--red);
  border-radius: 2px 8px 8px 2px;
  background: var(--paper);
}

.msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--sheet);
}

.is-typing {
  color: var(--ink-3);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.suggestions button {
  padding: 6px 10px;
  border: 1px dashed var(--ink-3);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
}

.suggestions button:hover {
  border-style: solid;
  border-color: var(--red);
  color: var(--red);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px;
  border-bottom: 1.5px solid var(--ink);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.chat-form input:focus {
  outline: none;
}

.chat-form:focus-within {
  border-color: var(--red);
}

.chat-form button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.chat-note {
  padding: 8px 16px 14px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
}

.noscript {
  position: relative;
  z-index: 3;
  width: var(--wrap);
  margin: 96px auto 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--sheet);
}

/* Адаптив */

@media (max-width: 1080px) {
  .tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasks .task:nth-child(n) .task-tab {
    left: 18px;
    right: auto;
    transform: none;
  }

  .tasks .task:nth-child(2n) .task-tab {
    left: auto;
    right: 18px;
  }

  .task-ask {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .seal {
    width: 230px;
  }

  .route-head,
  .route li {
    grid-template-columns: 44px 170px minmax(0, 1fr) 132px 32px;
    gap: 16px;
  }

  .ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .ledger div:nth-child(n + 3) {
    border-top: 1px dashed var(--rule);
  }

  .drawer {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 960px) {
  .eye {
    grid-template-columns: minmax(0, 1fr);
  }

  .vf {
    order: -1;
  }
}

@media (max-width: 860px) {
  .nav-burger {
    display: inline-flex;
    align-items: center;
  }

  .nav-cta {
    margin-left: auto;
  }

  .menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-radius: 16px;
    background: var(--sheet);
    box-shadow: var(--shadow);
  }

  .menu a {
    padding: 12px 14px;
    font-size: 17px;
  }

  .nav.is-menu .menu {
    display: flex;
  }
}

@media (max-width: 820px) {
  :root {
    --wrap: calc(100% - 28px);
  }

  main {
    padding-top: 92px;
  }

  .sheet::before,
  .pen {
    display: none;
  }

  .sec,
  .foot {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px 0;
  }

  .foot {
    padding: 20px 0 100px;
  }

  .margin-in {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .tag {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: 0.16em;
  }

  .body,
  .foot-in {
    padding-left: 0;
  }

  .foot .margin {
    display: none;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hero .lede {
    font-size: 18px;
  }

  .seal {
    grid-row: 3;
    width: 170px;
    margin: -6px 6px 0 0;
  }

  .ledger dd {
    font-size: 18px;
  }

  .sec-head {
    margin-bottom: 28px;
  }

  .sub {
    font-size: 17px;
  }

  .route-sheet {
    padding: 0 18px;
  }

  .route-head {
    display: none;
  }

  .route li {
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    grid-template-areas:
      "no title tick"
      ". text text"
      ". time time";
    gap: 8px 12px;
    align-items: start;
  }

  .route-no {
    grid-area: no;
    font-size: 26px;
  }

  .route h3 {
    grid-area: title;
    font-size: 18px;
    padding-top: 2px;
  }

  .route p {
    grid-area: text;
  }

  .route-time {
    grid-area: time;
  }

  .tick {
    grid-area: tick;
  }

  .rules,
  .receipts,
  .lead-grid,
  .catalog {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule {
    padding: 24px 22px;
  }

  .rule:nth-child(odd) {
    border-right: 0;
  }

  .rule:nth-child(-n + 3) {
    border-bottom: 1px solid var(--rule);
  }

  .catalog .task:nth-child(2n) .task-tab {
    left: 18px;
    transform: none;
  }

  .drawer {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 24px 0;
  }

  .drawer-cards {
    min-height: 170px;
  }

  .fan {
    bottom: -120px;
  }

  .blank {
    padding: 0 20px 26px;
  }

  .lead,
  .lead-grid {
    row-gap: 34px;
  }

  .doc {
    padding: 0 20px 28px;
    font-size: 15.5px;
  }

  .doc-meta div {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-deep,
  .doc-plain,
  .doc-list {
    padding-left: 12px;
  }

  .doc-code {
    margin-left: 12px;
  }

  .doc-list-deep {
    padding-left: 24px;
  }
}

@media (max-width: 700px) {
  .tasks {
    grid-template-columns: minmax(0, 1fr);
  }

  .tasks .task:nth-child(n) .task-tab {
    left: 18px;
    right: auto;
  }

  .receipt {
    padding: 22px 18px 38px;
  }

  .rates li {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .rates span {
    flex: 1 1 100%;
  }

  .rates i {
    display: none;
  }

  .price-stamp {
    font-size: 15px;
  }

  .chat-label {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav {
    padding-left: 14px;
  }

  .nav-cta .long {
    display: none;
  }

  .nav-cta .short {
    display: inline;
  }

  .ledger div {
    padding-right: 10px;
  }

  .ledger div + div {
    padding-left: 12px;
  }

  .ledger div:nth-child(3) {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .seal,
  .stamp-big {
    animation: none;
    opacity: 0.92;
  }

  .vf-scan,
  .vf .rec {
    animation: none;
  }

  .task,
  .fan,
  .stamp-mini,
  .tick path,
  .tip,
  .chat-panel,
  .seal {
    transition: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 253, 248, 0.96);
  }
}
