/* Classic Editor content styling — the theme forces the Classic
   Editor site-wide (see cement_force_classic_editor() in the parent
   theme's utilities/classic-editor.php) since most cement child themes
   render post_content as plain the_content() HTML, not Gutenberg block
   markup. Apply the .classic-content class to any wrapper around
   the_content() output (e.g. class="entry-content classic-content",
   or just class="classic-content" if there's no other wrapper class
   yet) to get sane default typography for every tag Classic Editor's
   TinyMCE can produce, using this theme's own tokens. */

.classic-content h1,
.classic-content h2,
.classic-content h3,
.classic-content h4,
.classic-content h5,
.classic-content h6 {
  margin: 1.25em 0 0.5em;
  font-family: var(--theme-font-heading);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.classic-content h1:first-child,
.classic-content h2:first-child,
.classic-content h3:first-child,
.classic-content h4:first-child,
.classic-content h5:first-child,
.classic-content h6:first-child {
  margin-top: 0;
}

.classic-content h1 {
  font-size: 2.25em;
}

.classic-content h2 {
  font-size: 1.75em;
}

.classic-content h3 {
  font-size: 1.4em;
}

.classic-content h4,
.classic-content h5,
.classic-content h6 {
  font-size: 1.1em;
}

.classic-content p,
.classic-content ul,
.classic-content ol,
.classic-content blockquote,
.classic-content table,
.classic-content figure,
.classic-content pre,
.classic-content dl {
  margin: 0 0 1em;
}

.classic-content > :last-child {
  margin-bottom: 0;
}

.classic-content ul,
.classic-content ol {
  padding-left: 1.25em;
}

.classic-content li {
  margin-bottom: 0.4em;
}

.classic-content li > ul,
.classic-content li > ol {
  margin-top: 0.4em;
}

.classic-content a {
  color: var(--theme-color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.3s var(--theme-ease-signature);
}

.classic-content a:hover {
  color: var(--theme-color-primary);
}

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

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

.classic-content small {
  font-size: 0.85em;
  color: var(--theme-color-text-muted);
}

.classic-content mark {
  background: color-mix(in srgb, var(--theme-color-accent) 25%, transparent);
  color: inherit;
}

.classic-content blockquote {
  padding-left: 1em;
  border-left: 1px solid var(--theme-color-border);
  font-style: italic;
  color: var(--theme-color-text-muted);
}

.classic-content blockquote p:last-child {
  margin-bottom: 0;
}

.classic-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--theme-radius-sm);
}

.classic-content figure {
  margin: 0 0 1em;
}

.classic-content figcaption {
  margin-top: 0.5em;
  font-size: 0.85em;
  color: var(--theme-color-text-muted);
}

.classic-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.classic-content th,
.classic-content td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--theme-color-border);
  text-align: left;
}

.classic-content th {
  font-weight: 700;
}

.classic-content dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25em 1em;
}

.classic-content dt {
  font-weight: 700;
}

.classic-content dd {
  margin: 0;
}

.classic-content code,
.classic-content kbd {
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--theme-color-surface);
  border-radius: var(--theme-radius-sm);
}

.classic-content pre {
  padding: 1em;
  overflow-x: auto;
  background: var(--theme-color-surface);
  border-radius: var(--theme-radius-md);
}

.classic-content pre code {
  padding: 0;
  background: none;
}

.classic-content hr {
  margin: 1.5em 0;
  border: none;
  border-top: 1px solid var(--theme-color-border);
}

/* Classic Editor's built-in alignment/caption classes. */
.classic-content .alignleft {
  float: left;
  margin: 0 1em 1em 0;
}

.classic-content .alignright {
  float: right;
  margin: 0 0 1em 1em;
}

.classic-content .aligncenter {
  display: block;
  margin: 0 auto 1em;
}

.classic-content .wp-caption {
  max-width: 100%;
}

.classic-content .wp-caption-text {
  margin-top: 0.5em;
  font-size: 0.85em;
  color: var(--theme-color-text-muted);
}
