/* ============================================================
   blog-prose.css — core-block prose inside .post__body
   blog-post.css owns the article shell and the elements the
   mockup already showed (h2, p, ul/li, strong, a, blockquote +
   cite). This file covers everything else a writer can insert
   from the block editor, in the same voice: Fraunces for the
   headings, Inter for the rest, gold hairlines, blue accents.
   ============================================================ */

/* ---------- Headings below h2 ---------- */
/* h2 is set in blog-post.css; the scale steps down from there.
   h3/h4 stay in the display face, h5/h6 drop to Inter so deep
   sub-levels read as labels rather than competing headlines. */
.post__body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.9vw, 1.4rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 1.9em;
}
.post__body h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: 1.7em;
}
.post__body h5 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: 1.6em;
}
.post__body h6 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 1.6em;
}
.post__body h3:first-child,
.post__body h4:first-child,
.post__body h5:first-child,
.post__body h6:first-child { margin-top: 0; }

/* ---------- Ordered lists (match the ul rhythm) ---------- */
.post__body ol {
  margin-left: 1.1rem;
  padding: 0;
}
.post__body ol li { margin-top: 0.5em; }
.post__body ol li::marker { color: var(--gold-deep); font-weight: 600; }
.post__body ul li::marker { color: var(--gold-deep); }
/* nested lists sit tighter than top-level ones */
.post__body li > ul,
.post__body li > ol { margin-top: 0.5em; }

/* ---------- Figures / images ---------- */
.post__body figure { margin: 0; }
.post__body .wp-block-image {
  margin-block: 1.8em;
}
.post__body .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.post__body figcaption,
.post__body .wp-block-image figcaption {
  margin-top: 0.7em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}
/* core's alignment helpers, kept inside the reading column */
.post__body .wp-block-image.aligncenter { margin-inline: auto; }
.post__body .wp-block-image.aligncenter figcaption { text-align: center; }

/* ---------- Tables ---------- */
/* The block's own wrapper scrolls, so a wide table never pushes
   the reading column sideways on a phone. */
.post__body .wp-block-table {
  margin-block: 1.9em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.post__body .wp-block-table table,
.post__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.55;
}
.post__body th,
.post__body td {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.post__body thead th {
  background: var(--paper-2);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.post__body .wp-block-table figcaption { text-align: left; }

/* ---------- Quotes ---------- */
/* The mockup's .post__quote look, applied to the native quote
   blocks a writer will actually insert. blog-post.css already
   styles bare blockquote; core's own block styles (text-align
   and a wider border) land at the same specificity, so these
   rules restate the design explicitly. */
.post__body .wp-block-quote,
.post__body blockquote.wp-block-quote {
  margin-block: 1.6em;
  padding: 0.4rem 0 0.4rem 1.4rem;
  border: 0;
  border-left: 3px solid var(--blue);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-style: normal;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: left;
}
.post__body .wp-block-quote p { margin: 0; }
.post__body .wp-block-quote p + p { margin-top: 0.8em; }
.post__body .wp-block-quote cite,
.post__body .wp-block-quote__citation {
  display: block;
  margin-top: 0.6em;
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
/* pull quote: the same voice, centred and set larger */
.post__body .wp-block-pullquote {
  margin-block: 2.2em;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.post__body .wp-block-pullquote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
.post__body .wp-block-pullquote cite {
  display: block;
  margin-top: 0.7em;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- Separator ---------- */
.post__body .wp-block-separator,
.post__body hr {
  margin-block: clamp(2.5rem, 5vw, 3.5rem);
  height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  opacity: 1;              /* core ships opacity on hr; the hairline token carries its own alpha */
}
.post__body .wp-block-separator.is-style-wide { max-width: none; }
.post__body .wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
  max-width: 6rem;
  margin-inline: auto;
}
.post__body .wp-block-separator.is-style-dots {
  border: 0;
  color: var(--gold-deep);
}

/* ---------- Links ---------- */
/* blog-post.css sets the resting state; this adds the hover and
   keeps links inside lists, tables and quotes consistent. */
.post__body a:hover { border-bottom-color: var(--blue); }
.post__body a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Code ---------- */
.post__body code,
.post__body kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.35em;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--ink);
}
.post__body .wp-block-code,
.post__body pre {
  margin-block: 1.8em;
  padding: 1.1rem 1.2rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre;
  tab-size: 2;
}
.post__body pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
}

/* ---------- Misc core blocks ---------- */
.post__body .wp-block-embed,
.post__body .wp-block-video { margin-block: 1.8em; }
.post__body .wp-block-embed__wrapper iframe,
.post__body iframe { max-width: 100%; }
.post__body .wp-block-buttons { margin-block: 1.8em; }
.post__body .wp-block-button__link {
  border-bottom: 0;
  border-radius: 8px;
}
