* {
  box-sizing: border-box;
}

:root {
  --altapp-blue: #5871e8;
  --altapp-blue-dark: #435fe0;
  --altapp-blue-light: #eef2ff;
  --altapp-mint: #00d1bd;
  --altapp-violet: #7a3df0;
  --text-main: #232323;
  --text-muted: #4a4a4a;
  --border-soft: #dbe3f0;
  --bg-page: #f7f8fb;
  --bg-card: #ffffff;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.calculator-page {
  min-height: 100vh;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 72% 12%, rgba(0, 209, 189, 0.13), transparent 22%),
    radial-gradient(circle at 12% 28%, rgba(122, 61, 240, 0.08), transparent 26%),
    #f7f8fb;
}

.calculator {
  max-width: 1180px;
  margin: 0 auto;
}

.calculator__header {
  margin-bottom: 24px;
  padding: 32px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(35, 35, 35, 0.08);
  border: 1px solid #eef1f7;
}

.calculator__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.calculator__logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--altapp-violet), var(--altapp-blue) 55%, var(--altapp-mint));
  box-shadow: 0 12px 28px rgba(88, 113, 232, 0.25);
}

.calculator__eyebrow {
  margin: 0 0 4px;
  color: #24245f;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 22px;
  line-height: 1;
}

.calculator__title {
  margin: 0;
  font-size: 38px;
  line-height: 1.12;
  color: var(--text-main);
}

.calculator__description {
  margin: 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Верхняя навигация по шагам */

.steps-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.steps-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: #ffffff;
  color: #24245f;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 12px 34px rgba(35, 35, 35, 0.05);
}

.steps-nav__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #edf1f8;
  color: #24245f;
  font-size: 14px;
}

.steps-nav__item:hover {
  border-color: var(--altapp-blue);
  background: #fbfcff;
}

.steps-nav__item.is-active {
  border-color: var(--altapp-blue);
  background: var(--altapp-blue-light);
  color: var(--altapp-blue-dark);
}

.steps-nav__item.is-active span {
  background: var(--altapp-blue);
  color: #ffffff;
}

/* Шаги */

.calculator-step {
  display: none;
}

.calculator-step.is-active {
  display: block;
}

.calculator-card {
  margin-bottom: 20px;
  padding: 28px;
  border-radius: 28px;
  background: var(--bg-card);
  box-shadow: 0 22px 60px rgba(35, 35, 35, 0.07);
  border: 1px solid #eef1f7;
}

.calculator-card--summary {
  border: 1px solid #dbe4ff;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.25;
  color: var(--text-main);
}

.section-description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.subsection-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--text-main);
}

.tariff-value-box {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 20px;
  background: #fbfcff;
  border: 1px solid #e5eaf5;
}

.tariff-value-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.tariff-value-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.55;
}

.step-info,
.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--altapp-blue-light);
  color: #2944c5;
  line-height: 1.55;
  border: 1px solid #d9e2ff;
}

.notice {
  margin-top: 18px;
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: block;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #24245f;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cbd6ea;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
}

.field__input:focus {
  border-color: var(--altapp-blue);
  box-shadow: 0 0 0 4px rgba(88, 113, 232, 0.14);
}

.field--readonly {
  min-height: 46px;
}

.readonly-value {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f3f6fb;
  color: var(--text-main);
  font-weight: 800;
}

.payment-box {
  margin-top: 20px;
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #dce5f3;
  border-radius: 18px;
  cursor: pointer;
  transition: 0.2s;
  background: #ffffff;
}

.radio-card:hover {
  border-color: var(--altapp-blue);
  background: #fbfcff;
}

.radio-card input {
  margin-top: 3px;
  accent-color: var(--altapp-blue);
}

.radio-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

.radio-card small {
  display: block;
  color: var(--text-muted);
  line-height: 1.4;
}

.radio-card--hidden {
  display: none;
}

.radio-card--with-tooltip {
  position: relative;
  padding-right: 52px;
}

