/* ============================================================
   SPIRILIGIOUS — SHARED ARTICLE OVERRIDES
   One responsive style system for every article.
   Load AFTER article-theme.css.
   New articles inherit this styling automatically.
   ============================================================ */

/* Shared palette: warm ivory, sacred saffron, deep maroon */
body[class*="slug-"] {
  --art-title-color: #782b32;
  --art-h2-color: #812f36;
  --art-h3-color: #986638;
  --art-body-color: #453a33;
  --art-summary-color: #766458;

  --art-sanskrit-color: #80551e;
  --art-sanskrit-bg: #fbf3e3;
  --art-sanskrit-border: #e5d0a4;
  --art-sanskrit-mark-color: #b88745;

  --art-quote-color: #68463d;
  --art-quote-border: #c49a55;
  --art-quote-mark-color: #b88745;
  --art-quote-cite-color: #68463d;

  --art-h2-rule-color: #c49a55;
  --art-cat-color: #a87535;
  --art-breadcrumb-color: #766458;
  --art-dropcap-color: #b88745;
  --art-list-marker-color: #b88745;
  --art-para-spacing: 1.35rem;

  background:
    radial-gradient(ellipse at 50% 0%, rgba(190, 139, 56, 0.09), transparent 36rem),
    #fbf8f1;
}

