/* ============================================================
   ШТАМП — бюро-эстетика: бумага, чернила, сургуч
   Unbounded (дисплей) · Golos Text (интерфейс) · IBM Plex Mono (документ)
   ============================================================ */

:root {
  --paper: #F5F1E8;
  --paper-deep: #ECE6D6;
  --sheet: #FDFCF8;
  --ink: #1B1712;
  --ink-soft: #57503F;
  --ink-faint: #8A8171;
  --stamp: #C33127;
  --stamp-deep: #A0271F;
  --pen: #23408F;
  --line: rgba(27, 23, 18, .16);
  --line-soft: rgba(27, 23, 18, .09);
  --dark-line: rgba(245, 241, 232, .18);
  --radius: 4px;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Golos Text", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --ease-slam: cubic-bezier(.2, 1.4, .35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* бумажное зерно */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--stamp); color: var(--paper); }

h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }

mark {
  background: linear-gradient(transparent 55%, rgba(195, 49, 39, .25) 55%);
  color: inherit;
  padding: 0 .1em;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: .85em 1.5em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--stamp {
  background: var(--stamp);
  border-color: var(--stamp-deep);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--stamp:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #2d2620; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--ghost-dark { background: transparent; border-color: var(--dark-line); color: var(--paper); }
.btn--ghost-dark:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--small { font-size: .85rem; padding: .6em 1.1em; }
.btn--big { font-size: 1.1rem; padding: 1em 2em; }
.btn--wide { width: 100%; }

:is(a, button, summary, input):focus-visible {
  outline: 2.5px solid var(--stamp);
  outline-offset: 2px;
}

/* ---------- шапка ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: .9rem clamp(1rem, 4vw, 3.5rem);
  background: rgba(245, 241, 232, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--stamp);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.brand__name em { color: var(--stamp); font-style: normal; }
.site-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--stamp);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- герой ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1rem, 4vw, 3.5rem) clamp(3.5rem, 7vw, 6rem);
  max-width: 1360px;
  margin: 0 auto;
}
.overline {
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--stamp);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .8em;
}
.overline::before { content: ""; width: 34px; height: 2px; background: var(--stamp); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  line-height: 1.06;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.hero__accent { color: var(--stamp); }
.hero__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34em;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__trust {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-faint);
}

/* документ в герое */
.hero__doc { perspective: 1200px; }
.paper {
  position: relative;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: 8px 10px 0 rgba(27, 23, 18, .16), 0 30px 60px rgba(27, 23, 18, .12);
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  transform: rotate(2.2deg);
  transition: transform .4s ease;
}
.paper:hover { transform: rotate(0deg) translateY(-4px); }
.paper__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: .6rem;
}
.paper__title {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: center;
  font-size: .85rem;
  letter-spacing: .12em;
  margin: 1rem 0;
}
.paper__line { height: 5px; background: var(--line-soft); border-radius: 2px; margin: .45rem 0; }
.paper__line--w80 { width: 80%; } .paper__line--w95 { width: 95%; }
.paper__line--w70 { width: 70%; } .paper__line--w90 { width: 90%; }
.paper__gap { height: .7rem; }
.paper__clause { font-size: .76rem; color: var(--ink-soft); margin: .5rem 0; line-height: 1.5; }
.paper__small { font-size: .68rem; color: var(--ink-faint); }
.paper__signs {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--ink-soft);
  margin-top: 1.2rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
}
.paper__barcode {
  height: 26px;
  margin-top: 1.1rem;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px);
  opacity: .8;
}

