/* =====================================================================
   Pedagogy First. Technology Second. — pedagogyfirst.ictevangelist.com
   Mark Anderson / ICT Evangelist

   Built on the Woodland / AI Governance site kit: vendored fonts, no
   external requests, WCAG 2.2 AA as the floor (AAA on body text), full
   keyboard operation, reduced-motion and forced-colors support.

   Each chapter re-themes itself through the custom properties in
   [data-chapter], so the page carries the identity of its infographic
   while the chrome, type and behaviour stay identical throughout.
   ===================================================================== */

/* ---------- Vendored faces (no network requests) ---------- */
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../assets/fonts/poppins-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Exo 2'; src: url('../assets/fonts/exo2-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Exo 2'; src: url('../assets/fonts/exo2-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --font-head: 'Exo 2', Segoe UI, system-ui, sans-serif;
  --font-body: 'Poppins', Segoe UI, system-ui, sans-serif;
  --font-meta: 'Inter', Segoe UI, system-ui, sans-serif;

  --paper: #ffffff;
  --paper-alt: #f4f6f8;
  --ink: #16202b;          /* 15.3:1 on white — AAA */
  --ink-soft: #4a5b68;     /* 7.4:1 on white — AAA */
  --border: #d5dde3;
  --border-strong: #b3c0c9;

  --brand-teal: #17abce;
  --brand-deep: #0b7f99;
  --brand-green: #45b84a;
  --brand-grad: linear-gradient(90deg, #17abce 0%, #0ea3ab 45%, #45b84a 100%);
  --gold: #FEAE00;

  --focus: #0b5c9e;
  --shadow: 0 1px 2px rgba(22,32,43,.06), 0 8px 24px rgba(22,32,43,.06);
  --radius: 12px;
  --measure: 68ch;

  /* Overridden per chapter by [data-chapter] below */
  --accent: #0b7f99;
  --accent-ink: #08596b;   /* accent darkened for text on white */
  --hero-bg: linear-gradient(135deg, #2d3436 0%, #1a1f24 50%, #0f1317 100%);
  --hero-ink: #ffffff;
  --hero-ink-soft: #ced8de;
  --hero-accent: #FEAE00;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { overflow-wrap: break-word; font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 .5rem; text-wrap: balance; }
p, li { max-width: var(--measure); overflow-wrap: break-word; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: from-font; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Focus stays visible against dark panels too */
.hero :focus-visible, .site-footer :focus-visible { outline-color: #ffd166; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Skip links ---------- */
.skip-links a {
  position: absolute; left: 0; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem;
  font-weight: 600; border-radius: 0 0 8px 0;
  /* Clipped rather than pushed off-canvas: a negative offset can widen the
     scroll area at large text sizes, which breaks reflow. */
  clip-path: inset(50%); white-space: nowrap;
}
.skip-links a:focus { clip-path: none; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 860px); margin-inline: auto; }
main { display: block; }
section { scroll-margin-top: calc(var(--header-h, 4.2rem) + var(--clusternav-h, 4rem) + 1rem); }
.cluster-nav { scroll-margin-top: var(--header-h, 4.2rem); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header::before { content: ""; display: block; height: 4px; background: var(--brand-grad); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding: .6rem 0; }
.brand { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; min-width: 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
.brand span { color: var(--accent-ink); }
.brand:hover { text-decoration: underline; }

.nav-toggle {
  display: none; align-items: center; gap: .45rem;
  background: var(--paper); border: 1px solid var(--border-strong); color: var(--ink);
  font: 600 .92rem/1 var(--font-body); padding: .6rem .8rem; border-radius: 8px; cursor: pointer;
  min-height: 44px;
}
.nav-toggle:hover { border-color: var(--accent); }

.main-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: .5rem .55rem; border-radius: 8px;
  font-size: .86rem; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  min-height: 44px; display: flex; align-items: center;
}
.main-nav a:hover { background: var(--paper-alt); color: var(--ink); }
.nav-no { font-family: var(--font-meta); font-size: .74rem; font-weight: 600; color: var(--border-strong); margin-right: .18rem; }
.main-nav a[aria-current="page"] .nav-no { color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }

/* ---------- Hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 3rem 0 2.6rem; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -120px -140px auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hero-accent) 14%, transparent) 0%, transparent 68%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: var(--hero-ink); font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 700; }
.hero .eyebrow {
  font-family: var(--font-meta); font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--hero-accent); margin: 0 0 .7rem;
}
.hero .lead { color: var(--hero-ink); font-size: clamp(1.05rem, .98rem + .4vw, 1.28rem); max-width: 60ch; margin: .8rem 0 0; }
.hero .meta { color: var(--hero-ink-soft); font-size: .92rem; max-width: 72ch; margin: 1rem 0 0; }
.hero .chapter-no {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(3rem, 2rem + 6vw, 6rem);
  line-height: .9; color: var(--hero-accent); opacity: .9; display: block; margin-bottom: .3rem;
}
.hero blockquote {
  margin: 1.6rem 0 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 4px solid var(--hero-accent); color: var(--hero-ink); font-style: italic; max-width: 62ch;
}
.hero blockquote cite { display: block; font-style: normal; font-size: .88rem; color: var(--hero-ink-soft); margin-top: .5rem; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .88rem; color: var(--ink-soft); padding: .9rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; min-height: 24px; }
/* Breadcrumb links are standalone targets, so they carry the 24px minimum. */
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; padding: .15rem .25rem; border-radius: 5px; }
.crumbs a:hover { background: var(--paper-alt); }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--border-strong); }

/* ---------- Prose blocks ---------- */
.prose-block { padding: 2.6rem 0 .6rem; }
.prose-block h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); }
.prose-block .kicker {
  font-family: var(--font-meta); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .5rem;
}
.prose-block .standfirst { font-size: 1.18rem; font-weight: 500; color: var(--ink); max-width: 56ch; margin: 0 0 1.1rem; }
.callout {
  margin: 1.6rem 0 0; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: var(--paper-alt); border-left: 5px solid var(--accent);
}
.callout p { margin: 0; }

