/* =========================================================================
   CHAPTER PAGES - C2 (agreed 19 October 2026)
   Loaded by every chapter and priority page (introduction, vision,
   priority, delivery, full-strategy; progress too, though it is unlinked).
   js/main.js draws the masthead and sets html.ch (and html.ch-motion when
   motion is allowed) before the first frame.

   Blue and white, Keele fonts: the homepage navy for the masthead band and
   headings, outline Arial Black for the title (as on the homepage),
   Arial headings and body (sans-serif throughout, Oct 2026). Square corners, hairline rules, no tints,
   glows or frosted glass.

   Motion (docs/motion.md - the same rules as the homepage):
   ARRIVE  One movement per page. The title settles in as the homepage
           lockup does (letter-spacing closes up while it fades in); the
           subtitle and summary line rise 16px. Under a second. The band is
           there on first paint: no curtain, no bounce.
   TRAVEL  The diagonal is for changing place. Moving between chapters (and
           from the homepage into one), the new page rises over the old on
           the homepage's wipe - same angle, same easing, right edge leading
           - while the old page stays put and dims slightly. Back/forward
           and reload don't wipe (see the pagereveal script in each page's
           <head>).
   READ    Nothing moves unless the reader makes it. The band scrolls away
           normally; its text lifts 46px and fades as it goes (js/main.js).
   With reduced motion: no arrival, no lift, no wipe.
   ========================================================================= */