/* печать */
.stamp { position: absolute; color: var(--stamp); opacity: .92; }
.stamp__ring { font-family: var(--font-mono); font-size: 15.5px; font-weight: 600; fill: currentColor; letter-spacing: 3px; }
.stamp__core { font-family: var(--font-display); font-weight: 900; font-size: 58px; fill: currentColor; }
.stamp--hero {
  width: clamp(110px, 11vw, 150px);
  top: -28px; right: -22px;
  transform: rotate(-12deg);
  filter: url(#none) drop-shadow(0 0 .4px currentColor);
  animation: slam .55s var(--ease-slam) 1.1s backwards;
  mix-blend-mode: multiply;
}
@keyframes slam {
  0% { transform: scale(2.6) rotate(8deg); opacity: 0; }
  60% { opacity: .95; }
  100% { transform: scale(1) rotate(-12deg); opacity: .92; }
}
.stamp--slip { width: 108px; top: -34px; right: -14px; transform: rotate(11deg); animation: slam .55s var(--ease-slam) 1s backwards; }

/* ---------- бегущая строка ---------- */
.ticker {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-deep);
  overflow: hidden;
  padding: .65rem 0;
}
.ticker__track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--ink);
  animation: tick 36s linear infinite;
}
.ticker__track i { color: var(--stamp); font-style: normal; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- секции ---------- */
section { padding: clamp(3.5rem, 8vw, 7rem) clamp(1rem, 4vw, 3.5rem); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  text-transform: uppercase;
}
.section-head p { margin-top: .8rem; color: var(--ink-soft); font-size: 1.05rem; }
.section-head + * { max-width: 1360px; }
.how, .features, .faq, .pricing { margin: 0 auto; }
.how > *, .features > *, .faq > *, .pricing > *, .wizard > * { max-width: 1360px; margin-left: auto; margin-right: auto; }

/* ---------- шаги ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1.5px solid var(--ink);
  counter-reset: step;
}
.step {
  padding: 1.8rem 1.6rem 2rem 0;
  border-bottom: 1.5px solid var(--ink);
  padding-left: 0;
}
.step + .step { padding-left: 1.8rem; border-left: 1px solid var(--line); }
.step__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--stamp);
  display: block;
  margin-bottom: .9rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- конструктор ---------- */
.wizard {
  background: var(--ink);
  color: var(--paper);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background-image: radial-gradient(ellipse 80% 60% at 70% -10%, rgba(195, 49, 39, .12), transparent);
}
.wizard__head { text-align: left; margin-bottom: 2.2rem; }
.wizard__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}
.wizard__badge {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  padding: .2em .6em;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: .6em;
  text-transform: lowercase;
}
.wizard__head p { color: rgba(245, 241, 232, .66); margin-top: .7rem; }

