/* Molio — токены сняты с stepanovweb.ru (computed styles) */
:root {
  --bg: #f4f4f1;
  --ink: #111;
  --dark: #161616;
  --muted: #6a6e6a;
  --soft: #a3a8a3;
  --grey: #ececea;
  --sage: #e3e8e3;
  --line: #e1e4e1;
  --accent: #8fdca0;
  --accent-ink: #2f6b45;
  --r: 28px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Layout */
.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 40px 40px;
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.screen main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0;
}

/* Top bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.me {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 6px 6px;
  background: #fff;
  border-radius: 99px;
}

.me .mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.me b {
  display: block;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.me span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* Pills & buttons */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  font-size: 16px;
  white-space: nowrap;
  border-radius: 99px;
  transition: background-color .2s, opacity .2s;
}

.pill.dark {
  background: var(--dark);
  color: #fff;
}

.pill.dark .circ {
  background: #2b2b2b;
}

.pill.dark:hover {
  background: #2b2b2b;
}

.pill.dark:hover .circ {
  background: var(--accent);
  color: var(--dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 26px;
  font-size: 17px;
  border-radius: 99px;
  transition: background-color .2s;
}

.btn.dark {
  background: var(--dark);
  color: #fff;
}

.btn.dark .circ {
  background: var(--accent);
  color: var(--dark);
}

.btn.dark:hover {
  background: #2b2b2b;
}

.btn.light {
  background: #fff;
  color: var(--ink);
}

.btn.light .circ {
  background: var(--grey);
}

.btn.light:hover .circ {
  background: var(--sage);
}

.circ {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  transition: background-color .2s, color .2s, transform .2s;
}

.btn:hover .circ,
.pill:hover .circ {
  transform: rotate(45deg);
}

.ar {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}

/* Typography */
.note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 12px 22px 12px 16px;
  font-size: 17px;
  color: #2b2e2b;
  background: var(--sage);
  border-radius: 99px;
}

.dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-ink);
}

.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 1.8s ease-out infinite;
}

@keyframes ping {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(2.6); opacity: 0; }
}

