/* Resources section (/resources/ and its pages: frameworks, programs, workshops, CoJourner), in the inner-page style.
   Loaded after tokens.css, styles.css, site.css and waves.css. Colours come only from tokens.css roles.
   The pages follow the CoJourner page: hero, prose sections alternating with wave bands, cards, a closing call. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Breadcrumb in the hero eyebrow ("RESOURCES · PROGRAMS") */
.inner .page-hero .eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.inner .page-hero .eyebrow a:hover { color: var(--site-ink); }

/* Hub: intro and the four resource cards */
.res-intro { max-width: 760px; padding: 80px 0 16px; text-align: center; }
.res-intro p { font-size: 18px; }
.res-intro a { color: var(--site-ink); }
.res-hub { list-style: none; margin: 0 auto; padding: 40px 0 110px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.res-hub > li > a { display: grid; grid-template-columns: 64px 1fr; gap: 6px 22px; height: 100%; align-content: start; padding: 36px 34px 32px; border: 1px solid var(--site-line); border-radius: 20px; background: var(--site-bg); color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.res-hub > li > a:hover { border-color: var(--site-hover-line); transform: translateY(-2px); }
.res-hub img { grid-row: span 4; width: 64px; height: 64px; }
.res-hub .res-kind { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--site-muted); }
.res-hub strong { font: 400 clamp(2rem, 3vw, 2.6rem)/1.05 var(--site-display); letter-spacing: -.02em; color: var(--site-ink); }
.res-hub p { margin: 6px 0 0; font-size: 16px; line-height: 1.65; }
.res-hub ul { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--site-line); display: flex; flex-wrap: wrap; gap: 4px 18px; }
.res-hub ul li { font: 400 19px/1.45 var(--site-display); color: var(--site-ink); }
.inner .res-hub ul li { color: var(--site-ink); }
.inner .res-hub ul li.pending { color: var(--site-muted); }
.res-hub ul li.pending::after { content: " · in preparation"; font: 400 12px/1 var(--site-body); letter-spacing: .04em; }
.res-hub .res-more { grid-column: 2; margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--site-ink); }

/* Jump links under a page intro */
.res-jump { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.res-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--site-line-strong); border-radius: 999px; background: var(--site-bg); color: var(--site-ink); font-size: 14px; text-decoration: none; transition: border-color .2s; }
.res-jump a:hover { border-color: var(--site-hover-line); }

/* Section bits inside .prose */
.inner .prose h3 { margin: 2.4rem 0 .9rem; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.inner .prose h3:first-child { margin-top: 0; }
.prose ol, .prose ul:not(.contrasts):not(.res-jump):not(.res-meta) { padding-left: 22px; margin: 0 0 1.3rem; }
.prose ol li, .prose ul:not(.contrasts):not(.res-jump) li { margin-bottom: .5rem; font-size: 16px; }
.prose li::marker { color: var(--site-muted); }
.inner .prose > p.res-subtitle, .res-subtitle { margin: -4px 0 26px; font: italic clamp(1.4rem, 2.4vw, 1.8rem)/1.4 var(--site-display); }
.inner .res-subtitle { color: var(--site-soft); }
.res-meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0 0 30px; padding: 18px 0; border-block: 1px solid var(--site-line); }
.res-meta dt { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--site-muted); }
.res-meta dd { margin: 2px 0 0; font-size: 15px; line-height: 1.6; color: var(--site-ink); }
.res-meta a { color: var(--site-ink); }
.res-refs { font-size: 15px; }
.inner .prose > p.res-formula, .res-formula { margin: 28px 0 10px; padding: 22px 24px; border-radius: 16px; background: var(--site-bg); font: 400 clamp(1.7rem, 3.4vw, 2.6rem)/1.2 var(--site-display); text-align: center; }
.inner .res-formula { color: var(--site-ink); }
.res-formula + p { text-align: center; }

