/**
 * Ayandeh theme — content styles.
 * Single source of truth for body content in the built site and CMS editor (WYSIWYG).
 * Content shell: .soledit-content + data-doc-type + .content-wrap-* (Solstack LAYOUT.md).
 * JSON pages: body HTML lives only in .soledit-doc-body; .soledit-article-chrome holds title, byline, featured image, excerpt (posts).
 * Posts: content-wrap-default (65ch). Pages: default|narrow|wide|full|landing (see LANDING-KIT.md).
 * v2 marketing blocks: ./v2-marketing.css (Solstack blocks + Ayandeh bands).
 */
@import './v2-marketing.css';
@import './v1-landing.css';

.soledit-content {
  line-height: 1.7;
  color: #374151;
}

/* ——— Content shell (editor + built site) — DESIGN.md reading column ——— */
.soledit-content[data-doc-type='post'].content-wrap-default {
  box-sizing: border-box;
  max-width: 65ch;
  width: 100%;
  margin-inline: auto;
  padding: 1.5rem 1rem 2.5rem;
}

.soledit-content[data-doc-type='page'].content-wrap-default,
.soledit-content[data-doc-type='page'].content-wrap-narrow {
  box-sizing: border-box;
  max-width: 65ch;
  width: 100%;
  margin-inline: auto;
  padding: 1.5rem 1rem 2.5rem;
}

.soledit-content[data-doc-type='page'].content-wrap-wide {
  box-sizing: border-box;
  max-width: 72rem;
  width: 100%;
  margin-inline: auto;
  padding: 1.5rem 1rem 2.5rem;
}

@media (min-width: 640px) {
  .soledit-content[data-doc-type='post'].content-wrap-default,
  .soledit-content[data-doc-type='page'].content-wrap-narrow,
  .soledit-content[data-doc-type='page'].content-wrap-default,
  .soledit-content[data-doc-type='page'].content-wrap-wide {
    padding-inline: 1.5rem;
  }
}

.soledit-content[data-doc-type='page'].content-wrap-landing,
.soledit-content[data-doc-type='home'].content-wrap-landing,
.soledit-content[data-doc-type='page'].content-wrap-full,
.soledit-content[data-doc-type='home'].content-wrap-full {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 0;
}

/* Prose headings: reading column only. Exclude full-bleed .mjs templates (home) and landing kit pages. */
.soledit-content[data-doc-type='post'] h1,
.soledit-content[data-doc-type='page'].content-wrap-narrow h1,
.soledit-content[data-doc-type='page'].content-wrap-default h1,
.soledit-content[data-doc-type='page'].content-wrap-wide h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  line-height: 1.2;
  color: #111827;
}

.soledit-content[data-doc-type='post'] h1:first-child,
.soledit-content[data-doc-type='post'] .soledit-doc-body > h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-narrow h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-narrow .soledit-doc-body > h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-default h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-default .soledit-doc-body > h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-wide h1:first-child,
.soledit-content[data-doc-type='page'].content-wrap-wide .soledit-doc-body > h1:first-child {
  margin-top: 0;
}

/* Post chrome (layout) sits above .soledit-doc-body */
.soledit-content .soledit-article-chrome {
  margin-bottom: 1rem;
}

/* Article title from frontmatter (layout); body duplicate H1 is stripped when it matches */
.soledit-content .article-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  color: #111827;
}

.soledit-content[data-doc-type='post'] h2,
.soledit-content[data-doc-type='page'].content-wrap-narrow h2,
.soledit-content[data-doc-type='page'].content-wrap-default h2,
.soledit-content[data-doc-type='page'].content-wrap-wide h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.6em;
  line-height: 1.3;
  color: #1f2937;
}

.soledit-content[data-doc-type='post'] h3,
.soledit-content[data-doc-type='page'].content-wrap-narrow h3,
.soledit-content[data-doc-type='page'].content-wrap-default h3,
.soledit-content[data-doc-type='page'].content-wrap-wide h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.4em;
  line-height: 1.4;
  color: #1f2937;
}

