/* Roohle — English essay layout, carried over unchanged from theme v1.6.0
   (roohle.css, article system). Loaded only on English posts. */

.r-essay{
  --bg:#FAFAFA;
  --ink:#232323;
  --ink-soft:#5a5a5a;
  --ink-mute:#717171;
  --ink-faint:#bcbcbc;
  --rule:#e6e6e6;
  --rule-soft:#efefef;
  --accent:#AA4FFF;
  --accent-ink:#7e2fcf;
  --accent-deep:#5e1ca8;
  --accent-tint:#EEDCFF;

  /* per-track accent — overridden per article */
  --track-color:#AA4FFF;          /* Maps = purple (this article is in Maps) */
  --track-color-deep:#7e2fcf;

  --serif:"Source Serif 4","Iowan Old Style","Apple Garamond",Georgia,serif;
  --sans:"Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --arabic:"Amiri","Scheherazade New",Georgia,serif;
  --mono:"SF Mono","JetBrains Mono",ui-monospace,Menlo,monospace;
  font-family:var(--serif); font-size:19px; line-height:1.6;
}

/* ============================================================
   ARTICLE TEMPLATE — native literary-essay layout (.r-essay)
   --------------------------------------------------------------
   v1.3.3 — fixes for:

     1. Single-HTML-card pastes: when authors paste the whole
        body into one Koenig HTML card, Ghost wraps it in
        <div class="kg-card kg-html-card">…</div>. Content
        (p, h2, aside, etc.) is then a GRANDCHILD of
        .r-essay-body, not a direct child. v1.3.2 used `>`
        combinators that missed it. v1.3.3 uses descendant
        selectors with explicit overrides for nested-in-blocks.

     2. Cross-block alignment: head, body, feature, series-nav,
        subscribe and colophon all share the SAME wide rail on
        desktop (1124px) with content left-aligned at the prose
        column's x. The title's left edge is now flush with the
        body prose's left edge — which is what the PDF shows.

     3. Hard !important guards on critical layout properties so
        a stale Code Injection still loading the 1.2.x rules
        cannot break the new layout.

   Layout shape on desktop (viewport ≥ 1180px):

       |<-32->|<--- 680 prose --->|<-60->|<--- 320 gutter --->|<-32->|
                                          ^ margin notes
       Total = 1124px, centered in viewport.

       Every block (head, body, feature, series-nav, subscribe,
       colophon) has the same 1124px outer width. Content
       inside each is left-aligned at the prose column.

   Below 1180px every block collapses to a 720-wide centered
   column and margin notes render as inline styled asides.
   ============================================================ */

/* ---------- LEGACY-WRAPPER GUARD ----------
   Defensive cleanup of pre-1.3 markup.  Hide stale structural
   elements outright; reset stale container wrappers to inert
   pass-throughs so their children inherit the native rail. */
.r-essay .essay-header,
.r-essay .essay-meta,
.r-essay .essay-series,
.r-essay .folio-mark,
.r-essay .lifted-above-title,
main > .essay-header,
main > .essay-meta,
main > .lifted-above-title{
  display:none !important;
}
.r-essay .roohle-essay,
.r-essay .essay-body{
  all:unset !important;
  display:block !important;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  font:inherit !important;
  color:inherit !important;
}
.r-essay .roohle-essay > p,
.r-essay .essay-body > p{
  margin:0 0 1.5rem !important;
}

/* ---------- ROOT ---------- */
.r-essay{
  display:block !important;
  width:auto !important;
  margin:0 !important;
  padding:0 0 96px !important;
  position:static !important;
  background:transparent;
  color:var(--ink);
  --r-prose:680px;
  --r-gap:60px;
  --r-aside:320px;
  --r-pad:32px;
  --r-rail-narrow:720px;   /*  prose + 2*pad  */
  --r-rail-wide:1124px;    /*  prose + gap + aside + 2*pad  */
}

/* ---------- SHARED RAIL — narrow default ---------- */
.r-essay-head,
.r-essay-feature,
.r-essay-folio,
.r-essay-body,
.r-essay-series-nav,
.r-essay-subscribe,
.r-essay-colophon{
  display:block !important;
  width:auto !important;
  max-width:var(--r-rail-narrow) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:var(--r-pad) !important;
  padding-right:var(--r-pad) !important;
  box-sizing:border-box !important;
  position:static;
}