/* Wider grids of small cards (applications, steps, patterns) */
.res-cards { display: grid; gap: 20px; margin: 8px 0 0; padding: 0; list-style: none; }
.res-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.res-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.res-cards > li, .res-cards > article { padding: 28px 26px; border: 1px solid var(--site-line); border-radius: 20px; background: var(--site-bg); }
.band .res-cards > li, .band .res-cards > article { background: var(--site-bg); }
.inner .res-cards h3, .inner .res-cards h4 { margin: 0 0 10px; font-family: var(--site-display); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -.015em; color: var(--site-ink); }
.res-cards p, .res-cards li li { font-size: 15px; line-height: 1.7; }
.res-cards p:last-child { margin-bottom: 0; }
.res-cards ul { margin: 0; padding-left: 18px; }
.res-cards .res-step { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--site-muted); }
.res-wide, .res-split { max-width: 1000px; }
.res-wide > h3 { margin-bottom: 20px; }

/* A section made of several blocks (prose, diagram, card grid): one rhythm of spacing, in or out of a band. */
.inner .res-stack > .wrap { padding: 0 0 64px; }
.inner .res-stack > .wrap:first-child { padding-top: 90px; }
.inner .res-stack > .wrap:last-child { padding-bottom: 96px; }

/* A sequence that reads left to right (painting stages, typology movement) */
.res-sequence { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); border: 1px solid var(--site-line); border-radius: 20px; overflow: hidden; background: var(--site-bg); }
.res-sequence > li { padding: 24px 22px; border-left: 1px solid var(--site-line); }
.res-sequence > li:first-child { border-left: 0; }
.inner .res-sequence h4 { margin: 0 0 8px; font: 400 26px/1.15 var(--site-display); color: var(--site-ink); }
.res-sequence p { margin: 0 0 8px; font-size: 14px; line-height: 1.65; }
.res-sequence small { display: block; font-size: 13px; line-height: 1.6; color: var(--site-muted); }

/* Grace–Truth Matrix diagram */
.res-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.matrix { position: relative; margin: 0; padding: 28px 0 30px; }
.matrix__grid { display: grid; grid-template-columns: 1fr 1fr; border-left: 2px solid var(--site-ink); border-bottom: 2px solid var(--site-ink); }
.matrix__cell { display: grid; align-content: start; gap: 2px; min-height: 150px; padding: 18px 18px 16px; border-right: 1px solid var(--site-line); border-top: 1px solid var(--site-line); background: var(--site-bg); }
.matrix__cell:nth-child(2n) { border-right: 0; }
.matrix__cell:nth-child(-n+2) { border-top: 0; }
.matrix__cell span { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--site-muted); }
.matrix__cell strong { font: 400 26px/1.15 var(--site-display); }
.matrix__cell small { font-size: 13px; line-height: 1.45; color: var(--site-muted); }
.inner .matrix__cell--whole { background: var(--site-accent); }
.inner .matrix__cell--whole :is(span, strong, small) { color: var(--site-on-accent); }
.matrix__axis { position: absolute; margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--site-ink); }
.inner .matrix__axis { color: var(--site-ink); }
.matrix__axis--y { left: 0; top: 0; }
.matrix__axis--x { right: 0; bottom: 0; }
.matrix figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.res-defs { margin: 0; }
.res-defs div { padding: 18px 0; border-top: 1px solid var(--site-line); }
.res-defs div:first-child { border-top: 0; padding-top: 0; }
.res-defs dt { font: 400 26px/1.2 var(--site-display); color: var(--site-ink); }
.res-defs dd { margin: 4px 0 0; font-size: 15px; line-height: 1.7; color: var(--site-muted); }

/* In preparation */
.res-pending { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--site-line); }
.inner .res-pending h3 { margin: 0 0 12px; font: 500 12px/1.6 var(--site-body); letter-spacing: .14em; text-transform: uppercase; color: var(--site-muted); }
.res-pending ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 36px; }
.inner .res-pending li { margin: 0; font: 400 24px/1.3 var(--site-display); color: var(--site-ink); }
.res-pending p { margin: 12px 0 0; font-size: 15px; }

