/* ═══════════════════════════════════════════════════════════════════════
   journal.css — editorial reading layer for JES journal pieces (/journal/*).
   Sits on top of the existing .art collection shell (service-bim-delivery.css):
   reuses .art / .art-hero / .art-eye / .art-meta / .art-lede / .art-body,
   adds a centred reading column + the editorial elements a journal piece needs
   (pull-quote, dark slide, aside note, soft funnel close). Tokens from page.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Article shell (journal-article.njk) ─────────────────────────────── */
.jr-art { background: var(--paper); }

/* Wide cover — 1040 frame above the reading column (pilot proportions) */
.jr-art-cover { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 3.5vw, 48px) var(--sp-section-h) 0; }
.jr-art-cover img {
  display: block; width: 100%; aspect-ratio: 960 / 380; /* matches the cover asset contract — no edge crop */
  object-fit: cover; object-position: center;
  background: var(--paper); border: 1px solid var(--paper-rule);
  border-radius: 14px;
}

/* ── Centred reading column ──────────────────────────────────────────── */
.jr-hero { padding: clamp(36px, 4vw, 48px) var(--sp-section-h) 0; }
.jr-hero-in,
.jr-body-in { max-width: 760px; margin: 0 auto; }
.jr-body { padding: 0 var(--sp-section-h) clamp(48px, 6vw, 80px); }
.jr-rule { height: 1px; background: var(--paper-rule); border: 0; margin: clamp(28px, 3.5vw, 36px) 0; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.jr-hero .art-eye { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 14px; }
.jr-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 6vw, 60px); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin: 0 0 14px; max-width: none; text-wrap: balance; }
.jr-hero h1 em { font-style: italic; color: var(--red); }
.jr-hero .art-meta { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 500; }
.jr-hero .art-lede { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.45; color: var(--ink-soft); margin: 0; max-width: 60ch; }

/* ── Body typography ─────────────────────────────────────────────────── */
.jr-body .art-body { max-width: none; padding: 0; margin: 0; }
.jr-body .art-body p { font-size: 18px; line-height: 1.62; color: var(--ink-soft); margin: 0 0 19px; max-width: none; }
.jr-body .art-body h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 2.8vw, 32px); color: var(--ink); margin: 40px 0 14px; line-height: 1.14; }
.jr-body .art-body h2 em { font-style: italic; color: var(--red); }
.jr-body .art-body h3 { font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink); margin: 26px 0 8px; }
.jr-body .art-body strong { color: var(--ink); font-weight: 700; }
.jr-body .art-body em { font-style: italic; }
/* Quiet-editorial in-body links — matches .tx-link in page.css (2026-07-03):
   text-colour underline at rest, whole link goes garnet on hover. */
.jr-body .art-body a { color: inherit; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s ease; }
.jr-body .art-body a:hover { color: var(--red); }
.jr-body .art-body ul { margin: 14px 0 18px; padding: 0; list-style: none; }
.jr-body .art-body ul li { position: relative; padding-inline-start: 20px; margin: 0 0 11px; font-size: 16px; line-height: 1.56; color: var(--ink-soft); }
.jr-body .art-body ul li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 9px; width: 6px; height: 6px; background: var(--red); }
.jr-body .art-body ul li strong { color: var(--ink); }
.jr-body .art-body ol { margin: 14px 0 18px; padding-inline-start: 22px; }
.jr-body .art-body ol li { margin: 0 0 10px; font-size: 16px; line-height: 1.56; color: var(--ink-soft); }
.jr-body .art-body ol li::marker { color: var(--red); font-weight: 700; }

/* ── Draft flag (stub articles only) ─────────────────────────────────── */
.jr-body .art-body .art-draft { max-width: none; margin: 0 0 22px; padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted-light); }

/* ── Small-caps lead-in (first words of the opening paragraph) ───────── */
.jr-body .art-body .jr-lead-in { font-variant: small-caps; letter-spacing: .02em; }

/* ── Severity / data table (wrap in .jr-table — scrolls sideways on phones) ── */
.jr-body .art-body .jr-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 22px; }
.jr-body .art-body .jr-table table { margin: 0; min-width: 560px; }
.jr-body .art-body table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 8px 0 22px; }
.jr-body .art-body th,
.jr-body .art-body td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--paper-rule); }
.jr-body .art-body th { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.jr-body .art-body td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.jr-body .art-body .jr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 7px; vertical-align: middle; }

