.content {
  color: #262626;
  font-size: 1.0625rem;
  line-height: 2.05;
  overflow-wrap: anywhere;
}

.content > :first-child {
  margin-top: 0;
}

.content > :last-child {
  margin-bottom: 0;
}

.content :global(p) {
  margin: 1.35rem 0;
  color: #333333;
  font-size: 1.0625rem;
  line-height: 2.05;
}

.content :global(h2) {
  margin: 2.75rem 0 1rem;
  color: #171717;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.75;
}

.content :global(h3) {
  margin: 2.25rem 0 0.875rem;
  color: #171717;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.8;
}

.content :global(h4) {
  margin: 1.75rem 0 0.75rem;
  color: #262626;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.9;
}

.content :global(a) {
  color: #be123c;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 4px;
}

.content :global(a:hover) {
  color: #9f1239;
  text-decoration: underline;
}

.content :global(strong),
.content :global(b) {
  color: #171717;
  font-weight: 900;
}

/* لیست‌های شماره‌دار و گلوله‌ای */

.content :global(ul),
.content :global(ol) {
  margin: 1.5rem 0;
  padding-inline-start: 1.75rem;
}

.content :global(ul) {
  list-style-type: disc;
}

.content :global(ol) {
  list-style-type: decimal;
}

.content :global(ul ul) {
  margin: 0.5rem 0;
  list-style-type: circle;
}

.content :global(ul ul ul) {
  list-style-type: square;
}

.content :global(ol ol) {
  margin: 0.5rem 0;
  list-style-type: lower-alpha;
}

.content :global(li) {
  display: list-item;
  margin: 0.5rem 0;
  padding-inline-start: 0.3rem;
  color: #333333;
  line-height: 1.95;
}

.content :global(li::marker) {
  color: #e11d48;
  font-weight: 800;
}

/* لیست وظایف Tiptap */

.content :global(ul[data-type="taskList"]) {
  padding-inline-start: 0;
  list-style: none;
}

.content :global(ul[data-type="taskList"] li) {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  list-style: none;
}

.content :global(ul[data-type="taskList"] li > label) {
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.content :global(ul[data-type="taskList"] input[type="checkbox"]) {
  width: 1rem;
  height: 1rem;
  accent-color: #e11d48;
}

.content :global(ul[data-type="taskList"] li > div) {
  flex: 1;
  min-width: 0;
}

/* نقل‌قول */

.content :global(blockquote) {
  position: relative;
  margin: 2.25rem 0;
  padding: 1rem 1.25rem 1rem 1rem;
  border-inline-start: 4px solid #e11d48;
  background: #fff1f2;
  color: #4c0519;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 2;
}

.content :global(blockquote p) {
  margin: 0;
  color: inherit;
}

/* تصویر و کپشن */

.content :global(figure) {
  margin: 2rem 0;
}

.content :global(img) {
  display: block;
  width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: 6px;
  object-fit: cover;
}

.content :global(figure img) {
  margin-bottom: 0;
}

.content :global(figcaption) {
  margin-top: 0.65rem;
  color: #737373;
  font-size: 0.8125rem;
  line-height: 1.8;
  text-align: center;
}

/* جدول حرفه‌ای و واکنش‌گرا */

.content :global(.tableWrapper) {
  width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #ffffff;
}

.content :global(table) {
  display: block;
  width: 100%;
  min-width: 580px;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-spacing: 0;
  border-collapse: separate;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.9375rem;
  line-height: 1.8;
  white-space: nowrap;
}

.content :global(.tableWrapper table) {
  display: table;
  min-width: 580px;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.content :global(thead) {
  background: #171717;
  color: #ffffff;
}

.content :global(th) {
  padding: 0.85rem 1rem;
  border-inline-end: 1px solid #404040;
  border-bottom: 1px solid #404040;
  color: #ffffff;
  font-weight: 800;
  text-align: right;
}

.content :global(td) {
  padding: 0.8rem 1rem;
  border-inline-end: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  color: #404040;
  text-align: right;
  vertical-align: middle;
}

.content :global(tbody tr:nth-child(even)) {
  background: #fafafa;
}

.content :global(tbody tr:hover) {
  background: #fff1f2;
}

.content :global(tr:last-child td) {
  border-bottom: 0;
}

.content :global(th:last-child),
.content :global(td:last-child) {
  border-inline-end: 0;
}

/* کد */

.content :global(code) {
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #f5f5f5;
  padding: 0.15rem 0.4rem;
  color: #be123c;
  direction: ltr;
  font-family: monospace;
  font-size: 0.875em;
}

.content :global(pre) {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: 6px;
  background: #171717;
  padding: 1rem;
  color: #fafafa;
  direction: ltr;
  line-height: 1.8;
  text-align: left;
}

.content :global(pre code) {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}

.content :global(hr) {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid #e5e5e5;
}

@media (max-width: 640px) {
  .content {
    font-size: 1rem;
    line-height: 2;
  }

  .content :global(p) {
    margin: 1.2rem 0;
    font-size: 0.9rem;
    line-height: 2;
    text-align: justify;
  }

  .content :global(h2) {
    margin-top: 2.25rem;
    font-size: 1.3rem;
    color: #404040;
  }

  .content :global(h3) {
    margin-top: 2rem;
    font-size: 1.125rem;
  }

  .content :global(ul),
  .content :global(ol) {
    padding-inline-start: 1.5rem;
  }

  .content :global(li) {
    font-size: 1rem;
    line-height: 1.95;
  }

  .content :global(blockquote) {
    margin: 1.75rem 0;
    font-size: 1rem;
  }

  .content :global(table) {
    min-width: 520px;
    font-size: 0.875rem;
  }

  .content :global(th),
  .content :global(td) {
    padding: 0.7rem 0.8rem;
  }
}