.wizard__grid {
  display: grid;
  grid-template-columns: minmax(340px, 480px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* вкладки шаблонов */
.tpl-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tpl-tab {
  font-family: var(--font-mono);
  font-size: .82rem;
  background: transparent;
  color: rgba(245, 241, 232, .7);
  border: 1.5px solid var(--dark-line);
  border-radius: var(--radius);
  padding: .55em 1em;
  cursor: pointer;
  transition: all .18s ease;
}
.tpl-tab:hover { border-color: var(--paper); color: var(--paper); }
.tpl-tab.is-active {
  background: var(--stamp);
  border-color: var(--stamp-deep);
  color: var(--paper);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}
.tpl-tab--custom { border-style: dashed; color: #d4b168; }
.tpl-tab--custom:hover { border-color: #d4b168; color: #d4b168; }
.tpl-tab--custom.is-active { background: #8a6d1f; border-color: #8a6d1f; color: var(--paper); }

/* панели формы */
.panel {
  border: 1.5px solid var(--dark-line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  background: rgba(245, 241, 232, .035);
}
.panel__label {
  font-family: var(--font-mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: rgba(245, 241, 232, .55);
  margin-bottom: .8rem;
}
.panel--fold > summary {
  font-family: var(--font-mono);
  font-size: .84rem;
  cursor: pointer;
  color: rgba(245, 241, 232, .85);
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: .4em;
  user-select: none;
}
.panel--fold > summary::-webkit-details-marker { display: none; }
.panel--fold > summary::before { content: "▸"; color: var(--stamp); transition: transform .2s ease; }
.panel--fold[open] > summary::before { transform: rotate(90deg); }
.panel__hint { color: rgba(245, 241, 232, .4); font-size: .74rem; }
.panel--fold .cp-fields { margin-top: 1rem; }

.cp-lookup { display: flex; gap: .6rem; }
.cp-lookup .field { flex: 1; }
.cp-status { font-family: var(--font-mono); font-size: .78rem; margin-top: .6rem; min-height: 1.2em; }
.cp-status--ok { color: #7fb069; }
.cp-status--err { color: var(--stamp); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .6rem; }
.chips__label { font-size: .78rem; color: rgba(245, 241, 232, .45); }
.chip {
  font-family: var(--font-mono);
  font-size: .74rem;
  background: transparent;
  color: rgba(245, 241, 232, .75);
  border: 1px dashed var(--dark-line);
  border-radius: 999px;
  padding: .25em .7em;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-style: solid; border-color: var(--stamp); color: var(--paper); }

.cp-fields { display: none; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.cp-fields.is-open { display: flex; }
.f { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.f > span { font-size: .78rem; color: rgba(245, 241, 232, .55); }
.f-row { display: flex; gap: .7rem; }

.field {
  font-family: var(--font-body);
  font-size: .95rem;
  background: rgba(245, 241, 232, .06);
  border: 1.5px solid var(--dark-line);
  border-radius: var(--radius);
  color: var(--paper);
  padding: .6em .8em;
  width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.field::placeholder { color: rgba(245, 241, 232, .3); }
.field:focus { border-color: var(--stamp); background: rgba(245, 241, 232, .09); outline: none; }
.field--mono { font-family: var(--font-mono); letter-spacing: .03em; }

/* предпросмотр */
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: 1rem;
}
.preview-bar__name { font-family: var(--font-mono); font-size: .85rem; color: rgba(245, 241, 232, .85); }
.preview-bar__actions { display: flex; gap: .6rem; align-items: center; }

.wm-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: rgba(245, 241, 232, .6);
  background: transparent;
  border: 1px solid var(--dark-line);
  border-radius: 999px;
  padding: .4em .9em;
  cursor: pointer;
  transition: all .15s ease;
}
.wm-toggle__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--stamp);
  transition: background .15s ease;
}
.wm-toggle[aria-pressed="false"] .wm-toggle__dot { background: #7fb069; }
.wm-toggle:hover { color: var(--paper); border-color: var(--paper); }

.sheet-wrap { position: relative; }
.sheet {
  position: relative;
  background: var(--sheet);
  color: var(--ink);
  aspect-ratio: 210 / 297;
  min-height: 0;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.sheet__wm {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  letter-spacing: .35em;
  color: var(--stamp);
  opacity: .08;
  transform: rotate(-28deg);
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 0 1px var(--stamp);
}
.sheet__wm::after {
  content: "ОБРАЗЕЦ · ШТАМП · ОБРАЗЕЦ";
  position: absolute;
  transform: rotate(56deg) translateY(2.4em);
  opacity: .8;
}
.sheet__body {
  flex: 1;
  padding: clamp(.9rem, 2.2vw, 1.6rem) clamp(1rem, 2.4vw, 1.8rem);
  font-family: var(--font-mono);
  font-size: clamp(.55rem, 1.15vw, .72rem);
  line-height: 1.5;
  overflow: visible;
}
.sheet__body mark { background: linear-gradient(transparent 50%, rgba(195, 49, 39, .22) 50%); }
.doc-brand {
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: .1em 0 .5em;
}
.doc-h { text-align: center; font-weight: 600; letter-spacing: .1em; margin: .4em 0; }
.doc-right { text-align: right; color: var(--ink-soft); }
.doc-p { text-align: justify; margin: .45em 0; }
.doc-sub { font-weight: 600; margin: .6em 0 .2em; letter-spacing: .05em; }
.doc-spacer { height: .8em; }
.doc-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2em; margin: .5em 0; }
.doc-kv p { margin: .15em 0; }
.doc-hr { border: none; border-top: 1px solid var(--line); margin: .7em 0; }
.doc-note { color: var(--ink-faint); font-size: .85em; }
.doc-table { width: 100%; border-collapse: collapse; margin: .5em 0; }
.doc-table th, .doc-table td { border: 1px solid var(--ink); padding: .35em .5em; text-align: left; }
.doc-table th { font-weight: 600; background: rgba(27, 23, 18, .04); }
.doc-sign { display: flex; justify-content: space-between; margin-top: 1.2em; }

.wiz-note { margin-top: 1rem; font-size: .8rem; color: rgba(245, 241, 232, .4); text-align: center; }

/* ---------- возможности ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--line);
  border: 1.5px solid var(--ink);
}
.feature { background: var(--paper); padding: 1.7rem 1.5rem 1.9rem; position: relative; transition: background .2s ease; }
.feature:hover { background: var(--paper-deep); }
.feature__tag {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .15em .7em;
  display: inline-block;
  margin-bottom: 1rem;
}
.feature h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.feature p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- тарифы-квитанции ---------- */
.slips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; align-items: start; }
.slip {
  position: relative;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: 5px 5px 0 rgba(27, 23, 18, .12);
}
.slip--pro { transform: translateY(-10px); box-shadow: 7px 9px 0 rgba(195, 49, 39, .35); }
.slip__head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 1rem;
  border-bottom: 1.5px dashed var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.slip__num { grid-column: 1 / -1; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; color: var(--ink-faint); margin-bottom: .4rem; }
.slip__head h3 { font-family: var(--font-display); font-size: 1.3rem; text-transform: uppercase; }
.slip__price { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; text-align: right; }
.slip__price small { font-family: var(--font-mono); font-weight: 400; font-size: .72rem; color: var(--ink-faint); }
.slip__list { list-style: none; margin-bottom: 1.4rem; }
.slip__list li {
  padding: .5em 0 .5em 1.6em;
  border-bottom: 1px solid var(--line-soft);
  font-size: .93rem;
  position: relative;
}
.slip__list li::before { content: "—"; position: absolute; left: 0; color: var(--stamp); font-weight: 600; }
.slip__list li.is-off { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: rgba(195,49,39,.5); }
.slip__list li.is-off::before { content: "×"; }
.slip__note { margin-top: .8rem; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-faint); }

/* ---------- FAQ ---------- */
.faq__list { max-width: 860px; }
.qa {
  border-bottom: 1.5px solid var(--ink);
}
.qa:first-child { border-top: 1.5px solid var(--ink); }
.qa summary {
  display: flex;
  gap: 1.4rem;
  align-items: baseline;
  padding: 1.3rem .4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.06rem;
  transition: color .15s ease;
  user-select: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--stamp); }
.qa summary span { font-family: var(--font-mono); font-size: .8rem; color: var(--stamp); }
.qa p { padding: 0 .4rem 1.4rem calc(1.4rem + 1.6em); color: var(--ink-soft); max-width: 46em; }

/* ---------- финальный CTA ---------- */
.cta { background: var(--paper-deep); border-top: 1.5px solid var(--ink); text-align: center; }
.cta__inner { max-width: 760px; margin: 0 auto; }
.cta h2 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.1;
  margin-bottom: 2rem;
}
.cta p { margin-top: 1.2rem; font-family: var(--font-mono); font-size: .82rem; color: var(--ink-faint); }

/* ---------- подвал ---------- */
.site-foot {
  border-top: 1.5px solid var(--ink);
  padding: 1.8rem clamp(1rem, 4vw, 3.5rem) 2.2rem;
  background: var(--ink);
  color: var(--paper);
}
.foot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot-note { font-family: var(--font-mono); font-size: .74rem; color: rgba(245, 241, 232, .5); }
.foot-disclaimer { margin-top: 1.1rem; font-size: .76rem; color: rgba(245, 241, 232, .38); max-width: 60em; }

/* ---------- появление ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- авторизация в шапке ---------- */
.auth-area { display: flex; align-items: center; gap: .7rem; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  border: 1.5px dashed var(--line);
  border-radius: 999px;
  padding: .35em .9em;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  font-style: normal;
  font-size: .66rem;
  letter-spacing: .08em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: .2em .6em;
}
.badge--pro { background: var(--stamp); }

/* ---------- модальное окно ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(27, 23, 18, .55);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(27, 23, 18, .35);
  padding: 1.8rem 1.6rem 1.6rem;
}
.modal__close {
  position: absolute;
  top: .7rem; right: .9rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-faint);
}
.modal__close:hover { color: var(--stamp); }
.modal__tabs { display: flex; gap: .4rem; margin-bottom: 1.1rem; }
.modal__tabs button {
  font-family: var(--font-mono);
  font-size: .82rem;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  padding: .5em 1.1em;
  cursor: pointer;
}
.modal__tabs button.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.modal__note { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.1rem; }
.mf { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.mf > span { font-size: .8rem; color: var(--ink-soft); }
.modal .field { background: var(--sheet); border-color: var(--line); color: var(--ink); }
.modal .field::placeholder { color: var(--ink-faint); }
.modal .field:focus { border-color: var(--stamp); background: #fff; }
.auth-error { min-height: 1.3em; font-size: .82rem; color: var(--stamp); margin-bottom: .5rem; }

/* ---------- мои документы ---------- */
.docs-list { display: flex; flex-direction: column; gap: .45rem; margin: .9rem 0 .8rem; }
.docs-empty { font-size: .82rem; color: rgba(245, 241, 232, .45); }
.docs-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  padding: .45rem .7rem;
  font-size: .84rem;
}
.docs-item__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(245, 241, 232, .9); }
.docs-item__date { font-family: var(--font-mono); font-size: .7rem; color: rgba(245, 241, 232, .4); }
.docs-item__btn {
  background: transparent;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  color: rgba(245, 241, 232, .75);
  width: 26px; height: 26px;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
}
.docs-item__btn:hover { border-color: var(--paper); color: var(--paper); }
.docs-item__btn--del:hover { border-color: var(--stamp); color: var(--stamp); }
.docs-item__ver { font-family: var(--font-mono); font-size: .68rem; color: var(--stamp); font-weight: 600; }
.docs-item--histhead { border-color: var(--stamp); background: rgba(195, 49, 39, .08); }
.docs-versions { display: flex; flex-direction: column; gap: .3rem; padding: .2rem 0 .4rem .8rem; border-left: 2px dashed var(--dark-line); }
.docs-version {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-align: left;
  background: transparent;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  color: rgba(245, 241, 232, .75);
  padding: .4em .8em;
  cursor: pointer;
}
.docs-version:hover { border-color: var(--stamp); color: var(--paper); }

/* ---------- радар оплат ---------- */
.due-item { grid-template-columns: 1fr auto auto auto; }
.due-badge {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .25em .7em;
  white-space: nowrap;
}
.due-badge--open { color: #b8860b; border: 1px solid currentColor; }
.due-badge--overdue { color: var(--paper); background: var(--stamp); border: 1px solid var(--stamp-deep); }
.due-badge--paid { color: #7fb069; border: 1px solid currentColor; }

/* ---------- секция шаблонов на главной ---------- */
.tpl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.tpl-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 1.3rem 1.2rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(27, 23, 18, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tpl-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(195, 49, 39, .3); }
.tpl-card__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--stamp);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .15em .7em;
}
.tpl-card h3 { font-size: 1.02rem; }
.tpl-card p { font-size: .86rem; color: var(--ink-soft); flex: 1; }
.tpl-card__more { font-family: var(--font-mono); font-size: .76rem; color: var(--stamp); }

/* ---------- SEO-страницы шаблонов /t/... ---------- */
.tplpage__main {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
}
.tplpage__h1 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.12;
  margin: 1rem 0;
}
.tplpage__intro { max-width: 46em; color: var(--ink-soft); font-size: 1.06rem; margin-bottom: 1.8rem; }
.tplpage__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.tplpage__cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.tplpage__col h2 { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; margin-bottom: 1rem; }
.tplpage__list { list-style: none; margin-bottom: 1.5rem; }
.tplpage__list li {
  padding: .6em 0 .6em 1.8em;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.tplpage__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--stamp);
  font-weight: 600;
}
.tplpage__aside { position: sticky; top: 5.5rem; }
.tplpage__note {
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  padding: 1.6rem 1.4rem;
  box-shadow: 6px 6px 0 rgba(27, 23, 18, .18);
}
.tplpage__note p { font-size: .9rem; margin-bottom: .7em; color: rgba(245, 241, 232, .85); }
.tplpage__asidetitle {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .74rem !important;
  color: var(--stamp) !important;
  margin-bottom: 1rem !important;
}
.tplpage__note .btn { margin-top: .6rem; }
.tplpage__legal { font-size: .72rem !important; color: rgba(245, 241, 232, .4) !important; margin-top: 1rem !important; }
.tplpage .qa summary { font-size: .96rem; }
.tplpage .qa p { padding-left: calc(1.2rem + 1.6em); }
@media (max-width: 880px) {
  .tplpage__cols { grid-template-columns: 1fr; }
  .tplpage__aside { position: static; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 600;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--paper);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
  border-radius: var(--radius);
  padding: .8em 1.4em;
  font-size: .9rem;
  max-width: min(480px, 92vw);
  text-align: center;
  animation: toast-in .25s ease;
}
.toast--err { background: var(--stamp); border-color: var(--stamp-deep); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (max-width: 880px) {
  .auth-area { margin-left: auto; }
  .user-chip { max-width: 120px; }
}

/* ---------- страница шаринга /d/:token ---------- */
.sharepage__main { max-width: 780px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 1rem 4rem; }
.sharepage__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.2rem); text-transform: uppercase; margin: .6rem 0 1.2rem; }
.share-head { text-align: center; }
.share-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin: 1.6rem 0; }
.share-actions .btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.share-note { text-align: center; margin-top: 1.4rem; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); }
.share-error { text-align: center; margin-top: 2rem; color: var(--stamp); font-weight: 600; }

