/* web/static/css/documents.css
   Стили страницы /documents поверх site.css. Общие классы (.hero, .faq, .h2…) переопределяются только внутри .page/.hero--page/.faq--list. */
:root {
  --band: #F7F7F8;
  --dash: #DADCDF;
  --kraft: #E9D8B8;
  --kraft-dark: #D9C29A;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
.page .h2 {
  font: 500 40px/1.1 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page .lead {
  margin-top: 16px;
  max-width: 38em;
  font-size: 18px;
  color: var(--text2);
}
.page .section {
  padding: 96px 0;
}
.section--band {
  background: var(--band);
}
.btn--ink {
  background: var(--ink);
  color: #fff;
}
.btn--line {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  color: #fff;
}
.hero.hero--page {
  padding-bottom: 0;
}
.hero.hero--page::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -300px;
  width: 1000px;
  height: 640px;
  transform: translateX(-50%);
  background:
    radial-gradient(
      closest-side,
      rgba(216, 242, 106, .22),
      transparent);
  pointer-events: none;
}
.hero--page .hero__body {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 0 0;
  text-align: center;
}
.hero__kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--on-dark);
  font-size: 14px;
}
.hero--page .hero__title {
  margin-top: 22px;
  font: 500 56px/1.06 var(--display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero--page .hero__lead {
  margin: 22px auto 0;
  max-width: 34em;
  color: var(--on-dark);
  font-size: 18px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.hfacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 72px;
  border-top: 1px dashed rgba(255, 255, 255, .18);
  text-align: left;
}
.hfacts__cell {
  padding: 28px 28px 44px;
}
.hfacts__cell + .hfacts__cell {
  border-left: 1px dashed rgba(255, 255, 255, .18);
}
.hfacts__num {
  font: 500 30px/1.1 var(--display);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.hfacts__num--lime {
  color: var(--lime);
}
.hfacts__num--red {
  color: #F07A66;
}
.hfacts__label {
  margin-top: 8px;
  color: var(--on-dark);
  font-size: 15px;
  line-height: 1.45;
}
.flow__cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 40px;
}
.fc {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  border-radius: 18px;
  background: var(--fog);
}
.fc__num {
  font: 400 40px/1 var(--display);
  letter-spacing: -0.04em;
  color: #C9CCD1;
}
.fc__when {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}
.fc__title {
  margin-top: 2px;
  font: 500 17px/1.3 var(--display);
  letter-spacing: -0.01em;
}
.fc__text {
  margin-top: 8px;
  color: var(--text2);
  font-size: 14.5px;
}
.fc--bad {
  background: var(--ink);
  color: #fff;
}
.fc--bad .fc__num {
  color: #F07A66;
}
.fc--bad .fc__when,
.fc--bad .fc__text {
  color: var(--on-dark);
}
.flow__bill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  margin-top: 56px;
}
.flow__h3 {
  font: 500 28px/1.15 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.bill {
  padding: 24px 26px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 20px 44px -28px rgba(23, 24, 26, .35);
}
.bill__row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--dot);
  font-size: 15px;
}
.bill__row span:first-child {
  flex: 1;
  color: var(--text2);
}
.bill__row span:last-child {
  white-space: nowrap;
}
.bill__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  font: 500 19px/1.3 var(--display);
}
.bill__total span:last-child {
  color: #B23A27;
  white-space: nowrap;
}
.bill__note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.section--dark {
  background: var(--ink);
  color: #fff;
}
.section--dark .lead {
  color: var(--on-dark);
}
.days__top {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.have {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.have input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.have__sw {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .22);
  transition: background .2s;
}
.have__sw::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s, background .2s;
}
.have:has(input:checked) .have__sw {
  background: var(--lime);
}
.have:has(input:checked) .have__sw::after {
  transform: translateX(24px);
  background: var(--ink);
}
.have:has(input:focus-visible) {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
.cal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 36px;
}
.cal__dow {
  padding: 0 4px 2px;
  color: var(--on-dark-2);
  font-size: 13px;
}
.cal__day {
  min-height: 128px;
  padding: 14px;
  border-radius: 14px;
  background: #222326;
  transition: background .25s;
}
.cal__num {
  font: 500 22px/1 var(--display);
  letter-spacing: -0.03em;
  color: #55585E;
}
.cal__task {
  margin-top: 10px;
  color: var(--on-dark);
  font-size: 14px;
  line-height: 1.4;
}
.cal__task--with {
  display: none;
}
.cal__day--start {
  background: #fff;
  color: var(--ink);
}
.cal__day--start .cal__num {
  color: var(--ink);
}
.cal__day--start .cal__task {
  color: var(--ink);
}
.cal__day--end {
  background: rgba(217, 83, 63, .18);
  box-shadow: inset 0 0 0 2px #F07A66;
}
.cal__day--end .cal__num,
.cal__day--end .cal__task {
  color: #F07A66;
}
.cal__day--end .cal__task {
  font-weight: 500;
}
body:has(#have-folder:checked) .cal__task--without {
  display: none;
}
body:has(#have-folder:checked) .cal__task--with {
  display: block;
}
body:has(#have-folder:checked) .cal__day--start {
  background: var(--lime);
}
body:has(#have-folder:checked) .cal__day:not(.cal__day--start) {
  background: #1E1F22;
}
body:has(#have-folder:checked) .cal__day:not(.cal__day--start) .cal__task {
  color: #55585E;
}
body:has(#have-folder:checked) .cal__day--end {
  box-shadow: none;
}
body:has(#have-folder:checked) .cal__day--end .cal__num {
  color: #55585E;
}
.days__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  color: var(--on-dark);
  font-size: 15.5px;
}
.days__foot b {
  color: #fff;
  font-weight: 500;
}
.days__say--with {
  display: none;
}
body:has(#have-folder:checked) .days__say--without {
  display: none;
}
body:has(#have-folder:checked) .days__say--with {
  display: inline;
}
.build {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 44px;
}
.ask {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 8px;
}
.ask__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .15s;
}
.ask__item:hover {
  box-shadow: 0 0 0 1px var(--dot);
}
.ask__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ask__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px var(--dot);
  background: #fff;
}
.ask__box svg {
  opacity: 0;
}
.ask__item:has(input:checked) .ask__box {
  background: var(--ink);
  box-shadow: none;
}
.ask__item:has(input:checked) .ask__box svg {
  opacity: 1;
}
.ask__item:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.ask__q {
  font-weight: 500;
  line-height: 1.35;
}
.ask__hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
}
.ask__note {
  margin-top: 6px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13.5px;
}
.result {
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  counter-reset: docs all;
}
.result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  background: var(--fog);
}
.result__title {
  font: 500 18px/1.3 var(--display);
}
.result__org {
  color: var(--muted);
  font-size: 14px;
}
.tear {
  position: relative;
  height: 20px;
  background: linear-gradient(var(--fog) 50%, #fff 50%);
}
.tear::before,
.tear::after {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--band);
}
.tear::before {
  left: -10px;
}
.tear::after {
  right: -10px;
}
.tear__line {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 10px;
  border-top: 1px dashed var(--dash);
}
.result__body {
  padding: 8px 28px 4px;
}
.group + .group {
  margin-top: 22px;
}
.group__name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--ink);
  font: 500 15px/1.3 var(--display);
}
.group__why {
  color: var(--muted);
  font: 400 13.5px/1.3 var(--sans);
}
.doc {
  counter-increment: docs all;
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--dot);
  font-size: 15px;
  animation: pop .25s ease;
}
.doc::before {
  content: counter(docs);
  flex: none;
  width: 24px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* «Ещё N документов»: свёрнутые строки остаются в разметке (иначе не попадут в счётчик всей папки),
   но не нумеруются, пока группа закрыта — номера следующих групп идут подряд */
.js .more:not(.is-open) {
  height: 0;
  overflow: hidden;
}
.js .more:not(.is-open) .doc {
  counter-increment: all;
  animation: none;
}
.more__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 14px/1.3 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--dot);
  text-underline-offset: 4px;
  cursor: pointer;
}
.more__btn::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.more.is-open + .more__btn::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}
.doc__tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EEF8C2;
  font-size: 12.5px;
  white-space: nowrap;
  align-self: center;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
