/* Article content: shared by the site (.opa-prose) and the block editor (.editor-styles-wrapper).
   Numbers follow the brief: body 18-19px / 1.65, paragraphs 24px apart, H2 64px above / 24px below,
   captions 14px / 1.4, left aligned (never justify). */

:root {
  --opa-ink: #2c2c2e;
  --opa-night: #14112c;
  --opa-accent: #8478c8;
  --opa-accent-deep: #5b4fb3;
  --opa-lav: #eae7fc;
  --opa-lav-soft: #f6f4fe;
  --opa-lav-mid: #dad3fc;
  --opa-muted: #6b6b73;
  --opa-line: #e6e4ee;
  --opa-paper: #ffffff;
  --opa-display: "Unbounded", "Arial Black", Arial, sans-serif;
  --opa-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --opa-radius: 16px;
}

:where(.opa-prose, .editor-styles-wrapper) {
  color: var(--opa-ink);
  font-family: var(--opa-body);
  font-size: clamp(18px, 17px + 0.2vw, 19px);
  line-height: 1.65;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  hyphens: manual;
  overflow-wrap: break-word;
}
.editor-styles-wrapper .is-root-container,
.editor-styles-wrapper .wp-block-post-content { max-width: 680px; margin-inline: auto; }

/* Rhythm */
:where(.opa-prose, .editor-styles-wrapper) :where(p, ul, ol, table, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery) { margin: 0 0 24px; }
:where(.opa-prose, .editor-styles-wrapper) :where(p) { text-align: left; }
:where(.opa-prose) > :first-child { margin-top: 0; }

:where(.opa-prose, .editor-styles-wrapper) h2 {
  font-family: var(--opa-display); font-weight: 600; color: var(--opa-night);
  font-size: clamp(24px, 18px + 1.2vw, 32px); line-height: 1.2; letter-spacing: -0.005em;
  margin: 64px 0 24px; scroll-margin-top: 24px;
}
:where(.opa-prose, .editor-styles-wrapper) h3 {
  font-family: var(--opa-body); font-weight: 700; color: var(--opa-night);
  font-size: clamp(20px, 18px + 0.4vw, 22px); line-height: 1.3; margin: 40px 0 16px; scroll-margin-top: 24px;
}
:where(.opa-prose, .editor-styles-wrapper) h4 {
  font-family: var(--opa-body); font-weight: 700; color: var(--opa-night); font-size: 19px; line-height: 1.4; margin: 32px 0 12px;
}
:where(.opa-prose, .editor-styles-wrapper) :is(h2, h3, h4) + :is(p, ul, ol) { margin-top: 0; }

/* Links */
:where(.opa-prose, .editor-styles-wrapper) a:not(.wp-element-button):not(.opa-btn) {
  color: var(--opa-accent-deep);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--opa-accent-deep) 45%, transparent);
  transition: color .15s ease, text-decoration-color .15s ease;
}
:where(.opa-prose, .editor-styles-wrapper) a:not(.wp-element-button):not(.opa-btn):hover { color: var(--opa-night); text-decoration-color: currentColor; }

/* Lists */
:where(.opa-prose, .editor-styles-wrapper) :where(ul, ol) { padding-left: 1.3em; }
:where(.opa-prose, .editor-styles-wrapper) li { margin: 0 0 10px; padding-left: .2em; }
:where(.opa-prose, .editor-styles-wrapper) li::marker { color: var(--opa-accent); font-weight: 600; }
:where(.opa-prose, .editor-styles-wrapper) li > :where(ul, ol) { margin: 10px 0 0; }
:where(.opa-prose, .editor-styles-wrapper) strong { font-weight: 600; color: var(--opa-night); }

/* Images + captions (ArticleImage / ImageCaption) */
:where(.opa-prose, .editor-styles-wrapper) :where(.wp-block-image, figure) { margin-block: 40px; }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-image img { border-radius: 12px; height: auto; max-width: 100%; display: block; }
:where(.opa-prose, .editor-styles-wrapper) :where(figcaption, .wp-element-caption) {
  font-size: 14px; line-height: 1.4; color: var(--opa-muted); margin: 10px 0 0; text-align: left;
}