/* ---------- админ-панель ---------- */
.adminpage { background: var(--paper-deep); }
.adminpage__main { max-width: 1100px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 4rem; }
.adminpage__title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.15rem; margin: 2.2rem 0 1rem; }
.admin-login { display: grid; place-items: center; min-height: 55vh; }
.admin-login__box {
  width: min(440px, 100%);
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: 6px 6px 0 rgba(27, 23, 18, .18);
  padding: 1.8rem 1.6rem;
}
.admin-login__box h1 { font-family: var(--font-display); font-size: 1.1rem; text-transform: uppercase; margin-bottom: .6rem; }
.admin-login__hint { font-size: .82rem; color: var(--ink-soft); margin-bottom: 1.1rem; }
.admin-login__hint code { font-family: var(--font-mono); font-size: .78rem; background: var(--paper-deep); padding: .1em .4em; border-radius: 3px; }
.admin-login .field { margin-bottom: .6rem; }
.admin-error { min-height: 1.3em; font-size: .84rem; color: var(--stamp); margin-bottom: .5rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat {
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  box-shadow: 4px 4px 0 rgba(27, 23, 18, .15);
}
.stat__k { display: block; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(245, 241, 232, .5); margin-bottom: .35rem; }
.stat__v { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.tablewrap { overflow-x: auto; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 2px; }
.admintable { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admintable th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  padding: .7em .9em;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}
.admintable td { padding: .6em .9em; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.admintable td code { font-family: var(--font-mono); font-size: .8rem; }
.admintable__btn {
  font-family: var(--font-mono);
  font-size: .72rem;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: .25em .8em;
  cursor: pointer;
  color: var(--ink-soft);
}
.admintable__btn:hover:not(:disabled) { border-color: var(--stamp); color: var(--stamp); }
.admintable__btn:disabled { opacity: .3; cursor: default; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- панель Telegram ---------- */
.tg-body { padding: .4rem 0; }
.tg-step { font-size: .84rem; color: rgba(245, 241, 232, .6); margin: .5rem 0; }
.tg-cmd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--paper);
  background: rgba(245, 241, 232, .08);
  border: 1.5px dashed var(--stamp);
  border-radius: var(--radius);
  padding: .5em 1em;
  letter-spacing: .08em;
}
.tg-cmd b { color: var(--stamp); }

/* ---------- печать / PDF ---------- */
@media print {
  body::before, .site-head, .preview-bar, .wiz-note, .ticker, .hero, .how, .features, .templates, .pricing, .faq, .cta, .site-foot, .tpl-tabs, .panel, .wizard__head, .wm-toggle, .btn, .share-actions, .share-head, .share-note { display: none !important; }
  body { background: #fff; }
  .wizard, .sharepage__main { background: #fff; padding: 0; border: none; max-width: 100%; }
  .wizard__grid { display: block; }
  .sheet { box-shadow: none; border: none; max-width: 100%; aspect-ratio: auto; }
  .sheet__body { font-size: 11px; overflow: visible; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1060px) {
  .wizard__grid { grid-template-columns: 1fr; }
  .sheet-wrap { order: -1; }
  .slips { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .slip--pro { transform: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .tpl-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero__doc { max-width: 480px; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: none; }
  .site-nav { display: none; }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .f-row { flex-direction: column; }
  .cp-lookup { flex-direction: column; }
  .tpl-cards { grid-template-columns: 1fr; }
  .site-head { gap: .9rem; padding: .8rem 1rem; }
  .site-head .btn--ink { display: none; }
  .user-chip { display: none; }
  .stamp--hero { right: 6px; top: -20px; width: 96px; }
  .paper { transform: rotate(0deg); }
  .hero { padding-bottom: 3rem; }
  .preview-bar__actions { flex-wrap: wrap; }
}

/* ---------- B2B-ссылка ---------- */
.b2b-link {
  display: block;
  margin-top: .55rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: rgba(245, 241, 232, .55);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  width: fit-content;
}
.b2b-link:hover { color: var(--paper); }
