
/* =========================================================
   ARTICLE CONTENT
   ========================================================= */

.article-content {
  width: 100%;
  max-width: 100%;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}


/* =========================================================
   PARAGRAPHS
   ========================================================= */

.article-content p {
  margin: 0 0 1.25rem;
  line-height: 1.8;
}

.article-content p:last-child {
  margin-bottom: 0;
}


/* Empty paragraphs / blank lines */
.article-content p:empty {
  min-height: 1.8em;
}


/* =========================================================
   HEADINGS
   ========================================================= */

.article-content h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 1rem;
}

.article-content h2 {
  font-size: 1.875rem;
  line-height: 1.3;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 0.875rem;
}

.article-content h3 {
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 600;
  color: #111827;
  margin: 1.75rem 0 0.75rem;
}

.article-content h4 {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 0.75rem;
}

.article-content h5 {
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 600;
  color: #1f2937;
  margin: 1.25rem 0 0.5rem;
}

.article-content h6 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: #374151;
  margin: 1rem 0 0.5rem;
}


/* =========================================================
   TEXT FORMATTING
   ========================================================= */

.article-content strong {
  font-weight: 700;
}

.article-content b {
  font-weight: 700;
}

.article-content em {
  font-style: italic;
}

.article-content i {
  font-style: italic;
}

.article-content u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content s,
.article-content del {
  text-decoration: line-through;
}


/* =========================================================
   LINKS
   ========================================================= */

.article-content a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #1d4ed8;
}


/* =========================================================
   UNORDERED LIST
   ========================================================= */

.article-content ul {
  list-style-type: disc;
  margin: 1rem 0 1.25rem;
  padding-left: 2rem;
}

.article-content ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-content ul ul ul {
  list-style-type: square;
}


/* =========================================================
   ORDERED LIST
   ========================================================= */

.article-content ol {
  list-style-type: decimal;
  margin: 1rem 0 1.25rem;
  padding-left: 2rem;
}

.article-content ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.5rem;
}

.article-content ol ol ol {
  list-style-type: lower-roman;
}


/* =========================================================
   LIST ITEMS
   ========================================================= */

.article-content li {
  margin: 0.35rem 0;
  padding-left: 0.25rem;
  line-height: 1.7;
}

.article-content li > p {
  margin: 0;
}


/* =========================================================
   TASK LIST
   Tiptap TaskList / TaskItem
   ========================================================= */

.article-content ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.25rem;
}

.article-content ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.article-content ul[data-type="taskList"] li > label {
  flex: 0 0 auto;
  margin-top: 0.25rem;
}

.article-content ul[data-type="taskList"] li > div {
  flex: 1;
}


/* =========================================================
   BLOCKQUOTE
   ========================================================= */

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  color: #475569;
  font-style: italic;
}

.article-content blockquote p {
  margin: 0;
}


/* =========================================================
   HORIZONTAL RULE
   ========================================================= */

.article-content hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}


/* =========================================================
   IMAGES
   ========================================================= */

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 0.75rem;
}


/* =========================================================
   FIGURE / IMAGE CAPTION SUPPORT
   ========================================================= */

.article-content figure {
  margin: 1.5rem 0;
}

.article-content figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}


/* =========================================================
   TABLE
   ========================================================= */

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  overflow: hidden;
}


/* Table cells */

.article-content th,
.article-content td {
  border: 1px solid #d1d5db;
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}


/* Table header */

.article-content th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
}


/* Table rows */

.article-content tbody tr:nth-child(even) {
  background: #f9fafb;
}

.article-content tbody tr:hover {
  background: #f3f4f6;
}


/* Responsive table */

.article-content .table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}


/* =========================================================
   INLINE CODE
   ========================================================= */

.article-content code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;

  font-size: 0.875em;
  background: #f3f4f6;
  color: #be123c;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}


/* =========================================================
   CODE BLOCK
   ========================================================= */

.article-content pre {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 0.75rem;
  background: #111827;
  color: #f9fafb;
  font-size: 0.875rem;
  line-height: 1.7;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}


/* =========================================================
   HIGHLIGHT
   Tiptap Highlight extension
   ========================================================= */

.article-content mark {
  background: #fef08a;
  color: inherit;
  padding: 0.05em 0.2em;
  border-radius: 0.2rem;
}


/* =========================================================
   SUBSCRIPT / SUPERSCRIPT
   ========================================================= */

.article-content sub {
  vertical-align: sub;
  font-size: 0.75em;
}

.article-content sup {
  vertical-align: super;
  font-size: 0.75em;
}


/* =========================================================
   TEXT ALIGNMENT
   Tiptap TextAlign
   ========================================================= */

.article-content [style*="text-align: left"] {
  text-align: left;
}

.article-content [style*="text-align: center"] {
  text-align: center;
}

.article-content [style*="text-align: right"] {
  text-align: right;
}

.article-content [style*="text-align: justify"] {
  text-align: justify;
}


/* =========================================================
   WHITESPACE / LINE BREAKS
   ========================================================= */

.article-content br {
  display: block;
  content: "";
  margin-top: 0.25rem;
}


/* =========================================================
   EMPTY PARAGRAPHS
   ========================================================= */

.article-content p:has(br:only-child) {
  min-height: 1.8em;
}


/* =========================================================
   FIRST / LAST ELEMENT SPACING
   ========================================================= */

.article-content > *:first-child {
  margin-top: 0;
}

.article-content > *:last-child {
  margin-bottom: 0;
}


/* =========================================================
   SELECTION
   ========================================================= */

.article-content ::selection {
  background: #bfdbfe;
  color: #111827;
}


/* =========================================================
   RESPONSIVE — TABLETS
   ========================================================= */

@media (max-width: 768px) {
  .article-content {
    font-size: 0.975rem;
    line-height: 1.75;
  }

  .article-content h1 {
    font-size: 1.875rem;
  }

  .article-content h2 {
    font-size: 1.625rem;
  }

  .article-content h3 {
    font-size: 1.375rem;
  }

  .article-content table {
    font-size: 0.875rem;
  }

  .article-content th,
  .article-content td {
    padding: 0.6rem 0.7rem;
  }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 480px) {
  .article-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .article-content h1 {
    font-size: 1.625rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.25rem;
  }

  .article-content p {
    margin-bottom: 1rem;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 1.5rem;
  }

  .article-content blockquote {
    padding: 0.75rem 1rem;
  }

  .article-content pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
}