h1 {
  max-width: 1180px;
  margin-top: 28px;
  font-size: clamp(44px, 5.8vw, 84px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.soft {
  color: var(--soft);
}

.lead {
  max-width: 760px;
  margin-top: 28px;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.45;
  color: var(--muted);
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 14px;
  font-size: 18px;
  background: #fff;
  border-radius: 99px;
}

.chip i {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  font-style: normal;
  color: var(--muted);
  background: var(--grey);
  border-radius: 99px;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 28px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.foot .sp {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.foot a {
  color: var(--ink);
}

.foot a:hover {
  opacity: .6;
}

/* Requisites */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  font-size: 15px;
  color: var(--muted);
}

.crumbs a:hover,
.crumbs .cur {
  color: var(--ink);
}

.req {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
  margin: 56px 0 96px;
}

.req-col {
  display: grid;
  gap: 20px;
}

.box {
  position: relative;
  padding: 32px;
  background: #fff;
  border-radius: var(--r);
}

.box.sage {
  background: var(--sage);
}

.box.dark {
  background: var(--dark);
  color: #fff;
}

.box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.box h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.req-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 6px 24px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.req-row:first-child {
  border-top: 0;
}

.req-row dt {
  font-size: 15px;
  color: var(--muted);
}

.req-row dd {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--grey);
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s;
}

.copy:hover {
  background: var(--sage);
}

.copy.is-copied {
  background: var(--accent);
  color: var(--dark);
}

.copy svg {
  width: 14px;
  height: 14px;
}

.box.dark .kicker {
  color: #b9bdb9;
}

.steps {
  display: grid;
  gap: 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  font-size: 16px;
  line-height: 1.45;
  color: #e7e9e7;
  counter-increment: s;
}

.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  color: #fff;
  background: #2b2b2b;
  border-radius: 50%;
}

.box .btn {
  width: 100%;
  justify-content: space-between;
  margin-top: 28px;
  font: inherit;
  font-size: 16px;
  border: 0;
  cursor: pointer;
}

.box p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  padding: 14px 22px;
  font-size: 15px;
  color: #fff;
  background: var(--dark);
  border-radius: 99px;
  width: max-content;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 1100px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .req {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 14px 16px 28px;
  }

  .screen main {
    padding: 48px 0;
  }

  .me {
    padding-right: 14px;
  }

  .me .mark {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .me span {
    display: none;
  }

  .pill.dark {
    gap: 8px;
    padding: 6px 6px 6px 14px;
    font-size: 15px;
  }

  .pill.dark .circ {
    width: 34px;
    height: 34px;
  }

  .label-long {
    display: none;
  }

  .note {
    padding: 10px 16px 10px 14px;
    font-size: 14px;
  }

  h1 {
    margin-top: 20px;
    font-size: clamp(34px, 9.4vw, 44px);
    letter-spacing: -0.04em;
  }

  .lead {
    margin-top: 18px;
    font-size: 17px;
  }

  .actions {
    margin-top: 32px;
  }

  .btn {
    width: 100%;
    justify-content: space-between;
    padding: 8px 8px 8px 20px;
    font-size: 16px;
  }

  .btn .circ {
    width: 36px;
    height: 36px;
  }

  .chips {
    gap: 8px;
    margin-top: 40px;
  }

  .chip {
    padding: 10px 16px 10px 10px;
    font-size: 15px;
  }

  .crumbs {
    margin-top: 32px;
  }

  .req {
    margin: 36px 0 64px;
    gap: 12px;
  }

  .req-col {
    gap: 12px;
  }

  .box {
    padding: 22px;
  }

  .box h2 {
    font-size: 22px;
  }

  .req-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .req-row dt {
    grid-column: 1 / -1;
    font-size: 14px;
  }

  .req-row dd {
    font-size: 16px;
  }

  .copy--icon-m {
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .copy--icon-m .copy-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .copy--icon-m svg {
    width: 16px;
    height: 16px;
  }

  .foot .sp {
    margin-left: 0;
  }
}

@media (min-width: 761px) {
  .label-short {
    display: none;
  }
}

@media print {
  .top, .foot, .copy, .box .btn, .toast {
    display: none !important;
  }

  .req {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.box.dark .btn.dark {
  background: #2b2b2b;
}

.box.dark .btn.dark:hover {
  background: #353535;
}

/* Language switch */
.right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--grey);
  border-radius: 99px;
}

.lang a {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 99px;
  transition: background-color .2s, color .2s;
}

.lang a:hover {
  color: var(--ink);
}

.lang a[aria-current="true"] {
  background: #fff;
  color: var(--ink);
}

@media (max-width: 760px) {
  .right {
    gap: 6px;
  }

  .lang a {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }
}

/* Requisites extras */
.box .sub {
  margin: -4px 0 8px;
  font-size: 15px;
  color: var(--muted);
}

.warn {
  margin-top: 8px;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.45;
  color: #2b2e2b;
  background: var(--sage);
  border-radius: 18px;
}

.box .warn {
  margin-top: 8px;
  font-size: 15px;
  color: #2b2e2b;
}

.warn b {
  font-weight: 500;
}

/* ============ Estimate ============ */
.est-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 44px;
}

.est-meta span {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--grey);
  border-radius: 99px;
}

.est-meta b {
  font-weight: 500;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 30px 32px;
  background: #fff;
  border-radius: var(--r);
}

.card.dark {
  background: var(--dark);
  color: #fff;
}

.card.sage {
  background: var(--sage);
}

