/* ============================================================
   AlgorithmBD — long-form content styles
   Shared by the journal (blog) and legal pages.
   ============================================================ */

.content-body {
  color: var(--muted);
  font-size: 1.0125rem;
  line-height: 1.85;
}

.content-body > * + * {
  margin-top: 1.35rem;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  scroll-margin-top: 7rem;
  color: var(--navy);
  font-family: "ClashDisplay", "Poppins", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.content-body h2 {
  margin-top: 3.25rem;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 700;
}

.content-body h3 {
  margin-top: 2.35rem;
  font-size: 1.22rem;
  font-weight: 600;
}

.content-body h4 {
  margin-top: 1.9rem;
  font-size: 1.02rem;
  font-weight: 600;
}

.content-body h2 + *,
.content-body h3 + *,
.content-body h4 + * {
  margin-top: 1rem;
}

.content-body p > strong,
.content-body li > strong {
  color: var(--navy);
  font-weight: 600;
}

.content-body a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.content-body a:hover {
  color: var(--blue);
}

.content-body ul,
.content-body ol {
  padding-left: 1.35rem;
}

.content-body ul {
  list-style: disc;
}

.content-body ol {
  list-style: decimal;
}

.content-body li::marker {
  color: var(--blue);
}

.content-body li + li {
  margin-top: 0.55rem;
}

.content-body blockquote {
  margin-top: 2.25rem;
  border-left: 2px solid var(--blue);
  padding: 0.15rem 0 0.15rem 1.35rem;
}

.content-body blockquote p {
  color: var(--navy);
  font-family: "ClashDisplay", "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
}

.content-body blockquote footer {
  margin-top: 0.6rem;
  color: var(--muted);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
}

.content-body hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.content-body code {
  border: 1px solid var(--hairline);
  border-radius: 0.3rem;
  background: rgba(8, 21, 44, 0.04);
  padding: 0.12rem 0.35rem;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.content-body .callout {
  margin-top: 2rem;
  border: 1px solid var(--hairline);
  border-radius: 0.55rem;
  background: rgba(233, 238, 247, 0.5);
  padding: 1.15rem 1.3rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.content-body .callout p {
  margin: 0;
}

.content-body .callout-title {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.content-body .table-wrap {
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 0.5rem;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.6;
}

.content-body th,
.content-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

.content-body th {
  background: rgba(233, 238, 247, 0.6);
  color: var(--navy);
  font-weight: 600;
}

.content-body tr + tr th,
.content-body tr + tr td {
  border-top: 1px solid var(--hairline);
}

/* Alternating section background for content pages */
.page-v2 main > section.section-mist {
  background-color: rgba(233, 238, 247, 0.56);
}

/* Article hero */
.article-hero h1 {
  max-width: 24ch !important;
}

.author-avatar {
  color: #fff !important;
}

/* On-this-page navigation */
.toc {
  font-size: 0.82rem;
  line-height: 1.55;
}

.toc-title {
  color: var(--navy);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc ol {
  margin-top: 0.9rem;
  list-style: none;
  padding: 0;
}

.toc li + li {
  margin-top: 0.55rem;
}

.toc a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.toc a:hover {
  color: var(--blue-deep);
}

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