/*
 * DERMAÉ – post content (Gutenberg core blocks).
 * The articles and legal pages are written in the block editor. Their styled pieces are
 * core/group blocks with the prototype's class names (art-list, art-steps, art-questions,
 * art-note, callout, art-compare, article__quote, legal__note, legal__todo, legal-features),
 * inserted from the "DERMAÉ" block patterns. dermae.css styles the prototype markup; this
 * file adapts it to the markup WordPress core blocks output.
 */

/* ── WordPress shell ─────────────────────────────────────────────────
   The prototype sets type on <html>; Hello Elementor's reset sets it on <body>. Re-assert. */
body { font-family: var(--font-text); background: var(--ivory); color: var(--ink); }

/* ── Article body rhythm ───────────────────────────────────────────── */
.article__body > .wp-block-heading { scroll-margin-top: 90px; }
.article__body > h2.wp-block-heading:not(:first-child) { margin-top: var(--space-5); }
.article__body > h2.wp-block-heading:first-child + p { font-size: 22px; line-height: 1.7; }
.article__body > .wp-block-group,
.article__body > .wp-block-image,
.article__body > .wp-block-table,
.article__body > .wp-block-quote { margin-block: 32px; }

/* Images */
.article__body .wp-block-image { margin-inline: 0; }
.article__body .wp-block-image img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article__body .wp-block-image figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-mute); text-align: start; }

/* Quote */
.article__body .wp-block-quote.article__quote { border-inline-start: 0; padding-inline: 0; }
.article__body .wp-block-quote.article__quote cite { display: block; margin-top: 12px; font-size: 14px; font-style: normal; color: var(--ink-mute); }

/* Steps: core ordered list → numbered path */
.art-steps .wp-block-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.art-steps .wp-block-list > li {
  position: relative; display: block; min-height: 52px; padding-inline-start: 68px; padding-bottom: 22px;
  counter-increment: step; font-size: 17px; line-height: 1.7; color: var(--ink-soft);
}
.art-steps .wp-block-list > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 0;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--forest); color: var(--sand); font-family: var(--font-latin); font-size: 19px;
}
.art-steps .wp-block-list > li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 25px; top: 52px; bottom: 4px; width: 1px; background: var(--rule); }
.art-steps .wp-block-list > li > strong { display: block; margin: 10px 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--ink); }
.art-steps .wp-block-list > li > br { display: none; }

/* Compare table: core table, first column as the row label */
.wp-block-table.art-compare { overflow-x: auto; }
.wp-block-table.art-compare table { width: 100%; min-width: 460px; border-collapse: collapse; }
.wp-block-table.art-compare td, .wp-block-table.art-compare th { border: 0; border-bottom: 1px solid var(--rule); }
.wp-block-table.art-compare tbody td:first-child { font-weight: 600; background: var(--ivory-deep); width: 42%; }

/* Warning box */
.callout > .wp-block-list { margin: 0 0 14px; padding-inline-start: 22px; }
.callout > p { margin: 0 0 10px; }

/* Timeline (model article a01) */
.day-light > .wp-block-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.day-light > .wp-block-list > li { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.day-light > .wp-block-list > li > strong { font-family: var(--font-latin); font-weight: 400; font-size: 22px; color: var(--ink); }
.article__body .day-light { margin: 28px 0; padding: 22px 0; border-block: 1px solid var(--rule); }

/* ── Legal documents ───────────────────────────────────────────────── */
.legal__body { counter-reset: legal; }
.legal__body > h2.wp-block-heading { counter-increment: legal; scroll-margin-top: 90px; }
.legal__body > h2.wp-block-heading:not(:first-child) { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.legal__body > h2.wp-block-heading::before { content: counter(legal, decimal-leading-zero); margin-inline-end: 14px; font-family: var(--font-latin); font-weight: 400; font-size: 0.72em; color: var(--clay); }
.legal__body > .wp-block-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.legal__body > .wp-block-list > li { position: relative; padding-inline-start: 26px; font-size: 18px; line-height: 1.7; }
.legal__body > .wp-block-list > li::before { content: ''; position: absolute; inset-inline-start: 4px; top: 0.72em; width: 7px; height: 7px; background: var(--clay); transform: rotate(45deg); }
.legal__body .legal__note { padding: 18px 20px; background: var(--ivory-deep); border: 1px solid var(--rule); }
.legal__body .legal__note p { margin: 0; font-size: 17px; line-height: 1.65; }
.legal__body .legal__todo { padding: 14px 16px; border: 1px dashed var(--clay); background: rgba(217, 197, 184, 0.22); }
.legal__body .legal__todo p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--clay-deep); }
.legal-features > .wp-block-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.legal-features > .wp-block-list > li { padding: 18px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.legal-features > .wp-block-list > li > strong { display: block; margin-bottom: 4px; font-size: 17px; color: var(--ink); }
.legal-features > .wp-block-list > li > br { display: none; }

@media (max-width: 767px) {
  .day-light > .wp-block-list { grid-template-columns: repeat(2, 1fr); }
  .legal-features > .wp-block-list { grid-template-columns: 1fr; }
  .art-steps .wp-block-list > li { padding-inline-start: 56px; }
  .art-steps .wp-block-list > li::before { width: 42px; height: 42px; font-size: 16px; }
  .art-steps .wp-block-list > li:not(:last-child)::after { inset-inline-start: 20px; top: 42px; }
}

/* Block editor canvas: keep the RTL reading measure */
.editor-styles-wrapper { direction: rtl; font-family: var(--font-text); background: var(--ivory); color: var(--ink); }
.editor-styles-wrapper .wp-block-post-content { max-width: 68ch; }
