/* RehabHive article typography (MATRYOSHKA §5.11)
 * Applied to any element with class="article-content".
 * Turns raw editor HTML ($blog->content, $article->body, etc.) into a
 * publication-grade reading layout WITHOUT modifying the markup itself.
 * Used by: blog/show, treatment/show (planned), insurance/show (planned),
 * any other long-form content template.
 */

.article-content {
  color: #1e293b;
  font-size: 17px;
  line-height: 1.75;
  max-width: 72ch;
}

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

.article-content p { margin: 0 0 1.25em; }
.article-content p + p { margin-top: 0; }

.article-content a {
  color: #1B4965;
  text-decoration: underline;
  text-decoration-color: rgba(27, 73, 101, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.article-content a:hover { text-decoration-color: #1B4965; }

.article-content h2 {
  position: relative;
  margin: 2.5em 0 .7em;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0E2E42;
  letter-spacing: -.01em;
  scroll-margin-top: 100px;
  padding-top: 1.2em;
  border-top: 1px solid #E2E8F0;
}
.article-content h2::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 54px;
  height: 3px;
  background: linear-gradient(90deg, #1B4965, #FCD34D);
  border-radius: 2px;
}
.article-content > h2:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.article-content > h2:first-child::before { display: none; }

.article-content h3 {
  margin: 1.8em 0 .5em;
  font-size: 1.25rem;
  font-weight: 700;
  color: #143D54;
  line-height: 1.35;
  scroll-margin-top: 100px;
}

.article-content h4 {
  margin: 1.4em 0 .4em;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1B4965;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.25em 1.35em;
  padding: 0;
}
.article-content li { margin: .35em 0; padding-left: .25em; }
.article-content ul li::marker { color: #FCD34D; font-size: 1.1em; }
.article-content ol li::marker { color: #1B4965; font-weight: 700; }

.article-content strong { color: #0E2E42; font-weight: 700; }
.article-content em { color: #1B4965; }

.article-content blockquote {
  margin: 1.6em 0;
  padding: .9em 1.2em;
  border-left: 4px solid #FCD34D;
  background: #FEF9E7;
  border-radius: 0 10px 10px 0;
  color: #475569;
  font-style: italic;
}
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content code {
  background: #F1F5F9;
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
  color: #0E2E42;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.article-content figure { margin: 1.6em 0; }
.article-content figcaption {
  margin-top: .5em;
  font-size: .85em;
  color: #64748B;
  text-align: center;
  font-style: italic;
}

.article-content hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px dashed #CBD5E1;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95em;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}
.article-content th {
  background: #F0F7FA;
  padding: .7em 1em;
  text-align: left;
  font-weight: 700;
  color: #1B4965;
  border-bottom: 2px solid #E2E8F0;
}
.article-content td {
  padding: .7em 1em;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: top;
}
.article-content tr:last-child td { border-bottom: 0; }

/* FAQ accordion (transformed from H3+p via article.js) */
.article-content details.rh-faq {
  margin: .6em 0;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.article-content details.rh-faq:hover {
  border-color: #1B4965;
  box-shadow: 0 2px 8px rgba(14, 46, 66, .06);
}
.article-content details.rh-faq[open] {
  border-color: #1B4965;
  background: #F7FAFC;
}
.article-content details.rh-faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 1em 1.2em;
  font-weight: 700;
  color: #0E2E42;
  font-size: 1.02rem;
  position: relative;
  padding-right: 3em;
  line-height: 1.4;
}
.article-content details.rh-faq > summary::-webkit-details-marker { display: none; }
.article-content details.rh-faq > summary::after {
  content: '';
  position: absolute;
  right: 1.2em;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #1B4965;
  border-bottom: 2px solid #1B4965;
  transform: translateY(-75%) rotate(45deg);
  transition: transform .2s;
}
.article-content details.rh-faq[open] > summary::after {
  transform: translateY(-25%) rotate(-135deg);
}
.article-content details.rh-faq > .rh-faq-body {
  padding: 0 1.2em 1em;
  color: #334155;
}
.article-content details.rh-faq > .rh-faq-body > *:first-child { margin-top: 0; }
.article-content details.rh-faq > .rh-faq-body > *:last-child { margin-bottom: 0; }