.hint {
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.search-field {
  display: block;
  margin-bottom: 18px;
}

.items-list {
  display: grid;
  gap: 12px;
}

.item-card {
  display: grid;
  grid-template-columns: auto 1fr minmax(120px, 170px);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #dce5f3;
  border-radius: 20px;
  background: #ffffff;
}

.item-card:hover {
  background: #fbfcff;
  border-color: var(--altapp-blue);
}

.item-card.is-hidden {
  display: none;
}

.item-card__check {
  width: 18px;
  height: 18px;
  accent-color: var(--altapp-blue);
}

.item-card__title {
  margin: 0 0 6px;
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.35;
}

.item-card__meta {
  margin: 0;
  color: #52627a;
  font-size: 14px;
  line-height: 1.45;
}

.item-card__description {
  margin: 6px 0 0;
  color: #52627a;
  font-size: 13px;
  line-height: 1.45;
}

.item-card__quantity-wrap {
  display: grid;
  gap: 6px;
}

.item-card__quantity-label {
  font-size: 12px;
  font-weight: 800;
  color: #52627a;
}

.item-card__quantity {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd6ea;
  border-radius: 12px;
  font-size: 14px;
}

.item-card__quantity-note {
  font-size: 12px;
  line-height: 1.35;
  color: #52627a;
}

/* Единая плашка выбора линии поддержки */

.support-card {
  display: block;
  padding: 18px;
  border: 1px solid #dce5f3;
  border-radius: 22px;
  background: #ffffff;
}

.support-card.is-hidden {
  display: none;
}

.support-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.support-card__title {
  margin: 0 0 6px;
  color: var(--text-main);
  font-weight: 900;
  line-height: 1.35;
}

.support-card__description {
  margin: 0 0 14px;
  color: #52627a;
  font-size: 14px;
  line-height: 1.45;
}

.support-controls {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.support-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.support-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dce5f3;
  border-radius: 16px;
  background: #fbfcff;
  cursor: pointer;
}

.support-option:hover {
  border-color: var(--altapp-blue);
  background: var(--altapp-blue-light);
}

.support-option input {
  margin-top: 2px;
  accent-color: var(--altapp-blue);
}

.support-option strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
}

.support-option small {
  display: block;
  margin-top: 3px;
  color: #52627a;
  font-size: 13px;
  line-height: 1.35;
}

.support-users-field {
  display: block;
}

.support-users-field span {
  display: block;
  margin-bottom: 8px;
  color: #24245f;
  font-size: 13px;
  font-weight: 800;
}

.support-users-field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd6ea;
  border-radius: 14px;
  font-size: 15px;
}

.tooltip-button {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: none;
  border-radius: 50%;
  background: #dfe6ff;
  color: var(--altapp-blue-dark);
  font-weight: 900;
  cursor: pointer;
}

.tooltip-button--inside {
  position: absolute;
  right: 14px;
  top: 14px;
}

.tooltip-content {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 20;
  display: none;
  width: 320px;
  padding: 14px;
  border-radius: 14px;
  background: #232323;
  color: #ffffff;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 16px 40px rgba(35, 35, 35, 0.22);
}

.tooltip-button:hover .tooltip-content,
.tooltip-button:focus .tooltip-content {
  display: block;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.summary {
  display: grid;
  gap: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.summary-card {
  padding: 16px;
  border-radius: 20px;
  background: #fbfcff;
  border: 1px solid #eef1f7;
}

.summary-card--accent {
  background: var(--altapp-blue-light);
  border: 1px solid #cdd8ff;
}

.summary-card__label {
  margin: 0 0 6px;
  color: #52627a;
  font-size: 14px;
}

.summary-card__value {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 900;
}

.summary-card--accent .summary-card__value {
  color: var(--altapp-blue-dark);
}

.summary-info-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.summary-info-pill {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fbfcff;
  border: 1px solid #e2e8f3;
}

.summary-info-pill span {
  display: block;
  margin-bottom: 4px;
  color: #52627a;
  font-size: 13px;
}

.summary-info-pill strong {
  display: block;
  color: var(--text-main);
  font-size: 16px;
}

.summary-warning {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff7ed;
  color: #c2410c;
  line-height: 1.5;
}

.summary-section-title {
  margin: 18px 0 10px;
  font-size: 18px;
  color: var(--text-main);
}

.summary-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f3;
  border-radius: 18px;
}

.summary-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.summary-table th,
.summary-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f3;
  text-align: left;
  font-size: 14px;
  line-height: 1.35;
  vertical-align: top;
}