/* Library pages: one row per resource, linked to its own page; resources in preparation are listed, unlinked */
.res-library-intro { padding-bottom: 24px; }
.res-library-section { padding: 24px 0 110px; }
.res-library-section > h2 { margin-bottom: 28px; }
.res-library { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--site-line-strong); }
.res-entry { border-bottom: 1px solid var(--site-line-strong); }
.res-entry__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 32px; gap: 12px 40px; align-items: start; padding: 32px 8px; color: inherit; text-decoration: none; }
a.res-entry__inner { transition: background .2s; }
a.res-entry__inner:hover { background: var(--site-surface); }
.res-entry__name { display: grid; gap: 4px; }
.res-entry__name strong { font: 400 clamp(1.9rem, 3vw, 2.5rem)/1.08 var(--site-display); letter-spacing: -.02em; color: var(--site-ink); }
.res-entry__name em { font: italic 19px/1.4 var(--site-display); color: var(--site-soft); }
.res-entry__summary { font-size: 16px; line-height: 1.7; color: var(--site-muted); }
.res-entry__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 13px; color: var(--site-ink); }
.res-entry__meta span + span::before { content: "·"; margin-right: 20px; color: var(--site-muted); }
.res-entry__go { align-self: center; font-size: 22px; color: var(--site-ink); transition: transform .2s; }
a.res-entry__inner:hover .res-entry__go { transform: translateX(4px); }
.res-entry--pending .res-entry__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 32px; }
.res-entry--pending .res-entry__name { align-content: start; justify-items: start; gap: 10px; }
.inner .res-entry--pending .res-entry__name strong { color: var(--site-muted); }
.res-entry--pending .badge { font-size: 12px; }

/* Closing call (hub and each page) */
.res-use { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; padding: 96px 0; }
.res-use h2 { margin-bottom: 18px; }
.res-use p { font-size: 16px; }
.res-checklist { margin: 0; padding-left: 20px; }
.res-checklist li { margin-bottom: 6px; font-size: 16px; }
.res-checklist li::marker { color: var(--site-accent); }
.res-use__aside { padding: 32px; border: 1px solid var(--site-line); border-radius: 20px; background: var(--site-bg); }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 20px 0 0; }
.res-actions .text-link { font-size: 14px; }

/* Next resource links at the end of a page */
.res-next { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.res-next-section { padding: calc(var(--wave-height) + 40px) 0 100px; } /* clears the closing wave of the band above, which paints over this section's top */
.res-all { margin: 24px 0 0; }
.res-next a { display: grid; gap: 2px; padding: 22px 24px; border: 1px solid var(--site-line); border-radius: 18px; color: inherit; text-decoration: none; transition: border-color .2s; }
.res-next a:hover { border-color: var(--site-hover-line); }
.res-next small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--site-muted); }
.res-next strong { font: 400 26px/1.2 var(--site-display); color: var(--site-ink); }
.res-next-title { padding-top: 10px; }
.inner .res-next-title { font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: 20px; }