/* ---------- DESKTOP — every block widens to 1124 ----------
   Every block (not just body) widens to the full 1124 rail so
   they all share the SAME left edge for their prose content.
   Children of head/folio + descendants of body that are prose
   elements get max-width 680 left-aligned. The right ~380px
   stays empty in head; in body it holds the margin-note gutter. */
@media (min-width:1180px){
  .r-essay-head,
  .r-essay-feature,
  .r-essay-folio,
  .r-essay-body,
  .r-essay-series-nav,
  .r-essay-subscribe,
  .r-essay-colophon{
    max-width:var(--r-rail-wide) !important;
  }

  /* Body needs to be the offset parent for absolute-positioned
     margin notes. */
  .r-essay-body{ position:relative !important; }

  /* Head children at prose width, left-aligned. */
  .r-essay-head > .r-essay-strip,
  .r-essay-head > .r-essay-title,
  .r-essay-head > .r-essay-dek,
  .r-essay-head > .r-essay-byline,
  .r-essay-folio{
    max-width:var(--r-prose) !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* Body's prose elements at 680, left-aligned. Use descendant
     combinator so content nested inside .kg-html-card or other
     wrappers gets the constraint too. */
  .r-essay-body p,
  .r-essay-body h2,
  .r-essay-body h3,
  .r-essay-body h4,
  .r-essay-body ul,
  .r-essay-body ol,
  .r-essay-body blockquote,
  .r-essay-body hr,
  .r-essay-body .pull-quote,
  .r-essay-body .verse-callout,
  .r-essay-body section.cross-ref-index{
    max-width:var(--r-prose) !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* Margin notes float in the right gutter. JS sets `top` per
     note. The aside is positioned relative to .r-essay-body
     (which is position:relative on desktop). */
  .r-essay-body aside.margin-note{
    position:absolute !important;
    right:var(--r-pad) !important;
    width:var(--r-aside) !important;
    margin:0 !important;
    padding:0 0 0 1rem !important;
    background:transparent !important;
    border:0 !important;
    border-left:2px solid var(--accent) !important;
    font-size:0.875rem !important;
    top:0; /* JS overrides */
  }

  /* Subscribe + colophon content at prose width, left-aligned. */
  .r-essay-subscribe > *,
  .r-essay-colophon{
    max-width:var(--r-prose) !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  .r-essay-colophon{
    /* The colophon is itself a flex row of links — keep its
       items in a single line at the prose width. */
    width:var(--r-prose) !important;
  }

  /* Series nav: two cards each at half the prose width. */
  .r-essay-series-nav{
    /* Override block layout for the inner grid. */
  }
  .r-essay-series-nav-inner{
    max-width:var(--r-prose) !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
}

/* ---------- 3.1  Metadata strip ---------- */
.r-essay-head{
  padding-top:88px !important;
  padding-bottom:48px !important;
}
.r-essay-strip{
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 28px;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:0.5em;
  line-height:1.5;
}
.r-essay-strip .cat,
.r-essay-strip .type{
  color:var(--accent);
  font-weight:500;
}
.r-essay-strip .dot{
  color:var(--accent);
  font-weight:500;
}
.r-essay-strip .slash{
  color:#c9c9c9;
  font-weight:400;
}
.r-essay-strip .qref{
  color:#6a6a6a;
  text-transform:none;
  letter-spacing:0.05em;
  font-weight:500;
}
.r-essay-strip .series{
  font-family:var(--serif);
  font-style:italic;
  font-weight:400;
  font-size:0.9rem;
  letter-spacing:0;
  text-transform:none;
  color:#6a6a6a;
  flex-basis:100%;
  margin-top:2px;
}
@media (min-width:760px){
  .r-essay-strip .series{
    flex-basis:auto;
    margin-top:0;
    margin-left:0.25em;
  }
}
.r-essay-strip [hidden]{ display:none !important; }

/* ---------- 3.2  Title ---------- */
.r-essay-title{
  font-family:var(--serif);
  font-weight:400;
  font-size:4.5rem;
  line-height:1.05;
  letter-spacing:-0.02em;
  color:var(--ink);
  margin:0 0 28px;
  padding:0;
  text-align:left;
  text-wrap:balance;
}

/* ---------- 3.3  Dek ---------- */
.r-essay-dek{
  font-family:var(--serif);
  font-weight:400;
  font-style:normal;
  font-size:1.25rem;
  line-height:1.55;
  color:#444;
  margin:0 0 36px;
  padding:0;
  max-width:60ch;
  text-align:left;
  text-wrap:pretty;
}

/* ---------- 3.4  Byline ---------- */
.r-essay-byline{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 14px;
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.05em;
  color:#6a6a6a;
  padding:14px 0;
  margin:0;
  border-top:1px solid #d0d0d0;
  border-bottom:1px solid #d0d0d0;
}
.r-essay-byline .by{ color:#3a3a3a; }
.r-essay-byline .dot{ color:#c9c9c9; }

/* ---------- 3.5  Folio ---------- */
.r-essay-folio{
  font-family:var(--mono);
  font-size:0.65rem;
  letter-spacing:0.15em;
  text-transform:uppercase;
  color:#6a6a6a;
  margin:48px 0 24px;
  padding-top:0;
  padding-bottom:0;
  text-align:left;
}

/* ---------- Optional feature image ---------- */
.r-essay-feature{
  margin-top:32px !important;
  margin-bottom:56px !important;
}
.r-essay-feature img{
  display:block;
  width:100%;
  max-width:var(--r-prose);
  margin:0;
  height:auto;
  border:1px solid var(--rule);
}
.r-essay-feature figcaption{
  font-family:var(--mono);
  font-size:0.7rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:#6a6a6a;
  margin:10px 0 0;
  text-align:left;
  max-width:var(--r-prose);
}

/* ---------- 3.6  Body (prose) ----------
   Selectors use descendant combinators so single-HTML-card
   pastes (where Ghost wraps content in .kg-html-card) still
   match. Nested paragraphs in pull-quote/verse-callout get
   their own overrides. */
.r-essay-body{
  font-family:var(--serif);
  font-size:1.125rem;
  line-height:1.75;
  color:var(--ink);
}
.r-essay-body p{
  margin:0 0 1.5rem;
  text-wrap:pretty;
}
.r-essay-body p:last-child{ margin-bottom:0; }

/* Drop cap on the very first paragraph of the body.

   IMPORTANT: every selector must use `>` (direct-child) so we
   don't accidentally hit the first-of-type <p> deeper inside
   structural cards (cross-ref-entry, verse-callout, pull-quote).
   In v1.3.3 the deep `p:first-of-type` selector matched the
   .entry-arabic paragraph in every cross-ref entry — every
   Arabic verse got its first character floated as a 3.5rem
   "drop cap." Using `>` restricts the rule to direct children
   of the body (or its first single-card wrapper). */
.r-essay-body > p:first-of-type::first-letter,
.r-essay-body > .kg-card:first-child > p:first-of-type::first-letter,
.r-essay-body > .kg-html-card:first-child > p:first-of-type::first-letter,
.r-essay-body > .roohle-essay:first-child > p:first-of-type::first-letter,
.r-essay-body > .essay-body:first-child > p:first-of-type::first-letter{
  font-family:var(--serif);
  font-size:3.5rem;
  font-weight:600;
  line-height:0.85;
  float:left;
  margin:0.1em 0.12em -0.05em 0;
  color:var(--ink);
}

/* Belt-and-suspenders: explicitly UNSET the drop cap on any
   paragraph that lives inside a structural card or is set in
   Arabic/RTL. Even if the rule above ever over-matches, these
   resets win because they come later AND target more-specific
   parents. Inheriting `inherit` for type properties brings the
   pseudo-element back to its parent's text styling. */
.r-essay-body p[lang="ar"]::first-letter,
.r-essay-body [lang="ar"] p::first-letter,
.r-essay-body [dir="rtl"]::first-letter,
.r-essay-body .entry-arabic::first-letter,
.r-essay-body .entry-body::first-letter,
.r-essay-body .entry-citation::first-letter,
.r-essay-body .cross-ref-entry p::first-letter,
.r-essay-body .verse-callout p::first-letter,
.r-essay-body .verse-callout figcaption::first-letter,
.r-essay-body .pull-quote p::first-letter,
.r-essay-body blockquote.pull-quote p::first-letter,
.r-essay-body aside.margin-note p::first-letter,
.r-essay-body aside.margin-note::first-letter{
  font-family:inherit !important;
  font-size:inherit !important;
  font-weight:inherit !important;
  line-height:inherit !important;
  float:none !important;
  margin:0 !important;
  padding:0 !important;
  color:inherit !important;
}

/* ---------- 3.7  Section headings ---------- */
.r-essay-body h2{
  font-family:var(--serif);
  font-style:italic;
  font-weight:600;
  font-size:1.5rem;
  line-height:1.3;
  color:var(--ink);
  margin:3rem 0 1.25rem;
  text-wrap:balance;
}
.r-essay-body h3{
  font-family:var(--serif);
  font-style:normal;
  font-weight:600;
  font-size:1.2rem;
  line-height:1.35;
  margin:2.25rem 0 0.75rem;
}

/* ---------- 3.8  Marginal citations (asides) ---------- */
.r-essay-body sup.ref{
  color:var(--accent);
  font-weight:600;
  font-size:0.7em;
  vertical-align:super;
  line-height:0;
  margin-left:0.1em;
  padding:0 1px;
}
.r-essay-body aside.margin-note{
  /* Default (mobile / narrow): styled inline aside. Desktop
     overrides above with position:absolute. */
  display:block;
  background:#f7f7f7;
  border-left:3px solid var(--accent);
  padding:1rem 1.25rem;
  margin:1.5rem 0;
  font-family:var(--serif);
  font-style:italic;
  font-size:0.95rem;
  line-height:1.55;
  color:#555;
}
.r-essay-body aside.margin-note .margin-num{
  color:var(--accent);
  font-weight:600;
  font-style:normal;
  font-family:var(--mono);
  margin-right:0.5em;
}

/* ---------- 3.9  Pull quote ---------- */
.r-essay-body .pull-quote,
.r-essay-body blockquote.pull-quote{
  font-family:var(--serif);
  font-style:italic;
  font-weight:300;
  font-size:1.5rem;
  line-height:1.45;
  color:var(--ink);
  margin:2.5rem 0;
  padding:2rem 0;
  border:0;
  border-top:1px solid var(--ink);
  border-bottom:1px solid var(--ink);
  text-align:left;
  text-wrap:balance;
}
.r-essay-body .pull-quote p,
.r-essay-body blockquote.pull-quote p{
  margin:0;
  /* Override the body-paragraph max-width 680 for nested p. */
  max-width:none !important;
}

/* ---------- 3.10  Verse callout ---------- */
.r-essay-body .verse-callout{
  text-align:center;
  margin:3rem 0;
  padding:2rem 0;
  border:0;
  border-top:1px solid #d0d0d0;
  border-bottom:1px solid #d0d0d0;
}
.r-essay-body .verse-callout p,
.r-essay-body .verse-callout figcaption{
  /* Nested elements should not pick up the 680-prose constraint;
     the callout itself is the prose-width container. */
  max-width:none !important;
}
.r-essay-body .verse-callout .arabic-large,
.r-essay-body .verse-callout p[lang="ar"]{
  font-family:var(--arabic);
  font-size:2rem;
  line-height:1.8;
  font-weight:400;
  margin:0 0 1rem;
  color:var(--ink);
  direction:rtl;
}
.r-essay-body .verse-callout .translation{
  font-family:var(--serif);
  font-style:italic;
  font-size:1.1rem;
  line-height:1.5;
  color:#555;
  margin:0 auto 1rem;
  max-width:54ch !important;
  text-align:center;
}
.r-essay-body .verse-callout figcaption{
  font-family:var(--mono);
  font-size:0.7rem;
  letter-spacing:0.15em;
  text-transform:uppercase;
  color:#6a6a6a;
}

/* ---------- 3.11  Cross-reference index ---------- */
.r-essay-body section.cross-ref-index{
  margin:4rem 0 0;
  padding:2rem 0 0;
  border-top:2px solid var(--ink);
}
.r-essay-body .cross-ref-header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:1rem;
  margin:0 0 2rem;
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.15em;
  text-transform:uppercase;
  max-width:none !important;
}
.r-essay-body .cross-ref-title{
  color:var(--ink);
  font-weight:600;
}
.r-essay-body .cross-ref-count{
  color:#6a6a6a;
  font-weight:400;
}
.r-essay-body .cross-ref-entry{
  margin:0 0 2.5rem;
  padding:0 0 1.5rem;
  border-bottom:1px solid #ececec;
  max-width:none !important;
}
.r-essay-body .cross-ref-entry:last-child{
  border-bottom:0;
  padding-bottom:0;
  margin-bottom:0;
}
.r-essay-body .entry-header{
  display:flex;
  align-items:baseline;
  gap:1.5rem;
  margin:0 0 1rem;
  max-width:none !important;
}
.r-essay-body .entry-num{
  font-family:var(--mono);
  font-size:1rem;
  font-weight:600;
  color:var(--accent);
  flex:0 0 auto;
}
.r-essay-body .entry-root{
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:#6a6a6a;
  display:inline-flex;
  align-items:baseline;
  gap:0.5em;
}
.r-essay-body .entry-root [lang="ar"]{
  font-family:var(--arabic);
  font-size:1.05rem;
  letter-spacing:normal;
  text-transform:none;
  color:var(--ink);
}
.r-essay-body .entry-root .root-label{
  color:#6a6a6a;
}
.r-essay-body .entry-arabic{
  font-family:var(--arabic);
  font-size:1.5rem;
  line-height:1.9;
  font-weight:400;
  color:var(--ink);
  text-align:right;
  direction:rtl;
  margin:0.5rem 0 1rem;
  max-width:none !important;
}
.r-essay-body .entry-body{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  font-family:var(--serif);
  font-size:0.95rem;
  line-height:1.6;
  color:#444;
  text-align:left !important;
  direction:ltr !important;
  margin:0;
}
.r-essay-body .entry-body em{
  display:inline !important;
  font-style:italic;
}
.r-essay-body .entry-citation{
  font-family:var(--mono);
  font-size:0.7rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:#6a6a6a;
  margin:0.75rem 0 0;
  display:block;
}

/* ---------- 3.12  Series navigation ---------- */
.r-essay-series-nav{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin-top:72px !important;
  /* On desktop, the nav widens but cards stay at prose width
     via max-width on the grid container. Actually the simpler
     approach: keep the grid at its normal max-width-rail
     constraints, the cards themselves split that width. */
}
@media (min-width:1180px){
  .r-essay-series-nav{
    /* override the wide-rail full width for series nav: keep
       the cards aligned with the prose column. */
    max-width:calc(var(--r-prose) + 2 * var(--r-pad)) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    /* Re-center via a left margin equal to (rail-wide - prose-rail)/2
       so the series nav block sits flush with the prose left edge.
       Actually we want it to sit at the SAME left edge as the prose,
       not centered. Use margin-left: 0 + a left-edge offset. */
  }
}
.r-essay-series-nav .series-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:24px 26px;
  border:1px solid #d0d0d0;
  background:transparent;
  color:var(--ink);
  transition:border-color .18s ease, background .18s ease;
  min-height:120px;
  text-decoration:none;
}
.r-essay-series-nav a.series-card:hover{
  border-color:var(--accent);
  background:color-mix(in srgb, var(--accent) 4%, transparent);
}
.r-essay-series-nav .series-card.next{
  text-align:right;
  align-items:flex-end;
}
.r-essay-series-nav .series-card .lbl{
  font-family:var(--mono);
  font-size:0.7rem;
  letter-spacing:0.15em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:600;
}
.r-essay-series-nav .series-card .ttl{
  font-family:var(--serif);
  font-style:italic;
  font-weight:400;
  font-size:1.1rem;
  line-height:1.35;
  color:var(--ink);
  text-wrap:balance;
}
.r-essay-series-nav .series-card.placeholder{
  background:#fafafa;
  border-style:dashed;
}
.r-essay-series-nav .series-card.placeholder .ttl{
  color:#888;
}

/* ---------- 3.13  Subscribe block ---------- */
.r-essay-subscribe{
  margin-top:88px !important;
  padding-top:48px !important;
  border-top:1px solid #d0d0d0;
}
.r-essay-subscribe .lbl{
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:600;
  margin:0 0 14px;
}
.r-essay-subscribe .h{
  font-family:var(--serif);
  font-weight:400;
  font-size:2rem;
  line-height:1.18;
  color:var(--ink);
  margin:0 0 14px;
  max-width:34ch;
  text-wrap:balance;
}
.r-essay-subscribe .d{
  font-family:var(--serif);
  font-size:1rem;
  line-height:1.6;
  color:#444;
  margin:0 0 24px;
  max-width:60ch;
}
.r-essay-subscribe form{
  display:flex;
  align-items:stretch;
  max-width:520px;
  border-bottom:1px solid var(--ink);
}
.r-essay-subscribe input{
  flex:1;
  border:0; outline:0;
  background:transparent;
  font-family:var(--mono);
  font-size:14px;
  padding:12px 0;
  color:var(--ink);
}
.r-essay-subscribe input::placeholder{ color:#9a9a9a; }
.r-essay-subscribe button{
  font-family:var(--mono);
  font-size:0.75rem;
  font-weight:600;
  letter-spacing:0.15em;
  text-transform:uppercase;
  color:var(--accent);
  padding:12px 0 12px 22px;
}
.r-essay-subscribe button:hover{ color:var(--accent-deep, #5e1ca8); }

/* ---------- 3.14  Article colophon ---------- */
.r-essay-colophon{
  margin-top:64px !important;
  padding-top:24px !important;
  border-top:1px solid #ececec;
  display:flex !important;
  flex-wrap:wrap;
  gap:8px 14px;
  align-items:center;
  font-family:var(--mono);
  font-size:0.75rem;
  letter-spacing:0.05em;
  color:#6a6a6a;
}
.r-essay-colophon .dot{ color:#c9c9c9; }
.r-essay-colophon a{
  color:#3a3a3a;
  text-decoration:none;
  transition:color .18s ease;
}
.r-essay-colophon a:hover{ color:var(--accent); }

/* ---------- Inline links in prose ---------- */
.r-essay-body p a,
.r-essay-body li a{
  color:var(--accent-deep, #7e2fcf);
  border-bottom:1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition:border-color .18s ease;
}
.r-essay-body p a:hover,
.r-essay-body li a:hover{
  border-bottom-color:var(--accent);
}

/* ---------- Koenig editor cards inside prose ----------
   .kg-html-card (the wrapper Ghost adds around an HTML card)
   uses `display: contents` so its children (the author's <p>,
   <aside>, etc.) flow as if they were direct children of
   .r-essay-body. This is what makes "paste the whole article
   into one HTML card" work — paragraphs get the prose
   constraints and asides position-absolute against the body.
   Other Koenig cards (image, bookmark) keep their default
   block layout so their internal styles still apply. */
.r-essay-body .kg-html-card{
  display:contents !important;
}
.r-essay-body .kg-image-card img{
  display:block;
  width:100%;
  height:auto;
  margin:0 auto;
}
.r-essay-body .kg-image-card figcaption{
  font-family:var(--mono);
  font-size:0.7rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:#6a6a6a;
  margin-top:10px;
  text-align:left;
}

/* ---------- Body-text scaling for narrow viewports ---------- */
@media (max-width:880px){
  .r-essay-head{
    padding-top:64px !important;
    padding-bottom:32px !important;
  }
  .r-essay-title{ font-size:2.6rem; line-height:1.1; }
  .r-essay-dek{ font-size:1.1rem; }
  .r-essay-body{ font-size:1.0625rem; line-height:1.65; }
  .r-essay-body > p:first-of-type::first-letter,
  .r-essay-body > .kg-card:first-child > p:first-of-type::first-letter,
  .r-essay-body > .kg-html-card:first-child > p:first-of-type::first-letter,
  .r-essay-body > .roohle-essay:first-child > p:first-of-type::first-letter,
  .r-essay-body > .essay-body:first-child > p:first-of-type::first-letter{
    font-size:2.8rem;
  }
  .r-essay-body h2{ font-size:1.3rem; margin-top:2.25rem; }
  .r-essay-body .pull-quote{
    font-size:1.25rem;
    padding:1.5rem 0;
    margin:2rem 0;
  }
  .r-essay-body .verse-callout .arabic-large,
  .r-essay-body .verse-callout p[lang="ar"]{ font-size:1.55rem; }
  .r-essay-body .entry-arabic{ font-size:1.25rem; }
  .r-essay-series-nav{ grid-template-columns:1fr !important; gap:14px; }
  .r-essay-series-nav .series-card.next{
    text-align:left;
    align-items:flex-start;
  }
  .r-essay-subscribe{ margin-top:64px !important; padding-top:36px !important; }
  .r-essay-subscribe .h{ font-size:1.5rem; }
}

@media (max-width:480px){
  .r-essay{ --r-pad:20px; }
  .r-essay-title{ font-size:2rem; }
  .r-essay-body{ font-size:1rem; }
  .r-essay-body > p:first-of-type::first-letter,
  .r-essay-body > .kg-card:first-child > p:first-of-type::first-letter,
  .r-essay-body > .kg-html-card:first-child > p:first-of-type::first-letter,
  .r-essay-body > .roohle-essay:first-child > p:first-of-type::first-letter,
  .r-essay-body > .essay-body:first-child > p:first-of-type::first-letter{
    font-size:2.4rem;
  }
}

/* ---------- Print ---------- */
@media print{
  .r-essay-series-nav,
  .r-essay-subscribe,
  .r-progress{ display:none !important; }
  .r-essay-body aside.margin-note{
    position:static !important;
    width:auto !important;
    background:#f7f7f7 !important;
    border-left:3px solid #888 !important;
    padding:0.75rem 1rem !important;
    margin:1rem 0 !important;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .r-essay-series-nav .series-card,
  .r-essay-colophon a,
  .r-essay-subscribe button{
    transition:none;
  }
}