.summary-table th {
  background: #f7f9fc;
  color: #24245f;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-group-row td {
  background: #eef2ff !important;
  color: #24245f;
  font-weight: 900;
}

.summary-subtotal-row td {
  background: #fbfcff !important;
  font-weight: 900;
}

.summary-total-box {
  margin-top: 16px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border: 2px solid var(--altapp-blue);
}

.summary-total-box__label {
  margin: 0 0 6px;
  color: var(--altapp-blue-dark);
  font-size: 15px;
  font-weight: 800;
}

.summary-total-box__value {
  margin: 0;
  color: var(--altapp-blue-dark);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 900;
}

.summary-total-box__note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Кнопки в стиле сайта */

.button,
.button--primary,
.button--secondary,
.button--light {
  min-height: 46px;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--altapp-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 14px 30px rgba(88, 113, 232, 0.18);
}

.button:hover,
.button--primary:hover,
.button--secondary:hover,
.button--light:hover {
  background: var(--altapp-blue-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.is-hidden {
  display: none !important;
}

.final-note {
  margin: 16px 0 0;
  color: #52627a;
  line-height: 1.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(35, 35, 35, 0.62);
}

.modal__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(35, 35, 35, 0.34);
}

.modal__content--wide,
.modal__content--invoice {
  max-width: 980px;
}

.modal__close {
  position: sticky;
  top: 0;
  left: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-bottom: -36px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--altapp-blue);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(88, 113, 232, 0.24);
}

.modal__close:hover {
  background: var(--altapp-blue-dark);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.form-message {
  margin: 12px 0 0;
  color: var(--altapp-blue-dark);
  line-height: 1.5;
}

/* Коммерческое предложение */

.commercial-offer {
  color: var(--text-main);
}

.commercial-offer h2 {
  margin: 0 48px 12px 0;
  font-size: 28px;
}

.commercial-offer h3 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.commercial-offer p,
.commercial-offer li {
  line-height: 1.5;
}

.offer-highlight {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--altapp-blue-light);
  border: 1px solid #cdd8ff;
  color: #1e3a8a;
  line-height: 1.55;
}

.offer-highlight strong {
  color: var(--altapp-blue-dark);
}

.offer-table-wrapper {
  overflow-x: auto;
}

.offer-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.offer-table th,
.offer-table td {
  padding: 9px;
  border: 1px solid #e2e8f3;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
}

.offer-table th {
  background: #f7f9fc;
}

.offer-table th:nth-child(1),
.offer-table td:nth-child(1) {
  width: 30%;
}

.offer-table th:nth-child(2),
.offer-table td:nth-child(2) {
  width: 18%;
}

.offer-table th:nth-child(3),
.offer-table td:nth-child(3),
.offer-table th:nth-child(4),
.offer-table td:nth-child(4),
.offer-table th:nth-child(5),
.offer-table td:nth-child(5),
.offer-table th:nth-child(6),
.offer-table td:nth-child(6) {
  width: 13%;
}

/* Оформленное коммерческое предложение */

.offer-hero {
  margin: 0 0 22px;
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 209, 189, 0.18), transparent 28%),
    linear-gradient(135deg, #eef2ff, #ffffff);
  border: 1px solid #cdd8ff;
}