/* QuoteBlock: light lavender, quotes mark, author below */
:where(.opa-prose, .editor-styles-wrapper) .wp-block-quote {
  position: relative; margin: 48px 0; padding: 28px 32px 28px 76px;
  background: var(--opa-lav); border: 0; border-radius: var(--opa-radius);
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-quote::before {
  content: "«"; position: absolute; left: 26px; top: 14px;
  font-family: var(--opa-display); font-weight: 600; font-size: 52px; line-height: 1; color: var(--opa-accent);
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-quote p {
  font-size: clamp(19px, 18px + 0.3vw, 21px); line-height: 1.5; font-weight: 500; color: var(--opa-night); margin: 0 0 12px;
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-quote cite {
  display: block; font-style: normal; font-size: 14px; line-height: 1.4; color: var(--opa-muted); margin-top: 14px;
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-quote cite::before { content: "— "; }

/* InfoBlock */
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-info {
  margin: 40px 0; padding: 20px 24px; background: var(--opa-lav-soft);
  border-left: 3px solid var(--opa-accent); border-radius: 0 12px 12px 0;
}
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-info > * { margin-bottom: 8px; }
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-info > :last-child { margin-bottom: 0; }
:where(.opa-prose, .editor-styles-wrapper) .opa-info__label {
  font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--opa-accent-deep);
}

/* FAQ */
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-faq { margin: 64px 0 40px; }
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-faq > h2 { margin-top: 0; }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details {
  margin: 0 0 12px; padding: 0; border: 1px solid var(--opa-line); border-radius: 12px; background: var(--opa-paper);
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 56px 18px 22px; font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--opa-night);
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details summary::-webkit-details-marker { display: none; }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 14px no-repeat;
  transition: transform .2s ease;
}
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details[open] summary::after { transform: rotate(45deg); }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-details > :not(summary) { margin: 0 22px 18px; font-size: 17px; }

/* ProductCTA (inline pattern) */
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-cta {
  margin: 48px 0; padding: 32px; background: var(--opa-lav); border-radius: 20px;
}
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-cta h3 {
  font-family: var(--opa-display); font-weight: 600; font-size: clamp(19px, 17px + .5vw, 22px); line-height: 1.25; margin: 0 0 12px;
}
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-cta p { margin-bottom: 20px; }
:where(.opa-prose, .editor-styles-wrapper) .is-style-opa-cta .wp-block-buttons { margin: 0; }

/* Buttons */
.opa-prose a.wp-block-button__link, .editor-styles-wrapper a.wp-block-button__link, :where(.opa-prose, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 13px 24px;
  background: var(--opa-night); color: #fff; font-family: var(--opa-body); font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; transition: background-color .15s ease;
}
.opa-prose a.wp-block-button__link:hover, .editor-styles-wrapper a.wp-block-button__link:hover { background: var(--opa-accent-deep); color: #fff; }

/* Separator, tables, embeds */
:where(.opa-prose, .editor-styles-wrapper) .wp-block-separator { border: 0; border-top: 1px solid var(--opa-line); margin: 56px 0; opacity: 1; }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-table { overflow-x: auto; }
:where(.opa-prose, .editor-styles-wrapper) table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
:where(.opa-prose, .editor-styles-wrapper) :where(th, td) { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--opa-line); vertical-align: top; }
:where(.opa-prose, .editor-styles-wrapper) th { font-weight: 600; color: var(--opa-night); }
:where(.opa-prose, .editor-styles-wrapper) .wp-block-embed iframe { max-width: 100%; border-radius: 12px; }

/* In-content course card */
.opa-inline-course { margin: 48px 0; }

@media (max-width: 759px) {
  :where(.opa-prose, .editor-styles-wrapper) h2 { margin-top: 48px; }
  :where(.opa-prose, .editor-styles-wrapper) .wp-block-quote { padding: 56px 22px 22px; }
  :where(.opa-prose, .editor-styles-wrapper) .wp-block-quote::before { left: 20px; top: 10px; }
  :where(.opa-prose, .editor-styles-wrapper) .is-style-opa-cta { padding: 24px 20px; }
}
