/*
 * WYSIWYG scope — base styles for rich-text content rendered by ACF
 * wysiwyg fields (paragraph block, toggle block body, etc.).
 *
 * Reset TinyMCE defaults to the project's typography and palette while
 * inheriting font-size / color / alignment from the parent (set via
 * Tailwind utilities in the block template).
 */

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

.wysiwyg p {
  margin-bottom: 1em;
}
.wysiwyg p:last-child {
  margin-bottom: 0;
}

.wysiwyg a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.wysiwyg a:hover {
  color: var(--color-secondary);
}

.wysiwyg strong,
.wysiwyg b {
  font-weight: 700;
}

.wysiwyg em,
.wysiwyg i {
  font-style: italic;
}

.wysiwyg u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wysiwyg ul,
.wysiwyg ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}
.wysiwyg ul:last-child,
.wysiwyg ol:last-child {
  margin-bottom: 0;
}

.wysiwyg ul {
  list-style: disc;
}
.wysiwyg ol {
  list-style: decimal;
}

.wysiwyg li {
  margin-bottom: 0.25em;
}
.wysiwyg li > ul,
.wysiwyg li > ol {
  margin-bottom: 0;
  margin-top: 0.25em;
}

.wysiwyg blockquote {
  border-left: 3px solid var(--color-primary);
  color: var(--color-text);
  font-style: italic;
  margin: 1em 0;
  padding: 0.25em 0 0.25em 1em;
}

.wysiwyg code {
  background-color: var(--color-quartz-20);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
}

.wysiwyg pre {
  background-color: var(--color-quartz-20);
  border-radius: 8px;
  margin-bottom: 1em;
  overflow-x: auto;
  padding: 1em;
}
.wysiwyg pre code {
  background: none;
  padding: 0;
}

.wysiwyg hr {
  background: none;
  border: 0;
  border-top: 1px solid var(--color-quartz-60);
  margin: 1.5em 0;
}

/* Inline <span> within headings: secondary typeface accent. */
h1 > span,
h2 > span,
h3 > span,
h4 > span,
h5 > span,
h6 > span {
  font-family: var(--font-secondary);
  font-style: italic;
  font-weight: 400;
}