.offer-hero__eyebrow {
  margin: 0 0 8px;
  color: var(--altapp-blue-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.offer-hero__title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.18;
  color: var(--text-main);
}

.offer-hero__text {
  margin: 0;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.offer-section-lead {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.offer-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}

.offer-benefit-card {
  position: relative;
  min-height: 150px;
  padding: 18px 18px 18px 58px;
  border: 1px solid #dce5f3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(35, 35, 35, 0.05);
}

.offer-benefit-card::before {
  content: attr(data-icon);
  position: absolute;
  left: 18px;
  top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: var(--altapp-blue-light);
  color: var(--altapp-blue-dark);
  font-size: 17px;
}

.offer-benefit-card h4 {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.3;
}

.offer-benefit-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.offer-benefit-card strong {
  color: var(--altapp-blue-dark);
}

.offer-callout {
  margin: 18px 0 24px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border: 1px solid #cdd8ff;
  color: #1e3a8a;
  line-height: 1.55;
}

.offer-callout strong {
  color: var(--altapp-blue-dark);
}

.offer-small-note {
  margin: 10px 0 0;
  color: #52627a;
  font-size: 13px;
  line-height: 1.45;
}

/* Счёт */

.invoice-preview {
  color: #111827;
}

.invoice-paper {
  background: #ffffff;
}

.invoice-bank-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}

.invoice-bank-table td {
  border: 1px solid #333333;
  padding: 4px 6px;
  font-size: 12px;
  vertical-align: top;
}

.invoice-title {
  font-size: 24px;
  font-weight: 900;
  margin: 10px 0 18px;
  border-bottom: 2px solid #333333;
  padding-bottom: 10px;
}

.invoice-info {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.invoice-info td {
  padding: 4px 6px;
  vertical-align: top;
  font-size: 13px;
}

.invoice-info td:first-child {
  width: 120px;
  color: #333333;
}

.invoice-items {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.invoice-items th,
.invoice-items td {
  border: 1px solid #333333;
  padding: 5px 6px;
  font-size: 12px;
  vertical-align: top;
}

.invoice-items th {
  background: #f1f5f9;
}

.invoice-totals {
  margin-left: auto;
  width: 320px;
  border-collapse: collapse;
}

.invoice-totals td {
  padding: 4px 6px;
  font-size: 13px;
}

.invoice-totals td:last-child {
  text-align: right;
  font-weight: 900;
}

.invoice-total-words {
  margin: 12px 0;
  font-weight: 900;
}

.invoice-note {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 10px;
}

.invoice-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  font-weight: 900;
}

.invoice-sign-line {
  display: inline-block;
  width: 180px;
  border-bottom: 1px solid #333333;
  margin: 0 8px;
}

.invoice-email-panel {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #fbfcff;
  border: 1px solid #e2e8f3;
}

.invoice-email-panel.is-open {
  display: block;
}

/* Адаптив */

@media (max-width: 900px) {
  .steps-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .radio-group {
    grid-template-columns: 1fr 1fr;
  }

  .summary-info-row,
  .support-controls {
    grid-template-columns: 1fr;
  }

  .support-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-card {
    grid-template-columns: auto 1fr;
  }

  .item-card__quantity-wrap {
    grid-column: 2 / 3;
  }

  .offer-benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calculator-page {
    padding: 16px 10px;
  }

  .calculator__header,
  .calculator-card {
    padding: 20px;
    border-radius: 24px;
  }

  .calculator__title {
    font-size: 28px;
  }

  .steps-nav {
    grid-template-columns: 1fr;
  }

  .steps-nav__item {
    justify-content: flex-start;
  }

  .form-grid,
  .radio-group,
  .support-options {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .tooltip-content {
    right: auto;
    left: -260px;
    width: 290px;
  }

  .tooltip-button--inside .tooltip-content {
    right: 0;
    left: auto;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }

  .summary-total-box__value {
    font-size: 28px;
  }

  .invoice-signatures {
    grid-template-columns: 1fr;
  }

  .offer-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .offer-hero__title {
    font-size: 24px;
  }

  .offer-benefit-card {
    padding: 16px 16px 16px 54px;
  }
}

/* Печать КП и счёта */

@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  body {
    overflow: visible !important;
  }

  body * {
    visibility: hidden !important;
  }

  .calculator-page,
  .modal__overlay,
  .modal__actions,
  .modal__close,
  .invoice-email-panel {
    display: none !important;
  }

  #offerModal,
  #offerModal .modal__content,
  #commercialOfferContent,
  #commercialOfferContent *,
  #invoiceModal,
  #invoiceModal .modal__content,
  #invoiceContent,
  #invoiceContent * {
    visibility: visible !important;
  }

  #offerModal.is-open,
  #invoiceModal.is-open {
    position: absolute !important;
    inset: auto !important;
    left: 0 !important;
    top: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  #offerModal .modal__content,
  #invoiceModal .modal__content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  #commercialOfferContent,
  #invoiceContent {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }

  .commercial-offer h2 {
    margin: 0 0 6mm !important;
    font-size: 18pt !important;
    line-height: 1.2 !important;
  }

  .commercial-offer h3 {
    margin: 6mm 0 2.5mm !important;
    font-size: 12.5pt !important;
    line-height: 1.25 !important;
  }

  .commercial-offer p,
  .commercial-offer li {
    font-size: 9.5pt !important;
    line-height: 1.32 !important;
  }

  .commercial-offer ul {
    margin: 0 0 3mm !important;
    padding-left: 6mm !important;
  }

  .offer-highlight {
    margin: 4mm 0 !important;
    padding: 3.5mm !important;
    border-radius: 4mm !important;
    background: #eef2ff !important;
    border: 1px solid #cdd8ff !important;
    color: #1e3a8a !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
    page-break-inside: avoid !important;
  }

  .offer-table-wrapper {
    overflow: visible !important;
  }

  .offer-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  .offer-table th,
  .offer-table td {
    padding: 2mm !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 8pt !important;
    line-height: 1.22 !important;
    vertical-align: top !important;
    overflow-wrap: break-word !important;
  }

  .offer-table th {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
  }

  .offer-table tr {
    page-break-inside: avoid !important;
  }

  .offer-hero {
    margin: 0 0 5mm !important;
    padding: 5mm !important;
    border-radius: 4mm !important;
    background: #eef2ff !important;
    border: 1px solid #cdd8ff !important;
    page-break-inside: avoid !important;
  }

  .offer-hero__eyebrow {
    margin: 0 0 2mm !important;
    font-size: 8.5pt !important;
  }

  .offer-hero__title {
    margin: 0 0 2.5mm !important;
    font-size: 18pt !important;
    line-height: 1.15 !important;
  }

  .offer-hero__text {
    font-size: 9.5pt !important;
    line-height: 1.32 !important;
  }

  .offer-section-lead {
    font-size: 9.5pt !important;
    line-height: 1.32 !important;
    margin: 0 0 3mm !important;
  }

  .offer-benefits-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3mm !important;
    margin: 3mm 0 5mm !important;
  }

  .offer-benefit-card {
    min-height: auto !important;
    padding: 3.5mm 3.5mm 3.5mm 11mm !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4mm !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
  }

  .offer-benefit-card::before {
    left: 3mm !important;
    top: 3.5mm !important;
    width: 6mm !important;
    height: 6mm !important;
    border-radius: 2mm !important;
    font-size: 9pt !important;
  }

  .offer-benefit-card h4 {
    margin: 0 0 1.5mm !important;
    font-size: 9.5pt !important;
    line-height: 1.2 !important;
  }

  .offer-benefit-card p {
    font-size: 8.2pt !important;
    line-height: 1.25 !important;
  }

  .offer-callout {
    margin: 4mm 0 5mm !important;
    padding: 3.5mm !important;
    border-radius: 4mm !important;
    background: #eef2ff !important;
    border: 1px solid #cdd8ff !important;
    font-size: 9.2pt !important;
    line-height: 1.32 !important;
    page-break-inside: avoid !important;
  }

  .offer-small-note {
    font-size: 8pt !important;
    line-height: 1.25 !important;
  }

  .invoice-bank-table td,
  .invoice-info td,
  .invoice-items th,
  .invoice-items td,
  .invoice-totals td,
  .invoice-note {
    font-size: 8.5pt !important;
  }

  .invoice-title {
    font-size: 16pt !important;
    margin: 4mm 0 !important;
  }

  .invoice-items th,
  .invoice-items td {
    padding: 1.5mm !important;
  }

  .invoice-note {
    line-height: 1.25 !important;
  }

  .invoice-signatures {
    margin-top: 10mm !important;
  }
}