.soledit-content[data-doc-type='post'] p + p,
.soledit-content[data-doc-type='page'].content-wrap-narrow p + p,
.soledit-content[data-doc-type='page'].content-wrap-default p + p,
.soledit-content[data-doc-type='page'].content-wrap-wide p + p {
  margin-top: 1em;
}

/* Article excerpt (after featured image, before body) */
.soledit-content .article-excerpt {
  font-size: 1.25rem;
  color: #4b5563;
  line-height: 1.625;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Featured image: frontmatter only; layout injects (not TipTap body). Match prose img treatment; block to avoid side-by-side with siblings. */
.soledit-content .article-featured-image {
  margin: 0 0 1.25em;
}
.soledit-content .article-featured-image__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Article meta (date, author, category, series, tags). Below title. */
.soledit-content .article-meta {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding: 1rem 1rem 1.25rem;
  background: #fffdf8;
  border: 1px solid #e1d8ca;
  border-radius: 8px;
}
.soledit-content .article-meta__line {
  margin-bottom: 0.375rem;
}
.soledit-content .article-meta__date,
.soledit-content .article-meta__author {
  color: #6b7280;
}
.soledit-content .article-meta__sep {
  color: #9ca3af;
  margin-inline: 0.25em;
}
.soledit-content .article-meta__taxonomies {
  font-size: 0.875rem;
  color: #6b7280;
}
.soledit-content .article-meta__category,
.soledit-content .article-meta__series {
  font-weight: 500;
  color: #374151;
}
.soledit-content .article-meta__link {
  color: #0f5f53;
  text-decoration: underline;
  transition: color 0.15s ease;
}
.soledit-content .article-meta__link:hover {
  color: #0c443f;
  text-decoration: none;
}
.soledit-content .article-meta__tags {
  color: #6b7280;
}

.soledit-content[data-doc-type='post'] ul,
.soledit-content[data-doc-type='post'] ol,
.soledit-content[data-doc-type='page'].content-wrap-narrow ul,
.soledit-content[data-doc-type='page'].content-wrap-narrow ol,
.soledit-content[data-doc-type='page'].content-wrap-default ul,
.soledit-content[data-doc-type='page'].content-wrap-default ol,
.soledit-content[data-doc-type='page'].content-wrap-wide ul,
.soledit-content[data-doc-type='page'].content-wrap-wide ol {
  margin: 1em 0;
  padding-inline-start: 1.5rem;
}

.soledit-content[data-doc-type='post'] ul,
.soledit-content[data-doc-type='page'].content-wrap-narrow ul,
.soledit-content[data-doc-type='page'].content-wrap-default ul,
.soledit-content[data-doc-type='page'].content-wrap-wide ul {
  list-style-type: disc;
}

.soledit-content[data-doc-type='post'] ol,
.soledit-content[data-doc-type='page'].content-wrap-narrow ol,
.soledit-content[data-doc-type='page'].content-wrap-default ol,
.soledit-content[data-doc-type='page'].content-wrap-wide ol {
  list-style-type: decimal;
}

html:lang(fa) .soledit-content[data-doc-type='post'] ol,
html:lang(fa) .soledit-content[data-doc-type='page'].content-wrap-narrow ol,
html:lang(fa) .soledit-content[data-doc-type='page'].content-wrap-default ol,
html:lang(fa) .soledit-content[data-doc-type='page'].content-wrap-wide ol {
  list-style-type: persian;
}

.soledit-content[data-doc-type='post'] li > p,
.soledit-content[data-doc-type='page'].content-wrap-narrow li > p,
.soledit-content[data-doc-type='page'].content-wrap-default li > p,
.soledit-content[data-doc-type='page'].content-wrap-wide li > p {
  margin: 0;
}

.soledit-content[data-doc-type='post'] blockquote,
.soledit-content[data-doc-type='page'].content-wrap-narrow blockquote,
.soledit-content[data-doc-type='page'].content-wrap-default blockquote,
.soledit-content[data-doc-type='page'].content-wrap-wide blockquote {
  margin: 1.5em 0;
  padding: 0.75em 1em 0.75em 1.25rem;
  border-inline-start: 4px solid #167767;
  background: #f8fafc;
  color: #475569;
  font-style: italic;
}

.soledit-content[data-doc-type='post'] a,
.soledit-content[data-doc-type='page'].content-wrap-narrow a,
.soledit-content[data-doc-type='page'].content-wrap-default a,
.soledit-content[data-doc-type='page'].content-wrap-wide a {
  color: #0f5f53;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.soledit-content[data-doc-type='post'] a:hover,
.soledit-content[data-doc-type='page'].content-wrap-narrow a:hover,
.soledit-content[data-doc-type='page'].content-wrap-default a:hover,
.soledit-content[data-doc-type='page'].content-wrap-wide a:hover {
  color: #0c443f;
  text-decoration: none;
}

.soledit-content[data-doc-type='post'] img,
.soledit-content[data-doc-type='page'].content-wrap-narrow img,
.soledit-content[data-doc-type='page'].content-wrap-default img,
.soledit-content[data-doc-type='page'].content-wrap-wide img {
  max-width: 100%;
  height: auto;
  margin: 1.25em 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Image display size (toolbar: Small / Medium / Large / Full / Natural). See SETUP.md → CSS Class Reference. */
.soledit-content[data-doc-type='post'] img[data-size='small'],
.soledit-content[data-doc-type='page'].content-wrap-narrow img[data-size='small'],
.soledit-content[data-doc-type='page'].content-wrap-default img[data-size='small'],
.soledit-content[data-doc-type='page'].content-wrap-wide img[data-size='small'] {
  max-width: 200px;
}
.soledit-content[data-doc-type='post'] img[data-size='medium'],
.soledit-content[data-doc-type='page'].content-wrap-narrow img[data-size='medium'],
.soledit-content[data-doc-type='page'].content-wrap-default img[data-size='medium'],
.soledit-content[data-doc-type='page'].content-wrap-wide img[data-size='medium'] {
  max-width: 400px;
}
.soledit-content[data-doc-type='post'] img[data-size='large'],
.soledit-content[data-doc-type='page'].content-wrap-narrow img[data-size='large'],
.soledit-content[data-doc-type='page'].content-wrap-default img[data-size='large'],
.soledit-content[data-doc-type='page'].content-wrap-wide img[data-size='large'] {
  max-width: 720px;
}
.soledit-content[data-doc-type='post'] img[data-size='full'],
.soledit-content[data-doc-type='page'].content-wrap-narrow img[data-size='full'],
.soledit-content[data-doc-type='page'].content-wrap-default img[data-size='full'],
.soledit-content[data-doc-type='page'].content-wrap-wide img[data-size='full'] {
  max-width: 100%;
}
/* natural = no constraint; base img rules already apply */

.soledit-content[data-doc-type='post'] hr,
.soledit-content[data-doc-type='page'].content-wrap-narrow hr,
.soledit-content[data-doc-type='page'].content-wrap-default hr,
.soledit-content[data-doc-type='page'].content-wrap-wide hr {
  border: none;
  border-top: 1px solid #e1d8ca;
  margin: 2em 0;
}

/* ——— Soledit blocks ——— */

/* Callout: info, warning, success, error — large icon + colored bar + tinted background.
 * Default = LTR (bar and icon on the left). Override only for RTL via html[dir="rtl"] — do not rely on LTR being set. */
.soledit-content .soledit-callout {
  margin: 1.5em 0;
  padding: 1.25rem 1.5rem;
  padding-left: 5.5rem;
  border-radius: 8px;
  border-left: 4px solid #167767;
  background: #dff1ed;
  color: #0f5f53;
  line-height: 1.65;
  position: relative;
}

.soledit-content .soledit-callout::before {
  position: absolute;
  left: 1.25rem;
  top: 1.1rem;
  font-size: 2.5rem;
  line-height: 1;
  color: inherit;
  font-weight: 800;
  font-style: normal;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* RTL: bar and icon on the right — override only */
html[dir="rtl"] .soledit-content .soledit-callout {
  border-left: none;
  border-right: 4px solid #167767;
  padding-left: 1.5rem;
  padding-right: 5.5rem;
}

html[dir="rtl"] .soledit-content .soledit-callout::before {
  left: auto;
  right: 1.25rem;
}

/* Info (default): ◆ diamond — neutral “note” symbol */
.soledit-content .soledit-callout::before {
  content: '\25C6';
}

.soledit-content .soledit-callout p {
  margin: 0;
  color: inherit;
}

.soledit-content .soledit-callout p + p {
  margin-top: 0.5em;
}

/* Warning */
.soledit-content .soledit-callout[data-callout-type="warning"] {
  background: #fffbeb;
  color: #92400e;
  border-left-color: #d97706;
}

html[dir="rtl"] .soledit-content .soledit-callout[data-callout-type="warning"] {
  border-left-color: transparent;
  border-right-color: #d97706;
}

.soledit-content .soledit-callout[data-callout-type="warning"]::before {
  content: '\26A0';
}

/* Success */
.soledit-content .soledit-callout[data-callout-type="success"] {
  background: #ecfdf5;
  color: #065f46;
  border-left-color: #059669;
}

html[dir="rtl"] .soledit-content .soledit-callout[data-callout-type="success"] {
  border-left-color: transparent;
  border-right-color: #059669;
}

.soledit-content .soledit-callout[data-callout-type="success"]::before {
  content: '\2713';
}

/* Error: ⊗ circled times (cross in circle) */
.soledit-content .soledit-callout[data-callout-type="error"] {
  background: #fef2f2;
  color: #991b1b;
  border-left-color: #dc2626;
}

html[dir="rtl"] .soledit-content .soledit-callout[data-callout-type="error"] {
  border-left-color: transparent;
  border-right-color: #dc2626;
}

.soledit-content .soledit-callout[data-callout-type="error"]::before {
  content: '\2297';
}

/* FAQ: section > details.soledit-faq-item > summary.soledit-faq-q + div.soledit-faq-a. Closed by default. */
.soledit-content .soledit-faq {
  margin: 1.5em 0;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  background: #fffdf8;
  border: 1px solid #e1d8ca;
}

.soledit-content .soledit-faq-item {
  margin-block-end: 0.5em;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e1d8ca;
}

.soledit-content .soledit-faq-item:last-child {
  margin-block-end: 0;
}

.soledit-content .soledit-faq-q {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  cursor: pointer;
  padding: 0.75rem 1rem;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.soledit-content .soledit-faq-q::-webkit-details-marker {
  display: none;
}

.soledit-content .soledit-faq-q::after {
  content: '\25BC';
  font-size: 0.6em;
  flex-shrink: 0;
  margin-block-start: 0.25em;
  margin-inline-start: auto;
  transition: transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .soledit-content .soledit-faq-q::after {
    transition: none;
  }
}

.soledit-content .soledit-faq-item[open] .soledit-faq-q::after {
  transform: rotate(180deg);
}

.soledit-content .soledit-faq-q:focus-visible {
  outline: 2px solid #167767;
  outline-offset: 2px;
}

.soledit-content .soledit-faq-a {
  padding: 0 1rem 1rem;
  margin-inline-start: 0;
  color: #4b5563;
  line-height: 1.7;
}

.soledit-content .soledit-faq-a p {
  margin: 0 0 0.5em;
}

.soledit-content .soledit-faq-a p:last-child {
  margin-bottom: 0;
}

/* FAQ section heading (e.g. "سوالات متداول") spacing */
.soledit-content .soledit-faq-section {
  margin-top: 1.5em;
}

/* v2 FAQ block (BEM classes) — light mode accordion */
.soledit-content .soledit-faq__item {
  margin-block-end: 0.5em;
  border-radius: 6px;
  background: var(--soledit-faq-bg, #fff);
  border: 1px solid var(--soledit-faq-border, #e1d8ca);
}

.soledit-content .soledit-faq__item:last-child {
  margin-block-end: 0;
}

.soledit-content .soledit-faq__question {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  cursor: pointer;
  padding: 0.75rem 1rem;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.soledit-content .soledit-faq__question::-webkit-details-marker {
  display: none;
}

.soledit-content .soledit-faq__question::after {
  content: '\25BC';
  font-size: 0.6em;
  flex-shrink: 0;
  margin-block-start: 0.35em;
  margin-inline-start: auto;
  transition: transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .soledit-content .soledit-faq__question::after {
    transition: none;
  }
}

.soledit-content .soledit-faq__item[open] .soledit-faq__question::after {
  transform: rotate(180deg);
}

.soledit-content .soledit-faq__question:focus-visible {
  outline: 2px solid #167767;
  outline-offset: 2px;
}

.soledit-content .soledit-faq__answer {
  padding: 0 1rem 1rem;
  color: #4b5563;
  line-height: 1.7;
}

.soledit-content .soledit-faq__answer p {
  margin: 0 0 0.5em;
}

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

/* Hero: section heading + subtitle; optional background image */
.soledit-content .soledit-hero {
  margin: 1.5em 0;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  background: #f4efe6;
  border: 1px solid #e1d8ca;
  text-align: center;
}

.soledit-content .soledit-hero[data-background-url] {
  background-color: rgba(17, 24, 39, 0.6);
  background-size: cover;
  background-position: center;
  border-color: transparent;
}

.soledit-content .soledit-hero[data-background-url] h1,
.soledit-content .soledit-hero[data-background-url] h2,
.soledit-content .soledit-hero[data-background-url] h3,
.soledit-content .soledit-hero[data-background-url] p {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.soledit-content .soledit-hero h1,
.soledit-content .soledit-hero h2,
.soledit-content .soledit-hero h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.5rem;
}

.soledit-content .soledit-hero h1 { font-size: 1.75rem; }

.soledit-content .soledit-hero p {
  margin: 0;
  font-size: 1rem;
  color: #4b5563;
  max-width: 40ch;
  margin-inline: auto;
}

/* CTA: link as button; variants primary, secondary, outline.
 * SSG outputs data-variant on the wrapper .soledit-cta, so we target the button by wrapper. */
.soledit-content .soledit-cta {
  margin: 1.25em 0;
}

.soledit-content .soledit-cta .soledit-cta-button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  background: #167767;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.soledit-content .soledit-cta .soledit-cta-button:hover,
.soledit-content .soledit-cta .soledit-cta-button:focus-visible {
  background: #0f5f53;
  color: #fff;
}

/* Support data-variant on wrapper (current SSG) or on button */
.soledit-content .soledit-cta[data-variant="secondary"] .soledit-cta-button,
.soledit-content .soledit-cta-button[data-variant="secondary"] {
  background: #e5e7eb;
  color: #374151;
}

.soledit-content .soledit-cta[data-variant="secondary"] .soledit-cta-button:hover,
.soledit-content .soledit-cta-button[data-variant="secondary"]:hover {
  background: #d1d5db;
  color: #1f2937;
}

.soledit-content .soledit-cta[data-variant="outline"] .soledit-cta-button,
.soledit-content .soledit-cta-button[data-variant="outline"] {
  background: transparent;
  color: #0f5f53;
  border-color: #167767;
}

.soledit-content .soledit-cta[data-variant="outline"] .soledit-cta-button:hover,
.soledit-content .soledit-cta-button[data-variant="outline"]:hover {
  background: #dff1ed;
  border-color: #0f5f53;
  color: #0c443f;
}

.soledit-content .soledit-spacer {
  display: block;
  width: 100%;
  min-height: 40px; /* default fallback; actual height comes from inline style (editor/SSG output style="height: …px") */
}

.soledit-content .soledit-video-embed {
  margin: 1.5em 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.soledit-content .soledit-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.soledit-content .soledit-image-figure {
  margin: 1.75em 0;
}

.soledit-content .soledit-image-figure img {
  display: block;
  margin: 0;
}

.soledit-content .soledit-image-caption {
  margin-top: 0.6em;
  padding-inline-start: 0.25em;
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}

/* Condition page heroes: row layout lives in input.css → layout.css (.condition-hero-ctas). Reset margins so global .soledit-cta doesn’t stack CTAs vertically. */
.condition-hero-ctas .soledit-cta {
  margin: 0;
}
.condition-hero-articles-link {
  margin-top: 1rem;
  font-size: 0.9375rem;
}
.condition-hero-articles-link a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.condition-hero-articles-link a:hover {
  color: #fff;
}

/* Shared CTA styles: same look in posts (.soledit-content) and on .mjs pages. Unscoped so CTAs are never underlined or styled as prose links. */
.soledit-cta {
  margin: 1.25em 0;
}
.soledit-cta .soledit-cta-button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  background: #167767;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.soledit-cta .soledit-cta-button:hover,
.soledit-cta .soledit-cta-button:focus-visible {
  background: #0f5f53;
  color: #fff;
}
.soledit-cta[data-variant="secondary"] .soledit-cta-button,
.soledit-cta-button[data-variant="secondary"] {
  background: #e5e7eb;
  color: #374151;
}
.soledit-cta[data-variant="secondary"] .soledit-cta-button:hover,
.soledit-cta-button[data-variant="secondary"]:hover {
  background: #d1d5db;
  color: #1f2937;
}
.soledit-cta[data-variant="outline"] .soledit-cta-button,
.soledit-cta-button[data-variant="outline"] {
  background: transparent;
  color: #0f5f53;
  border-color: #167767;
}
.soledit-cta[data-variant="outline"] .soledit-cta-button:hover,
.soledit-cta-button[data-variant="outline"]:hover {
  background: #dff1ed;
  border-color: #0f5f53;
  color: #0c443f;
}

/* =============================================================================
   v2 block sections inside article bodies
   Sections are landing-page "bands" by default (paddingY: md = 3rem per side).
   Inside a reading column that's excessive — tighten so blocks flow like a document.
   ============================================================================= */
.soledit-content[data-doc-type='post'] .soledit-doc-body .soledit-section {
  --soledit-section-py-sm: 0.75rem;
  --soledit-section-py-md: 1.25rem;
  --soledit-section-py-lg: 2rem;
}

/* ctaBanner primary button: use brand teal in article context (not marketing-root) */
.soledit-content .soledit-cta-button--primary {
  background: #167767;
  border-color: #167767;
  color: #fff;
}
.soledit-content .soledit-cta-button--primary:hover {
  background: #0f5f53;
  border-color: #0f5f53;
  color: #fff;
}

/* CTA banner in article body — invert gradient surface so it pops out of the article flow */
.soledit-content .soledit-cta-banner--tone-default {
  background: linear-gradient(135deg, #0f3f3a 0%, #16675d 58%, #5d6f79 100%);
  --soledit-cta-banner-fg: #f0faf8;
  border: none;
}
/* Beat the article h3 specificity (0,3,1) so heading text is white on the dark gradient */
.soledit-content .soledit-cta-banner--tone-default h3.soledit-cta-banner__heading {
  color: #fff;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  font-weight: 700;
}
/* White pill button with teal text — stands out on the dark gradient */
.soledit-content .soledit-cta-banner--tone-default .soledit-cta-button--primary {
  background: #fff;
  border-color: #fff;
  color: #0f5f53;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
}
.soledit-content .soledit-cta-banner--tone-default .soledit-cta-button--primary:hover {
  background: #dff1ed;
  border-color: #dff1ed;
  color: #0c443f;
}

/* =============================================================================
   Dark theme — `class="dark"` on <html> (theme script + Tailwind darkMode: class)
   ============================================================================= */

html.dark .soledit-content {
  color: #d1d5db;
}

html.dark .soledit-content[data-doc-type='post'] h1,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow h1,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default h1,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide h1 {
  color: #f9fafb;
}

html.dark .soledit-content .article-title {
  color: #f9fafb;
}

html.dark .soledit-content[data-doc-type='post'] h2,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow h2,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default h2,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide h2,
html.dark .soledit-content[data-doc-type='post'] h3,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow h3,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default h3,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide h3 {
  color: #e5e7eb;
}

html.dark .soledit-content .article-excerpt {
  color: #9ca3af;
}

html.dark .soledit-content .article-meta {
  background: #17211f;
  border-color: #32433f;
  color: #d1d5db;
}

html.dark .soledit-content .article-meta__date,
html.dark .soledit-content .article-meta__author,
html.dark .soledit-content .article-meta__taxonomies,
html.dark .soledit-content .article-meta__tags {
  color: #9ca3af;
}

html.dark .soledit-content .article-meta__category,
html.dark .soledit-content .article-meta__series {
  color: #e5e7eb;
}

html.dark .soledit-content .article-meta__link {
  color: #7dd6c4;
}

html.dark .soledit-content .article-meta__link:hover {
  color: #a1e4d7;
}

html.dark .soledit-content[data-doc-type='post'] a,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow a,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default a,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide a {
  color: #7dd6c4;
}

html.dark .soledit-content[data-doc-type='post'] a:hover,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow a:hover,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default a:hover,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide a:hover {
  color: #a1e4d7;
}

html.dark .soledit-content[data-doc-type='post'] blockquote,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow blockquote,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default blockquote,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide blockquote {
  border-inline-start-color: #5bbfad;
  background: #12302b;
  color: #cbd5e1;
}

html.dark .soledit-content[data-doc-type='post'] hr,
html.dark .soledit-content[data-doc-type='page'].content-wrap-narrow hr,
html.dark .soledit-content[data-doc-type='page'].content-wrap-default hr,
html.dark .soledit-content[data-doc-type='page'].content-wrap-wide hr {
  border-top-color: #374151;
}

html.dark .soledit-content .soledit-image-caption {
  color: #9ca3af;
}

/* Callouts — dark surfaces */
html.dark .soledit-content .soledit-callout {
  background: #143d37;
  color: #a1e4d7;
  border-left-color: #5bbfad;
}

html.dark .soledit-content .soledit-callout[data-callout-type='warning'] {
  background: #422006;
  color: #fde68a;
  border-left-color: #d97706;
}

html.dark .soledit-content .soledit-callout[data-callout-type='success'] {
  background: #052e16;
  color: #a7f3d0;
  border-left-color: #059669;
}

html.dark .soledit-content .soledit-callout[data-callout-type='error'] {
  background: #450a0a;
  color: #fecaca;
  border-left-color: #dc2626;
}

html[dir='rtl'].dark .soledit-content .soledit-callout {
  border-left: none;
  border-right: 4px solid #5bbfad;
}

html[dir='rtl'].dark .soledit-content .soledit-callout[data-callout-type='warning'] {
  border-right-color: #d97706;
}

html[dir='rtl'].dark .soledit-content .soledit-callout[data-callout-type='success'] {
  border-right-color: #059669;
}

html[dir='rtl'].dark .soledit-content .soledit-callout[data-callout-type='error'] {
  border-right-color: #dc2626;
}

/* CTA buttons in content */
html.dark .soledit-content .soledit-cta[data-variant='secondary'] .soledit-cta-button,
html.dark .soledit-content .soledit-cta-button[data-variant='secondary'] {
  background: #374151;
  color: #e5e7eb;
}

html.dark .soledit-content .soledit-cta[data-variant='secondary'] .soledit-cta-button:hover,
html.dark .soledit-content .soledit-cta-button[data-variant='secondary']:hover {
  background: #4b5563;
  color: #f9fafb;
}

html.dark .soledit-content .soledit-cta[data-variant='outline'] .soledit-cta-button,
html.dark .soledit-content .soledit-cta-button[data-variant='outline'] {
  color: #7dd6c4;
  border-color: #7dd6c4;
}

html.dark .soledit-content .soledit-cta[data-variant='outline'] .soledit-cta-button:hover,
html.dark .soledit-content .soledit-cta-button[data-variant='outline']:hover {
  background: #143d37;
  border-color: #a1e4d7;
  color: #d6fff6;
}

html.dark .soledit-cta[data-variant='secondary'] .soledit-cta-button,
html.dark .soledit-cta-button[data-variant='secondary'] {
  background: #374151;
  color: #e5e7eb;
}

html.dark .soledit-cta[data-variant='secondary'] .soledit-cta-button:hover,
html.dark .soledit-cta-button[data-variant='secondary']:hover {
  background: #4b5563;
  color: #f9fafb;
}

html.dark .soledit-cta[data-variant='outline'] .soledit-cta-button,
html.dark .soledit-cta-button[data-variant='outline'] {
  color: #7dd6c4;
  border-color: #7dd6c4;
}

html.dark .soledit-cta[data-variant='outline'] .soledit-cta-button:hover,
html.dark .soledit-cta-button[data-variant='outline']:hover {
  background: #143d37;
  border-color: #a1e4d7;
  color: #d6fff6;
}


/*
 * Inline photos (not CSS background heroes): dim slightly on dark chrome.
 * Include `.soledit-doc-body img` — CMS preview often has no <main>, only the doc body shell.
 * `main img` covers built site + article lists; strength is a bit more than 0.93 so it reads vs hero overlay tweaks.
 */
html.dark main img,
html.dark .soledit-doc-body img,
html.dark .articles-list-page img {
  filter: brightness(0.84) saturate(0.92);
}

html.dark .soledit-content .soledit-faq {
  background: #17211f;
  border-color: #32433f;
}

html.dark .soledit-content .soledit-faq-item {
  background: #101716;
  border-color: #32433f;
}

html.dark .soledit-content .soledit-faq-q {
  color: #e5e7eb;
}

html.dark .soledit-content .soledit-faq-a {
  color: #cbd5e1;
}

/* v2 FAQ block (BEM classes) — dark mode */
html.dark .soledit-content .soledit-faq__item {
  --soledit-faq-bg: #101716;
  --soledit-faq-border: #32433f;
  --soledit-faq-border-inner: #1e3530;
}
html.dark .soledit-content .soledit-faq__question {
  color: #e5e7eb;
}
html.dark .soledit-content .soledit-faq__answer {
  color: #cbd5e1;
}

html.dark .soledit-content .soledit-hero {
  background: #17211f;
  border-color: #32433f;
}

html.dark .soledit-content .soledit-hero[data-background-url] {
  background-color: rgba(15, 23, 42, 0.75);
}

/* ctaBanner primary button — dark mode: lighter teal so it reads on dark bg */
html.dark .soledit-content .soledit-cta-button--primary {
  background: #1d9e87;
  border-color: #1d9e87;
  color: #fff;
}
html.dark .soledit-content .soledit-cta-button--primary:hover {
  background: #167767;
  border-color: #167767;
}

/* CTA banner — dark mode: deepen the gradient to separate from dark page background */
html.dark .soledit-content .soledit-cta-banner--tone-default {
  background: linear-gradient(135deg, #082016 0%, #0f3f3a 58%, #3a3246 100%);
  --soledit-cta-banner-fg: #d6f4ec;
  border: 1px solid #1a3d35;
}