/* Main article title */
body[class*="slug-"] .ed-article__title {
  color: var(--art-title-color, #782b32);
  max-width: 940px;
  margin-inline: auto;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* Consistent, centered reading column */
body[class*="slug-"] .ed-article__body {
  box-sizing: border-box;
  width: min(100%, 790px);
  max-width: 790px;
  margin-inline: auto;
  color: var(--art-body-color, #453a33);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  line-height: 1.9;
  letter-spacing: 0.002em;
  overflow-wrap: break-word;
}

/* Paragraphs */
body[class*="slug-"] .ed-article__body p {
  margin: 0 0 var(--art-para-spacing, 1.35rem);
  color: inherit;
  line-height: inherit;
  text-align: left;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Headings use fluid sizing and consistent spacing */
body[class*="slug-"] .ed-article__body h2 {
  position: relative;
  margin: 2.5em 0 0.95em;
  padding: 0 0 0.65em;
  color: var(--art-h2-color, #812f36);
  font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.75rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(184, 135, 50, 0.32);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

body[class*="slug-"] .ed-article__body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, #8a2633, #c49a55, #e0c783);
}

body[class*="slug-"] .ed-article__body h3 {
  margin: 1.8em 0 0.65em;
  color: var(--art-h3-color, #986638);
  font-size: clamp(1.08rem, 1rem + 0.25vw, 1.2rem);
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Scripture / quote panels: works with ordinary blockquotes */
body[class*="slug-"] .ed-article__body blockquote,
body[class*="slug-"] .ed-article__body .ed-sanskrit {
  box-sizing: border-box;
  margin: 1.5em 0 1.7em;
  padding: 1.2em 1.25em;
  color: var(--art-sanskrit-color, #80551e);
  background: linear-gradient(135deg, #fffaf0, #f5ead6);
  border: 1px solid var(--art-sanskrit-border, #e5d0a4);
  border-left: 3px solid var(--art-quote-border, #c49a55);
  border-radius: 4px 12px 12px 4px;
  font-family: "Noto Serif Devanagari", "Nirmala UI", Georgia, serif;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.12rem);
  font-weight: 500;
  line-height: 2;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 18px rgba(87, 52, 23, 0.045);
}

body[class*="slug-"] .ed-article__body blockquote::before {
  content: "✦";
  display: block;
  margin: 0 auto 0.6em;
  color: var(--art-quote-mark-color, #b88745);
  font-size: 0.82rem;
  line-height: 1;
}

/* Avoid extra paragraph margins inside verse / quote panels */
body[class*="slug-"] .ed-article__body blockquote p,
body[class*="slug-"] .ed-article__body .ed-sanskrit p {
  margin-bottom: 0.5em;
}

/* Lists */
body[class*="slug-"] .ed-article__body ul,
body[class*="slug-"] .ed-article__body ol {
  margin: 1em 0 1.5em;
  padding-left: 1.5em;
}

body[class*="slug-"] .ed-article__body li {
  margin-bottom: 0.55em;
  color: inherit;
  line-height: 1.8;
  padding-left: 0.15em;
}

body[class*="slug-"] .ed-article__body li::marker {
  color: var(--art-list-marker-color, #b88745);
  font-weight: 700;
}

/* Emphasis and links */
body[class*="slug-"] .ed-article__body strong,
body[class*="slug-"] .ed-article__body b {
  color: var(--art-h2-color, #812f36);
  font-weight: 700;
}

body[class*="slug-"] .ed-article__body em {
  color: #79572e;
}

body[class*="slug-"] .ed-article__body a {
  color: #8b572c;
  text-decoration-color: rgba(139, 87, 44, 0.45);
  text-underline-offset: 3px;
}

body[class*="slug-"] .ed-article__body a:hover {
  color: #782b32;
}

/* Images and tables stay within the reading column */
body[class*="slug-"] .ed-article__body img,
body[class*="slug-"] .ed-article__body video,
body[class*="slug-"] .ed-article__body iframe {
  max-width: 100%;
}

body[class*="slug-"] .ed-article__body img {
  display: block;
  height: auto;
  margin: 1.5em auto;
  border-radius: 10px;
}

body[class*="slug-"] .ed-article__body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

/* Takeaways panel */
body[class*="slug-"] .ed-takeaways {
  box-sizing: border-box;
  width: min(100%, 790px);
  max-width: 790px;
  margin: 2.5em auto 2em;
  padding: 1.35em 1.45em;
  color: var(--art-body-color, #453a33);
  background: linear-gradient(135deg, #fffaf0, #f3e8d3);
  border: 1px solid rgba(172, 126, 55, 0.3);
  border-top: 3px solid #8b2935;
  border-radius: 5px 5px 12px 12px;
  line-height: 1.85;
  box-shadow: 0 8px 24px rgba(85, 48, 30, 0.045);
}

body[class*="slug-"] .ed-takeaways h2,
body[class*="slug-"] .ed-takeaways h3 {
  color: var(--art-title-color, #782b32);
}

/* Small screens */
@media (max-width: 640px) {
  body[class*="slug-"] .ed-article__body {
    width: 100%;
    font-size: 1rem;
    line-height: 1.85;
  }

  body[class*="slug-"] .ed-article__body p {
    margin-bottom: 1.15rem;
  }

  body[class*="slug-"] .ed-article__body h2 {
    margin-top: 2.1em;
    margin-bottom: 0.8em;
    font-size: 1.3rem;
  }

  body[class*="slug-"] .ed-article__body h3 {
    margin-top: 1.5em;
    font-size: 1.08rem;
  }

  body[class*="slug-"] .ed-article__body blockquote,
  body[class*="slug-"] .ed-article__body .ed-sanskrit {
    margin: 1.2em 0 1.4em;
    padding: 1em 0.85em;
    font-size: 0.98rem;
    line-height: 1.9;
  }

  body[class*="slug-"] .ed-takeaways {
    padding: 1.1em;
  }
}
/* ============================================================
   YOUTUBE EMBEDS
   Long-form videos: 16:9. Shorts: 9:16 (auto-detected from URL).
   Force a specific shape by passing { short: true|false } in the
   video() helper. Works anywhere inside .ed-article__body.
   ============================================================ */

body[class*="slug-"] .ed-article__body .ed-video {
  box-sizing: border-box;
  margin: 2rem auto;
  padding: 0;
  max-width: 100%;
}

body[class*="slug-"] .ed-article__body .ed-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(130, 66, 18, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

body[class*="slug-"] .ed-article__body .ed-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Vertical Shorts */
body[class*="slug-"] .ed-article__body .ed-video--short {
  max-width: 380px;
}

body[class*="slug-"] .ed-article__body .ed-video--short .ed-video__frame {
  aspect-ratio: 9 / 16;
}

/* Caption */
body[class*="slug-"] .ed-article__body .ed-video__caption {
  margin: 0.7rem 0 0;
  font-family: var(
    --ed-sans,
    "Inter",
    system-ui,
    -apple-system,
    sans-serif
  );
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  font-style: italic;
  color: var(--art-body-color, #493326);
  opacity: 0.78;
}

@media (max-width: 640px) {
  body[class*="slug-"] .ed-article__body .ed-video {
    margin: 1.5rem auto;
  }
  body[class*="slug-"] .ed-article__body .ed-video--short {
    max-width: 100%;
  }
  body[class*="slug-"] .ed-article__body .ed-video__frame {
    border-radius: 10px;
  }
}