.card .lbl {
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.card.dark .lbl,
.card.dark .cap {
  color: #b9bdb9;
}

.card .num {
  margin-top: auto;
  padding-top: 48px;
  font-size: clamp(48px, 4.6vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.card .num.text {
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: normal;
}

.card .cap {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
}

.blk {
  margin-top: 120px;
}

.blk h2 {
  max-width: 1100px;
  margin-top: 18px;
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

/* Work items */
.items {
  margin: 40px 0 0;
  padding: 8px 32px;
  list-style: none;
  background: #fff;
  border-radius: var(--r);
}

.item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 140px 120px 72px;
  gap: 8px 24px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  transition: opacity .2s;
}

.item:first-child {
  border-top: 0;
}

.item__n {
  align-self: start;
  padding-top: 3px;
  font-size: 14px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.item__title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.item__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 3px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 99px;
}

.item__desc {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.item__term {
  font-size: 15px;
  color: var(--muted);
}

.item__price {
  font-size: 20px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item.is-off .item__title,
.item.is-off .item__desc,
.item.is-off .item__term,
.item.is-off .item__n {
  opacity: .45;
}

.item.is-off .item__price {
  color: var(--soft);
  text-decoration: line-through;
}

/* Итог — та же сетка, что у .item, чтобы «Разом» стоял под названиями задач, а сумма — под ценами */
.total {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 140px 120px 72px;
  gap: 8px 24px;
  align-items: center;
  margin-top: 12px;
  padding: 28px 32px;
  background: var(--sage);
  border-radius: var(--r);
}

.total__lbl {
  grid-column: 2;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.total__lbl small {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.total__sum {
  grid-column: 3 / 5;
  justify-self: end;
  font-size: clamp(36px, 3.4vw, 52px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Switch */
.switch {
  justify-self: end;
  position: relative;
  width: 52px;
  height: 30px;
  padding: 0;
  background: var(--grey);
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  transition: background-color .2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: transform .2s;
}

.switch[aria-checked="true"] {
  background: var(--dark);
}

.switch[aria-checked="true"]::after {
  transform: translateX(22px);
}

/* Lists */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.box h3 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ticks {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
  line-height: 1.45;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grey);
}

.ticks.minus li::before {
  background: var(--grey) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.5 9h7' stroke='%236a6e6a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.ticks.check li::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.5 9.2l2.3 2.3 4.7-4.9' fill='none' stroke='%232f6b45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* CTA band (как .band у референса) */
.band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
  gap: 40px;
  margin: 120px 0 96px;
  padding: 56px;
  color: #fff;
  background: var(--dark);
  border-radius: 32px;
}

.band h2 {
  font-size: clamp(32px, 3.4vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.band h2 .soft {
  color: #8d918d;
}

.band .acts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.band .btn {
  justify-content: space-between;
}

.btn.accent {
  background: var(--accent);
  color: var(--dark);
}

.btn.accent .circ {
  background: var(--dark);
  color: #fff;
}

.btn.accent:hover {
  background: #a3e4b1;
}

.band .btn.light {
  background: #2b2b2b;
  color: #fff;
}

.band .btn.light .circ {
  background: #3a3a3a;
}

.band .btn.light:hover {
  background: #353535;
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats .card:first-child {
    grid-column: 1 / -1;
  }

  .band {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px;
  }

  .item,
  .total {
    grid-template-columns: 40px minmax(0, 1fr) 110px 100px 64px;
    gap: 8px 16px;
  }
}

@media (max-width: 760px) {
  .est-meta {
    margin-top: 32px;
  }

  .est-meta span {
    font-size: 13px;
    padding: 7px 12px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 36px;
  }

  .card {
    min-height: 0;
    padding: 22px;
  }

  .card .num {
    padding-top: 28px;
    font-size: 56px;
  }

  .card .num.text {
    font-size: 28px;
  }

  .blk {
    margin-top: 80px;
  }

  .blk h2 {
    font-size: clamp(28px, 7.6vw, 36px);
  }

  .items {
    margin-top: 28px;
    padding: 4px 20px;
  }

  .item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "n n"
      "main main"
      "meta sw";
    gap: 6px 12px;
    padding: 20px 0;
  }

  .item__n {
    grid-area: n;
    padding: 0;
  }

  .item__main {
    grid-area: main;
  }

  .item__title {
    font-size: 18px;
  }

  .item__desc {
    font-size: 15px;
  }

  .item__meta {
    grid-area: meta;
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-top: 8px;
  }

  .item__price {
    order: -1;
    font-size: 18px;
    text-align: left;
  }

  .item .switch {
    grid-area: sw;
    margin-top: 8px;
  }

  /* телефон: «Итого» и сумма в одну строку, пояснение — на всю ширину под линией */
  .total {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding: 20px;
  }

  .total__lbl {
    display: contents;
  }

  .total__t {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 20px;
  }

  .total__sum {
    grid-column: 2;
    grid-row: 1;
    font-size: 34px;
  }

  .total__lbl small {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 14px;
    padding-top: 12px;
    font-size: 14px;
    line-height: 1.45;
    border-top: 1px solid rgba(17, 17, 17, .08);
  }

  .cols {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }

  .box h3 {
    font-size: 22px;
  }

  .ticks li {
    font-size: 16px;
  }

  .band {
    margin: 80px 0 56px;
    padding: 26px;
    border-radius: 24px;
  }

  .band h2 {
    font-size: 28px;
  }
}

/* На десктопе срок и цена — отдельные колонки сетки */
@media (min-width: 761px) {
  .item__meta {
    display: contents;
  }
}

/* ============ Project ============ */
:root {
  --blue-bg: #dfe7f3;
  --blue-ink: #2c4f86;
  --amber-bg: #f4e8cc;
  --amber-ink: #7a5410;
  --green-bg: #d6efdb;
  --green-ink: #2f6b45;
}

/* Status chips: цвет = статус */
.st {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
  background: var(--grey);
  border-radius: 99px;
}

.st::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.st--progress,
.st--open {
  color: var(--blue-ink);
  background: var(--blue-bg);
}

.st--review,
.st--waiting,
.st--due {
  color: var(--amber-ink);
  background: var(--amber-bg);
}

.st--done,
.st--launched,
.st--paid {
  color: var(--green-ink);
  background: var(--green-bg);
}

.st--paused {
  color: #fff;
  background: #6a6e6a;
}

.st--lg {
  padding: 10px 18px 10px 14px;
  font-size: 15px;
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

/* Waiting for client */
.wait {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 24px;
  margin-top: 44px;
  padding: 28px 32px;
  background: var(--amber-bg);
  border-radius: var(--r);
}

.wait__ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--amber-ink);
  background: rgba(255, 255, 255, .6);
  border-radius: 50%;
}

.wait__ic svg {
  width: 22px;
  height: 22px;
}

.wait h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.wait ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.wait li {
  position: relative;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.45;
  color: #3d3220;
}

.wait li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-ink);
}

/* Progress bar */
.bar {
  display: block;
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  background: #3a3a3a;
  border-radius: 99px;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.card:not(.dark) .bar {
  background: rgba(0, 0, 0, .08);
}

.card:not(.dark) .bar i {
  background: var(--dark);
}

.stats.four {
  grid-template-columns: repeat(4, 1fr);
}

.updated {
  margin-top: 14px;
  font-size: 15px;
  color: var(--soft);
}

/* Timeline: карточки этапов + общая полоса */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 28px;
  background: #fff;
  border-radius: var(--r);
}

.step.is-active {
  color: #fff;
  background: var(--dark);
}

.step__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.step__n {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.step.is-active .step__n {
  color: #b9bdb9;
}

.step__ok {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--green-ink);
  background: var(--green-bg);
  border-radius: 50%;
}

.step__ok svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step__now {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dark);
  background: var(--accent);
  border-radius: 99px;
  white-space: nowrap;
}

.step__t {
  margin-top: auto;
  padding-top: 40px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.step.is-planned .step__t {
  color: var(--muted);
}

.step__d {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.step.is-active .step__d {
  color: #b9bdb9;
}

.step__d small {
  display: block;
  font-size: 14px;
  color: var(--soft);
}

.step.is-active .step__d small {
  color: #8d918d;
}

.tl {
  margin-top: 16px;
  padding: 44px 32px 24px;
  background: #fff;
  border-radius: var(--r);
}

.tl__track {
  position: relative;
  height: 10px;
}

.tl__seg {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  background: var(--grey);
  border-radius: 99px;
  /* зазор между этапами */
  box-shadow: 0 0 0 2px #fff;
}

.tl__seg i {
  display: block;
  height: 100%;
}

.tl__seg.is-done i {
  background: var(--accent);
}

.tl__seg.is-active {
  background: var(--blue-bg);
}

.tl__seg.is-active i {
  background: var(--dark);
}

.tl__today {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  margin-left: -1px;
  background: var(--dark);
  border-radius: 2px;
}

.tl__today span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  padding: 4px 10px;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  background: var(--dark);
  border-radius: 99px;
  transform: translateX(-50%);
}

.tl__ends {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Таймлайн: переключатель вида + диаграмма этапов */
.blk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.vswitch {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--grey);
  border-radius: 99px;
}

.vswitch button {
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 99px;
  transition: background-color .2s, color .2s;
}

.vswitch button[aria-pressed="true"] {
  color: var(--ink);
  background: #fff;
}

.tl-blk[data-tl-view="gantt"] .tl-view--cards,
.tl-blk[data-tl-view="cards"] .tl-view--gantt {
  display: none;
}

.gantt {
  margin-top: 40px;
  padding: 28px 0 24px;
  background: #fff;
  border-radius: var(--r);
}

.gantt__scroll {
  overflow-x: auto;
  padding: 0 28px;
  scrollbar-width: thin;
}

.gantt__in {
  position: relative;
  min-width: 100%;
}

.gantt__head {
  position: relative;
  height: 64px;
}

.gantt__months,
.gantt__days {
  position: relative;
  height: 28px;
}

.gantt__months {
  margin-bottom: 8px;
}

.gantt__month {
  position: absolute;
  top: 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.gantt__month:first-letter {
  text-transform: uppercase;
}

.gantt__days {
  z-index: 1;
}

/* белая подложка с отступом справа: пунктир сетки не подходит к тексту вплотную; margin — чтобы своя линия слева оставалась видна */
.gantt__day {
  position: absolute;
  top: 4px;
  margin-left: 1px;
  padding: 0 6px 0 5px;
  background: #fff;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.gantt__grid {
  position: absolute;
  top: 36px;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.gantt__line {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--line);
}

.gantt__off {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, rgba(22, 22, 22, .035) 0 6px, transparent 6px 12px);
}

.gantt__line.is-week {
  border-left-color: #cfd3cf;
}

.gantt__rows {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px 0 4px;
}

.gantt__row {
  position: relative;
  height: 56px;
}

.gantt__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 56px;
  padding: 0 20px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  color: var(--muted);
  background: var(--grey);
  border-radius: 99px;
  /* зазор от соседних линий сетки */
  box-shadow: 0 0 0 3px #fff;
}

.gantt__bar > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt__bar.is-done {
  color: var(--ink);
  background: var(--accent);
}

.gantt__bar.is-optional {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--soft), 0 0 0 3px #fff;
}

.gantt__bar.is-due {
  color: var(--amber-ink);
  background: var(--amber-bg);
}

.gantt__bar.is-active {
  color: #fff;
  background: var(--dark);
}

.gantt__row.is-narrow .gantt__bar {
  min-width: 0;
  padding: 0;
}

.gantt__row.is-narrow .gantt__bar > span,
.gantt__row:not(.is-narrow) .gantt__label {
  display: none;
}

/* план (график оценки) */
.gantt__bar.is-plan {
  color: var(--ink);
  background: var(--accent);
}

.gantt__label {
  position: absolute;
  top: 50%;
  padding: 0 12px;
  font-size: 15px;
  white-space: nowrap;
  transform: translateY(-50%);
}

.gantt__ok {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, .55);
  border-radius: 50%;
}

.gantt__ok svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gantt__today {
  position: absolute;
  top: 36px;
  bottom: 0;
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--dark);
  border-radius: 2px;
  pointer-events: none;
}

.gantt__today b {
  position: absolute;
  bottom: 100%;
  left: 50%;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  background: var(--dark);
  border-radius: 99px;
  transform: translate(-50%, 4px);
}

/* Accordion: stages / months */
.acc {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}

.acc details {
  background: #fff;
  border-radius: var(--r);
}

.acc summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto 40px;
  gap: 8px 20px;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  list-style: none;
}

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

.acc__n {
  font-size: 14px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.acc__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.acc__sub {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.acc__count {
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.acc__chev {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--grey);
  border-radius: 50%;
  transition: transform .2s;
}

.acc__chev svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acc details[open] .acc__chev {
  transform: rotate(180deg);
}

.acc__body {
  padding: 0 32px 24px;
}

/* Tasks */
.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.task {
  display: grid;
  grid-template-columns: 56px 150px minmax(0, 1fr) auto;
  gap: 6px 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.task:last-child {
  border-bottom: 0;
}

.task .st {
  grid-column: 2;
  justify-self: start;
}

.task__title {
  font-size: 17px;
  line-height: 1.4;
}

.task__title small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

.task__price {
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

.task.is-done .task__title {
  color: var(--muted);
}

.month-total {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 8px 20px;
  align-items: center;
  margin-top: 8px;
  padding: 20px 24px 20px 0;
  background: var(--sage);
  border-radius: 20px;
}

.month-total__lbl {
  grid-column: 2;
  font-size: 20px;
  font-weight: 500;
}

.month-total__lbl small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.month-total__sum {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Files */
.files {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.files .box h3 {
  font-size: 20px;
}

.flist {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.flink {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: center;
  margin: 0 -12px;
  padding: 10px 12px;
  border-radius: 16px;
  transition: background-color .2s;
}

.flink:hover {
  background: var(--bg);
}

.flink__ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--grey);
  border-radius: 12px;
}

.flink__t {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.flink .circ {
  width: 36px;
  height: 36px;
  background: var(--grey);
}

.flink:hover .circ {
  transform: rotate(45deg);
}

/* Payments */
.pay {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.pay .card {
  min-height: 0;
}

.pay .card .num {
  padding-top: 40px;
}

.plist {
  margin: 0;
  padding: 8px 32px;
  list-style: none;
  background: #fff;
  border-radius: var(--r);
}

/* Страница блока работ: статус задачи в колонке «срок» — по ширине текста */
.item .st {
  justify-self: start;
  align-self: center;
}

/* Страница блока работ: счёта ещё нет */
.blk-note {
  margin-top: 40px;
  padding: 24px 32px;
  font-size: 17px;
  color: var(--muted);
  background: #fff;
  border-radius: var(--r);
}

/* Счета проекта (под материалами) */
.plist.inv-list {
  margin-top: 40px;
}

.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 120px;
  gap: 6px 20px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.prow:first-child {
  border-top: 0;
}

.prow__t {
  font-size: 17px;
  line-height: 1.35;
}

.prow__t small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prow .st {
  justify-self: start;
}

.prow__sum {
  font-size: 20px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .stats.four {
    grid-template-columns: 1fr 1fr;
  }

  .stats.four .card:first-child {
    grid-column: auto;
  }

  .pay {
    grid-template-columns: 1fr;
  }

  .files {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stats.four {
    grid-template-columns: 1fr;
  }

  .wait {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 32px;
    padding: 22px;
  }

  .wait__ic {
    width: 40px;
    height: 40px;
  }

  .wait h2 {
    font-size: 20px;
  }

  .wait li {
    font-size: 16px;
  }

  .steps-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 28px;
  }

  .step {
    min-height: 0;
    padding: 18px;
  }

  .step__t {
    padding-top: 24px;
    font-size: 17px;
  }

  .step__d {
    margin-top: 6px;
    font-size: 14px;
  }

  .step__d small {
    font-size: 12px;
  }

  .step__now {
    font-size: 11px;
    padding: 4px 8px;
  }

  .tl {
    margin-top: 10px;
    padding: 40px 20px 18px;
  }

  .tl__ends {
    font-size: 13px;
  }

  .acc {
    margin-top: 28px;
  }

  /* телефон: без номера — название + стрелка, ниже счётчик и статус */
  .acc summary {
    grid-template-columns: minmax(0, 1fr) 40px;
    grid-template-areas:
      "title chev"
      "meta meta";
    gap: 6px 12px;
    padding: 20px;
  }

  .acc summary > .acc__n {
    display: none;
  }

  .acc__title {
    grid-area: title;
    font-size: 19px;
  }

  .acc__meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
  }

  .acc__chev {
    grid-area: chev;
  }

  .acc__body {
    padding: 0 20px 20px;
  }

  .task {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .task .st {
    grid-column: 1;
    grid-row: 1;
  }

  .task__title {
    grid-column: 1 / -1;
    font-size: 16px;
  }

  .task__price {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
  }

  .task__price small {
    display: inline;
    margin-right: 6px;
  }

  .task__n {
    display: none;
  }

  .month-total {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px 20px;
  }

  .month-total__lbl {
    grid-column: 1;
    font-size: 17px;
  }

  .month-total__sum {
    font-size: 26px;
  }

  .files {
    gap: 12px;
    margin-top: 28px;
  }

  .pay {
    gap: 12px;
    margin-top: 28px;
  }

  .plist {
    padding: 4px 20px;
  }

  /* телефон: название + сумма в одну строку, ниже дата + статус, ещё ниже кнопка счёта */
  .prow {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .prow__t {
    display: contents;
  }

  .prow__name {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 16px;
    line-height: 1.35;
  }

  .prow__sum {
    grid-column: 2;
    grid-row: 1;
    font-size: 18px;
  }

  .prow__t small {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    margin: 0;
  }

  .prow .st {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .prow .pill-links {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 4px;
  }

  /* счета проекта: статус + сумма сверху, название на всю ширину, ниже дата и кнопка */
  .inv-list .prow .st {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .inv-list .prow__sum {
    grid-row: 1;
  }

  .inv-list .prow__name {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .inv-list .prow__t small {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .inv-list .prow .pill-links {
    grid-row: 4;
  }
}

/* На десктопе мета-блок аккордеона — отдельные колонки сетки */
@media (min-width: 761px) {
  .acc__meta {
    display: contents;
  }
}

.bar.is-empty {
  visibility: hidden;
}

/* ============ Invoice ============ */
button.btn {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.band button.btn {
  font-size: 17px;
}

.btn:disabled {
  opacity: .6;
  cursor: progress;
}

.est-meta a b {
  border-bottom: 1px solid currentColor;
}

.est-meta a:hover b {
  border-bottom-color: transparent;
}

.inv-pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.inv-pay__main {
  grid-column: 1 / -1;
}

.inv-pay .req-row {
  grid-template-columns: 200px minmax(0, 1fr) auto;
}

.inv-pay .box:not(.inv-pay__main) .req-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.inv-pay .box:not(.inv-pay__main) .req-row dt {
  grid-column: 1 / -1;
}

.paid-note {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 28px 32px;
  background: var(--green-bg);
  border-radius: var(--r);
}

.paid-note .step__ok {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  background: #fff;
}

.paid-note .step__ok svg {
  width: 22px;
  height: 22px;
}

.paid-note h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.paid-note p {
  margin-top: 4px;
  font-size: 17px;
  color: var(--green-ink);
}

.prow__inv,
.month-total__inv {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
}

.prow__inv:hover,
.month-total__inv:hover {
  border-bottom-color: transparent;
}

@media (max-width: 1100px) {
  .inv-pay {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .inv-pay {
    gap: 12px;
    margin-top: 28px;
  }

  .inv-pay .req-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .paid-note {
    padding: 22px;
  }

  .paid-note h2 {
    font-size: 20px;
  }

  .band button.btn {
    font-size: 16px;
  }
}

/* Кнопки-ссылки на оценку / счёт (в итоге периода, блока, в графике оплат) */
.pill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  background: #fff;
  border-radius: 99px;
  transition: background-color .2s;
}

.pill-link .circ {
  width: 30px;
  height: 30px;
  background: var(--grey);
}

.pill-link .ar {
  width: 13px;
  height: 13px;
}

.pill-link:hover .circ {
  background: var(--accent);
  transform: rotate(45deg);
}

/* на белом фоне (график оплат) — серая таблетка */
.prow .pill-link {
  background: var(--grey);
}

.prow .pill-link .circ {
  background: #fff;
}

.prow .pill-links {
  margin-top: 8px;
}

/* Последняя строка реквизитов в блоке оплаты счёта — без нижнего отступа */
.inv-pay .req-row:last-child {
  padding-bottom: 0;
}

/* Аккордеоны (периоды, этапы, блоки): без нумерации на всех экранах */
.acc summary {
  grid-template-columns: minmax(0, 1fr) auto auto 40px;
}

.acc summary > .acc__n {
  display: none;
}

/* итог периода/блока — по левому краю, без колонки под номер */
.month-total {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px 24px;
}

.month-total__lbl {
  grid-column: 1;
}

@media (max-width: 760px) {
  .acc summary {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .month-total {
    padding: 18px 20px;
  }
}

/* =====================================================================
   Документ (ТЗ / инструкция / отчёт)
   ===================================================================== */
button.pill-link {
  font: inherit;
  font-size: 14px;
  border: 0;
  cursor: pointer;
}

.doc-draft {
  margin-bottom: 16px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--amber-ink);
  background: var(--amber-bg);
  border-radius: 14px;
}

.doc .est-meta a b {
  border-bottom: 1px solid currentColor;
}

.doc-actions {
  margin-top: 24px;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: 56px;
  margin-top: 48px;
}

.doc-layout.has-toc {
  grid-template-columns: minmax(0, 760px) 260px;
  justify-content: space-between;
}

.doc-body {
  padding: 44px 48px;
  font-size: 18px;
  line-height: 1.7;
  background: #fff;
  border-radius: var(--r);
}

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

.doc-body p {
  margin: 0 0 18px;
}

.doc-body a {
  border-bottom: 1px solid currentColor;
}

.doc-body mark {
  padding: 0 3px;
  background: var(--sage);
  border-radius: 4px;
}

.doc-body code {
  padding: 1px 6px;
  font-size: .9em;
  background: var(--grey);
  border-radius: 6px;
}

.doc-h2 {
  margin: 48px 0 16px;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}

.doc-h3,
.doc-h4 {
  margin: 32px 0 12px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}

.doc-list {
  margin: 0 0 18px;
  padding-left: 26px;
}

.doc-list li {
  margin: 6px 0;
  padding-left: 4px;
}

.doc-list .doc-list {
  margin: 6px 0 0;
}

ol.doc-list > li::marker {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.doc-check {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.doc-check li {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  padding: 0;
}

.doc-check__box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 4px;
  border: 1.5px solid #c9cdc9;
  border-radius: 50%;
}

.doc-check li.is-done > .doc-check__box {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4' fill='none' stroke='%23161616' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
  border-color: var(--accent);
}

.doc-check li.is-done > span:last-child {
  color: var(--muted);
}

.doc-quote {
  margin: 28px 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--accent);
}

.doc-quote p {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.doc-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-style: normal;
  color: var(--muted);
}

.doc-callout {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--amber-bg);
  border-radius: 20px;
}

.doc-callout b {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: var(--amber-ink);
}

.doc-callout p {
  margin: 0;
  color: #3d3220;
}

.doc-hr {
  margin: 40px auto;
  width: 64px;
  height: 0;
  border: 0;
  border-top: 2px dotted var(--soft);
}

.doc-table {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line);
}

.doc-table table {
  width: 100%;
  font-size: 16px;
  border-collapse: collapse;
}

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

.doc-table tr:first-child th,
.doc-table tr:first-child td {
  border-top: 0;
}

.doc-table th {
  font-weight: 500;
  background: var(--bg);
}

.doc-img {
  margin: 28px 0;
}

.doc-img img {
  display: block;
  max-width: 100%;
  border-radius: 20px;
}

.doc-img.is-wide img {
  width: 100%;
}

.doc-img.is-bg {
  padding: 24px;
  background: var(--bg);
  border-radius: 20px;
}

.doc-img.is-bg img {
  margin: 0 auto;
  max-width: 70%;
}

.doc-img.is-border img {
  box-shadow: 0 0 0 1px var(--line);
}

.doc-img figcaption,
.doc-embed figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.doc-file {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  padding: 12px 14px;
  border: 0 !important;
  background: var(--bg);
  border-radius: 18px;
  transition: background-color .2s;
}

.doc-file:hover {
  background: var(--sage);
}

.doc-file__ext {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  border-radius: 12px;
}

.doc-file__t {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.doc-file__t small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.doc-file .circ {
  width: 36px;
  height: 36px;
  background: #fff;
}

.doc-link {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
  overflow: hidden;
  border: 0 !important;
  background: var(--bg);
  border-radius: 18px;
  transition: background-color .2s;
}

.doc-link:hover {
  background: var(--sage);
}

.doc-link__t {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
}

.doc-link__t b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.doc-link__t small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.doc-link__t em {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  color: var(--soft);
}

.doc-link img {
  width: 180px;
  object-fit: cover;
}

.doc-embed {
  margin: 28px 0;
}

.doc-embed__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--grey);
  border-radius: 20px;
}

.doc-embed__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.doc-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px;
  background: #fff;
  border-radius: var(--r);
}

.doc-toc ol {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.doc-toc a {
  display: block;
  padding: 6px 10px;
  margin: 0 -10px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--muted);
  border-radius: 10px;
  transition: background-color .2s, color .2s;
}

.doc-toc a:hover {
  color: var(--ink);
  background: var(--bg);
}

.doc-toc li.is-sub a {
  padding-left: 24px;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .doc-layout.has-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 760px) {
  .doc-layout {
    margin-top: 32px;
    gap: 16px;
  }

  .doc-body {
    padding: 24px 20px;
    font-size: 17px;
  }

  .doc-h2 {
    margin-top: 36px;
  }

  .doc-quote p {
    font-size: 20px;
  }

  .doc-link img {
    display: none;
  }
}

@media print {
  .doc-actions,
  .doc-toc,
  .doc ~ .foot,
  .band,
  .doc-draft {
    display: none !important;
  }

  .doc-body {
    padding: 0;
  }

  .doc-layout,
  .doc-layout.has-toc {
    grid-template-columns: 1fr;
  }
}

/* документ в «Матеріали проєкту» — тёмная иконка-тип */
.flink.is-doc .flink__ic {
  color: #fff;
  background: var(--dark);
}

.task__title .pill-links {
  margin-top: 8px;
}

.task__title .pill-link {
  background: var(--grey);
}

.task__title .pill-link .circ {
  background: #fff;
}

/* Документ — карточка с текстом на всю доступную ширину (рядом с оглавлением) */
.doc-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.doc-layout.has-toc {
  grid-template-columns: minmax(0, 1fr) 300px;
  justify-content: stretch;
}

@media (max-width: 1100px) {
  .doc-layout.has-toc {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .gantt {
    margin-top: 28px;
    padding: 22px 0 18px;
  }

  .gantt__scroll {
    padding: 0 18px;
  }

  .gantt__row {
    height: 48px;
  }

  .gantt__bar {
    padding: 0 14px;
    font-size: 14px;
  }
}
