/*
 * DHV Experience 13.78.1 — Reader Body Rhythm Foundation.
 * Scope: long-form prose and in-article media rhythm only.
 * No Reader Journey, story continuity, reaction, commerce, ads,
 * conversation, article-opening or end-of-article behavior changes.
 */
:root {
  --dhvx-reader-prose: #2c2925;
  --dhvx-reader-prose-muted: #706b63;
  --dhvx-reader-prose-font: var(--dhvx-platform-ui-font, var(--dhv-sans));
  --dhvx-reader-stage: 692px;
}

/* Keep the measure calm and editorial. The Reader shell remains authoritative;
 * this slice only changes the reading lane inside it. */
.dhvx-reader__body {
  width: min(calc(100% - 72px), 64ch);
  color: var(--dhvx-reader-prose);
  font-size: 19px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

/* Long-form copy keeps the same native sans reading voice as the rest of the
 * platform; only display/story headlines use the editorial serif. */
.dhvx-reader__body > p,
.dhvx-reader__body > ul,
.dhvx-reader__body > ol,
.dhvx-reader__body > blockquote,
.dhvx-reader__body > blockquote p,
.dhvx-reader__body > .wp-block-quote,
.dhvx-reader__body > .wp-block-quote p {
  font-family: var(--dhvx-reader-prose-font);
}

.dhvx-reader__body > p {
  margin-bottom: 1.42em;
  text-wrap: pretty;
}

.dhvx-reader__body > p:first-child {
  font-size: 1.035em;
  line-height: 1.76;
}

.dhvx-reader__body h2,
.dhvx-reader__body h3,
.dhvx-reader__body h4 {
  font-family: var(--dhvx-platform-ui-font, var(--dhv-sans));
  color: var(--dhvx-text);
  text-wrap: balance;
}

.dhvx-reader__body h2 {
  max-width: 20em;
  margin: 2.18em 0 .72em;
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -.03em;
  font-weight: 800;
}

.dhvx-reader__body h3 {
  max-width: 24em;
  margin: 1.9em 0 .66em;
  font-size: 23px;
  line-height: 1.28;
  letter-spacing: -.02em;
  font-weight: 700;
}

.dhvx-reader__body h4 {
  margin: 1.7em 0 .58em;
  font-size: 18.5px;
  line-height: 1.35;
  letter-spacing: -.01em;
  font-weight: 700;
}

.dhvx-reader__body > ul,
.dhvx-reader__body > ol {
  margin: .15em 0 1.55em;
  padding-left: 1.3em;
}

.dhvx-reader__body > ul li,
.dhvx-reader__body > ol li {
  margin: .46em 0;
  padding-left: .14em;
}

.dhvx-reader__body blockquote,
.dhvx-reader__body .wp-block-quote {
  margin: 2.35em 0;
  padding: .1em 0 .1em 23px;
  border-left: 2px solid color-mix(in srgb, var(--dhvx-brand) 78%, transparent);
  color: #49443d;
  font-size: 1.1em;
  line-height: 1.7;
}

.dhvx-reader__body blockquote p,
.dhvx-reader__body .wp-block-quote p {
  margin-bottom: .8em;
}

.dhvx-reader__body blockquote p:last-child,
.dhvx-reader__body .wp-block-quote p:last-child {
  margin-bottom: 0;
}

.dhvx-reader__body hr {
  width: 58%;
  margin: 2.85em auto;
  border-top-color: color-mix(in srgb, var(--dhvx-border) 88%, transparent);
}

/* In-article photography is allowed to breathe to the Reader stage. The image
 * keeps intrinsic sizing, so smaller source assets are never forcibly enlarged. */
.dhvx-reader__body > figure:not(.alignleft):not(.alignright),
.dhvx-reader__body > .wp-block-image:not(.alignleft):not(.alignright),
.dhvx-reader__body > .wp-caption:not(.alignleft):not(.alignright) {
  width: min(var(--dhvx-reader-stage), calc(100vw - 48px));
  max-width: none;
  margin: 2.65em 0 2.8em 50%;
  transform: translateX(-50%);
}

.dhvx-reader__body > figure:not(.alignleft):not(.alignright) img,
.dhvx-reader__body > .wp-block-image:not(.alignleft):not(.alignright) img,
.dhvx-reader__body > .wp-caption:not(.alignleft):not(.alignright) img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.dhvx-reader__body figcaption,
.dhvx-reader__body .wp-caption-text {
  max-width: 64ch;
  margin: 10px 0 0;
  color: var(--dhvx-reader-prose-muted);
  font-family: var(--dhvx-platform-ui-font, var(--dhv-sans));
  font-size: 12.25px;
  line-height: 1.5;
  text-align: left;
}

/* Explicit WordPress wide/full media converges on the same stage instead of
 * spilling toward adjacent rails. */
.dhvx-reader__body figure.alignwide,
.dhvx-reader__body figure.alignfull,
.dhvx-reader__body .wp-block-image.alignwide,
.dhvx-reader__body .wp-block-image.alignfull,
.dhvx-reader__body .wp-block-gallery.alignwide,
.dhvx-reader__body .wp-block-gallery.alignfull,
.dhvx-reader__body .wp-block-embed.alignwide,
.dhvx-reader__body .wp-block-embed.alignfull {
  width: min(var(--dhvx-reader-stage), calc(100vw - 48px));
}

html[data-theme="dark"] {
  --dhvx-reader-prose: #ddd8cf;
  --dhvx-reader-prose-muted: #aaa49a;
}

html[data-theme="dark"] .dhvx-reader__body blockquote,
html[data-theme="dark"] .dhvx-reader__body .wp-block-quote {
  color: #ccc6bc;
}

@media (max-width: 767px) {
  .dhvx-reader__body {
    width: auto;
    margin-inline: 18px;
    font-size: 17.25px;
    line-height: 1.76;
  }
  .dhvx-reader__body > p { margin-bottom: 1.34em; }
  .dhvx-reader__body > p:first-child { font-size: 1.02em; line-height: 1.73; }
  .dhvx-reader__body h2 {
    margin-top: 1.95em;
    font-size: 25.5px;
    line-height: 1.23;
  }
  .dhvx-reader__body h3 {
    margin-top: 1.7em;
    font-size: 21px;
    line-height: 1.3;
  }
  .dhvx-reader__body h4 { margin-top: 1.55em; font-size: 18px; }
  .dhvx-reader__body blockquote,
  .dhvx-reader__body .wp-block-quote {
    margin: 1.95em 0;
    padding-left: 16px;
    font-size: 1.055em;
  }
  .dhvx-reader__body hr { width: 72%; margin: 2.35em auto; }
  .dhvx-reader__body > figure:not(.alignleft):not(.alignright),
  .dhvx-reader__body > .wp-block-image:not(.alignleft):not(.alignright),
  .dhvx-reader__body > .wp-caption:not(.alignleft):not(.alignright),
  .dhvx-reader__body figure.alignwide,
  .dhvx-reader__body figure.alignfull,
  .dhvx-reader__body .wp-block-image.alignwide,
  .dhvx-reader__body .wp-block-image.alignfull,
  .dhvx-reader__body .wp-block-gallery.alignwide,
  .dhvx-reader__body .wp-block-gallery.alignfull,
  .dhvx-reader__body .wp-block-embed.alignwide,
  .dhvx-reader__body .wp-block-embed.alignfull {
    width: auto;
    max-width: 100%;
    margin: 2.05em 0 2.2em;
    transform: none;
  }
  .dhvx-reader__body figcaption,
  .dhvx-reader__body .wp-caption-text {
    margin-top: 8px;
    font-size: 11.75px;
  }
}

@media (max-width: 359px) {
  .dhvx-reader__body { margin-inline: 14px; font-size: 17px; }
  .dhvx-reader__body h2 { font-size: 24px; }
  .dhvx-reader__body h3 { font-size: 20px; }
}

@media (max-width:920px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse) {
  .dhvx-site-app.is-reader .dhvx-reader__body {
    width: auto;
    margin-inline: 18px;
    font-size: 17px;
    line-height: 1.75;
  }
}

@media (forced-colors: active) {
  .dhvx-reader__body blockquote,
  .dhvx-reader__body .wp-block-quote { border-left-color: CanvasText; }
}