body:has(#q-staff:not(:checked)) .if-staff,
body:has(#q-office:not(:checked)) .if-office,
body:has(#q-cams:not(:checked)) .if-cams,
body:has(#q-site:not(:checked)) .if-site,
body:has(#q-mail:not(:checked)) .if-mail,
body:has(#q-vendors:not(:checked)) .if-vendors {
  display: none;
}
.result__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 20px 28px 24px;
  border-top: 1px dashed var(--dash);
}
.result__count {
  font: 500 22px/1.2 var(--display);
  letter-spacing: -0.02em;
}
.result__count::before {
  content: counter(all) " ";
  color: var(--ink);
}
.result__count span {
  color: var(--muted);
  font: 400 15px/1 var(--sans);
  letter-spacing: 0;
}
.qa {
  margin-top: 40px;
  border-top: 1.5px solid var(--ink);
}
.qa__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px dotted var(--dot);
}
.qa__ask {
  font: 500 17px/1.35 var(--display);
  letter-spacing: -0.01em;
}
.qa__arrow {
  color: var(--dot);
  font-size: 22px;
  text-align: center;
}
.qa__doc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qa__chip {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--fog);
  font-size: 14.5px;
}
.price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
}
.ticket {
  position: relative;
  padding: 32px;
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
}
.ticket__name {
  color: var(--on-dark);
  font-size: 15px;
}
.ticket__price {
  margin-top: 6px;
  font: 400 56px/1 var(--display);
  letter-spacing: -0.04em;
  color: var(--lime);
}
.ticket__per {
  margin-top: 6px;
  color: var(--on-dark);
  font-size: 15px;
}
.ticket__rows {
  margin-top: 24px;
}
.ticket__row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dotted rgba(255, 255, 255, .16);
  font-size: 15px;
}
.ticket__row::before {
  content: "\2713";
  color: var(--lime);
  font-weight: 600;
}
.ticket .btn {
  width: 100%;
  margin-top: 24px;
}
.ticket__small {
  margin-top: 12px;
  color: var(--on-dark-2);
  font-size: 13.5px;
  text-align: center;
}
.facts {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1.5px solid var(--ink);
}
.facts__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dotted var(--dot);
  font-size: 15.5px;
}
.facts__row dt {
  color: var(--muted);
}
.facts__row dd {
  margin: 0;
}
.side-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--fog);
  color: var(--text2);
  font-size: 15px;
}
.side-note a {
  color: var(--ink);
}
.faq.faq--list {
  display: block;
  margin-top: 36px;
  max-width: 860px;
  border-top: 1.5px solid var(--ink);
}
.faq--list .faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font: 500 17px/1.4 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq--list .faq__q::after {
  content: "+";
  flex: none;
  font: 400 26px/1 var(--sans);
  color: var(--muted);
  transition: transform .15s;
}
.faq--list .faq__item[open] .faq__q::after {
  transform: rotate(45deg);
}
.faq--list .faq__a {
  padding: 0 0 22px;
  max-width: 46em;
  color: var(--text2);
}
@media (max-width: 1000px) {
  .price {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .build {
    grid-template-columns: 1fr;
  }
  .ask {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 1000px) {
  .flow__cards {
    grid-template-columns: 1fr 1fr;
  }
  .fc--bad {
    grid-column: 1 / -1;
  }
  .flow__bill {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cal {
    grid-template-columns: 1fr 1fr;
  }
  .cal__dow {
    display: none;
  }
  .cal__day {
    min-height: 0;
  }
}
@media (max-width: 720px) {
  .flow__cards {
    grid-template-columns: 1fr;
  }
  .flow__h3 {
    font-size: 22px;
  }
  .have {
    white-space: normal;
  }
  .page .section {
    padding: 64px 0;
  }
  .page .h2 {
    font-size: clamp(26px, 7vw, 40px);
  }
  .hero--page .hero__body {
    padding: 40px 0 0;
  }
  .hero--page .hero__title {
    font-size: clamp(28px, 8.4vw, 56px);
    hyphens: auto;
  }
  .hfacts {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }
  .hfacts__cell {
    padding: 20px 0;
  }
  .hfacts__cell + .hfacts__cell {
    border-left: 0;
    border-top: 1px dashed rgba(255, 255, 255, .18);
  }
  .hero__actions .btn {
    flex: 1;
  }
  .ask {
    grid-template-columns: 1fr;
  }
  .result__head,
  .result__body,
  .result__foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .result__foot .btn {
    width: 100%;
  }
  .qa__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .qa__arrow {
    display: none;
  }
  .facts__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .ticket {
    padding: 24px;
  }
  .ticket__price {
    font-size: 46px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .doc {
    animation: none;
  }
}