@media (max-width: 1000px) {
  .res-sequence { grid-template-columns: minmax(0, 1fr); }
  .res-sequence > li { border-left: 0; border-top: 1px solid var(--site-line); }
  .res-sequence > li:first-child { border-top: 0; }
}
@media (max-width: 900px) {
  .res-hub, .res-cards--2, .res-cards--3, .res-split, .res-use { grid-template-columns: minmax(0, 1fr); }
  .res-cards--quad > li:nth-child(2) { order: 1; } /* one column: read the quadrants I, II, III, IV */
  .res-split { gap: 32px; }
  .res-use { gap: 32px; }
}
@media (max-width: 800px) {
  .res-entry__inner, .res-entry--pending .res-entry__inner { grid-template-columns: minmax(0, 1fr) 24px; gap: 10px 16px; padding: 26px 4px; }
  .res-entry__summary { grid-column: 1; }
  .res-entry__meta { flex-direction: column; gap: 2px; }
  .res-entry__meta span + span::before { content: none; }
  .res-entry__go { grid-row: 1; grid-column: 2; align-self: start; padding-top: 8px; }
  .res-library-section { padding-bottom: 70px; }
  .res-intro { padding-top: 56px; text-align: left; }
  .res-intro p { font-size: 16px; }
  .res-hub { padding: 24px 0 70px; gap: 14px; }
  .inner .res-stack > .wrap { padding-bottom: 48px; }
  .inner .res-stack > .wrap:first-child { padding-top: 65px; }
  .inner .res-stack > .wrap:last-child { padding-bottom: 72px; }
  .res-use { padding: 68px 0; }
}
@media (max-width: 580px) {
  .res-hub > li > a { grid-template-columns: 48px 1fr; gap: 4px 16px; padding: 26px 20px 24px; }
  .res-hub img { width: 48px; height: 48px; }
  .res-hub ul, .res-hub p, .res-hub .res-more { grid-column: 1 / -1; }
  .res-hub img { grid-row: span 2; }
  .res-cards > li, .res-cards > article { padding: 24px 20px; }
  .res-use__aside { padding: 24px 20px; }
  .matrix__cell { min-height: 120px; padding: 12px 10px; }
  .matrix__cell strong { font-size: 21px; }
  .res-meta { gap: 12px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .res-hub > li > a, .res-jump a, .res-next a, a.res-entry__inner, .res-entry__go { transition: none; }
  a.res-entry__inner:hover .res-entry__go { transform: none; }
  .res-hub > li > a:hover { transform: none; }
}

/* Scripture citations: at least 12px (aesthetic audit 2026-10-22, finding 7); styles.css sets them at 10px. */
.inner :is(.page-hero, .pull, .movement-cards) cite { font-size: 12px; }

/* UI/UX Pro Max integrity check (2026-10-24), resource pages only (body.res-page; the CoJourner page is left as it is).
   color-contrast: the hero Scripture line and citation sit on the hero image; muted grey measured 3.3–3.9:1 there, ink passes. */
.res-page .page-hero blockquote p, .res-page .page-hero cite { color: var(--site-ink); }
/* line-length: keep running text near 65–75 characters per line on wide screens. */
.res-page .prose > :is(p, ul, ol, dl, .lines, blockquote), .res-page .res-library-intro > p, .res-page .res-cards > li > :is(p, ul) { max-width: 56ch; }
.res-page .prose > p.summary-line { max-width: 34ch; }
/* web-target-size: standalone links in the details row get at least a 24px target. */
.res-meta a { display: inline-block; padding: 3px 0; }
/* readable-font-size: 16px reading text on phones. */
@media (max-width: 800px) {
  .res-page :is(.res-cards p, .res-cards li, .res-meta dd, .res-refs, .res-sequence p, .res-defs dd, .res-entry__summary, .res-sequence small) { font-size: 16px; }
}
.res-page :is(.res-use, .res-intro) p { max-width: 56ch; }
.res-page .res-intro p { margin-inline: auto; }

/* Workshop scripts (Forming a Reading Culture): the full talk is the workshop's page, each slide beside its part of the text. */
.res-script { max-width: 56ch; }
.res-script p { font-size: 17px; line-height: 1.85; }
.inner .res-script p { color: var(--site-reading); }
.inner .res-script .res-script-h { margin: 2.6rem 0 .8rem; font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.inner .res-script .res-script-h:first-child { margin-top: 0; }
.inner p.res-script-note { max-width: 56ch; font-size: 16px; font-style: italic; }
@media (max-width: 800px) { .res-script p { font-size: 16px; } }

.rs-head { text-align: center; }
.inner .rs-head p.res-script-note { margin-inline: auto; }
.rs-head .res-meta { justify-content: center; max-width: 64ch; margin: 0 auto; }
.rs-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; padding: 56px 0; border-top: 1px solid var(--site-line); }
.rs-row:first-child { border-top: 0; padding-top: 24px; }
.rs-row--text { grid-template-columns: minmax(0, 1fr); max-width: 72ch; margin-inline: auto; }
.rs-row--text .res-script { max-width: none; }
.res-script :is(ul, ol) { padding-left: 1.3em; line-height: 1.85; }
.res-script li { margin-bottom: .5em; }
.res-script :is(p, li, cite) { overflow-wrap: anywhere; }
.res-entry__name .badge { justify-self: start; margin-top: 6px; }
/* The slides hold a fixed place, centred against their part of the script. */
.rs-slides { display: grid; gap: 22px; align-self: center; }
.rs-slide { margin: 0; }
.rs-slide img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 563; border-radius: 12px; background: var(--site-surface); }
.rs-slide--graphic img { aspect-ratio: 4 / 3; }
.rs-slide figcaption { margin-top: 8px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--site-muted); }
.rs-credit { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.6; }
.rs-sign { display: grid; gap: 2px; margin: 2.4rem 0 0; }
.inner .res-script p.rs-sign { color: var(--site-ink); }
.rs-sign__name { font-family: var(--site-display); font-style: italic; font-size: 26px; line-height: 1.3; }
.rs-sign time { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--site-muted); }
.rs-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding: 32px 36px; border: 1px solid var(--site-line); border-radius: 20px; background: var(--site-surface); }
.rs-download h3 { margin: 0 0 4px; font-size: clamp(1.6rem, 2.4vw, 2rem); }
.inner .rs-download p { margin: 0; font-size: 16px; }
.rs-download__meta { opacity: .8; font-size: 13px; }
@media (max-width: 900px) {
  .rs-row { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 44px 0; }
  .rs-download { padding: 26px 24px; }
}

