/* ===== Essay pages, moved to their kit blueprint (November 2026) =====
   One sheet for every essay: the body classes are pg-writing-<slug>, so the selector matches any
   class that starts with "pg-writing-" (the Writing page itself is pg-writing and is not matched).
   The reading column keeps Literata upright for long reading; headings move to Inter; the pull quote,
   the closing question, and the margin notes take the Literata italic accent; figures sit in a white mat (the cut-out watercolor scenes and interactive figures of Vanity metrics vs. actionable metrics are left out; essay-vig.css styles them).
   Keep reading becomes gallery cards on a midnight panel, ending on the next essay. The words never change. */

/* ---------- Reading column ---------- */
body.rd[class*=" pg-writing-"] .read-progress { background: var(--vermilion-deep); }
body.rd[class*=" pg-writing-"] article.has-hero .prose :is(h2, h3) { font-family: var(--font-body); font-weight: 600; font-style: normal; text-transform: none; color: var(--midnight); text-wrap: balance; }
body.rd[class*=" pg-writing-"] article.has-hero .prose h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.25; letter-spacing: -.012em; margin: clamp(40px, 5vw, 56px) 0 14px; }
body.rd[class*=" pg-writing-"] article.has-hero .prose h3 { font-size: clamp(1.12rem, 1rem + .4vw, 1.3rem); line-height: 1.3; letter-spacing: -.005em; }
body.rd[class*=" pg-writing-"] article.has-hero .prose :is(p, li) { color: var(--ink); }
/* Pull quote: Literata italic in deep cobalt, a thin vermilion rule, no box */
body.rd[class*=" pg-writing-"] article.has-hero .prose > blockquote { margin: clamp(28px, 4vw, 40px) 0; padding: 4px 0 4px 18px; background: none; border: 0; border-left: 3px solid var(--vermilion); font-family: 'Literata', Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); line-height: 1.42; color: var(--cobalt-deep); box-shadow: none; }
body.rd[class*=" pg-writing-"] article.has-hero .prose > blockquote p { font: inherit; color: inherit; margin: 0; }
/* Figures in a white mat; captions in plain Inter beside a thin rule */
body.rd[class*=" pg-writing-"] article.has-hero .prose figure:not(.vid):not(.demo):not(.ev):not(.opm):not(.vg-scene) > img,
body.rd[class*=" pg-writing-"] article.has-hero .prose figure:not(.vid):not(.demo):not(.ev):not(.opm):not(.vg-scene) > picture { display: block; background: #FFFFFF; padding: 10px; border-radius: 0; box-shadow: var(--plate-shadow); }
body.rd[class*=" pg-writing-"] article.has-hero .prose figure:not(.vid):not(.demo):not(.vg-scene):not(.vg-ltv):not(.vg-sim):not(.vg-net) > figcaption { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line); font: 400 .88rem/1.5 var(--font-body); color: var(--muted); }
/* Square corners on the essay's own panels (plates follow the kit) */
body.rd[class*=" pg-writing-"] article.has-hero .prose :is(.ev, .opm, .opm li, .pbuild, .stats li, .fixes li, .so__n, .chat, .sources, .ask) { border-radius: 0; }
body.rd[class*=" pg-writing-"] article.has-hero .prose :is(.ev, .stats li, .fixes li) { background: #FFFFFF; box-shadow: var(--plate-shadow); border-color: transparent; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .stats b { font-family: var(--font-body); font-weight: 600; color: var(--midnight); }
body.rd[class*=" pg-writing-"] article.has-hero .prose .stats__hot { border: 0 !important; border-top: 3px solid var(--vermilion) !important; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .stats__hot b { color: var(--vermilion-deep); }
body.rd[class*=" pg-writing-"] article.has-hero .prose .fixes li::before { font-family: var(--font-body); font-weight: 600; font-size: 1.1rem; color: var(--vermilion-deep); }
/* Chat exchange: the reader's side on paper at the right, the reply on a pale cobalt card */
body.rd[class*=" pg-writing-"] article.has-hero .prose .chat { background: #FFFFFF; box-shadow: var(--plate-shadow); padding: clamp(14px, 2.4vw, 22px); gap: 10px; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .chat__b { border-radius: 0; font-family: var(--font-body); font-size: .98rem; line-height: 1.5; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .chat__b--q { background: var(--fringe); color: var(--ink); border: 1px solid var(--line); }
body.rd[class*=" pg-writing-"] article.has-hero .prose .chat__b--a { background: #E8EEF9; color: var(--ink); border: 0; }
/* The closing question: a margin note in the Literata italic accent */
body.rd[class*=" pg-writing-"] article.has-hero .prose .ask { background: #FFFFFF; box-shadow: var(--plate-shadow); border-left: 3px solid var(--vermilion); font-family: 'Literata', Georgia, serif; font-style: italic; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .ask p { font-family: inherit; font-style: inherit; }
/* Sources: a white plate with a midnight edge */
body.rd[class*=" pg-writing-"] article.has-hero .prose .sources { background: #FFFFFF; border-top: 3px solid var(--midnight); box-shadow: var(--plate-shadow); }
body.rd[class*=" pg-writing-"] article.has-hero .prose .sources h2 { margin-top: 0; font-size: 1.15rem; }
/* Side rail on wider screens: the name in the title voice */
body.rd[class*=" pg-writing-"] .essay-rail__name { font-family: var(--font-body); font-weight: 600; color: var(--midnight); }
body.rd[class*=" pg-writing-"] .essay-toc a { color: var(--midnight); }

/* ---------- Keep reading: gallery cards on a midnight panel, then the next essay ---------- */
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .essay-grid--related { margin-top: clamp(18px, 2.6vw, 28px); padding: clamp(16px, 2.6vw, 28px); gap: clamp(12px, 2vw, 22px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  background: var(--midnight) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='200' viewBox='0 0 120 200'%3E%3Cpath d='M0 0L120 200M120 0L0 200' stroke='%23F5ECD9' stroke-width='1' fill='none' opacity='.12'/%3E%3C/svg%3E"); }
@media (max-width: 720px) { body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .essay-grid--related { margin-inline: calc(-1 * var(--gutter)); padding: 20px var(--gutter); } }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__link { gap: 10px; padding: 10px 10px 16px; background: var(--fringe); border-radius: 14px; box-shadow: none; transform: none; color: var(--ink); }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__link:hover { transform: translateY(-3px); box-shadow: none; }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__art { margin: 0; background: #F7F0E1; aspect-ratio: 16 / 10; overflow: hidden; }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__art img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center top; border: 0; border-radius: 0; box-shadow: none; transform: none; }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__body { gap: 8px; padding: 2px 6px 0; }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__meta { font: 600 11px/1.45 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__title { font: 600 clamp(1.1rem, 1rem + .5vw, 1.35rem)/1.25 var(--font-body); letter-spacing: -.01em; color: var(--midnight); }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__sum { font-size: .98rem; line-height: 1.55; color: var(--ink-soft); }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__more { display: inline-block; min-height: 44px; padding: 10px 0 0; border: 0; font: 600 .76rem/1.6 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--midnight); text-decoration: underline 2px var(--vermilion); text-underline-offset: 6px; }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .ecard__link:hover :is(.ecard__title, .ecard__more) { color: var(--cobalt); }
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .essay-grid--related :focus-visible { outline-color: var(--mustard); }
/* The next essay leads the links under the gallery */
body.rd[class*=" pg-writing-"] section[aria-labelledby="rel-h"] .more { display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: baseline; margin-top: clamp(18px, 2.6vw, 26px); }
body.rd[class*=" pg-writing-"] main > section[aria-labelledby="rel-h"] .more .essay-next { flex-basis: 100%; color: var(--midnight); font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); font-weight: 600; letter-spacing: -.005em; text-transform: none; line-height: 1.5 !important; text-underline-offset: 5px; }

/* Labels inside the essays' figures speak in the label voice (Inter caps); Literata upright stays for the reading text */
body.rd[class*=" pg-writing-"] article.has-hero .prose :is(.ev__k, .so__h, .fl__lane p) { font-family: var(--font-body); font-weight: 600; font-size: .78rem; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .chat__stamp { font-family: var(--font-body); font-weight: 700; letter-spacing: .02em; }
body.rd[class*=" pg-writing-"] article.has-hero .prose .fn a { font-family: var(--font-body); font-weight: 600; }

/* Prompt labels on the cobalt strip ("Make it visible"): keep them white; the essay text color was overriding them (November 2026) */
body.rd[class*=" pg-writing-"] article.has-hero .prose .pbuild p.pbuild__k { color: #FFFFFF; }
