/* Shared editorial treatment for hydrated and prerendered blog articles. */
.post-body {
  color: #3A3A4A;
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.1rem);
  line-height: 1.82;
  min-width: 0;
  overflow-wrap: break-word;
}

.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p { margin: 0 0 1.15em; }
.post-body :where(p, h2, h3, h4):empty { display: none; }

.post-body :where(h2, h3, h4) {
  color: #2D2D3A;
  font-family: 'Outfit', 'DM Sans', sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  scroll-margin-top: 5rem;
}

.post-body h2 {
  font-size: clamp(1.5rem, 1.35rem + 0.65vw, 1.82rem);
  font-weight: 800;
  margin: 2.4rem 0 0.85rem;
  padding-top: 0.9rem;
  position: relative;
}

.post-body h2::before {
  background: linear-gradient(90deg, #C92A45 0 38px, #1A7B7E 38px 52px);
  border-radius: 999px;
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  top: 0;
  width: 52px;
}

.post-body h3 {
  color: #244F52;
  font-size: clamp(1.2rem, 1.12rem + 0.3vw, 1.4rem);
  font-weight: 750;
  margin: 1.75rem 0 0.65rem;
}

.post-body h4 {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 1.45rem 0 0.55rem;
}

.post-body :where(ul, ol) {
  margin: 0 0 1.35rem;
  padding-inline-start: clamp(1.25rem, 4vw, 1.8rem);
}

.post-body li { margin-block: 0.45rem; padding-inline-start: 0.2rem; }
.post-body li::marker { color: #C92A45; font-weight: 800; }
.post-body li > :where(ul, ol) { margin-block: 0.55rem 0; }

.post-body blockquote {
  background: linear-gradient(135deg, #F8F7F4, #F1F6F5);
  border: 1px solid rgba(26, 123, 126, 0.18);
  border-inline-start: 5px solid #1A7B7E;
  border-radius: 0 14px 14px 0;
  color: #454554;
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
}

.post-body blockquote > :last-child { margin-bottom: 0; }

.post-body a,
.v-application .post-body a {
  border-radius: 2px;
  color: #C92A45;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(201, 42, 69, 0.42);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.17em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.post-body a:hover,
.v-application .post-body a:hover {
  color: #9F2037;
  text-decoration-color: currentColor;
}

.post-body a:focus-visible,
.post-body .table-scroll:focus-visible {
  outline: 3px solid #1A7B7E;
  outline-offset: 3px;
}

.post-body :not(pre) > code {
  background: #F0EEEA;
  border: 1px solid rgba(45, 45, 58, 0.09);
  border-radius: 5px;
  color: #7F2034;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
  padding: 0.12em 0.36em;
}

.post-body pre {
  background: #272731;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(45, 45, 58, 0.13);
  color: #F8F7F4;
  line-height: 1.58;
  margin: 1.6rem 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem 1.1rem;
  white-space: pre;
}

.post-body pre code {
  background: transparent;
  border: 0;
  color: inherit;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  overflow-wrap: normal;
  padding: 0;
}

.post-body hr {
  border: 0;
  border-top: 1px solid rgba(45, 45, 58, 0.16);
  margin: 2.3rem 0;
}

.post-body .table-scroll {
  background: #FFFFFF;
  border: 1px solid rgba(45, 45, 58, 0.13);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(45, 45, 58, 0.07);
  margin: 1.65rem 0 1.9rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #1A7B7E #ECEAE5;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.post-body .table-scroll table {
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  min-width: 34rem;
  width: 100%;
}

.post-body .table-scroll[data-columns='2'] table { min-width: 30rem; }
.post-body .table-scroll[data-columns='3'] table { min-width: 38rem; }
.post-body .table-scroll[data-columns='4'] table { min-width: 44rem; }
.post-body .table-scroll[data-columns='5'] table { min-width: 52rem; }

.post-body .table-scroll :where(th, td) {
  border-bottom: 1px solid rgba(45, 45, 58, 0.09);
  border-right: 1px solid rgba(45, 45, 58, 0.07);
  hyphens: auto;
  line-height: 1.5;
  overflow-wrap: break-word;
  padding: 0.78rem 0.9rem;
  text-align: start;
  vertical-align: top;
}

.post-body .table-scroll :where(th, td):last-child { border-right: 0; }
.post-body .table-scroll tbody tr:last-child :where(th, td) { border-bottom: 0; }
.post-body .table-scroll thead th {
  background: linear-gradient(180deg, #F8F7F4, #F2F0EB);
  color: #2D2D3A;
  font-family: 'Outfit', 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.post-body .table-scroll tbody tr:nth-child(even) { background: #FCFBF9; }
.post-body .table-scroll tbody tr:hover { background: #F1F7F6; }
.post-body .table-scroll tbody :where(th:first-child, td:first-child) {
  color: #2D2D3A;
  font-weight: 700;
}

.post-body img {
  block-size: auto;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(45, 45, 58, 0.1);
  display: block;
  margin: 1.6rem auto;
  max-inline-size: 100%;
}

.post-body figure { margin: 1.7rem 0; }
.post-body figcaption {
  color: #6B6B7B;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0.55rem;
  text-align: center;
}

.post-body details {
  background: #FCFBF9;
  border: 1px solid rgba(45, 45, 58, 0.13);
  border-radius: 12px;
  margin: 1.4rem 0;
  padding: 0.8rem 1rem;
}

.post-body summary { cursor: pointer; font-weight: 800; }

@media (max-width: 600px) {
  .post-body { font-size: 1rem; line-height: 1.75; }
  .post-body h2 { margin-top: 2.1rem; }
  .post-body .table-scroll { border-radius: 10px; margin-inline: -4px; }
  .post-body .table-scroll :where(th, td) { font-size: 0.88rem; padding: 0.68rem 0.72rem; }
  .post-body pre { border-radius: 9px; font-size: 0.84rem; padding: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .post-body a { transition: none; }
}