html.ch {
  --ch-navy: #1D1A3B;     /* the homepage navy (css/home.css --lb-navy). The keele.ac.uk
                             style guide primary is #271E3D - swap both together if brand prefers it. */
  --ch-link: #005D8F;     /* Keele tertiary: links and small labels */
  --ch-ink: #262335;
  --ch-soft: #4A4660;
  --ch-line: #DCD9E4;
  --brand: var(--ch-navy);
  --header-bg: #fff;      /* solid header on the same white as the page */
}
html.ch body { background: #fff; color: var(--ch-ink); }
html.ch .header-bar::after { background: var(--ch-navy); }   /* reading progress in navy */

/* ---- the masthead band ---- */
.ch-mast { background: var(--ch-navy); color: #fff; padding: clamp(24px, 3vw, 40px) 0 clamp(48px, 5.5vw, 80px); overflow-x: clip; }

/* chapters: boxed and numbered (the Arts Council reference), kept quiet so
   they don't compete with the title - hairline boxes, the current one solid */
.ch-chapters ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ch-chapters li { margin: 0; }
.ch-chapters a {
  display: block; padding: 0.42em 0.7em; border: 1px solid rgba(255,255,255,0.42);
  color: rgba(255,255,255,0.88); font: 700 0.8rem/1.2 var(--font-body); text-decoration: none !important;
  transition: background-color var(--dur-ui) var(--ease-out), border-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}
.ch-chapters a:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }
.ch-chapters a[aria-current] { background: #fff; border-color: #fff; color: var(--ch-navy); }
.ch-chapters a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.ch-eyebrow { margin: clamp(36px, 5vw, 64px) 0 0.8em; font-weight: 700; font-size: 1rem; color: rgba(255,255,255,0.8); max-width: none; }
.ch-title {
  margin: 0; max-width: none; font-family: var(--font-outline); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.6rem, 0.7rem + 6.2vw, 7rem); line-height: 0.95; letter-spacing: 0.005em; color: #fff;
}
.ch-eyebrow + .ch-title { margin-top: 0; }
.ch-chapters + .ch-title { margin-top: clamp(36px, 5vw, 64px); }
@supports (-webkit-text-stroke: 1px #000) { .ch-title { color: transparent; -webkit-text-stroke: max(1.5px, 0.018em) #fff; } }
@media (forced-colors: active) { .ch-title { color: CanvasText; -webkit-text-stroke: 0; } }
.ch-title-line { display: block; white-space: nowrap; }   /* lines locked at rest (js/main.js) so the arrival never re-wraps */
.ch-sub { margin: 0.6em 0 0; max-width: none; font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.65rem); color: #fff; }
.ch-strap { max-width: 44ch; margin: 0.8em 0 0; font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.2rem); line-height: 1.5; color: rgba(255,255,255,0.86); }

@media (max-width: 700px) {
  .ch-chapters ol { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
  .ch-chapters li { flex: none; }
  .ch-eyebrow { margin-top: 32px; }
}

/* ---- ARRIVE ---- */
html.ch-motion .ch-title { animation: ch-settle var(--dur-arrive) var(--ease-out) 60ms both; }
html.ch-motion .ch-sub,
html.ch-motion .ch-strap { animation: ch-rise-in 600ms var(--ease-out) both; }
html.ch-motion .ch-sub { animation-delay: 240ms; }
html.ch-motion .ch-strap { animation-delay: 340ms; }
html.ch-motion .ch-sub + .ch-strap { animation-delay: 420ms; }
/* arriving by a wipe: start once it is just over half way, as the homepage brings in its copy */
html.ch-motion.ch-vt .ch-title { animation-delay: 420ms; }
html.ch-motion.ch-vt .ch-sub { animation-delay: 600ms; }
html.ch-motion.ch-vt .ch-strap { animation-delay: 700ms; }
html.ch-motion.ch-vt .ch-sub + .ch-strap { animation-delay: 760ms; }
@keyframes ch-settle { from { opacity: 0; letter-spacing: 0.08em; } }        /* to: the title's own spacing */
@keyframes ch-rise-in { from { opacity: 0; transform: translateY(var(--rise)); } }

/* ---- TRAVEL ----
   Cross-document view transitions: both pages opt in (this file and
   css/home.css), so it runs between chapter pages and from the homepage
   into a chapter. Chrome, Edge and Safari 18.2+; other browsers just load
   the page. The polygon is js/home.js wipePoly(): slope 34% of the screen
   height, right edge leading. The whole new page arrives together, header
   included (holding the header still made the condensed and full-height
   logos ghost over each other). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(root) { animation-duration: 700ms; }
::view-transition-old(root) { animation: ch-recede 700ms cubic-bezier(.45, 0, .55, 1) both; mix-blend-mode: normal; }
::view-transition-new(root) { animation: ch-travel 700ms cubic-bezier(.45, 0, .55, 1) both; mix-blend-mode: normal; }
@keyframes ch-recede { to { filter: brightness(0.86); } }   /* so the edge reads where both pages are white */
@keyframes ch-travel {
  from { clip-path: polygon(0% 134%, 100% 100%, 100% 100%, 0% 100%); }
  to   { clip-path: polygon(0% 0%, 100% -34%, 100% 100%, 0% 100%); }
}

/* ---- the reading column ---- */
html.ch .chapter-layout { padding-top: clamp(28px, 3.5vw, 52px); column-gap: clamp(40px, 6vw, 96px); }
html.ch .chapter-layout.no-ref { grid-template-columns: minmax(0, 1fr); }
html.ch .chapter-layout.no-ref .chapter-reference { display: none; }
html.ch .chapter-main { font-size: 1.0625rem; line-height: 1.7; color: var(--ch-ink); }
html.ch .chapter-main p, html.ch .chapter-main li { max-width: 66ch; }
html.ch .chapter-main a:not(.principles-strip) { color: var(--ch-link); }
html.ch .long-section { padding-top: clamp(24px, 3vw, 40px); }
html.ch .long-section:first-child { padding-top: 0; }
html.ch .lead-section p { font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.6; }

/* section headings: Palatino, navy */
html.ch .chapter-main h2,
html.ch .long-section h3 { font-family: var(--font-display); font-weight: 700; color: var(--ch-navy); letter-spacing: 0; }
html.ch .chapter-main h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); line-height: 1.2; margin: 0 0 0.6em; }
html.ch .long-section h3 { font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem); line-height: 1.25; margin: 0 0 0.5em; }
/* on chapter pages a headed section is a top-level section: give it the larger size */
html.ch body[data-template="chapter"] .long-section h3 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); line-height: 1.2; margin-bottom: 0.6em; }