/* Workshop library groups (2026-10-29): the Workshops library is split into two toggleable categories
   (native details/summary, no JavaScript), and an entry whose workshop has slides carries its first
   slide as a cover. Entries without slides keep the plain row above. */
.res-group { margin-top: 44px; border-top: 2px solid var(--site-ink); }
.res-group > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 20px 8px 16px; cursor: pointer; list-style: none; }
.res-group > summary::-webkit-details-marker { display: none; }
.res-group > summary:hover { background: var(--site-surface); }
.res-group > summary:focus-visible { outline: 2px solid var(--site-ink); outline-offset: 5px; }
.res-group__title { font: 400 clamp(2rem, 3.4vw, 3rem)/1.05 var(--site-display); letter-spacing: -.02em; color: var(--site-ink); }
.res-group__count { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--site-muted); }
.res-group__chev { margin-left: auto; font-size: 22px; color: var(--site-ink); transition: transform .25s; }
.res-group:not([open]) .res-group__chev { transform: rotate(-90deg); }
.res-group__desc { max-width: 56ch; margin: 2px 8px 10px; font-size: 16px; }
/* Workshop entry layout (Paul, 2026-10-29): in the grouped library the cover sits in a left
   column at its original aspect ratio (never cropped, no fixed frame), and the whole text
   block — title, subtitle, then the intro — sits to its right. The categories are folded by
   default (build.py renders the details without `open`). Only grouped (workshop) entries use
   this layout; Frameworks and Programs keep the row layout above. */
.res-group .res-entry__inner { position: relative; grid-template-columns: 429px minmax(0, 1fr); gap: 16px 32px; }
.res-group .res-entry__name { grid-row: 1; grid-column: 2; padding-right: 44px; }
.res-group .res-entry__cover { grid-row: 1 / span 2; grid-column: 1; width: 100%; }
.res-group .res-entry__summary { grid-row: 2; grid-column: 2; }
.res-group .res-entry__inner--no-cover .res-entry__name { grid-column: 1 / -1; }
.res-group .res-entry__inner--no-cover .res-entry__summary { grid-row: 2; grid-column: 1 / -1; max-width: 76ch; }
.res-group .res-entry__go { position: absolute; top: 32px; right: 8px; align-self: auto; padding-top: 0; }
.res-entry__cover { display: block; }
.res-entry__cover img { display: block; width: 100%; height: auto; border: 1px solid var(--site-line); border-radius: 14px; background: var(--site-surface); }
@media (max-width: 800px) {
  .res-group .res-entry__go { top: 26px; right: 4px; }
}
@media (max-width: 640px) {
  .res-group .res-entry__inner { grid-template-columns: minmax(0, 1fr); }
  .res-group .res-entry__name { grid-row: 1; grid-column: 1; }
  .res-group .res-entry__cover { grid-row: 2; grid-column: 1; }
  .res-group .res-entry__summary { grid-row: 3; grid-column: 1; }
  .res-group .res-entry__inner--no-cover .res-entry__name { grid-column: 1; }
  .res-group .res-entry__inner--no-cover .res-entry__summary { grid-row: 2; grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .res-group__chev { transition: none; }
}