/* ── Pull figure (diagram in a framed card) ──────────────────────────── */
.jr-body .art-body figure { margin: 30px 0; border: 1px solid var(--paper-rule); border-radius: 12px; background: var(--paper-warm); padding: 22px 20px 16px; }
.jr-body .art-body figure svg { display: block; width: 100%; height: auto; }
.jr-body .art-body figcaption { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; margin-top: 14px; text-align: center; }

/* ── Light pull-quote (stays in column) ──────────────────────────────── */
.jr-pull { margin: 30px 0; padding: 4px 0 4px 24px; border-inline-start: 3px solid var(--red); }
.jr-pull p { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.36; color: var(--ink); margin: 0; }

/* ── Dark slide (full-bleed memorable line) ──────────────────────────── */
.jr-slide { background: var(--ink); width: 100vw; margin: 44px 0; margin-inline-start: calc(50% - 50vw); padding: clamp(40px, 5vw, 60px) 24px; }
.jr-slide .in { max-width: 620px; margin: 0 auto; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 31px); line-height: 1.34; color: #fff; text-align: center; }
.jr-slide .in p,
.jr-body .art-body .jr-slide .in p { margin: 0; color: #fff; font-family: var(--serif); font-size: inherit; line-height: inherit; max-width: none; }
.jr-slide .in .src { font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #C9C6BF; margin-top: 18px; }

/* ── Aside note ──────────────────────────────────────────────────────── */
.jr-note { border-inline-start: 3px solid var(--paper-rule-2); background: var(--paper-warm); padding: 14px 18px; margin: 20px 0; }
.jr-note p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.jr-note strong { color: var(--ink); }

/* ── Soft funnel close ───────────────────────────────────────────────── */
.jr-funnel { max-width: 720px; margin: 44px auto 0; padding: 26px var(--sp-section-h) 0; border-top: 2px solid var(--ink); }
.jr-funnel .nl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 14px; }
.jr-funnel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jr-fn { border: 1px solid var(--paper-rule); padding: 20px 22px; text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; }
.jr-fn:hover { border-color: var(--ink); background: var(--paper-warm); }
.jr-fn .k { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-light); font-weight: 700; display: block; margin-bottom: 6px; }
.jr-fn h4 { font-family: var(--sans); font-weight: 700; font-size: 17px; color: var(--ink); margin: 0 0 5px; }
.jr-fn p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 10px; }
.jr-fn .go { font-size: 14px; font-weight: 700; color: var(--red); }
.jr-back { display: inline-block; margin: 22px 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.jr-back:hover { color: var(--red); }

/* ── Journal hub (/journal/) — left-aligned header + 3-up grid ───────── */
.jr-hub .jr-hub-head { margin-bottom: clamp(36px, 4vw, 56px); }
.jr-hub .jr-hub-head .art-eye { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 14px; }
.jr-hub .jr-hub-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); margin: 0 0 16px; }
.jr-hub .jr-hub-head h1 em { font-style: italic; color: var(--red); }
.jr-hub .jr-hub-head .art-lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-soft); margin: 0; max-width: 56ch; }
.jr-hub .jr-row { grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 980px) { .jr-hub .jr-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .jr-hub .jr-row { grid-template-columns: 1fr; } }

/* ── Read next (article close — 3 sibling cards + hub link) ──────────── */
.jr-next { background: var(--paper); padding: 0 var(--sp-section-h) clamp(64px, 7vw, 104px); }
.jr-next-in { max-width: var(--sp-container); margin: 0 auto; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .jr-body .art-body p { font-size: 16.5px; }
  .jr-funnel-row { grid-template-columns: 1fr; }
  .jr-slide { padding: 36px 20px; }
  .jr-art-cover img { aspect-ratio: 16 / 9; border-radius: 10px; }
}

/* Belt-and-braces: an article page never scrolls sideways into the
   off-canvas nav drawer, whatever a wide element tries to do. */
html:has(.jr-art), html:has(.jr-art) body { overflow-x: clip; }
