/*
 * Yoganatomy Core
 *
 * Consumes the design tokens emitted on :root by Cornerstone Globals >
 * Variables. Fallbacks after each var() keep this correct if the token layer
 * is missing or has not loaded yet.
 *
 * Selectors are doubled (.yn-callout .yn-callout__title) on purpose. The base
 * stylesheet uses .ya-article h3 and .ya-article p, which are two-class
 * specificity. A single class loses to them.
 */


/* ---------- Shared block rhythm ---------- */
/* Matches the mid-post capture blocks so every in-article block shares one
   vertical rhythm. */

.yn-embed,
.yn-callout {
  margin-block: var(--sp-block, 2.5rem);
  max-width: none;
}


/* ---------- Embeds ---------- */

.yn-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink, #1D1D1D);
  border: 1px solid var(--grey-line, #C9C9C1);
  border-radius: var(--r-sm, 4px);
  overflow: hidden;
}

.yn-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@supports not (aspect-ratio: 16 / 9) {
  .yn-embed {
    height: 0;
    padding-bottom: 56.25%;
  }
}

.yn-embed-error {
  padding: var(--sp-3, 0.75rem) var(--sp-4, 1rem);
  border-left: 4px solid var(--brand-red, #990000);
  background: var(--beige, #FEDBB2);
  font-family: Lato, sans-serif;
  font-size: var(--fs-sm, 0.9375rem);
}


/* ---------- Callouts ---------- */

.yn-callout {
  border-radius: var(--r-md, 6px);
}

.yn-callout .yn-callout__header {
  margin: 0;
}

.yn-callout .yn-callout__title {
  font-family: Sora, sans-serif;
  font-size: var(--fs-3, 1.5rem);
  font-weight: var(--fw-bold, 700);
  line-height: 1.3;
  color: var(--brand-red, #990000);
  margin: 0 0 var(--sp-3, 0.75rem);
  max-width: none;
}

.yn-callout .yn-callout__content p,
.yn-callout .yn-callout__content li {
  font-family: Lato, sans-serif;
  font-size: 1.0625rem;
  line-height: var(--lh-body, 1.6);
  margin: 0 0 var(--sp-4, 1rem);
  max-width: none;
}

.yn-callout .yn-callout__content ul,
.yn-callout .yn-callout__content ol {
  margin: 0 0 var(--sp-4, 1rem);
  padding-left: 1.25em;
}

.yn-callout .yn-callout__content > *:last-child {
  margin-bottom: 0;
}

.yn-callout .yn-callout__content a {
  color: var(--brand-red, #990000);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.yn-callout .yn-callout__content a:hover {
  color: var(--green-dark, #5B9232);
}

/* Conclusion: warm block. Same language as the mid-post capture. */

.yn-callout.post-conclusion {
  background: var(--beige, #FEDBB2);
  padding: 2rem 2.125rem;
}

/* Research: bordered card with the gold rule. Same language as the
   Tier A cross-sell block. */

.yn-callout.research-wrapper {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--grey-line, #C9C9C1);
  border-left: 4px solid var(--gold, #F7AC48);
  border-radius: 0 var(--r-md, 6px) var(--r-md, 6px) 0;
  padding: 1.5rem 1.75rem;
}


/* ---------- Mobile ---------- */
/* Most article traffic is mobile. Blocks lose the wide gutters and the heading
   steps down so it does not swamp a 375px column. */

@media (max-width: 600px) {
  .yn-embed,
  .yn-callout {
    margin-block: 2rem;
  }

  .yn-callout.post-conclusion,
  .yn-callout.research-wrapper {
    padding: 1.375rem;
  }

  .yn-callout .yn-callout__title {
    font-size: 1.25rem;
  }

  .yn-callout .yn-callout__content p,
  .yn-callout .yn-callout__content li {
    font-size: 0.9375rem;
    line-height: 1.55;
  }
}
