/*
 * Body layout for informational (Content Page) pages — sticky "on this
 * page" nav, article sections, pull quotes, citation-copy blocks. Pairs
 * with shared/partials/header.php + footer.php, which provide everything
 * above/below this. Requires tokens.css to be loaded first.
 *
 * Source: build_docs/design_handoff_witch_tools/redesign/Content Page.dc.html
 */

.cp-body {
  flex: 1; display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 48px clamp(32px, 6vw, 96px);
  padding: 32px clamp(24px, 5vw, 60px) 120px;
  max-width: 1200px; width: 100%; margin: 0 auto;
}
.cp-toc { flex: 0 0 200px; min-width: 0; align-self: stretch; }
.cp-toc nav { position: sticky; top: 32px; display: flex; flex-direction: column; }
.cp-toc .label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mid); padding-bottom: 12px; }
.cp-toc a { display: block; border-top: 2px solid #3A2A18; padding: 10px 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-2); }
.cp-toc a:hover { color: var(--rust); }
.cp-toc .end { border-top: 2px solid #3A2A18; }

.cp-article { flex: 1 1 480px; min-width: 0; max-width: 66ch; display: flex; flex-direction: column; gap: 64px; }
/* Raw exported Drupal body HTML (shared/partials/content-page-generic.php)
   carries its own hardcoded width/height attributes on <img>, up to
   800px wide on some pages - confirmed to overflow the article column
   and force horizontal scroll on any phone-width viewport. Nothing else
   in .cp-article sets image sizing at all. */
.cp-section img { max-width: 100%; height: auto; }
/* Same export also carries legacy layout <table style="width:616px">
   blocks (confirmed up to 677px, 4 of the 39 exported pages) - max-width
   always wins over width in the used-value calculation regardless of
   the inline style's specificity, so this is enough to cap them without
   needing !important. */
/* max-width alone doesn't stop these: table-layout:auto (the default)
   sizes columns from their content's preferred width first and only
   respects max-width where it can without going below that - with a
   320px inline-styled <img> in a cell, the table just stays 320px+
   wide regardless. table-layout:fixed makes the browser actually honor
   max-width by distributing it across columns, which combined with the
   img rule above (now capped to its now-narrower cell) is what actually
   stops the overflow. */
.cp-section table { max-width: 100%; height: auto; table-layout: fixed; }
.cp-section td, .cp-section th { word-break: break-word; }
.cp-section { scroll-margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.cp-section h2 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; color: var(--ink); }
.cp-section p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--ink-soft); text-wrap: pretty; }
/* Matches the site's other ?q= highlight styling (throwing-bones/css/
   editions.css, fulltext.css) - a search term landed here via
   shared/partials/content-page-generic.php's ?q= handling. */
.cp-section mark { background: var(--ochre); color: var(--ink); font-style: normal; padding: 0 2px; border-radius: 2px; }
.cp-quote { margin: 10px 0; font-size: 28px; line-height: 1.32; font-weight: 600; letter-spacing: -.02em; color: var(--ink-2); text-wrap: pretty; max-width: 22em; }

.cp-cite { background: var(--ochre-field); border-radius: 3px; padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.cp-cite-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.cp-cite-style { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); }
.cp-cite-copy { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid var(--ochre); padding-bottom: 1px; }
.cp-cite-copy:hover { border-color: var(--rust); }
.cp-cite-copy.done { border-color: var(--rust); }
.cp-cite-text { font-size: 16px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
