/*
 * Legal Disclaimer for Basic Package licence
 *
 * Basic Licence Package with limited parameters.
 *
 * Should the license page views limit be exceeded the license holder will be required to contact Lineto.com for an upgrade.
 *
 * It is strictly prohibited to rename the font and to download or use these fonts in any other media.
 *
 * These Web fonts are licensed exclusively for the use on the following domain(s) and their subdomains:
 *
 * hackney.pe, up to 5k monthly page viewsFor up to 5k followers on all social media channels belonging to P.E. Hackney
 *
 */

@font-face {
  font-family: "ChampionSansCondLLWeb-Bold";
  src: url("../fonts/ChampionSansCondLLWeb-Bold.woff2") format("woff2"),
       url("../fonts/ChampionSansCondLLWeb-Bold.woff") format("woff");
  font-display: swap;
}

/* ============================================================
   P.E. HACKNEY — one stylesheet for the whole site.
   Helvetica-led and bare, after the original hackney.pe.
   ============================================================ */
:root {
  --dark: #1b1b1c;
  --red: #fe3c00;
  --cream: #f4e9db;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --champion: "ChampionSansCondLLWeb-Bold", "Arial Narrow", sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 38rem;
}

/* Themes: theme.js picks one per visit and keeps it across pages */
body, .theme-dark { --bg: var(--dark);  --fg: var(--red); }
.theme-red        { --bg: var(--red);   --fg: #ffffff; }
.theme-cream      { --bg: var(--cream); --fg: var(--red); }
body, .theme-dark, .theme-red, .theme-cream { --line: color-mix(in srgb, var(--fg) 28%, transparent); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
b, strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Placeholder copy still to be supplied */
.todo { background: var(--fg); color: var(--bg); padding: 0 0.3em; font-style: normal; }

/* ------------------------------------------------------------ type */
.kicker, .crumbs, .k, .h, .foot-links a, .nav a, .btn, .step-count {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.h { font-weight: 700; font-size: 13px; letter-spacing: 0.12em; margin: 0 0 14px; }
.small { font-size: 14px; line-height: 1.6; max-width: var(--measure); }
.small + .small { margin-top: 10px; }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 0.9em; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 22px;
  border: 1.5px solid var(--fg); border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-size: 13px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-sm { min-height: 32px; padding: 0 16px; font-size: 11px; }
.btn.is-pending { opacity: 0.45; cursor: default; }
.btn.is-pending:hover { background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: 0.5; cursor: default; }

.pill {
  display: inline-flex; align-items: center;
  border: 2px solid var(--fg); border-radius: 999px;
  font-weight: 500; text-transform: uppercase; line-height: 1.1;
}

/* ------------------------------------------------------------ header (directories + inner pages) */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter) 0;
}
.home { display: block; color: var(--fg); }
.home svg { width: 22px; height: 22px; }
.home:hover { opacity: 0.7; }
.nav ul { display: flex; gap: 28px; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

/* ------------------------------------------------------------ page titles */
.title { padding: clamp(28px, 4vw, 52px) var(--gutter) clamp(20px, 2.6vw, 32px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.kicker { margin-bottom: 8px; opacity: 0.8; }
.title-row { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px); }
.title h1 {
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.lede { margin-top: 14px; max-width: 40rem; font-size: clamp(15px, 1.3vw, 18px); font-weight: 300; line-height: 1.5; }

/* Rotating stamp from the deck */
.stamp { width: clamp(46px, 4vw, 62px); flex: none; color: var(--fg); }
.stamp svg { overflow: visible; }
.stamp text { fill: currentColor; font: 500 15px var(--sans); letter-spacing: 0.12em; }
.stamp line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.stamp-ring { transform-origin: 100px 100px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.block { padding: 0 var(--gutter) clamp(32px, 4vw, 56px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: start; }

/* ------------------------------------------------------------ footer */
.foot { padding: 28px var(--gutter) 24px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.legal { margin-top: 12px; font-size: 11px; letter-spacing: 0.04em; opacity: 0.6; }
.is-home .foot { border-top: 0; display: flex; justify-content: center; padding-top: 20px; }

/* ============================================================
   PRINTER'S CROP MARKS (home lockup + manifesto only)
   ============================================================ */
.crop { --cm-len: clamp(22px, 3vw, 45px); --cm-gap: clamp(12px, 1.7vw, 26px); position: relative; }
.cm { position: absolute; width: 0; height: 0; pointer-events: none; }
.cm::before, .cm::after { content: ""; position: absolute; background: var(--fg); }
.cm::before { width: 1px; height: var(--cm-len); }
.cm::after { width: var(--cm-len); height: 1px; }
.cm-tl { top: 0; left: 0; }      .cm-tl::before { left: 0; bottom: var(--cm-gap); } .cm-tl::after { top: 0; right: var(--cm-gap); }
.cm-tr { top: 0; right: 0; }     .cm-tr::before { left: 0; bottom: var(--cm-gap); } .cm-tr::after { top: 0; left: var(--cm-gap); }
.cm-bl { bottom: 0; left: 0; }   .cm-bl::before { left: 0; top: var(--cm-gap); }    .cm-bl::after { top: 0; right: var(--cm-gap); }
.cm-br { bottom: 0; right: 0; }  .cm-br::before { left: 0; top: var(--cm-gap); }    .cm-br::after { top: 0; left: var(--cm-gap); }

/* ============================================================
   HOME
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px var(--gutter) 48px;
}
.hero-mark { width: clamp(56px, 5.4vw, 84px); color: var(--fg); margin-bottom: 8px; }
.lockup {
  width: min(100% - 2 * (var(--cm-len) + var(--cm-gap)), 760px);
  margin: calc(var(--cm-len) + var(--cm-gap)) auto;
  padding: clamp(26px, 4.4vw, 52px) clamp(4px, 2.4vw, 22px);
}
.lockup-in { container-type: inline-size; }
.lk-head span, .lk-sub span, .figure-line span {
  display: block; white-space: nowrap;
  text-align: justify; text-align-last: justify; text-justify: inter-word;
  text-transform: uppercase;
}
.lk-head { font-size: 9cqi; font-weight: 700; line-height: 0.98; letter-spacing: -0.01em; }
.lk-pills { display: flex; justify-content: space-between; margin: 6.4cqi 0; }
.lk-pills .pill { font-size: max(11px, 3.1cqi); padding: 0.42em 0.9em; border-width: max(1.5px, 0.38cqi); }
.lk-sub { font-size: max(10px, 2.55cqi); font-weight: 500; line-height: 1.25; letter-spacing: 0.01em; }
.doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.figure { position: relative; width: 100%; aspect-ratio: 1440 / 1240; }
.figure-art {
  position: absolute; inset: 0; background: var(--fg);
  -webkit-mask: url("../images/figure.svg") center / 100% 100% no-repeat;
          mask: url("../images/figure.svg") center / 100% 100% no-repeat;
}
.figure-foot {
  position: absolute; left: 50%; bottom: 2.5%; transform: translateX(-50%);
  width: clamp(180px, 26vw, 380px); text-align: center; container-type: inline-size;
}
.figure-foot .copy { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.55; margin-bottom: 10px; }
.figure-line span { font-size: 5.4cqi; font-weight: 700; line-height: 1.05; }
.figure-line sup { font-size: 0.55em; font-weight: 400; vertical-align: super; line-height: 0; margin-left: 0.08em; }

/* Drawing pen (homepage only) */
#drawing-canvas { position: absolute; top: 0; left: 0; width: 100%; z-index: 999; pointer-events: none; display: block; }
#scribbleBtn { display: none; }
body.scribbling { overflow: hidden; touch-action: none; }
body.scribbling #drawing-canvas { pointer-events: auto; touch-action: none; }
.is-home { cursor: crosshair; }
.is-home.pen-off { cursor: auto; }
.is-home a, .is-home button { cursor: pointer; }

/* ============================================================
   DIRECTORIES (Move with us, Why we move)
   ============================================================ */
.is-dir main { display: flex; flex-direction: column; }
.dir { padding: 0 var(--gutter) clamp(40px, 6vw, 80px); counter-reset: d; }
.dir li { border-top: 1px solid var(--line); }
.dir li:last-child { border-bottom: 1px solid var(--line); }
.dir a, .dir .d-row {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr) minmax(0, 0.9fr) 2em;
  align-items: baseline;
  gap: 8px 24px;
  padding: clamp(18px, 2.4vw, 28px) 0;
  text-decoration: none;
}
.d-n { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; opacity: 0.6; }
.d-t { font-size: clamp(28px, 4.2vw, 60px); font-weight: 700; line-height: 0.95; letter-spacing: -0.015em; text-transform: uppercase; }
.d-d { font-size: 14px; font-weight: 300; line-height: 1.45; max-width: 26rem; }
.d-a { font-size: clamp(20px, 2vw, 28px); text-align: right; transition: transform 0.2s; }
.dir a:hover .d-a { transform: translateX(6px); }
.dir a:hover .d-t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.dir .soon { opacity: 0.45; }

/* ============================================================
   THURSDAYS
   ============================================================ */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.facts li { border-top: 2px solid var(--fg); padding-top: 10px; font-size: 14px; line-height: 1.45; }
.facts .k { display: block; margin-bottom: 6px; opacity: 0.75; font-size: 11px; }
.facts b { display: block; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.15; margin-bottom: 2px; }
.notice { margin-top: 16px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }

.steps-list { counter-reset: s; display: grid; gap: 14px; }
.steps-list li { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; font-size: 15px; line-height: 1.5; }
.steps-list b { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 2px; }

.pay { border-top: 1px solid var(--line); }
.pay li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay b { display: block; font-size: 15px; }
.pay span { font-size: 14px; font-weight: 300; }
.pay-go { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pay-go .todo { font-size: 11px; }
.nq { margin-top: 14px; font-size: 15px; font-weight: 700; }

.faqs { border-top: 1px solid var(--line); margin-bottom: 14px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; font-size: 14px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 18px; line-height: 1; transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 14px; font-size: 14px; max-width: 34rem; }
.split .h + .small, .split .small + .h { margin-top: 0; }
.split > div > .h:not(:first-child) { margin-top: 28px; }

/* ============================================================
   WHY WE MOVE PAGES
   ============================================================ */
.defs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 88px); }
.defs h2 { font-family: var(--champion); font-weight: normal; text-transform: uppercase; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; margin-bottom: 10px; }
.defs p { font-size: clamp(18px, 1.7vw, 24px); font-weight: 300; line-height: 1.35; max-width: 30rem; }

.beliefs { display: grid; gap: 10px; max-width: 46rem; margin-bottom: 20px; }
.beliefs li { font-size: clamp(17px, 1.5vw, 21px); font-weight: 300; line-height: 1.4; }
.beliefs b { font-weight: 700; }

.manifesto-wrap { min-height: calc(100svh - 160px); display: grid; place-items: center; padding: 8px var(--gutter) 48px; }
.manifesto { width: min(100% - 2 * (var(--cm-len) + var(--cm-gap)), 860px); padding: clamp(28px, 4vw, 56px); }
.manifesto .kicker { margin-bottom: 20px; }
.m-text { font-size: clamp(19px, 2.1vw, 30px); line-height: 1.32; letter-spacing: -0.005em; }
.m-text .lt { font-weight: 300; }

.values { border-top: 1px solid var(--line); }
.values li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 32px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.values b { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; }
.values span { font-size: 15px; font-weight: 300; }

.timeline { border-top: 1px solid var(--line); max-width: 56rem; }
.timeline li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.t-when { font-family: var(--champion); text-transform: uppercase; font-size: 22px; line-height: 1.1; }
.timeline b { display: block; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.timeline p { font-size: 15px; font-weight: 300; max-width: 36rem; }
.timeline li:last-child .t-when, .timeline li:last-child b { text-decoration: underline; text-underline-offset: 5px; }

.people { display: grid; gap: 24px; }
.people b { display: block; font-size: 17px; }
.people span { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; margin-bottom: 6px; }
.people p { font-size: 15px; max-width: 30rem; }

.small-print { font-size: 14px; line-height: 1.6; }
.small-print p + p { margin-top: 10px; }
.small-print .h { margin-top: 24px; }
.small-print .h:first-child, .small-print .prose > p:first-child + .h { margin-top: 0; }
.small-print ul { margin: 8px 0; padding-left: 1.1em; list-style: disc; }
.small-print li + li { margin-top: 4px; }

/* ============================================================
   GET INVOLVED: one question at a time
   ============================================================ */
.steps { position: relative; max-width: 44rem; min-height: 230px; }
.step { border: 0; display: grid; gap: 18px; margin-bottom: 32px; }
.step-count { display: none; margin-bottom: 14px; opacity: 0.7; }
.q, .q label { font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; padding: 0; }
.answer {
  width: 100%; border: 0; border-bottom: 2px solid var(--fg); border-radius: 0;
  background: transparent; color: var(--fg);
  font: 400 clamp(19px, 2vw, 26px) var(--sans); padding: 8px 0;
}
.answer::placeholder { color: var(--fg); opacity: 0.35; }
.answer:focus { outline: none; border-bottom-width: 4px; padding-bottom: 6px; }
.step-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border: 1.5px solid var(--fg); border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.choice input:checked + span, .choice span:hover { background: var(--fg); color: var(--bg); }
.choice input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 3px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15px; max-width: 34rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--fg); }
.hp { position: absolute; left: -9999px; }
.form-error { font-size: 14px; font-weight: 700; }
.form-error:empty { display: none; }
.success { display: grid; gap: 12px; max-width: 34rem; }
.success h2 { font-size: clamp(30px, 4vw, 52px); font-weight: 700; text-transform: uppercase; line-height: 1; }
.aside { margin-top: 36px; font-size: 14px; }

.steps.is-stepped .step-count { display: block; }
.steps.is-stepped .step { display: none; margin-bottom: 0; }
.steps.is-stepped .step.is-active { display: grid; animation: step-in 0.45s cubic-bezier(.2,.7,.2,1) both; }
.steps.is-stepped .step.is-leaving { display: grid; animation: step-out 0.22s ease both; }
.steps.is-stepped.go-back .step.is-active { animation-name: step-in-back; }
.steps.is-stepped.go-back .step.is-leaving { animation-name: step-out-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes step-out { to { opacity: 0; transform: translateX(-48px); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes step-out-back { to { opacity: 0; transform: translateX(48px); } }
.success:not([hidden]) { animation: step-in 0.45s cubic-bezier(.2,.7,.2,1) both; }

/* ============================================================
   SMALL SCREENS
   ============================================================ */
@media (max-width: 768px) {
  .nav ul { gap: 18px; }
  .split, .defs { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .dir a, .dir .d-row { grid-template-columns: 2.4em minmax(0, 1fr) 1.4em; }
  .dir .d-d { grid-column: 2 / 3; grid-row: 2; }
  .dir .d-a { grid-column: 3; grid-row: 1; }
  .values li, .timeline li { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 32px; }
  #drawing-canvas { position: fixed; }
  #scribbleBtn { display: inline-flex; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; }
  .is-home .foot { padding-bottom: 84px; }
  .figure { margin-bottom: 96px; }
  .figure-foot { top: 100%; bottom: auto; padding-top: 18px; width: min(300px, 78vw); }
  .pay li { align-items: flex-start; }
  .pay-go { flex-direction: column; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .stamp-ring { animation: none; }
  .btn, .d-a { transition: none; }
  .steps.is-stepped .step.is-active, .steps.is-stepped .step.is-leaving, .success:not([hidden]) { animation: none; }
}

/* ============================================================
   HOMEPAGE LOCKUP, QUIETER — proportions taken from the live
   hackney.pe lockup: marks hug the text, arrows between pills
   ============================================================ */
.hero { padding: 32px var(--gutter) 40px; }
.hero-mark { width: clamp(48px, 4.4vw, 64px); margin-bottom: 0; }
.lockup {
  --cm-len: clamp(20px, 2.6vw, 38px);
  --cm-gap: clamp(12px, 1.5vw, 22px);
  width: min(100% - 2 * (var(--cm-len) + var(--cm-gap)), 560px);
  margin: calc(var(--cm-len) + var(--cm-gap) + 4px) auto;
  padding: 10px clamp(10px, 1.4vw, 18px);
}
.lk-head { font-size: 8.3cqi; line-height: 1; }
.lk-pills { align-items: center; margin: 4.4cqi 0 4cqi; }
.lk-pills .pill { font-size: max(10px, 2.7cqi); padding: 0.32em 0.7em; border-width: max(1.25px, 0.3cqi); }
.lk-pills .arrow { font-size: 3.6cqi; line-height: 1; }
.lk-sub { font-size: max(9px, 2.2cqi); line-height: 1.3; }
.doors { gap: 10px; margin-top: 4px; }
.doors .btn { min-height: 34px; padding: 0 18px; font-size: 11px; }
.lockup { width: min(100% - 2 * (var(--cm-len) + var(--cm-gap)), 600px); }
.lk-pills .pill { font-size: max(10px, 3cqi); }
.lk-sub { font-size: max(9px, 2.5cqi); }
/* Logo back to its earlier size; marks pulled in tight; buttons full size */
.hero-mark { width: clamp(56px, 5.4vw, 84px); margin-bottom: 4px; }
.lockup {
  --cm-len: clamp(18px, 2.2vw, 32px);
  --cm-gap: clamp(6px, 0.8vw, 12px);
  padding: 4px clamp(6px, 0.8vw, 10px);
  margin: calc(var(--cm-len) + var(--cm-gap) + 4px) auto;
}
.doors .btn { min-height: 40px; padding: 0 22px; font-size: 13px; }

/* Paideia Eudaimonia: centred, as on the deck slide */
.pe-hero { text-align: center; padding: clamp(48px, 8vw, 112px) var(--gutter) clamp(40px, 6vw, 80px); }
.pe-hero .kicker { margin-bottom: 14px; }
.pe-hero h1 { font-size: clamp(36px, 6vw, 88px); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; }
.pe-text { max-width: 44rem; margin: clamp(20px, 2.6vw, 32px) auto 0; font-size: clamp(18px, 1.8vw, 24px); font-weight: 300; line-height: 1.4; }
.pe-text b { font-weight: 700; }
.pe-hero + .block .h { text-align: left; }

/* Manifesto: marks pulled in tight, as on the homepage */
.manifesto {
  --cm-len: clamp(18px, 2.2vw, 32px);
  --cm-gap: clamp(6px, 0.8vw, 12px);
  padding: 4px clamp(6px, 0.8vw, 10px);
}
.manifesto .kicker { margin-bottom: 14px; }

/* Home buttons: same text size as the Movement / Mindset / Nutrition pills */
.doors {
  width: min(100% - 2 * (clamp(18px, 2.2vw, 32px) + clamp(6px, 0.8vw, 12px)) - 2 * clamp(6px, 0.8vw, 10px), 580px);
  container-type: inline-size;
  margin-top: 6px;
}
.doors .btn { font-size: max(11px, 3cqi); letter-spacing: 0.02em; min-height: 0; padding: 0.5em 1.1em; border-width: max(1.25px, 0.3cqi); }

/* Us */
.story p { font-size: 16px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); }
.person { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.person img, .no-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.no-photo { border: 1px dashed var(--line); }
.person p { font-size: 14px; line-height: 1.6; max-width: 34rem; }
.more { margin-top: 10px; }
.more summary { cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " +"; }
.more[open] summary::after { content: " –"; }
.more p { margin-top: 10px; }
@media (max-width: 900px) { .people { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .person { grid-template-columns: 1fr; } .person img, .no-photo { max-width: 260px; } }
.no-photo { display: none; }
.person:has(.no-photo) { grid-template-columns: 1fr; }
.small-print ul.doc-links { list-style: none; padding-left: 0; }
.doc-links a { font-weight: 700; }

/* Home buttons: built exactly like the pills (same size ratio of text to button) */
.doors { gap: 4cqi; }
.doors .btn {
  font-size: max(10px, 3cqi);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
  min-height: 0;
  padding: 0.32em 0.7em;
  border-width: max(1.25px, 0.3cqi);
}

/* Us: an open bio takes the full width, the other person moves below, text flows in two columns */
.person:has(.more[open]) { grid-column: 1 / -1; order: -1; grid-template-columns: minmax(0, 0.32fr) minmax(0, 1.68fr); }
.person:has(.more[open]) .person-text > p { max-width: none; }
.more[open] .more-body { column-count: 2; column-gap: clamp(24px, 3vw, 48px); }
.more-body p { break-inside: avoid; margin: 0 0 10px; }
.more[open] summary::before { content: "Close"; }
.more[open] summary { font-size: 0; }
.more[open] summary::before, .more[open] summary::after { font-size: 12px; }
@media (max-width: 900px) { .more[open] .more-body { column-count: 1; } .person:has(.more[open]) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
@media (max-width: 520px) { .person:has(.more[open]) { grid-template-columns: 1fr; } }

/* Support a child */
.support b { font-size: 22px; letter-spacing: 0; }

/* ============================================================
   PAGE FIT — the first screen of every page is complete on load.
   Anything after the fold starts below it; nothing is cut in half.
   ============================================================ */
:root { --hdr: 62px; }
.top { height: var(--hdr); padding-top: 0; }
.fold { min-height: calc(100svh - var(--hdr)); display: flex; flex-direction: column; }
.fold > .pe-hero, .fold > .manifesto-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.fold > .manifesto-wrap { display: grid; place-items: center; }
.cue {
  margin: auto auto 0; padding: 12px 24px 22px;
  font-size: 18px; line-height: 1; text-decoration: none; opacity: 0.55;
  animation: cue 2.4s ease-in-out infinite;
}
.cue:hover { opacity: 1; }
@keyframes cue { 50% { transform: translateY(5px); } }
#more { padding-top: clamp(48px, 7vw, 96px); }

/* Who we are: a screen of its own, so both people arrive whole */
.screen { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: clamp(32px, 4vw, 56px); }
#more > .screen:first-child { margin-top: calc(-1 * clamp(48px, 7vw, 96px)); }
.person img { max-height: 58svh; }

/* Home: no footer; logo 20% larger and sitting a little higher */
.is-home .hero { padding-top: 12px; padding-bottom: 72px; }
.hero-mark { width: clamp(67px, 6.5vw, 101px); margin-top: -16px; margin-bottom: 4px; }
@media (max-width: 768px) {
  .is-home .hero { padding-top: 24px; padding-bottom: 40px; }
  .hero-mark { margin-top: 0; }
  .figure { margin-bottom: 140px; }
}
@media (prefers-reduced-motion: reduce) { .cue { animation: none; } }

/* Footer never sits half on the first screen (js/fit.js) */
.foot-below main { min-height: calc(100svh - var(--hdr)); }

/* Phone covers: the opening of the page fills the first screen; on desktop they do nothing */
.fold-m { display: contents; }
.cue-m { display: none; }
@media (max-width: 768px) {
  .fold-m { display: flex; flex-direction: column; min-height: calc(100svh - var(--hdr)); }
  .fold-m > .title { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 12vh; }
  .fold-m:has(.duo-a) > .title { flex: none; padding-bottom: clamp(20px, 2.6vw, 32px); }
  .fold-m:has(.duo-a) > .duo-a { padding-bottom: 8px; }
  .cue-m { display: block; }
  .fold-m + * { padding-top: 40px; }
}

/* Two-part pages (Support a child, Safeguarding): side by side on desktop */
@media (min-width: 769px) {
  .duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 88px); align-items: start; padding: 0 var(--gutter); }
  .duo .title { grid-column: 1 / -1; padding-left: 0; padding-right: 0; }
  .duo .block { padding-left: 0; padding-right: 0; }
}

/* Directories: rows scale with the height of the screen as well, so the whole list fits */
.dir a, .dir .d-row { padding: clamp(12px, min(2.4vw, 3svh), 28px) 0; }
.d-t { font-size: clamp(26px, min(4.2vw, 6.4svh), 60px); }
.title { padding-top: clamp(20px, min(4vw, 5svh), 52px); }

/* Us: the story reads across three columns on wide screens so it all sits on one screen */
@media (min-width: 1100px) {
  .story { max-width: none; column-count: 3; column-gap: clamp(28px, 3vw, 48px); }
  .story p { break-inside: avoid; }
  .story p + p { margin-top: 0; }
}

/* History: a horizontal timeline on desktop, so the whole story fits one screen */
@media (min-width: 1000px) {
  .timeline { max-width: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 0; }
  .timeline li { display: block; padding: 18px 20px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .timeline .t-when { display: block; margin-bottom: 14px; }
  .timeline p { font-size: 14px; }
}

/* Privacy: an accordion, like the FAQs */
.privacy .faq-body { padding: 0 0 14px; max-width: 40rem; }
.privacy .faq-body p { padding: 0; font-size: 14px; max-width: none; }
.privacy .faq-body p + p { margin-top: 8px; }

/* Home: a full first screen at every size, so the figure never peeks in halfway */
.is-home .hero { min-height: 100svh; }
@media (max-width: 768px) and (max-height: 700px) {
  .cue { padding: 6px 24px 10px; }
  .duo .title { padding-top: 16px; }
  .duo .prose p + p { margin-top: 0.7em; }
}
@media (max-width: 768px) and (max-height: 700px) { .duo .cue-m { display: none; } }

/* Us on phones: each person gets a screen of their own, and the page settles on them whole */
@media (max-width: 768px) {
  html:has(.people) { scroll-snap-type: y proximity; }
  .fold-m, .fold, .person { scroll-snap-align: start; }
  .screen { min-height: 0; padding-top: 0; }
  #more > .screen:first-child { margin-top: 0; }
  .screen > .h { padding-top: 24px; }
  .people { gap: 0; }
  .person { min-height: 100svh; align-content: center; padding: 24px 0; }
  .person img { max-height: 46svh; width: auto; max-width: 100%; }
}

/* ============================================================
   BALANCE — content sits in the middle of each screen, not stacked at the top
   ============================================================ */
/* First screen: content centred between the header and the ↓ */
.fold > :first-child { margin-top: auto; }
.fold > .cue { margin-top: auto; }
.fold .title { padding-top: 0; }
/* Pages that fit on one screen: centred between header and footer */
main { display: flex; flex-direction: column; }
main > :first-child { margin-top: auto; }
main > :last-child { margin-bottom: auto; }
main > .title:first-child, main > .duo:first-child > .title, main > .duo:first-child .fold-m > .title { padding-top: 0; }
/* Further down: on larger screens each section is a screen of its own, centred */
@media (min-width: 769px) {
  #more { padding-top: 0; }
  #more > .block { min-height: 100svh; display: grid; align-content: center; padding-top: clamp(32px, 4vw, 56px); }
  #more > .screen:first-child { margin-top: 0; }
  #more > .block > .h { align-self: end; }
}
@media (min-width: 769px) {
  .fold > .fold-m:first-child > :first-child, main > .fold-m:first-child > :first-child { margin-top: auto; padding-top: 0; }
}

/* ============================================================
   SWISS GRID — Thursdays, Us, Support a child
   12 columns. Headings hold the top of the screen, body content
   holds the bottom; every element sits in its own ruled field.
   ============================================================ */
:root { --cols: repeat(12, minmax(0, 1fr)); --cg: clamp(16px, 2vw, 32px); }
.sw-rule { border-top: 1px solid var(--line); }

/* Breathing room between a heading and what it heads, at every size */
.pg-thursdays .h, .pg-us .h, .pg-support-a-child .h { margin-bottom: clamp(20px, 3svh, 36px); }

@media (min-width: 1000px) {
  /* The opening screen: title band at the top, body band at the bottom */
  .pg-thursdays .fold, .pg-us .fold, .pg-support-a-child .duo {
    display: grid; grid-template-columns: var(--cols); column-gap: var(--cg);
    grid-template-rows: auto 1fr auto auto; align-content: stretch;
    min-height: calc(100svh - var(--hdr)); padding: 0 var(--gutter);
  }
  .pg-thursdays .fold > *, .pg-us .fold > *, .pg-support-a-child .duo > * { margin: 0; }
  .pg-thursdays .fold .title, .pg-us .fold .title, .pg-support-a-child .duo .title {
    grid-column: 1 / -1; grid-row: 1;
    display: grid; grid-template-columns: var(--cols); column-gap: var(--cg); align-items: end;
    padding: clamp(32px, 7svh, 88px) 0 0; margin: 0;
  }
  .pg-thursdays .title > *, .pg-us .title > *, .pg-support-a-child .title > * { grid-column: 1 / 8; }
  .pg-thursdays .title .title-row, .pg-us .title .title-row, .pg-support-a-child .title .title-row { grid-column: 1 / 8; }
  .pg-thursdays .title h1, .pg-us .title h1, .pg-support-a-child .title h1 { font-size: clamp(44px, 5.4vw, 88px); line-height: 0.92; }
  .pg-thursdays .title .lede, .pg-us .title .lede, .pg-support-a-child .title .lede {
    grid-column: 9 / -1; grid-row: 1 / span 9; align-self: end; margin: 0; padding-bottom: 0.4em;
    font-size: clamp(16px, 1.35vw, 20px);
  }
  .pg-thursdays .cue, .pg-us .cue { grid-column: 1 / -1; grid-row: 4; justify-self: center; margin: 0; }

  /* Thursdays: four facts across the bottom, each in its own field */
  .pg-thursdays .fold > .block { grid-column: 1 / -1; grid-row: 3; padding: 0 0 clamp(16px, 3svh, 32px); }
  .pg-thursdays .facts { grid-template-columns: var(--cols); column-gap: var(--cg); }
  .pg-thursdays .facts li { grid-column: span 3; padding-top: 14px; font-size: 15px; }
  .pg-thursdays .facts .k { margin-bottom: clamp(28px, 5svh, 56px); }
  .pg-thursdays .facts b { font-size: clamp(22px, 2vw, 30px); margin-bottom: 6px; }
  .pg-thursdays .notice { margin-top: clamp(20px, 3svh, 32px); padding-top: 12px; border-top: 1px solid var(--line); }

  /* Us: "How we started" label in the first three columns, story across the other nine */
  .pg-us .fold > .block { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: var(--cols); column-gap: var(--cg);
                          border-top: 1px solid var(--line); padding: 14px 0 clamp(16px, 3svh, 32px); }
  .pg-us .fold > .block > .h { grid-column: 1 / 4; margin: 0; }
  .pg-us .fold > .block > .story { grid-column: 4 / -1; column-count: 3; column-gap: var(--cg); }
  .pg-us .story p { font-size: 15px; }

  /* Support a child: the case on the left, the numbers on the right, both on the base line */
  .pg-support-a-child .duo-a { grid-column: 1 / 7; grid-row: 3; border-top: 1px solid var(--line); padding: 14px 0 clamp(24px, 5svh, 48px); max-width: none; }
  .pg-support-a-child .duo-b { grid-column: 8 / -1; grid-row: 3; align-self: end; border-top: 1px solid var(--line); padding: 14px 0 clamp(24px, 5svh, 48px); }
  .pg-support-a-child .big { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.35; margin-bottom: clamp(20px, 3svh, 32px); }
  .pg-support-a-child .duo-b .values { border-top: 0; }
  .pg-support-a-child .support li { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); padding: 18px 0; }
  .pg-support-a-child .support b { font-size: clamp(26px, 2.4vw, 36px); line-height: 1; }
  .pg-support-a-child .support span { align-self: end; }

  /* Further down: label column on the left, content in its own field on the right */
  .pg-thursdays #more > .split, .pg-us #more > .screen {
    grid-template-columns: var(--cols); column-gap: var(--cg); row-gap: clamp(48px, 8svh, 96px);
  }
  .pg-thursdays #more > .split > div { grid-column: span 6; border-top: 1px solid var(--line); padding-top: 14px; }
  .pg-thursdays #more .faqs { border-top: 0; }
  .pg-thursdays #more .pay { border-top: 0; }
  .pg-us #more > .screen > .h { grid-column: 1 / 4; align-self: start; border-top: 1px solid var(--line); padding-top: 14px; margin: 0; }
  .pg-us #more > .screen > .people { grid-column: 4 / -1; grid-template-columns: 1fr 1fr; }
  .pg-us .person { grid-template-columns: 1fr; border-top: 1px solid var(--line); padding-top: 14px; gap: clamp(16px, 2.6svh, 28px); }
  .pg-us .person img { max-height: 44svh; width: auto; }
  .pg-us .person:has(.more[open]) { grid-template-columns: minmax(0, 0.34fr) minmax(0, 1.66fr); }
}
/* Medium screens: same idea, fewer columns */
@media (min-width: 769px) and (max-width: 999px) {
  .pg-thursdays #more > .split > div, .pg-us .fold > .block, .pg-us #more > .screen > .h, .pg-support-a-child .duo-a, .pg-support-a-child .duo-b { border-top: 1px solid var(--line); padding-top: 14px; }
}
/* Phones: fields ruled off, with air between label and content */
@media (max-width: 768px) {
  .pg-thursdays .facts .k { margin-bottom: 16px; }
  .pg-thursdays #more > .split > div, .pg-us #more > .screen > .h { border-top: 1px solid var(--line); padding-top: 12px; }
  .pg-thursdays #more > .split > div + div { margin-top: 40px; }
  .pg-support-a-child .duo-b { border-top: 1px solid var(--line); padding-top: 12px; }
}
@media (min-width: 1000px) {
  .pg-thursdays .title h1, .pg-us .title h1, .pg-support-a-child .title h1 { white-space: nowrap; }
  .pg-support-a-child .title .title-row { grid-column: 1 / 9; }
}
/* Snap only to people, never past the header on load */
.fold-m, .fold { scroll-snap-align: none; }
@media (min-width: 1000px) {
  body.pg-support-a-child main > .duo:first-child .fold-m > .title { padding-top: clamp(32px, 7svh, 88px); }
  .pg-support-a-child .duo-b { align-self: start; }
}
@media (min-width: 1000px) { body.pg-us .fold > .fold-m:first-child > .title { padding-top: clamp(32px, 7svh, 88px); } }