/* the three big parts of a priority page each open on a navy rule */
html.ch .explored-block,
html.ch .commitments-block,
html.ch .measures-block { border-top: 2px solid var(--ch-navy); padding-top: clamp(32px, 4vw, 48px); margin-top: clamp(48px, 6vw, 80px); scroll-margin-top: var(--header-offset); }
html.ch .explored-block > p { margin-bottom: 1em; }
html.ch .explored-block .long-section { padding-top: clamp(28px, 3.5vw, 40px); }

/* principles: a plain line between two hairlines, not a tinted box */
html.ch .principles-strip { text-decoration: none !important; background: none; border: 0; border-top: 1px solid var(--ch-line); border-bottom: 1px solid var(--ch-line); border-radius: 0; padding: 0.85em 0; margin-bottom: clamp(24px, 3vw, 40px); gap: 0.4em 1em; }
html.ch .principles-strip-label { font-size: 0.9rem; font-weight: 400; color: var(--ch-soft); }
html.ch .principles-strip-names { color: var(--ch-navy); font-weight: 700; }
html.ch .principles-strip:hover .principles-strip-names span:not(.sep) { text-decoration: underline; text-underline-offset: 4px; }

/* photographs: square, like the homepage's white mount */
html.ch .editorial-image-frame, html.ch .gallery-tile, html.ch .editorial-image img { border-radius: 0; }
html.ch figcaption { color: var(--ch-soft); font-size: 0.9rem; }

/* commitments: number, title, then a scannable "We will:" list */
html.ch .commitment-block { border-top: 1px solid var(--ch-line); padding: clamp(28px, 3.5vw, 40px) 0 0; margin-top: clamp(28px, 3.5vw, 40px); }
html.ch .commitment-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
html.ch .commitment-kicker-row .obj-num { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; color: var(--ch-link); }
html.ch .commitment-block h3 { font-family: var(--font-display); font-weight: 700; color: var(--ch-navy); font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.65rem); line-height: 1.25; margin: 0.2em 0 0.5em; }
.we-will-label { font-weight: 700; color: var(--ch-navy, var(--brand)); margin: 1.1em 0 0.3em; }
html.ch .commitment-block ul.we-will { list-style: none; padding: 0; margin: 0.4em 0 0; }
html.ch .commitment-block ul.we-will li { position: relative; padding: 0.55em 0 0.55em 1.6em; margin: 0; border-top: 1px solid var(--ch-line); }
html.ch .commitment-block ul.we-will li::before { content: ""; position: absolute; left: 0; top: 1.35em; width: 0.8em; height: 2px; background: var(--ch-link); }

/* measures: an intro line, then a numbered list on hairlines */
html.ch .measures-intro { margin-bottom: 1em; }
html.ch .measures-block ul { list-style: none; padding: 0; margin: 0; counter-reset: ch; }
html.ch .measures-block li { counter-increment: ch; position: relative; padding: 0.7em 0 0.7em 2.6em; margin: 0; border-top: 1px solid var(--ch-line); }
html.ch .measures-block li::before { content: counter(ch, decimal-leading-zero); position: absolute; left: 0; top: 0.7em; font-weight: 700; color: var(--ch-link); font-variant-numeric: tabular-nums; }

/* quotes: a navy rule, no tint */
html.ch .pull-quote { background: none; border-left: 3px solid var(--ch-navy); border-radius: 0; padding: 0.2em 0 0.2em 1.4em; margin: clamp(40px, 5vw, 64px) 0; }
html.ch .pull-quote p { color: var(--ch-navy); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.4; max-width: 40ch; }

/* figures (An Open Strategy): hairline cells, navy numerals, no glow */
html.ch .stats-grid { gap: 0; border-top: 1px solid var(--ch-line); margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
html.ch .stat { border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: none; padding: 1.2em 1.4em 1.2em 0; }
html.ch .stat-value { color: var(--ch-navy); font-family: var(--font-outline); font-weight: 900; }
html.ch .stat-label { color: var(--ch-soft); }
html.ch .stat { transition: opacity var(--dur-content) var(--ease-out); transform: none; }   /* fades only */

/* "On this page" */
html.ch .chapter-reference { border-radius: 0; }
html.ch .reference-heading { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--ch-navy); }
html.ch .reference-list .ref-group-label { font-size: 0.85rem; font-weight: 700; color: var(--ch-soft); }
html.ch .reference-list .ref-gap { padding: 0.7em 0 0; }
html.ch .reference-list a { color: var(--ch-ink); }
html.ch .reference-list a.is-active { color: var(--ch-navy); border-left-color: var(--ch-navy); }