/* ---------- Cluster navigation ---------- */
.cluster-nav {
  position: sticky; top: var(--header-h, 4.2rem); z-index: 60;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-block: 1px solid var(--border); padding: .55rem 0; margin-top: 2.2rem;
}
.cluster-nav h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-family: var(--font-meta); margin: 0 0 .45rem; }
.cluster-nav ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.cluster-nav a {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px;
  padding: .4rem .75rem; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: .88rem; font-weight: 500; color: var(--ink); text-decoration: none; background: var(--paper);
}
.cluster-nav a:hover { border-color: var(--accent); background: var(--paper-alt); }
.cluster-nav a[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.dot { width: .7rem; height: .7rem; border-radius: 3px; background: var(--cluster, var(--accent)); flex: none; }

/* ---------- Cluster sections ---------- */
.cluster { padding: 2.6rem 0 .4rem; }
.cluster-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; border-bottom: 3px solid var(--cluster, var(--accent)); padding-bottom: .6rem; margin-bottom: 1.6rem; }
.cluster-head h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); margin: 0; }
.cluster-head .count { font-family: var(--font-meta); font-size: .82rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Strategy cards ---------- */
.strategies { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.strategy {
  border: 1px solid var(--border); border-left: 6px solid var(--cluster, var(--accent));
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem 1.5rem; scroll-margin-top: calc(var(--header-h, 4.2rem) + var(--clusternav-h, 4rem) + 1rem);
}
.strategy:target { outline: 3px solid var(--focus); outline-offset: 4px; }
.strategy__top { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .5rem; }
.strategy__icon { font-size: 1.6rem; line-height: 1; flex: none; }
.strategy__no {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  color: #fff; background: var(--cluster-badge, var(--cluster, var(--accent)));
  border-radius: 7px; padding: .2rem .5rem; flex: none; letter-spacing: .02em;
}
.strategy h3 { font-size: 1.22rem; margin: 0; }
.strategy h3 a { color: inherit; text-decoration: none; }
.strategy h3 a:hover { text-decoration: underline; }
.strategy__summary { font-size: 1.02rem; color: var(--ink); margin: .1rem 0 1rem; }

.strategy__body h4 {
  font-family: var(--font-meta); font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); margin: 1.1rem 0 .3rem;
}
.strategy__body p { margin: 0 0 .5rem; font-size: .98rem; }
.strategy__body ol { margin: .2rem 0 .6rem; padding-left: 1.25rem; }
.strategy__body ol li { margin-bottom: .35rem; font-size: .98rem; }
.strategy__watch {
  margin-top: 1rem; padding: .8rem 1rem; border-radius: 9px;
  background: var(--paper-alt); border-left: 4px solid var(--border-strong);
}
.strategy__watch p { margin: 0; font-size: .95rem; }
.strategy__watch strong { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.chip {
  font-family: var(--font-meta); font-size: .78rem; color: var(--ink);
  background: var(--paper-alt); border: 1px solid var(--border);
  border-radius: 7px; padding: .3rem .6rem;
}
.chip b { font-weight: 600; color: var(--ink-soft); text-transform: uppercase; font-size: .68rem; letter-spacing: .1em; margin-right: .3rem; }
.permalink {
  font-family: var(--font-meta); font-size: .78rem; color: var(--ink-soft);
  text-decoration: none; margin-left: auto; align-self: center;
  min-width: 2.6rem; min-height: 1.7rem; padding: .25rem .5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.permalink:hover { color: var(--accent-ink); background: var(--paper-alt); text-decoration: underline; }

/* ---------- Chapter index cards ---------- */
.chapter-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); margin: 2rem 0; padding: 0; list-style: none; }
.chapter-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.chapter-card__band { background: var(--hero-bg); color: #fff; padding: 1.2rem 1.3rem; }
.chapter-card__band .no { font-family: var(--font-head); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--hero-accent); }
.chapter-card__band h3 { color: #fff; font-size: 1.25rem; margin: .3rem 0 0; }
.chapter-card__body { padding: 1.1rem 1.3rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.chapter-card__body p { font-size: .97rem; color: var(--ink-soft); margin: 0 0 1rem; }
.chapter-card__clusters { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chapter-card__clusters li { font-family: var(--font-meta); font-size: .76rem; color: var(--ink); border: 1px solid var(--border); border-radius: 999px; padding: .18rem .55rem; display: inline-flex; align-items: center; gap: .35rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; overflow-wrap: break-word;
  background: var(--accent-ink); color: #fff; font-weight: 600; text-decoration: none;
  padding: .6rem 1.1rem; border-radius: 9px; margin-top: auto; align-self: flex-start;
}
.btn:hover { background: var(--ink); }
.btn--ghost { background: transparent; color: var(--accent-ink); border: 2px solid var(--accent-ink); }
.btn--ghost:hover { background: var(--accent-ink); color: #fff; }

/* ---------- Stat strip ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 2rem 0; padding: 0; list-style: none; }
.stats li { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--paper-alt); max-width: none; }
.stats .n { font-family: var(--font-head); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--accent-ink); display: block; }
.stats .l { font-size: .92rem; color: var(--ink-soft); display: block; margin-top: .3rem; }

/* ---------- Prev / next ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin: 3rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.pager a { display: block; max-width: 24rem; text-decoration: none; color: var(--ink); }
.pager a span { display: block; font-family: var(--font-meta); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.pager a strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--accent-ink); }
.pager a:hover strong { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #16202b; color: #ced8de; margin-top: 4rem; padding: 2.6rem 0 2rem; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--brand-grad); margin: -2.6rem 0 2.2rem; }
.site-footer a { color: #ffd166; }
.site-footer .motto { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.05rem; margin: 0 0 .5rem; }
.site-footer .motto span { color: var(--gold); text-transform: uppercase; }
.site-footer p { font-size: .92rem; max-width: 74ch; }
.site-footer img { height: 34px; width: auto; margin-bottom: .8rem; }
.licence { display: flex; gap: .4rem; margin: 1rem 0 0; }
.licence span {
  font-family: var(--font-meta); font-weight: 600; font-size: .72rem; color: #ffd166;
  border: 1px solid #ffd166; border-radius: 50%; width: 1.9rem; height: 1.9rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; left: 1.1rem; bottom: 1.1rem; z-index: 140;
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: .5rem .9rem; text-decoration: none; font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .18s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { border-color: var(--accent); }

/* =====================================================================
   Per-chapter theming. Values lifted from the original infographics so
   each page carries the identity of the graphic it expands.
   ===================================================================== */
[data-chapter="retrieval-practice"] {
  --accent: #e17055; --accent-ink: #9c3f26;
  --hero-bg: linear-gradient(135deg, #2d3436 0%, #1a1f24 50%, #0f1317 100%);
  --hero-accent: #ff9d76;
}
[data-chapter="formative-assessment"] {
  --accent: #3498db; --accent-ink: #1d6a9c;
  --hero-bg: linear-gradient(135deg, #2c3e50 0%, #1a2530 50%, #0f1922 100%);
  --hero-accent: #74b9ff;
}
[data-chapter="feedback"] {
  --accent: #c2185b; --accent-ink: #9c1049;
  --hero-bg: linear-gradient(135deg, #f5c518 0%, #f0b400 50%, #e8a800 100%);
  --hero-ink: #1a1a1a; --hero-ink-soft: #4a3a00; --hero-accent: #9c1049;
}
[data-chapter="questioning-and-discussion"] {
  --accent: #00796b; --accent-ink: #00584e;
  --hero-bg: linear-gradient(135deg, #00574a 0%, #00433a 50%, #00382e 100%);
  --hero-accent: #f1c40f;
}
[data-chapter="explanations-and-modelling"] {
  --accent: #706fd3; --accent-ink: #4a49a0;
  --hero-bg: linear-gradient(135deg, #40407a 0%, #2c2c54 50%, #1e1e3f 100%);
  --hero-accent: #ffb142;
}
[data-chapter="metacognition-and-self-regulation"] {
  --accent: #c2185b; --accent-ink: #9c1049;
  --hero-bg: linear-gradient(135deg, #f2bc36 0%, #e8ae1f 100%);
  --hero-ink: #1a1a1a; --hero-ink-soft: #4a3a00; --hero-accent: #9c1049;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .strategy { padding: 1.2rem 1.1rem 1.3rem; }
  .brand { font-size: .92rem; }
}

/* ---------- Motion, contrast, print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (prefers-contrast: more) {
  :root { --ink-soft: #33424e; --border: #98a8b3; --border-strong: #6d7d88; }
  .strategy, .chapter-card, .stats li { border-width: 2px; }
}

@media (forced-colors: active) {
  .strategy, .chapter-card, .cluster-nav a, .chip, .stats li { border: 1px solid CanvasText; }
  .strategy__no, .btn { forced-color-adjust: none; }
  .dot { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .cluster-nav, .a11y-widget, .to-top, .pager, .skip-links { display: none !important; }
  body { font-size: 11pt; }
  .hero { background: none !important; color: #000; }
  .hero h1, .hero .lead, .hero blockquote { color: #000; }
  .strategy { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
  .strategy h3 a::after, .permalink::after { content: ""; }
}

/* =====================================================================
   Reading-controls widget (ported from aigovernance.ictevangelist.com)
   ===================================================================== */
html.a11y-contrast {
  --ink: #000000; --ink-soft: #1f2b35; --border: #7f8f9a; --border-strong: #5c6c77;
  --paper-alt: #eef2f5;
}
html.a11y-contrast a { text-decoration: underline; }
html.a11y-contrast .strategy, html.a11y-contrast .chapter-card,
html.a11y-contrast .stats li, html.a11y-contrast .chip { border-color: #5c6c77; }
html.a11y-contrast .strategy__summary, html.a11y-contrast .chapter-card__body p,
html.a11y-contrast .stats .l, html.a11y-contrast .crumbs { color: var(--ink-soft); }
html.a11y-contrast .hero { --hero-ink-soft: #ffffff; }

html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing .lead,
html.a11y-spacing .standfirst, html.a11y-spacing blockquote p {
  line-height: 1.9; letter-spacing: .02em; word-spacing: .1em;
}
html.a11y-spacing p { margin-bottom: 1.5em; }
html.a11y-spacing li { margin-bottom: .75em; }

.a11y-widget { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 150; }
.a11y-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent-ink); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(22,32,43,.28);
}
.a11y-fab:hover { background: var(--ink); }
.a11y-panel {
  position: absolute; right: 0; bottom: 62px; width: min(19rem, calc(100vw - 2.2rem));
  background: var(--paper); color: var(--ink); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; box-shadow: 0 10px 30px rgba(22,32,43,.22);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel::before { content: ""; display: block; height: 4px; border-radius: 3px; background: var(--brand-grad); margin: -.2rem 0 .8rem; }
.a11y-panel__title { font-size: 1.02rem; margin: 0 0 .7rem; font-family: var(--font-head); font-weight: 700; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .55rem 0; }
.a11y-row__label { font-size: .92rem; }
.a11y-btns { display: inline-flex; align-items: center; gap: .3rem; }
.a11y-size-ind { font-size: .82rem; color: var(--ink-soft); min-width: 3.2em; text-align: center; }
.a11y-ctl, .a11y-toggle {
  min-height: 36px; min-width: 44px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--border-strong);
  border-radius: 7px; font: 600 .86rem/1 var(--font-body); padding: .45rem .7rem;
}
.a11y-ctl:hover, .a11y-toggle:hover { border-color: var(--accent); }
.a11y-toggle[aria-pressed="true"] { background: var(--accent-ink); color: #fff; border-color: var(--accent-ink); }
.a11y-reset {
  margin-top: .8rem; width: 100%; min-height: 44px; cursor: pointer;
  background: var(--accent-ink); color: #fff; border: 0; border-radius: 8px;
  font: 600 .9rem/1 var(--font-body); padding: .6rem;
}
.a11y-reset:hover { background: var(--ink); }
.a11y-note { font-size: .76rem; color: var(--ink-soft); margin: .8rem 0 0; line-height: 1.5; }
@media print { .a11y-widget { display: none !important; } }

/* =====================================================================
   Second pass: measure, chapters panel, infographic, praise, downloads,
   filter. Added after reviewing the first build end to end.
   ===================================================================== */

/* ---------- Reading measure ----------
   The first build ran to 90 characters a line in the hero meta and the
   footer, which is well past comfortable. 66 is the ceiling now, and the
   narrow wrapper is tightened to match. */
:root { --measure: 66ch; }
.wrap--narrow { width: min(100% - 2.5rem, 760px); }
.hero .meta { max-width: 62ch; }
.hero .lead { max-width: 46ch; }
.site-footer p { max-width: 66ch; }
.prose-block .standfirst { max-width: 44ch; }

/* ---------- Header: chapters panel at every width ---------- */
.header-inner { flex-wrap: nowrap; position: relative; }
.nav-toggle { display: inline-flex; }
.main-nav {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 120;
  width: min(24rem, calc(100vw - 2.5rem));
  background: var(--paper); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 12px 34px rgba(22,32,43,.18);
  padding: .5rem;
}
.main-nav[hidden] { display: none; }
.main-nav ul { flex-direction: column; gap: .1rem; justify-content: flex-start; }
.main-nav li { width: 100%; }
.main-nav a {
  width: 100%; gap: .65rem; padding: .6rem .7rem; font-size: .96rem;
  border-radius: 8px; align-items: baseline;
}
.main-nav a[aria-current="page"] { box-shadow: none; background: var(--paper-alt); }
.nav-no {
  font-family: var(--font-head); font-size: .8rem; font-weight: 700;
  color: var(--border-strong); flex: none; min-width: 1.4em;
}
.main-nav a[aria-current="page"] .nav-no { color: var(--accent); }
.nav-title { flex: 1; }

/* ---------- Hero additions ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0 0; }
.btn--light { background: #fff; color: #16202b; }
.btn--light:hover { background: var(--hero-accent); color: #16202b; }
.btn--outline { background: transparent; color: var(--hero-ink); border: 2px solid currentColor; }
.btn--outline:hover { background: var(--hero-ink); color: #16202b; }
.btn--big { font-size: 1.05rem; padding: .85rem 1.4rem; }
.btn__meta { font-weight: 400; opacity: .8; font-size: .86rem; margin-left: .15rem; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 1.6rem 0 0;
  font-family: var(--font-meta); font-size: .84rem; color: var(--hero-ink-soft); max-width: none;
}
.hero-facts span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-facts span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ---------- Tinted band ---------- */
.band { background: var(--paper-alt); border-block: 1px solid var(--border); margin-top: 2.5rem; padding-bottom: 2.6rem; }

/* ---------- The infographic ---------- */
.infographic-figure { margin: 1.4rem 0 0; }
.infographic-figure a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.infographic-figure img { display: block; width: 100%; height: auto; }
.infographic-figure figcaption { font-size: .92rem; color: var(--ink-soft); margin-top: .8rem; max-width: 66ch; }

/* ---------- Strategy card: the classroom picture paragraph ---------- */
.strategy__picture { font-size: .99rem; color: var(--ink); margin: 0 0 .2rem; }
.chip--also a { color: var(--accent-ink); }
.chip--also a + a { margin-left: .3rem; }

/* ---------- Cluster nav plus filter ---------- */
.cluster-nav__inner { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1.6rem; justify-content: space-between; }
.cluster-nav__groups { flex: 1 1 24rem; min-width: 0; max-width: 100%; }
.cluster-nav__groups[aria-hidden="true"] { opacity: .45; }
.cluster-nav a .n { font-family: var(--font-meta); font-size: .76rem; color: var(--ink-soft); }
.filter { flex: 0 1 19rem; min-width: 0; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; position: relative; }
.filter label { min-width: 0; font-family: var(--font-meta); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); width: 100%; }
.filter input {
  flex: 1 1 10rem; min-width: 0; max-width: 100%; min-height: 44px; font: 400 .95rem var(--font-body);
  padding: .5rem .7rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--border-strong); border-radius: 8px;
}
.filter input:disabled { opacity: .55; }
.filter input::placeholder { color: var(--ink-soft); opacity: .85; }
.filter__clear {
  min-height: 44px; padding: .45rem .8rem; cursor: pointer;
  font: 600 .86rem var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--border-strong); border-radius: 8px;
}
.filter__clear:hover { border-color: var(--accent); }
.filter__status { width: 100%; min-width: 0; max-width: 100%; margin: 0; font-size: .82rem; color: var(--ink-soft); min-height: 1.2em; }
.filter__empty { margin: 2rem 0; font-size: 1.05rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }

/* While filtering, drop the cluster rules so results read as one list. */
html.is-filtering .cluster-head { border-bottom-color: var(--border); }

/* ---------- Praise ---------- */
.praise-lead { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); margin: 1.6rem 0 1.3rem; }
.praise-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.praise { margin: 0; background: var(--paper); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.praise blockquote { margin: 0; }
.praise blockquote p { margin: 0; font-size: .97rem; max-width: none; }
.praise--lead blockquote p { font-size: 1.06rem; }
.praise figcaption { margin-top: .9rem; font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--ink); }
.praise figcaption span { display: block; font-family: var(--font-body); font-weight: 400; font-size: .86rem; color: var(--ink-soft); margin-top: .15rem; }

/* ---------- Work with Mark ---------- */
.mini-quotes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin-top: 1.6rem; }
.mini-quote { margin: 0; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.mini-quote blockquote { margin: 0; }
.mini-quote blockquote p { margin: 0; font-size: .93rem; max-width: none; }
.mini-quote figcaption { margin-top: .7rem; font-weight: 600; font-size: .88rem; }
.mini-quote figcaption span { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Downloads ---------- */
.download-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; margin: 1.8rem 0 0; padding: 0; }
.download-grid li { max-width: none; }
.download-grid a { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.download-grid a:hover { border-color: var(--accent); }
/* The six infographics are not all exactly the same height. Crop the
   thumbnails to a shared ratio so the captions line up across the row. */
.download-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-bottom: 1px solid var(--border); }
.download-grid a { display: flex; flex-direction: column; height: 100%; }
.download-grid span { margin-top: auto; }
.download-grid span { display: block; padding: .7rem .9rem .9rem; font-size: .86rem; color: var(--ink-soft); }
.download-grid strong { display: block; font-family: var(--font-head); font-size: .98rem; color: var(--ink); margin-bottom: .1rem; }

/* ---------- Chapter card band is now a link ---------- */
.chapter-card__band { display: block; text-decoration: none; }
.chapter-card__band:hover h3 { text-decoration: underline; }

@media (max-width: 560px) {
  .cluster-nav__inner { align-items: stretch; }
  .filter { flex-basis: 100%; }
}

@media print {
  .filter, .infographic-figure a { break-inside: avoid; }
  .hero-actions, .download-grid, .mini-quotes { display: none !important; }
}

/* =====================================================================
   Third pass: the call to action, and the analytics consent banner.
   ===================================================================== */

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--hero-bg); color: var(--hero-ink);
  margin-top: 3rem; padding: 2.6rem 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0 auto auto 0; right: 0; height: 4px;
  background: var(--brand-grad);
}
.cta-band__inner { display: flex; flex-wrap: wrap; gap: 1.4rem 2.5rem; align-items: center; justify-content: space-between; }
.cta-band__inner > div:first-child { flex: 1 1 24rem; min-width: 0; }
.cta-band h2 { color: var(--hero-ink); font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); margin: 0 0 .5rem; }
.cta-band p { color: var(--hero-ink); margin: 0; max-width: 56ch; font-size: 1.02rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .7rem; flex: 1 1 auto; min-width: 0; }
/* .cta-band clips its decorative edge, so the buttons must wrap rather than
   run past it and get cut off at large text sizes. */
.cta-band__actions .btn { max-width: 100%; }
.cta-band :focus-visible { outline-color: #ffd166; }

/* ---------- Consent banner ---------- */
.consent {
  position: fixed; left: 1.1rem; right: 1.1rem; bottom: 1.1rem; z-index: 200;
  max-width: 30rem; margin-inline: auto;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(22,32,43,.28); padding: 1.2rem 1.3rem 1.3rem;
}
.consent::before { content: ""; display: block; height: 4px; border-radius: 3px; background: var(--brand-grad); margin: -.3rem 0 .9rem; }
.consent__title { font-family: var(--font-head); font-size: 1.08rem; margin: 0 0 .45rem; }
.consent__body { font-size: .93rem; color: var(--ink-soft); margin: 0 0 1rem; max-width: none; }
.consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.consent button {
  min-height: 44px; cursor: pointer; border-radius: 8px;
  font: 600 .92rem var(--font-body); padding: .6rem 1.1rem;
}
.consent__yes { background: var(--accent-ink); color: #fff; border: 0; }
.consent__yes:hover { background: var(--ink); }
.consent__no { background: var(--paper); color: var(--ink); border: 1px solid var(--border-strong); }
.consent__no:hover { border-color: var(--accent); }

@media (max-width: 620px) {
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { flex: 1 1 12rem; justify-content: center; }
}

@media print { .consent, .cta-band { display: none !important; } }

/* =====================================================================
   Fourth pass: written in response to the people who endorsed the guide.
   Principles (Elder), measurement (Kingsley), CPD sessions (Sale, Hughes),
   and a cross-chapter finder (Gwilliam, Fletcher-Saxon).
   ===================================================================== */

/* ---------- Principles ---------- */
.principles { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.principles > li { max-width: none; }
.principle {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.principle__no {
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; line-height: 1;
  color: #fff; background: var(--accent-ink); border-radius: 9px;
  min-width: 2.3rem; height: 2.3rem; display: grid; place-items: center; flex: none;
}
.principle h3 { font-size: 1.12rem; margin: .2rem 0 .35rem; }
.principle p { margin: 0 0 .5rem; font-size: .99rem; }
.principle__seen { font-family: var(--font-meta); font-size: .82rem; color: var(--ink-soft); margin: 0; }
.principle__seen span { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; margin-right: .35rem; }
.principle__seen a + a { margin-left: .5rem; }

/* ---------- CPD sessions ---------- */
.sessions { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.sessions > li { max-width: none; }
.session { background: var(--paper); border: 1px solid var(--border); border-top: 5px solid var(--accent); border-radius: var(--radius); padding: 1.2rem 1.3rem 1.3rem; }
.session__len { font-family: var(--font-meta); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .3rem; }
.session h3 { font-size: 1.1rem; margin: 0 0 .7rem; }
.session ol { margin: 0; padding-left: 1.2rem; }
.session li { font-size: .95rem; margin-bottom: .45rem; }

/* ---------- Find a strategy ---------- */
.finder { background: var(--paper-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem 1.4rem; margin-bottom: 2rem; }
.finder h3 { font-family: var(--font-meta); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin: 0 0 .55rem; }
.finder__search { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.finder__search label { width: 100%; font-family: var(--font-meta); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.finder__search input {
  flex: 1 1 16rem; min-width: 0; max-width: 100%; min-height: 48px;
  font: 400 1.02rem var(--font-body); padding: .55rem .8rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--border-strong); border-radius: 9px;
}
.finder__search input:disabled { opacity: .55; }
.finder__starters, .finder__chapters { margin-top: 1.2rem; }
.finder__starters ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.finder__starters li { max-width: none; }
.starter, .finder__chip {
  min-height: 40px; cursor: pointer; text-align: left;
  font: 500 .9rem var(--font-body); padding: .45rem .8rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--border-strong); border-radius: 999px;
}
.starter:hover, .finder__chip:hover { border-color: var(--accent); background: var(--paper); }
.finder__chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.finder__chip { display: inline-flex; align-items: center; gap: .45rem; }
.finder__chip[aria-pressed="true"] { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); font-weight: 600; }
.finder__status { margin: 1.1rem 0 0; font-size: .92rem; color: var(--ink-soft); min-height: 1.3em; }

.findings-group + .findings-group { margin-top: 2rem; }
.findings-group__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem .7rem;
  font-family: var(--font-head); font-size: 1.08rem; margin: 0 0 .8rem;
  padding-bottom: .45rem; border-bottom: 2px solid var(--border);
}
.findings-group__head .dot { align-self: center; }
.findings-group__link { margin-left: auto; font-family: var(--font-meta); font-size: .82rem; font-weight: 600; }

.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.findings > li { max-width: none; }
.finding a {
  display: flex; gap: .8rem; align-items: flex-start; height: 100%;
  padding: .9rem 1rem; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--border); border-radius: 10px;
}
.finding a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.finding__icon { font-size: 1.3rem; line-height: 1.2; flex: none; }
.finding__text { display: block; min-width: 0; }
.finding__text strong { display: block; font-family: var(--font-head); font-size: 1.02rem; margin-bottom: .2rem; }
.finding__sum { display: block; font-size: .9rem; color: var(--ink-soft); margin-bottom: .45rem; }
.finding__where { display: flex; align-items: center; gap: .4rem; font-family: var(--font-meta); font-size: .78rem; color: var(--ink-soft); }

/* ---------- Sign-up, when Mark switches it on ---------- */
.signup { margin-top: 2rem; padding: 1.3rem 1.4rem; background: var(--paper-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.signup h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.signup p { margin: 0 0 1rem; font-size: .97rem; color: var(--ink-soft); }
.signup iframe { border: 0; width: 100%; }

@media (max-width: 560px) {
  .principle { flex-direction: column; gap: .7rem; }
}

/* ---------- Privacy notice ---------- */
/* The two-column table is nicer to read when there is room for it, and turns
   into a sideways scroll when there isn't. A container query means the switch
   follows the space actually available rather than the viewport, so it also
   does the right thing at 200% text on a small screen. */
.table-scroll { margin: 1.4rem 0; max-width: 100%; container-type: inline-size; }
.facts { border-collapse: collapse; width: 100%; font-size: .96rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: .8rem .9rem; border-bottom: 1px solid var(--border); }
.facts th { width: 34%; font-family: var(--font-meta); font-weight: 600; color: var(--ink); background: var(--paper-alt); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

.facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
.facts th { border-bottom: 0; padding-bottom: .3rem; }
.facts td { padding-top: 0; }
.facts tr { border-bottom: 1px solid var(--border); }
.facts tr:last-child { border-bottom: 0; }

@container (min-width: 34rem) {
  .facts { display: table; width: 100%; }
  .facts tbody { display: table-row-group; }
  .facts tr { display: table-row; border-bottom: 0; }
  .facts th, .facts td { display: table-cell; border-bottom: 1px solid var(--border); padding: .8rem .9rem; }
  .facts th { width: 34%; }
  .facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
}

@media print {
  .finder, .finder__starters, .finder__chips { display: none !important; }
  .session, .principle { break-inside: avoid; }
}
