@font-face {
  font-family: "Onest";
  src: url("../assets/fonts/Onest-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("../assets/fonts/Onest-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("../assets/fonts/Onest-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --text: #453c69;
  --text-muted: rgba(69, 60, 105, 0.7);
  --text-faint: rgba(69, 60, 105, 0.56);
  --primary: #453c69;
  --secondary: #bfd5f6;
  --accent: #f39b52;
  --accent-soft: #f4c49b;
  --danger: #b84747;
  --success: #2d7d64;
  --shadow: 0 22px 48px rgba(47, 41, 77, 0.12);
  --radius-pill: 999px;
  --radius-field: 12px;
  --header-height: 82px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

img {
  display: block;
  max-width: 100%;
}

.app-header {
  padding: 16px 24px;
  background: var(--bg);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.92;
}

.brand-link img,
.brand-link svg {
  display: block;
}

.brand-link img {
  width: 94px;
  height: 27px;
  object-fit: contain;
}

.brand-link svg {
  width: 132px;
  height: 50px;
  flex-shrink: 0;
  overflow: visible;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav__link:hover,
.nav__link--active {
  opacity: 1;
}

.page-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-shell--tight {
  padding-top: 8px;
}

.page-shell--home {
  padding-top: 32px;
}

.surface {
  background: var(--surface);
}

.page-panel,
.section-card,
.form-panel,
.preview-panel,
.stat-card,
.history-card,
.theme-card,
.newsletter-template-card,
.tool-card,
.draft-card {
  background: var(--surface);
  box-shadow: none;
}

.page-panel,
.section-card {
  padding: 32px 32px 36px;
}

.page-intro__row {
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.page-intro__content {
  max-width: 860px;
}

.page-intro__action {
  flex-shrink: 0;
}

.eyebrow {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.16;
  font-weight: 500;
  color: rgba(69, 60, 105, 0.62);
}

.type-display {
  margin: 0;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.type-page-title {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.type-section-title {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.type-card-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.type-body,
.body-muted {
  font-size: 18px;
  line-height: 1.2;
}

.type-body-sm {
  font-size: 16px;
  line-height: 1.24;
}

.type-meta {
  font-size: 14px;
  line-height: 1.16;
}

.type-label {
  font-size: 16px;
  line-height: 1.24;
  font-weight: 500;
}

.type-m {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
  font-weight: 500;
}

.body-muted {
  margin: 20px 0 0;
  max-width: 52ch;
  color: var(--text-muted);
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  position: relative;
  min-height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 24px 48px;
}

.hero__row {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
}

.hero__title {
  max-width: 6.2ch;
  color: #fff;
}

.hero__arrow {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease;
}

.hero__arrow:hover {
  transform: translateY(4px);
}

.tool-grid {
  display: grid;
  gap: 20px;
}

.tool-grid + .tool-grid {
  margin-top: 20px;
}

.tool-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-grid--catalog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
  min-height: 290px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
}

.tool-card--light {
  background: #F4F4F6;
  color: var(--text);
}

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

.tool-card--secondary {
  background: var(--secondary);
  color: var(--text);
}

.tool-card--disabled {
  background: rgba(69, 60, 105, 0.52);
  color: rgba(255, 255, 255, 0.86);
}

.tool-card__head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.tool-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.tool-card--light .tool-card__icon,
.tool-card--secondary .tool-card__icon {
  background: #fff;
}

.tool-card__description {
  max-width: 30ch;
  margin: 0;
  opacity: 0.78;
}

.tool-card__footer {
  margin-top: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 15px;
  font-weight: 500;
}

.theme-grid,
.template-grid {
  display: grid;
  gap: 16px;
}

.theme-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.theme-card {
  display: flex;
  min-height: 404px;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.theme-card:hover,
.newsletter-template-card:hover {
  transform: translateY(-4px);
}

.theme-card__media {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.theme-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.theme-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.theme-card__body h3 {
  margin: 0;
}

.theme-card__body p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

.theme-card__action {
  margin-top: auto;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: #f4f4f6;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.theme-card:hover .theme-card__action {
  background: #dad8e1;
}

.newsletter-template-card {
  display: flex;
  flex-direction: column;
}

.newsletter-template-card__preview {
  padding: 16px;
}

.newsletter-template-card__body {
  padding: 24px;
}

.newsletter-template-card__body h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.newsletter-template-card__body p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

.newsletter-template-card__hint {
  margin-top: 16px;
  background: #fff;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(69, 60, 105, 0.68);
}

.newsletter-template-card__icon {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.editor-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
}

.editor-layout--wide {
  grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
}

.form-panel,
.preview-panel {
  padding: 28px;
}

.form-panel--long {
  align-self: start;
}

.preview-panel {
  min-height: 420px;
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.preview-frame,
.preview-card {
  width: 100%;
  background: #fff;
  box-shadow: var(--shadow);
}

.preview-frame--square {
  aspect-ratio: 1 / 1;
  max-width: 720px;
  margin: 0 auto;
}

.preview-card--employee {
  padding: 0;
}

.preview-card--offer {
  padding: 24px;
}

.field,
.field-group {
  display: block;
}

.field + .field,
.field-grid + .field,
.field-grid + .list-section,
.field + .list-section,
.list-section + .list-section,
.list-section + .field-grid,
.field-group + .field-group,
.section-heading + .field,
.section-heading + .template-picker,
.template-picker + .field-group {
  margin-top: 18px;
}

.field-grid > .field,
.field-grid > .field-group {
  margin-top: 0;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
}

.input,
.textarea,
select.input {
  width: 100%;
  border: 0;
  border-radius: var(--radius-field);
  background: #fff;
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  box-shadow: 0 0 0 1px rgba(69, 60, 105, 0.12) inset;
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
select.input:focus {
  box-shadow: 0 0 0 2px rgba(69, 60, 105, 0.18) inset;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.field__error {
  margin-top: 12px;
  font-size: 14px;
  color: var(--danger);
}

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

.list-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.list-row .input {
  flex: 1 1 auto;
  min-width: 0;
}

.list-row__remove {
  flex: 0 0 auto;
  width: 48px;
  border: 0;
  border-radius: var(--radius-field);
  background: #f4f4f6;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.list-row__remove:hover {
  color: var(--danger);
  background: #dad8e1;
}

.list-add {
  justify-self: start;
  padding: 10px 16px;
  font-size: 15px;
}

.file-field {
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 0 1px rgba(69, 60, 105, 0.12) inset;
  background: #fff;
  border-radius: var(--radius-field);
  padding: 10px 12px;
}

.file-field__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-field__button {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: 15px;
}

.file-field__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-muted, #6b6480);
}

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

.form-panel > .actions-row:first-child {
  margin-top: 0;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  justify-items: start;
}

.form-panel > .actions-row:first-child .button {
  white-space: nowrap;
  padding-left: 16px;
  padding-right: 16px;
}

.button {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  font-size: 16px;
  font-weight: 500;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--outline,
.button--ghost {
  background: #f4f4f6;
  color: var(--text);
}

.button--outline:hover,
.button--ghost:hover {
  background: #dad8e1;
}

.button--danger {
  background: rgba(184, 71, 71, 0.08);
  color: var(--danger);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.tab {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab--active {
  background: var(--primary);
  color: #fff;
}

.status-message {
  margin: 0 0 16px;
  padding: 14px 18px;
  font-size: 15px;
}

.status-message--success {
  background: rgba(45, 125, 100, 0.08);
  color: var(--success);
}

.status-message--error {
  background: rgba(184, 71, 71, 0.08);
  color: var(--danger);
}

.theme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border: 0;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

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

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

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

.template-thumb {
  border: 0;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(69, 60, 105, 0.12) inset;
}

.template-thumb--active {
  box-shadow: 0 0 0 2px var(--primary) inset;
}

.template-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.template-thumb--wide img {
  aspect-ratio: 1.4 / 1;
  object-fit: contain;
  background: #fff;
}

.template-thumb span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.template-group + .template-group {
  margin-top: 24px;
}

.template-group {
  display: block;
}

.template-group__title {
  margin-bottom: 12px;
}

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

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

.category-list + .section-heading {
  margin-top: 36px;
}

.category-card {
  border: 0;
  background: #fff;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 0 0 1px rgba(69, 60, 105, 0.12) inset;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-card span {
  display: block;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

.category-card--active {
  box-shadow: 0 0 0 2px var(--primary) inset;
}

.newsletter-banner {
  position: relative;
  aspect-ratio: 85 / 28;
  width: 100%;
  overflow: hidden;
}

.newsletter-banner__background {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  object-fit: cover;
}

.newsletter-banner__title {
  position: absolute;
  font-weight: 500;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.newsletter-banner__image {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.newsletter-banner__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.birthday-card-preview,
.avatar-preview {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.birthday-card-preview img,
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.birthday-card-preview__name {
  position: absolute;
  left: 3%;
  top: 10.9%;
  max-width: 76%;
  font-size: clamp(41px, 11.2vw, 68px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 500;
  text-align: left;
}

.birthday-card-preview__name--brand {
  color: #453c69;
}

.birthday-card-preview__name--white {
  color: #fff;
}

.avatar-preview__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.employee-card-preview {
  overflow: hidden;
  background: #fff;
}

.employee-card-preview__hero {
  background: #eaf2ff;
}

.employee-card-preview__hero-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 56px 42px 68px;
}

.employee-card-preview__hero-title h2 {
  margin: 0;
  max-width: 340px;
  color: #4d467d;
  font-size: 33px;
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.employee-card-preview__hero-title img {
  width: 83px;
  height: auto;
}

.employee-card-preview__hero-grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 48px;
}

.employee-card-preview__photo-wrap {
  min-height: 456px;
  background: #fff;
}

.employee-card-preview__photo,
.employee-card-preview__photo-wrap {
  width: 100%;
  height: 100%;
}

.employee-card-preview__photo {
  object-fit: cover;
}

.employee-card-preview__photo-placeholder {
  min-height: 456px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(69, 60, 105, 0.56);
}

.employee-card-preview__meta {
  padding: 4px 42px 40px 0;
}

.employee-card-preview__name {
  color: #4d467d;
  font-size: 56px;
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.employee-card-preview__position {
  margin-top: 32px;
  max-width: 360px;
  color: #4d467d;
  font-size: 24px;
  line-height: 1.24;
  font-weight: 500;
}

.employee-card-preview__contacts {
  margin-top: 92px;
  display: grid;
  gap: 14px;
}

.meta-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: #4d467d;
}

.meta-row span {
  font-size: 16px;
  line-height: 1.35;
}

.employee-card-preview__section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.employee-card-preview__section-title {
  background: #73a2f2;
  color: #fff;
  padding: 32px 28px;
  font-size: 15px;
  line-height: 1.12;
  font-weight: 500;
}

.employee-card-preview__section-body {
  padding: 32px 40px;
}

.employee-card-preview__section-body ul {
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
  display: grid;
  gap: 20px;
  color: #4d467d;
  font-size: 16px;
  line-height: 1.5;
}

.employee-card-preview__section-body li {
  display: flex;
  gap: 12px;
}

.employee-card-preview__section-body li span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 10px;
  background: #4d467d;
  flex-shrink: 0;
}

.offer-preview {
  display: grid;
  gap: 24px;
}

.offer-page {
  position: relative;
  width: 595px;
  height: 842px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.offer-page__title {
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 36px;
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.offer-page__meta {
  position: absolute;
  left: 394px;
  top: 28px;
  width: 128px;
  color: #a29db4;
  font-size: 8px;
  line-height: 1.08;
}

.offer-page__logo {
  position: absolute;
  right: 20px;
  top: 26px;
  width: 42px;
  height: auto;
}

.offer-page__hello {
  position: absolute;
  left: 20px;
  top: 117px;
  max-width: 154px;
  font-size: 10px;
  line-height: 1.22;
}

.offer-page__position {
  position: absolute;
  left: 20px;
  top: 202px;
  max-width: 342px;
  font-size: 16px;
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.offer-page__card--employer {
  position: absolute;
  left: 383px;
  top: 190px;
  width: 212px;
  height: 94px;
  background: #d0e6ff;
  padding: 20px 18px;
}

.offer-page__band {
  position: absolute;
  inset: 284px 0 auto 0;
  height: 221px;
  background: #d0e6ff;
  padding: 16px 20px;
  display: grid;
  gap: 16px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-term span {
  display: block;
  color: #a29db4;
  font-size: 7px;
  line-height: 1.2;
}

.offer-term strong {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.2;
  color: #453c69;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.offer-term em {
  display: block;
  margin-top: 2px;
  color: #a29db4;
  font-size: 7px;
  line-height: 1.2;
  font-style: normal;
}

.offer-page__benefits {
  position: absolute;
  inset: 505px 0 0;
  background: #584f78;
  color: #fff;
}

.offer-page__benefits-title {
  padding: 16px 20px 0;
  font-size: 16px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.offer-page__benefits-grid {
  display: grid;
  grid-template-columns: 190px 213px 192px;
  margin-top: 34px;
}

.offer-page__benefits-grid > div {
  min-height: 303px;
  padding: 12px 20px 20px;
}

.offer-page__benefits-grid > div:first-child {
  background: #655f93;
}

.offer-page__benefits-grid > div:nth-child(2),
.offer-page__benefits-grid > div:nth-child(3) {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.offer-page__benefits-subtitle {
  font-size: 10px;
  line-height: 1.2;
}

.offer-benefit {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-width: 118px;
  font-size: 10px;
  line-height: 1.22;
}

.offer-page__lead {
  margin: 18px 0 0;
  max-width: 150px;
  font-size: 10px;
  line-height: 1.18;
}

.offer-page__bullets {
  margin: 16px 0 0;
  padding-left: 14px;
  font-size: 7px;
  line-height: 1.18;
}

.offer-badge {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.offer-badge--white {
  background: #fff;
  color: #453c69;
}

.offer-page__top-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 403px;
  background: #d0e6ff;
  padding: 18px 20px 28px;
}

.offer-page__top-band h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.offer-page__tasks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px;
  margin-top: 48px;
}

.offer-task small {
  color: #a29db4;
  font-size: 7px;
}

.offer-task p {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.24;
}

.offer-page__bottom {
  position: absolute;
  inset: 403px 0 50px;
}

.offer-page__bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 34px;
  padding: 40px 20px 28px;
}

.offer-page__closing {
  color: #a29db4;
  font-size: 7px;
  line-height: 1.25;
}

.offer-page__signatures {
  display: grid;
  grid-template-columns: 170px 160px 1fr;
  gap: 40px 22px;
  padding: 66px 20px 26px;
  font-size: 10px;
  line-height: 1.2;
}

.offer-signature-line {
  align-self: end;
  border-bottom: 1px solid #453c69;
  padding-bottom: 2px;
  font-size: 7px;
  line-height: 1;
}

.offer-page__footer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 382px;
  height: 50px;
  background: #453c69;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px;
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
}

.profile-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-top: 16px;
}

#newsletter-illustrations {
  display: block;
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}

#avatar-fields {
  margin-top: 24px;
}

.section-heading {
  margin-bottom: 24px;
}

.profile-summary + .section-heading {
  margin-top: 28px;
}

.section-heading p {
  margin: 12px 0 0;
}

.summary-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.summary-row + .summary-row {
  margin-top: 20px;
}

.summary-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.quick-links,
.draft-list {
  display: grid;
  gap: 12px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #fff;
}

.favorite-card {
  border: 0;
  padding: 28px;
  background: #fff;
  text-align: left;
  box-shadow: 0 0 0 1px rgba(69, 60, 105, 0.1) inset;
  cursor: pointer;
}

.favorite-card--active {
  background: #fbfafe;
  box-shadow: 0 0 0 2px #453c69 inset;
}

.favorite-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.favorite-card__head strong {
  max-width: 12ch;
  font-size: 26px;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.favorite-card__badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-card--active .favorite-card__badge {
  background: var(--primary);
  color: #fff;
}

.favorite-card p {
  margin: 18px 0 0;
  max-width: 24ch;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(69, 60, 105, 0.66);
}

.favorite-card__state {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(69, 60, 105, 0.56);
}

.draft-card {
  padding: 28px;
}

.draft-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.draft-card p {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

.toggle-card,
.toggle-small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-card {
  background: #fff;
  padding: 20px;
}

.toggle-card strong {
  display: block;
  font-size: 17px;
}

.toggle-card span {
  display: block;
  margin-top: 8px;
  color: rgba(69, 60, 105, 0.66);
  font-size: 15px;
  line-height: 1.6;
}

.toggle-small {
  padding: 10px 0;
}

.text-stack {
  display: grid;
  gap: 14px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}

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

.stat-card {
  padding: 28px;
}

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

.stat-card--secondary {
  background: var(--secondary);
}

.stat-card__value {
  margin-top: 16px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.split-card {
  margin-top: 16px;
  padding: 32px 32px 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.history-grid {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.history-card {
  overflow: hidden;
}

.history-card__media {
  position: relative;
  background: #fff;
}

.history-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-card__body {
  padding: 28px;
}

.history-card__pill {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: rgba(69, 60, 105, 0.62);
  font-size: 12px;
  font-weight: 500;
}

.history-card__body h3 {
  margin: 16px 0 0;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.history-card__body p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-muted);
}

.history-card__meta {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(69, 60, 105, 0.58);
}

.history-card__details {
  margin: 12px 0 20px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(69, 60, 105, 0.68);
}

.empty-state {
  padding: 56px 40px 64px;
  text-align: center;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-state__text {
  max-width: 34ch;
  margin: 16px auto 0;
}

.empty-box {
  min-height: 180px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: rgba(69, 60, 105, 0.58);
  font-size: 17px;
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .type-display {
    font-size: 64px;
  }

  .type-page-title {
    font-size: 48px;
    line-height: 1.08;
  }

  .type-section-title {
    font-size: 32px;
    line-height: 1.12;
  }

  .theme-grid,
  .tool-grid--three,
  .tool-grid--catalog,
  .history-grid--compact,
  .profile-grid,
  .editor-layout,
  .editor-layout--wide {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .field-grid--two,
  .template-grid--two,
  .template-picker {
    grid-template-columns: 1fr;
  }

  .form-panel > .actions-row:first-child {
    grid-template-columns: 1fr;
  }

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

  .offer-page {
    transform: scale(0.8);
    transform-origin: top center;
    margin-bottom: -120px;
  }
}

@media (max-width: 767px) {
  .app-header,
  .desktop-app {
    display: none !important;
  }

  body::before {
    content: "";
    display: block;
    width: 100%;
    min-height: 100vh;
    background: url("../assets/mobile-desktop-only.png") center/cover no-repeat;
  }
}