/* "On this page" steps back while you read: once the text is under way its
   links recede to a grey that still passes AA (#6B6780 is 5.4:1 on white);
   the section you're in stays at full strength; hover or tab in and it all
   comes straight back. Desktop only - on phones it's a strip above the text. */
@media (min-width: 961px) {
  html.ch .chapter-reference .reference-heading,
  html.ch .chapter-reference .ref-group-label,
  html.ch .chapter-reference .reference-list a { transition: color 0.5s ease, border-color 0.5s ease; }
  html.ch.ch-reading .chapter-reference .reference-heading,
  html.ch.ch-reading .chapter-reference .ref-group-label,
  html.ch.ch-reading .chapter-reference .reference-list a:not(.is-active) { color: #6B6780; }
  html.ch.ch-reading .chapter-reference .reference-list a:not(.is-active) { border-left-color: #EEEDF2; }
  html.ch.ch-reading .chapter-reference:hover .reference-heading,
  html.ch.ch-reading .chapter-reference:focus-within .reference-heading { color: var(--ch-navy); transition-duration: 0.2s; }
  html.ch.ch-reading .chapter-reference:hover .ref-group-label,
  html.ch.ch-reading .chapter-reference:focus-within .ref-group-label { color: var(--ch-soft); transition-duration: 0.2s; }
  html.ch.ch-reading .chapter-reference:hover .reference-list a:not(.is-active),
  html.ch.ch-reading .chapter-reference:focus-within .reference-list a:not(.is-active) { color: var(--ch-ink); border-left-color: var(--ch-line); transition-duration: 0.2s; }
}
@media (prefers-reduced-motion: reduce) { html.ch .chapter-reference * { transition: none !important; } }

/* previous / next */
html.ch .chapter-link .title { font-family: var(--font-display); color: var(--ch-navy); }

/* full strategy: one plain continuous read */
html.ch #full-strategy-content { padding: clamp(28px, 3.5vw, 52px) 0 var(--space-5); }
html.ch #full-strategy-content .prose > h2 { font-family: var(--font-display); color: var(--ch-navy); }
html.ch #full-strategy-content h3 { font-family: var(--font-display); color: var(--ch-navy); }
/* the top of the page: downloads and contents (fullStrategyIntroHTML) */
html.ch .fs-intro .lede { color: var(--ch-soft); }
html.ch #full-strategy-content .fs-intro h2 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; color: var(--ch-navy); margin: var(--space-4) 0 var(--space-2); }
html.ch .fs-files { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ch-line); }
html.ch .fs-file { padding: 0.9em 0; border-bottom: 1px solid var(--ch-line); }
html.ch .fs-file a { font-weight: 700; color: var(--ch-link); }
html.ch .fs-file .fs-label { font-weight: 700; color: var(--ch-ink); }
html.ch .fs-meta { color: var(--ch-soft); white-space: nowrap; }
html.ch .fs-file a .fs-meta { color: inherit; font-weight: 400; }
html.ch .fs-note { display: block; font-size: var(--step--1); color: var(--ch-soft); margin-top: 0.2em; }
html.ch .fs-request { margin-top: var(--space-2); font-size: var(--step--1); color: var(--ch-soft); }
html.ch .fs-contents ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: var(--space-4); }
html.ch .fs-contents li { break-inside: avoid; padding: 0.25em 0; }
html.ch .fs-contents a { color: var(--ch-link); }
@media (max-width: 640px) { html.ch .fs-contents ol { columns: 1; } }
html.ch .full-strategy-rule { border: 0; border-top: 2px solid var(--ch-navy); margin: var(--space-5) auto; max-width: var(--content-max); }
html.ch #full-strategy-content .explored-block,
html.ch #full-strategy-content .commitments-block,
html.ch #full-strategy-content .measures-block { border-top: 1px solid var(--ch-line); margin-top: var(--space-4); padding-top: var(--space-3); }
