/* =====================================================================
   Mobilise – The Playbook · web workbook
   Fonts: Lexend (headings and body text, SIL OFL) + Sentient (quotes, prayers, verses; ITF Free Font License)
   Colours from the printed workbook: ink blue, red, mustard, purple
   ===================================================================== */

/* Lexend (SIL OFL) – headings, statements, body text and UI; it has no italic */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --serif: 'Lexend', system-ui, sans-serif;   /* headings, statements */
  --sans: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --quote: 'Sentient', Georgia, serif;   /* quotes, prayers, verses */

  --ink: #16244f;      /* darkest blue – heading text, illustration strokes */
  --navy: #1f3c96;          /* brand blue */
  --text: #283049;
  --grey: #697089;
  --grey-light: #9aa0b4;
  --rule: #e4e2dc;
  --red: #d63a2f;
  --red-dark: #ad2b22;
  --wine: #7a2826;
  --blue: #2e5fc8;
  --blue-light: #dfe8fd;
  --mustard: #e3a92b;
  --mustard-light: #fbf0d4;
  --purple: #7a4ea3;
  --purple-light: #eee6f8;
  --paper: #fffdf8;
  --backdrop: #f3f0e8;
  --note: #f9e7a5;

  /* surfaces and shades that change in dark mode (html[data-theme="dark"] at the end of the file) */
  --panel: #16244f;          /* dark pills, labels, prayer panel */
  --panel-hover: #1f3c96;
  --card: #fff;             /* white cards on the paper */
  --tint: 22,36,79;          /* subtle tint on hover: rgba(var(--tint), .05) */
  --bar-background: rgba(255,253,248,.86);
  --logo: #3e2926;
  --dots: #b9b5aa;          /* dotted lines of the fields */
  --placeholder: #bdb9ae;
  --frame: #c9c4b7;
  --frame-background: rgba(255,255,255,.5);
  --frame-coach: #fcfaf5;
  --th: #f6f3eb;
  --remark: #f5f2ea;
  --ponder: #fde8e4;
  --light-page: #f7f2e6;
  --wave: #ecebef;
  --wave-purple: #e7e4f4;
  --mustard-text: #9a6a0b;
  --mustard-icon: #b27b0e;

  --bar: 64px;
  --sidebar: 312px;
  --measure: 700px;
  --gutter: clamp(20px, 6vw, 88px);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(22,36,79,.06), 0 12px 32px -12px rgba(22,36,79,.18);
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--backdrop); color: var(--text);
  font: 400 18px/1.65 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 0;
}
img, svg { display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button, summary, .btn-file { cursor: pointer; }
::selection { background: #ffe29a; color: #16244f; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skiplink { position: fixed; left: 12px; top: -80px; z-index: 60; background: var(--card); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.skiplink:focus { top: 12px; }
.illu { max-width: 100%; height: auto; }

/* ================================================================ bar */
.bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar);
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  background: var(--bar-background); color: var(--ink);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(var(--tint),.08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand-ring { width: 30px; height: 30px; color: var(--red); }
.brand-text { display: flex; flex-direction: column; font: 800 17px/1 var(--sans); letter-spacing: .02em; }
.brand-text small { font: italic 500 13px/1 var(--serif); letter-spacing: 0; color: var(--grey); margin-top: 3px; }
.bar-place { font-size: 14px; color: var(--grey); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 14px; border-left: 1px solid var(--rule); }
.bar-place b { color: var(--ink); font-weight: 700; }
.bar-status { margin-left: auto; font-size: 13px; color: var(--grey); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.bar-status.ok::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3aa35b; box-shadow: 0 0 0 3px rgba(58,163,91,.18); }
.bar-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.bar-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--mustard)); transition: width .15s linear; border-radius: 0 3px 3px 0; }

.menu { position: relative; }
.menu > summary, .btn-toc {
  list-style: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; font: 700 14px/1 var(--sans); white-space: nowrap; border: 0;
  background: var(--panel); color: #fff; transition: background .2s var(--ease), transform .2s var(--ease);
}
.menu > summary:hover, .btn-toc:hover { background: var(--panel-hover); }
.menu > summary::-webkit-details-marker { display: none; }
.btn-icon svg { width: 18px; height: 18px; }
.btn-toc { display: none; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--tint),.2); }
.btn-toc:hover { background: rgba(var(--tint),.06); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: 300px; background: var(--card); color: var(--text);
  border-radius: 18px; padding: 10px; box-shadow: 0 24px 60px -12px rgba(22,36,79,.35), 0 0 0 1px rgba(22,36,79,.06);
  animation: slide-in .22s var(--ease);
  max-height: calc(100vh - var(--bar) - 24px); max-height: calc(100dvh - var(--bar) - 24px);
  overflow-y: auto; overscroll-behavior: contain;   /* a long menu scrolls on its own, the bar stays sticky */
}
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-info { font-size: 13px; line-height: 1.5; color: var(--grey); margin: 6px 10px 10px; }
.menu-panel [hidden] { display: none !important; }   /* a hidden item stays hidden whatever the menu's own layout says */
.menu-panel button, .btn-file {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0;
  padding: 11px 12px; border-radius: 12px; font-size: 15px; font-weight: 600;
}
.menu-panel button svg, .btn-file svg { width: 18px; height: 18px; color: var(--grey); flex: 0 0 auto; }
.menu-panel button:hover, .btn-file:hover { background: rgba(var(--tint),.06); }
.menu-panel hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 4px; }
.danger, .menu-panel .danger svg { color: var(--red-dark) !important; }

/* print dialog */
.print-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 0; padding: 22px;
  border-radius: 22px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px -20px rgba(10,14,30,.5);
}
.print-dialog::backdrop { background: rgba(10,14,30,.45); }
.print-dialog[open] { animation: slide-in .22s var(--ease); }
.print-dialog h2 { margin: 0 0 14px; font: 700 22px/1.2 var(--serif); color: var(--ink); }
.print-dialog fieldset { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.print-dialog legend { padding: 0; margin-bottom: 8px; font: 700 11.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.choice-row { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-radius: 14px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--rule); transition: box-shadow .15s, background .15s;
}
.choice:hover { background: rgba(var(--tint),.04); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.choice:has(input:disabled) { opacity: .45; cursor: default; }
.choice input { margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.choice span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice b { font-size: 15px; font-weight: 600; color: var(--ink); }
.choice small { font-size: 13px; color: var(--grey); }
.print-hint { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--grey); }
.print-actions { display: flex; justify-content: flex-end; gap: 8px; }
.print-actions .btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; font-size: 15px; }
.print-actions .btn-print { background: var(--panel); color: #fff; box-shadow: none; }
.print-actions .btn-print:hover { background: var(--panel-hover); box-shadow: none; }
.btn-print svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .choice-row { grid-template-columns: 1fr; } }

/* account (top right, locked version): who is signed in, Teams and admins, sign out */
.account { position: relative; flex: 0 0 auto; }
.account[hidden] { display: none; }
.btn-account {
  list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--tint),.2); transition: background .2s;
}
.btn-account::-webkit-details-marker { display: none; }
.btn-account:hover, .account[open] > .btn-account { background: rgba(var(--tint),.06); }
.btn-account .account-icon { width: 19px; height: 19px; }
.account.has-initial .btn-account { background: var(--panel); color: #fff; box-shadow: none; font: 700 15px/1 var(--sans); }
.account.has-initial .btn-account:hover, .account.has-initial[open] > .btn-account { background: var(--panel-hover); }
.account.has-initial .account-icon, .account:not(.has-initial) .account-initial { display: none; }
.account-panel { width: 270px; }
.account-who { display: flex; flex-direction: column; gap: 2px; margin: 4px 10px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.account-who b { font-size: 15.5px; color: var(--ink); overflow-wrap: anywhere; }
.account-who span { font-size: 13px; color: var(--grey); }
.account-who span:empty { display: none; }
@media (max-width: 640px) { .btn-account { width: 42px; height: 42px; } .account-panel { position: fixed; left: auto; right: 10px; top: calc(var(--bar) + 8px); width: min(270px, calc(100vw - 20px)); } }
@media print { .account { display: none; } }

/* ================================================================ layout and table of contents */
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); overflow-y: auto;
  background: var(--paper); border-right: 1px solid var(--rule); padding: 20px 14px 32px; font-size: 14.5px;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--frame) transparent;
}
.toc-start { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 12px; }
.toc-start:hover { background: rgba(var(--tint),.05); }
.toc-ring { width: 18px; height: 18px; color: var(--red); }
.toc-home { width: 18px; height: 18px; color: var(--red); flex: none; }
.toc-phase { margin-top: 8px; }
.toc-phase > summary {
  display: flex; align-items: center; gap: 12px; list-style: none; padding: 10px 12px; border-radius: 14px;
}
.toc-phase > summary::-webkit-details-marker { display: none; }
.toc-phase > summary:hover { background: rgba(var(--tint),.05); }
.toc-phase-number { font: italic 400 26px/1 var(--serif); color: var(--red); width: 34px; }
.toc-phase-title { flex: 1; font: 700 19px/1.1 var(--serif); color: var(--ink); }
.toc-phase-title small { display: block; font: 500 12.5px/1.3 var(--sans); color: var(--grey); margin-top: 3px; }
.progress { font-size: 11.5px; font-weight: 700; color: var(--grey); font-variant-numeric: tabular-nums; background: rgba(var(--tint),.06); padding: 3px 8px; border-radius: 999px; }
.progress:empty { display: none; }
.toc-phase ol { list-style: none; margin: 4px 0 10px; padding: 0 0 0 10px; }
.toc-phase li + li { margin-top: 2px; }
.toc-phase a {
  display: flex; gap: 10px; align-items: baseline; padding: 5px 12px; border-radius: 10px; text-decoration: none; color: var(--text);
  line-height: 1.35; transition: background .15s;
}
.toc-phase a:hover { background: rgba(var(--tint),.05); }
.toc-phase a[aria-current] { background: var(--panel); color: #fff; }
.toc-phase a[aria-current] .toc-number { color: rgba(255,255,255,.7); }
.toc-number { flex: 0 0 22px; color: var(--grey-light); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.toc-title { flex: 1; }
.toc-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--frame); flex: 0 0 auto; align-self: center; transition: .2s; }
.toc-dot.filled { background: var(--mustard); box-shadow: none; }
.sidebar-note { margin: 20px 12px 0; font-size: 12.5px; color: var(--grey); }
.veil { display: none; }
main { min-width: 0; }

/* ================================================================ title page */
.title {
  position: relative; overflow: hidden; background: #4a1214; color: #fff;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(40px, 5vw, 72px);
  background-image: radial-gradient(circle at 80% 15%, rgba(150,40,40,.55), transparent 55%), radial-gradient(circle at 10% 110%, rgba(20,6,8,.55), transparent 50%);
}
.title-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1180px; margin: 0 auto; }
.title-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(24px, 4vw, 48px); }
.title-ring { width: 46px; height: 46px; color: var(--red); }
.title-brand span { font: 800 22px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; display: flex; flex-direction: column; }
.title-brand small { font: italic 400 15px/1 var(--serif); text-transform: none; letter-spacing: 0; opacity: .75; margin-top: 6px; }
.title h1 {
  font: 800 clamp(60px, 8.6vw, 136px)/.86 var(--serif); letter-spacing: -.018em; margin: 0;
}
.title-the { display: block; font-style: italic; font-weight: 300; font-size: .42em; letter-spacing: -.005em; color: var(--mustard); margin-bottom: .06em; }
.title-author { font: italic 400 clamp(20px, 2.2vw, 28px)/1.2 var(--serif); margin: 18px 0 0; opacity: .85; }
.title-lede { max-width: 34ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: rgba(255,255,255,.82); margin: 26px 0 0; }
.title-lede em { font: italic 500 1.08em var(--serif); color: #fff; }
.title-action { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 16px/1 var(--sans); text-decoration: none; transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(214,58,47,.8); }
.btn-primary svg { width: 20px; height: 20px; transition: transform .2s var(--ease); }
.btn-primary:hover { transform: translateY(-2px); background: #e0453a; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-secondary:hover { background: rgba(255,255,255,.08); }
.title-image { position: relative; }
.title-image .illu { position: relative; width: 100%; max-width: 560px; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.25)); }
.title-sun { position: absolute; inset: 6% 8% 18%; border-radius: 50%; background: var(--mustard); }

.cards-phases { list-style: none; padding: 0; margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1180px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card a {
  position: relative; display: flex; flex-direction: column; height: 100%; padding: 20px 20px 18px; border-radius: 20px;
  background: rgba(255,255,255,.06); text-decoration: none; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .3s var(--ease), background .3s;
}
.card a:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.card-number { font: italic 300 40px/1 var(--serif); color: var(--mustard); }
.card-image { display: block; height: 110px; margin: 6px -6px 10px; }
.card-image .illu { width: 100%; height: 100%; object-fit: contain; }
.card-title { font: 700 26px/1.1 var(--serif); }
.card-sub { font-size: 13.5px; color: rgba(255,255,255,.65); margin-top: 4px; }
.card-progress { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); margin-top: 16px; overflow: hidden; }
.card-progress span { display: block; height: 100%; width: 0; background: var(--mustard); border-radius: 4px; transition: width .6s var(--ease); }
.title-howto { max-width: 1180px; margin: 22px auto 0; font-size: 14.5px; color: rgba(255,255,255,.7); }
.title-howto p { margin: 0; }
.title-howto b { color: #fff; }

/* ================================================================ page */
.page {
  position: relative; background: var(--paper);
  padding: clamp(72px, 9vw, 120px) var(--gutter) clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--rule);
}
.page-inner { max-width: var(--measure); margin: 0 auto; position: relative; overflow-wrap: break-word; }   /* long URLs wrap on phones */
.page-inner::after { content: ''; display: block; clear: both; }
.page-head { position: absolute; top: clamp(22px, 3vw, 34px); left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); pointer-events: none; }
.page-number {
  font: italic 300 15px/1 var(--serif); color: var(--grey); letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.page-number::before { content: ''; width: 22px; height: 1.5px; background: currentColor; opacity: .5; }
.label {
  margin: 0; background: var(--panel); color: #fff; padding: 7px 14px; border-radius: 999px;
  font: 700 11.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* typography */
.page p { margin: 0 0 1em; text-wrap: pretty; }
.page h3 {
  font: 700 clamp(25px, 2.4vw, 32px)/1.16 var(--serif); color: var(--ink); margin: 1.6em 0 .5em;
  letter-spacing: -.005em; text-wrap: balance;
}
.page h4 { font: 700 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
.page ul, .page ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.page li { margin: .35em 0; padding-left: .2em; }
.page ul { list-style: none; padding-left: 1.3em; }
.page ul > li::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mustard); margin-left: -1.3em; margin-right: calc(1.3em - 7px); vertical-align: .18em; }
.page ol > li::marker { color: var(--red); font: italic 600 1.05em var(--serif); }
.page strong { font-weight: 700; color: var(--ink); }
.page em { font-style: italic; }
.page mark { background: linear-gradient(transparent 62%, rgba(227,169,43,.45) 0); color: inherit; }
.page a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.page-heading {
  font: 700 clamp(46px, 7vw, 96px)/.95 var(--serif); color: var(--ink); margin: 0 0 .45em;
  letter-spacing: -.015em; text-wrap: balance;
}
.signature { font-size: 14px; color: var(--grey); font-weight: 500; }

/* page illustrations */
.page-illu { float: right; width: min(40%, 280px); margin: -8px 0 16px 32px; shape-outside: margin-box; }
.page-illu-left { float: left; margin: -8px 32px 16px 0; }
.page-illu-center { float: none; width: min(100%, 460px); margin: 0 auto 32px; }
.page-illu-wide { float: none; width: 100%; margin: 0 0 36px; }
.page-illu .illu { width: 100%; }
.image { margin: 28px auto; }
.image .illu { width: 100%; }
.image-center { width: min(100%, 460px); }
.image-wide { width: 100%; }
.image-right { float: right; width: min(38%, 240px); margin: 0 0 16px 28px; }
.image-left { float: left; width: min(38%, 240px); margin: 0 28px 16px 0; }
.image-small { float: right; width: min(26%, 130px); margin: -10px 0 12px 24px; }

/* ================================================================ modules */
.module { position: relative; margin: 44px 0; clear: both; border-radius: var(--radius); }
.module:first-child { margin-top: 0; }
.module-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.module-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; }
.module-icon svg { width: 21px; height: 21px; }
.module-label { font: 700 12.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.module-heading { margin-top: 0 !important; }

.module-training .module-icon { background: var(--blue-light); color: var(--blue); }
.module-training .module-label { color: var(--blue); }

.module-activity { background: var(--card); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.module-activity .module-icon { background: var(--mustard-light); color: var(--mustard-icon); }
.module-activity .module-label { color: var(--mustard-text); }
.module-activity h3:first-of-type { margin-top: .2em; }

.module-reflection { background: var(--purple-light); padding: clamp(22px, 3vw, 34px); margin-top: 64px; }
.module-reflection .module-icon { background: var(--card); color: var(--purple); }
.module-reflection .module-label { color: var(--purple); }
.module-figure { position: absolute; right: clamp(14px, 2vw, 26px); top: -40px; width: clamp(104px, 18%, 138px); margin: 0; }
.module-reflection > .module-head, .module-reflection > .module-body > :first-child { margin-right: clamp(110px, 20%, 150px); }
.module-figure .illu { width: 100%; }
.module-ponder { background: var(--ponder); }
.module-ponder .module-icon { color: var(--red); }
.module-ponder .module-label { color: var(--red-dark); }
.module-research, .module-reader { background: var(--mustard-light); }
.module-research .module-icon, .module-reader .module-icon { color: var(--mustard-icon); }
.module-research .module-label, .module-reader .module-label { color: var(--mustard-text); }
.module-body { clear: none; }

.module-prayer { background: var(--panel); color: rgba(255,255,255,.88); padding: clamp(24px, 3.4vw, 40px); overflow: hidden; }
.module-prayer::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(227,169,43,.55), transparent 65%); }
.module-prayer .module-icon { background: var(--mustard); color: #16244f; }
.module-prayer .module-label { color: var(--mustard); }
.module-prayer p { font: italic 400 clamp(19px, 1.8vw, 22px)/1.55 var(--quote); position: relative; z-index: 1; }
.module-prayer strong { color: #fff; }

.question { position: relative; margin: 28px 0 14px; padding-left: 18px; border-left: 3px solid var(--red); }
.question-label { display: block; font: 700 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.question p { font: 600 clamp(20px, 1.9vw, 24px)/1.35 var(--serif); color: var(--ink); margin: 0 0 6px; }

/* quotes */
.quote { position: relative; margin: 44px 0; padding: 0 0 0 clamp(52px, 6vw, 72px); clear: both; }
.quote::before {
  content: '“'; position: absolute; left: -4px; top: -.18em; font: 700 clamp(96px, 11vw, 140px)/1 var(--quote); color: var(--red);
}
.quote-bracket { display: none; }
.quote blockquote { margin: 0; font: italic 400 clamp(23px, 2.5vw, 32px)/1.35 var(--quote); color: var(--purple); letter-spacing: -.003em; text-wrap: pretty; }
.quote blockquote p { margin: 0 0 .5em; }
.quote figcaption { font: 600 14px/1.4 var(--sans); color: var(--grey); margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.quote figcaption::before { content: ''; width: 28px; height: 1.5px; background: var(--red); }
.quote.blue blockquote { color: var(--navy); }
.quote.small blockquote, .quote.long blockquote { font-size: clamp(20px, 1.9vw, 23px); line-height: 1.45; }
.quote.long::before, .quote.small::before { font-size: clamp(72px, 8vw, 100px); }

/* ================================================================ coloured pages */
.background-blue { background: #2e5fc8; }
.background-wine { background: #7a2826; }
.background-red { background: var(--red); }
.background-grey { background: #5f7d96; }
.background-purple { background: #7a4ea3; }
.background-light { background: var(--light-page); }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) { color: rgba(255,255,255,.9); border-bottom-color: transparent; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) :is(h2, h3, h4, .page-heading, .page-inner > p strong) { color: #fff; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) .page-number { color: rgba(255,255,255,.7); }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) .label { background: #fff; color: #16244f; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner > :is(p, ul, ol, .with-field) { color: rgba(255,255,255,.9); }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner > .field textarea { color: #fff; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner .field textarea::placeholder { color: rgba(255,255,255,.5); }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner > .field textarea { background-image: radial-gradient(circle at 2px calc(2em - 3px), rgba(255,255,255,.55) 1.1px, transparent 1.6px); }
.background-red .page h3 { color: #fff; }
.background-red .page-inner > p strong { color: #fff; }

/* big full-page statements */
.type-quote { display: flex; flex-direction: column; justify-content: center; min-height: min(88vh, 860px); overflow: hidden; }
.type-quote .page-inner { width: 100%; max-width: 980px; }
.statement { margin: 0; position: relative; z-index: 1; }
.statement blockquote { margin: 0; }
.statement p {
  margin: 0; font: 700 clamp(30px, 5.2vw, 76px)/1.08 var(--serif); letter-spacing: -.02em; hyphens: auto; -webkit-hyphens: auto; color: #fff; text-wrap: balance;
}
.statement p strong { font-weight: 900; font-style: italic; color: #fff; }   /* fonts without an italic stay upright (font-synthesis-style: none) */
.statement figcaption { margin-top: 36px; font: 700 13px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 12px; }
.statement figcaption::before { content: ''; width: 36px; height: 2px; background: var(--mustard); }
.statement-icon { width: 64px; height: 64px; color: #d8b9f5; margin-bottom: 28px; stroke-width: 1.4; }
.statement-sentence p { line-height: 1.08; }
.statement-sentence p:nth-child(odd) { font-weight: 800; }
.statement-outline p { font: 900 clamp(32px, 9vw, 128px)/.95 var(--sans); text-transform: uppercase; letter-spacing: -.010em; color: transparent; -webkit-text-stroke: 2px #fff; text-align: center; font-style: normal; }
.statement-outline p strong { color: var(--mustard); -webkit-text-stroke: 0; font-style: normal; }
.statement mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--mustard); text-decoration-thickness: .06em; text-underline-offset: .12em; }
.type-quote.background-wine::before, .type-quote.background-blue::before, .type-quote.background-red::before, .type-quote.background-grey::before {
  content: ''; position: absolute; right: -12vw; bottom: -30vw; width: 60vw; height: 60vw; border-radius: 50%;
  border: clamp(40px, 6vw, 90px) solid rgba(255,255,255,.06);
}
.arcs::after { content: ''; position: absolute; right: -8vw; bottom: -20vw; width: 44vw; height: 44vw; border-radius: 50%; border: 18px solid rgba(255,255,255,.12); }

/* ================================================================ phase covers */
.type-cover { padding: 0; min-height: min(100vh, 960px); display: flex; overflow: hidden; }
.type-cover.background-blue { background: linear-gradient(160deg, #2350b8 0%, #2e5fc8 45%, #5588ea 100%); }
.cover-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: 24px; padding: clamp(48px, 7vw, 96px) var(--gutter) 0; max-width: 1320px; margin: 0 auto; width: 100%; }
.cover-text { align-self: center; padding-bottom: clamp(32px, 6vw, 96px); color: #fff; }
.cover-number {
  font: italic 200 clamp(90px, 14vw, 200px)/.8 var(--serif); margin: 0 0 12px; color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,.55); letter-spacing: -.020em;
}
.cover-kicker { font: 700 13px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--mustard); margin: 0 0 14px; }
.cover-heading { font: 800 clamp(52px, 8vw, 118px)/.9 var(--serif); letter-spacing: -.020em; margin: 0; color: #fff; }
.cover-heading-long { font-size: clamp(44px, 6vw, 88px); }   /* longer phase title (e.g. The Skylight) */
.cover-heading span { display: block; font: italic 300 .34em/1.2 var(--serif); letter-spacing: -.005em; margin-top: .35em; color: rgba(255,255,255,.9); }
.page .cover-session { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.page .cover-session li { margin: 0; padding: 0; }
.page .cover-session li::before { display: none; }
.cover-session a {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; text-decoration: none;
  background: rgba(255,255,255,.12); color: #fff; font-size: 14.5px; font-weight: 600; transition: background .2s;
}
.cover-session a:hover { background: rgba(255,255,255,.22); }
.cover-session span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #16244f; font-size: 12.5px; font-weight: 800; }
.cover-illu { align-self: end; }
.cover-illu .illu { width: 100%; max-height: 78vh; margin-left: auto; }

/* ================================================================ fields */
.field { margin: 8px 0 26px; }
.field textarea, .field input {
  width: 100%; border: 0; border-radius: 0; background-color: transparent; color: var(--navy);
  font: 500 18px/2em var(--sans); caret-color: var(--red);
}
.field textarea {
  display: block; resize: vertical; min-height: calc(4em + 12px); padding: 0 6px 12px; overflow: hidden;   /* strip at the bottom: keeps the resize handle off the dotted line */
  background-image: radial-gradient(circle at 2px calc(2em - 3px), var(--dots) 1.1px, transparent 1.6px);
  background-size: 7px 2em; background-attachment: local; transition: background-color .2s;
}
.field textarea::placeholder, .field input::placeholder { color: var(--placeholder); font-style: italic; }
.field textarea:focus, .field input:focus { outline: none; background-color: rgba(227,169,43,.1); border-radius: 8px; }
.field-line { display: inline-block; min-width: 12em; margin: 0; flex: 1; }
.field-line input {
  padding: 0 6px; height: 2.2em;
  background-image: radial-gradient(circle at 2px calc(100% - 3px), var(--dots) 1.1px, transparent 1.6px);
  background-size: 7px 100%;
}
.field.saved textarea, .field.saved input { animation: flash .9s var(--ease); }
@keyframes flash { 30% { background-color: rgba(58,163,91,.12); } }
.with-field { margin: 0 0 14px; }
.with-field > p { margin: 0 0 4px; }
.field-label { font-weight: 700; color: var(--ink); margin: 14px 0 0 !important; }
.li-field { margin: 12px 0 !important; }
.li-field .li-text { display: block; }
.li-field .field { margin: 2px 0 10px; }
.page :is(ol, ul) > .li-field .field-line { display: block; }

.frame { border: 1.5px dashed var(--frame); border-radius: 18px; padding: 20px 22px 6px; margin: 16px 0 30px; background: var(--frame-background); }
.frame .field textarea { min-height: calc(6em + 12px); }
.box { border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); margin: 28px 0; display: flow-root; }
.box-red { background: var(--red); color: #fff; }
.box-wine { background: #7a2826; color: #fff; }
.box-blue { background: var(--card); box-shadow: var(--shadow); }
.box-blue > p:first-child { font: 700 12.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.box-blue strong { font: 600 clamp(20px, 2vw, 24px)/1.3 var(--serif); display: block; }
.box-mustard { background: var(--mustard-light); }
.box-cloud { padding: 0; }
.box-highlight { padding: 0 .55em; margin: 32px 0; }   /* room for the ends of the highlight on full lines */
.box-highlight p { display: inline; font: 700 clamp(22px, 2.4vw, 30px)/1.55 var(--serif); color: #fff; background: var(--panel); padding: .08em .35em; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.box-star { position: relative; padding: 0 0 0 56px; }
.box-star::before { content: '✱'; position: absolute; left: 0; top: -4px; font: 400 40px/1 var(--sans); color: var(--red); }
.box-star p { font: 500 clamp(19px, 1.8vw, 22px)/1.5 var(--serif); color: var(--ink); }
.box-star strong { font-weight: 700; }
.box-verse { background: rgba(255,255,255,.14); margin-top: 40px; }
.box-verse p:first-child { font: 700 12.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; color: rgba(255,255,255,.8); }
.box-verse strong { font: italic 500 clamp(21px, 2.1vw, 26px)/1.45 var(--quote); color: #fff; }

/* tables */
.table-wrap { overflow-x: auto; margin: 20px 0 30px; -webkit-overflow-scrolling: touch; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.page table { border-collapse: collapse; width: 100%; font-size: 16px; }
.page th { text-align: left; color: var(--ink); font: 700 12.5px/1.35 var(--sans); letter-spacing: .06em; text-transform: uppercase; background: var(--th); padding: 14px 16px; vertical-align: bottom; }
.page td { border-top: 1px solid var(--rule); padding: 12px 16px; vertical-align: top; line-height: 1.5; }
.page td .field { margin: 0; }
.page td .field textarea { min-height: calc(2em + 12px); font-size: 16px; }
.page td .field-line { display: block; min-width: 9em; }
.page td .field-cell textarea { min-height: calc(2em + 12px); min-width: 9em; }

/* sticky notes */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px 22px; margin: 28px 0 12px; }
.note {
  position: relative; background: var(--note); padding: 18px 18px 8px; border-radius: 3px 3px 18px 3px;
  box-shadow: 0 16px 24px -16px rgba(90,64,0,.55), 0 2px 0 rgba(0,0,0,.03); transform: rotate(-1.6deg);
  transition: transform .3s var(--ease);
}
.note::before { content: ''; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.note:hover, .note:focus-within { transform: rotate(0) scale(1.02); }
.note-1 { transform: rotate(1.4deg) translateY(10px); background: #fbd8cf; }
.note-2 { transform: rotate(-.6deg) translateY(-4px); background: #d7e3fc; }
.note p { color: #16244f; font: 600 16px/1.3 var(--serif); margin: 0 0 8px; }
.note .field textarea { color: #1f3c96; font-size: 16px; min-height: calc(8em + 12px); background-image: radial-gradient(circle at 2px calc(2em - 3px), rgba(22,36,79,.28) 1.1px, transparent 1.6px); }

/* coaching */
.coaching { position: relative; margin: 8px 0 30px; }
.coaching-tab {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border-radius: 20px 20px 0 0;
  padding: 14px 20px; margin-right: min(40%, 220px); position: relative; z-index: 1;
}
.coaching-tab .module-icon { background: var(--mustard-light); color: var(--mustard-icon); width: 36px; height: 36px; }
.coaching-tab label { font: 700 12.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--wine); }
.coaching-tab .field-line { min-width: 10em; }
.coaching-list { background: var(--card); border-radius: 0 24px 24px 24px; padding: clamp(24px, 3.4vw, 40px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); color: var(--text); }
.coaching-figure { float: right; width: clamp(100px, 22%, 160px); margin: -8px -8px 10px 16px; }
.coaching-figure .illu { width: 100%; }
.coaching-heading { font: 700 clamp(28px, 3vw, 38px)/1.1 var(--serif) !important; color: var(--wine) !important; margin: 0 0 18px !important; letter-spacing: -.010em; }
.coaching-list strong { color: var(--ink) !important; }
.coaching-list .frame { background: var(--frame-coach); }

/* drawing */
.drawing-wrap { margin: 20px 0 30px; clear: both; }
.drawing-prompt { font: 600 clamp(19px, 1.8vw, 22px)/1.35 var(--serif); color: var(--ink); margin-bottom: 12px !important; }
.background-blue > .page-inner > .drawing-wrap .drawing-prompt { color: #fff; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner > .with-field .field-label { color: #fff; }
:is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) > .page-inner > .with-field .field textarea { color: #fff; background-image: radial-gradient(circle at 2px calc(2em - 3px), rgba(255,255,255,.55) 1.1px, transparent 1.6px); }
.drawing { margin: 0; position: relative; }
.drawing-canvas { position: relative; background: #fff; border-radius: 24px; overflow: hidden; touch-action: none; box-shadow: inset 0 0 0 2px var(--purple), var(--shadow); }
.drawing-canvas::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(22,36,79,.09) 1px, transparent 1.5px); background-size: 22px 22px; }
.drawing canvas { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; cursor: crosshair; touch-action: none; }
.drawing.shape-wave .drawing-canvas { box-shadow: inset 0 0 0 2px var(--blue), var(--shadow); }
.drawing.shape-cloud .drawing-canvas { border-radius: 42% 38% 44% 40% / 34% 30% 38% 36%; }
.drawing-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.drawing-enlarge {
  position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 12px; background: rgba(255,255,255,.9); color: #16244f; box-shadow: 0 0 0 1px rgba(22,36,79,.14), 0 4px 12px -4px rgba(22,36,79,.3);
  transition: transform .15s var(--ease), background .15s;
}
.drawing-enlarge:hover { transform: scale(1.08); background: #fff; }
.drawing-enlarge svg { width: 18px; height: 18px; }
.drawing-enlarge .icon-shrink, .drawing.large .drawing-enlarge .icon-enlarge { display: none; }
.drawing.large .drawing-enlarge .icon-shrink { display: block; }
.drawing-rotate { display: none; }
/* enlarged drawing in a full-screen dialog; the 3 : 2 ratio is kept and the canvas fits both the width and the height */
.drawing-dialog {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px;
  border: 0; background: transparent; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.drawing-dialog::backdrop { background: rgba(10,14,30,.9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.drawing-dialog[open] { animation: drawing-dialog .25s var(--ease); }
@keyframes drawing-dialog { from { opacity: 0; transform: scale(.97); } }
.drawing-dialog-title { margin: 0; max-width: min(100%, 1400px); font: 600 clamp(15px, 1.6vw, 19px)/1.3 var(--serif); color: rgba(255,255,255,.88); text-align: center; }
.drawing-dialog-title:empty { display: none; }
.drawing.large { width: min(100%, 1500px, calc((100dvh - 150px) * 1.5)); }
.drawing.large .drawing-canvas { box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); }
.drawing.large .drawing-tools { margin-top: 12px; }
.drawing.large .btn { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }
.drawing.large .colour { border-color: #0c1122; }
.drawing.large .colour[aria-pressed="true"] { box-shadow: 0 0 0 2.5px #fff; }
.drawing.large .colour:not([aria-pressed="true"]) { box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); }
/* short screen (phone in landscape): tools in a column beside the canvas, no title */
@media (max-height: 560px) and (orientation: landscape) {
  .drawing-dialog { padding: 8px 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .drawing-dialog-title { display: none; }
  .drawing.large { width: auto; display: flex; align-items: stretch; gap: 12px; }
  .drawing.large .drawing-canvas { width: min(calc(100vw - 150px), calc((100dvh - 16px) * 1.5)); }
  .drawing.large .drawing-tools { margin: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
  .drawing.large .drawing-tools .colours { width: auto; margin: 0 0 auto; display: grid; grid-template-columns: repeat(2, 30px); gap: 8px; }
  .drawing.large .btn { padding: 8px 10px; font-size: 13px; }
}
@media (orientation: portrait) and (max-width: 640px) {
  .drawing.large .drawing-rotate { display: block; margin: 14px 0 0; text-align: center; font: 500 14px/1.4 var(--sans); color: rgba(255,255,255,.75); }
}
@media print { .drawing-enlarge { display: none; } }
.drawing-tools .colours { display: flex; gap: 8px; margin-right: auto; }
.colour { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(var(--tint),.2); padding: 0; transition: transform .15s; }
.colour:hover { transform: scale(1.1); }
.colour[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.btn { background: var(--card); border: 0; box-shadow: inset 0 0 0 1.5px rgba(var(--tint),.18); border-radius: 999px; padding: 8px 16px; font: 600 14px/1 var(--sans); color: var(--ink); }
.btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }

/* diagrams */
.diagram { margin: 30px 0; }
.diagram .illu { width: 100%; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 32px; }
.editor-note { font-size: 14px; color: var(--grey); background: var(--remark); border-radius: 12px; padding: 10px 14px; }

.footer { padding: 56px var(--gutter) 72px; text-align: center; font-size: 14px; color: var(--grey); }
.footer-ring { width: 36px; height: 36px; color: var(--red); margin: 0 auto 14px; }
.footer b { color: var(--ink); }
.footer-sources { font-size: 12.5px; opacity: .8; }
.footer-sources a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================ responsive layout */
@media (max-width: 1180px) {
  :root { --sidebar: 280px; }
  .cards-phases { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  :root { --sidebar: 0px; }
  .layout { display: block; }
  .btn-toc { display: flex; }
  .sidebar {
    position: fixed; top: var(--bar); left: 0; bottom: 0; width: min(88vw, 360px); height: auto; z-index: 25;
    transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: 20px 0 60px -20px rgba(22,36,79,.35);
  }
  body.menu-open .sidebar { transform: none; }
  .veil { display: block; position: fixed; inset: var(--bar) 0 0 0; z-index: 24; background: rgba(22,36,79,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.menu-open .veil { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .bar-place { display: none; }
}
@media (max-width: 860px) {
  .title-grid { grid-template-columns: 1fr; }
  .title-image { order: -1; max-width: 420px; width: 100%; margin: 0 auto -8px; }
  .cover-grid { grid-template-columns: 1fr; padding-top: 56px; }
  .cover-text { padding-bottom: 8px; }
  .cover-illu .illu { max-height: 52vh; margin: 0 auto; }
  .type-cover { min-height: 0; }
}
@media (max-width: 640px) {
  :root { --bar: 58px; --radius: 18px; }
  body { font-size: 17px; }
  .bar { gap: 8px; padding-right: 10px; }
  .brand-text small, .bar-status, .btn-text { display: none; }
  .menu { margin-left: auto; }
  .menu > summary, .btn-toc { width: 42px; padding: 0; justify-content: center; }
  .menu-panel { position: fixed; left: 10px; right: 10px; top: calc(var(--bar) + 8px); width: auto; }
  .cards-phases { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card a { padding: 16px 14px 14px; }
  .card-image { height: 76px; }
  .card-title { font-size: 21px; }
  .card-sub { font-size: 12px; }
  .page { padding-top: 76px; }
  .page-head { top: 22px; gap: 10px; }
  .page-number::before { width: 12px; }
  .page-illu, .image-right, .image-left, .image-small { float: none; width: auto; margin: 0 auto 22px; }
  .page-illu .illu, .image-right .illu, .image-left .illu, .image-small .illu { width: auto; max-width: 70%; max-height: 300px; margin: 0 auto; }
  .page-illu-wide .illu { max-width: 100%; max-height: none; width: 100%; }
  .title h1 { font-size: clamp(64px, 19vw, 96px); }
  .coaching-figure { width: 96px; margin: -4px -4px 6px 10px; }
  .module-figure { width: 88px; top: -34px; }
  .module-reflection > .module-head, .module-reflection > .module-body > :first-child { margin-right: 84px; }
  .coaching-tab { margin-right: 0; border-radius: 18px 18px 0 0; }
  .coaching-list { border-radius: 0 0 20px 20px; }
  .quote { padding-left: 42px; }
  .note-1, .note-2 { transform: rotate(1deg); }
  .drawing-tools .colours { width: 100%; }
  .page td, .page th { padding: 10px 12px; }
  .page table { min-width: 520px; }
  .title-action a { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 380px) {
  .cards-phases { grid-template-columns: 1fr; }
}

/* ================================================================ print */
/* Print = the workbook as it looks on screen: every page on its own A4 sheet, in its own colours
   (dark pages stay dark, so white text and highlights stay readable), blocks never split. */
.print-value { display: none; }
@media print {
  /* Home and office printers cannot print to the edge of the paper (3–5 mm), so every sheet gets the
     same white margin and coloured pages become panels inside it: the same result on every printer,
     in every browser and in a saved PDF. */
  @page { size: A4; margin: 38px; }   /* ≈10 mm; whole pixels, or a hairline of the next page shows at the bottom edge */
  html, body { background: transparent; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: 10.5pt; }
  .bar, .sidebar, .veil, .drawing-tools, .title-action, .cards-phases, .skiplink, .footer, .page-decor { display: none !important; }
  .layout { display: block; }
  .title, .page { break-before: page; min-height: 276mm; padding: 9mm 10mm 0; border: 0; box-shadow: none; border-radius: 4mm; }
  .page.background-white { background: #fff; border-radius: 0; padding: 0; }
  .title { break-before: avoid; display: flex; flex-direction: column; justify-content: center; }
  .page-head { position: static; padding: 0; margin-bottom: 10px; }
  .page-inner > :last-child, .page-inner > :last-child > :last-child { margin-bottom: 0 !important; }   /* no trailing space that would start an empty sheet */
  .page-inner::after { display: none; }
  .page-inner, .cover-grid { max-width: none; zoom: .87; }   /* screen sizes are generous for A4; slightly smaller keeps a page on one sheet */
  /* Long modules may continue on the next sheet (filled answers make them grow); small units stay whole. */
  :is(.box, .quote, .drawing-wrap, .note, .with-field, .pair, .diagram, figure, .statement, tr, li, .field) { break-inside: avoid; }
  p { orphans: 3; widows: 3; }
  :is(.page:not(.background-white), .module, .box, .coaching, .notes, .table-wrap) { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  :is(h2, h3, h4, .page-heading, .label, .module-head, .module-heading) { break-after: avoid; }
  .module-body > :first-child { break-before: avoid; }
  /* a little tighter than on screen, so a page that nearly fits a sheet does fit */
  :is(.module, .quote, .box) { margin-top: 26px; margin-bottom: 26px; }
  .field { margin: 6px 0 18px; }
  .cover-illu :is(img, svg) { max-height: 108mm; width: auto; }
  .page-illu .illu, .image .illu { max-height: 88mm; width: auto; max-width: 100%; }
  .field textarea, .field input { display: none; }
  .print-value { display: block; white-space: pre-wrap; min-height: 2.2em; border-bottom: 1px dotted #999; padding: 4px 2px; color: var(--navy); }
  .field-line .print-value { display: inline-block; min-width: 10em; }
  /* answers written straight on a dark page are white; inside light cards and boxes they stay dark blue */
  :is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) .print-value,
  .module-prayer .print-value { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
  :is(.background-blue, .background-wine, .background-red, .background-grey, .background-purple) :is(.module:not(.module-prayer), .box-blue, .box-mustard, .note, .table-wrap, .coaching, .notes) .print-value { color: var(--navy); border-bottom-color: #999; }
}

/* ================================================================ gentle reveal while reading */
@media (prefers-reduced-motion: no-preference) {
  .animate :is(.module, .quote, .statement, .notes, .diagram, .image, .page-illu, .coaching, .cover-illu, .cover-text) {
    opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease);
  }
  .animate :is(.module, .quote, .statement, .notes, .diagram, .image, .page-illu, .coaching, .cover-illu, .cover-text).visible { opacity: 1; transform: none; }
}
/* print: only the chosen pages; ink-saving mode prints text and thin lines only (no filled areas),
   which also reads well on a black-and-white printer */
@media print {
  .print-part :is(.title, section.page:not(.print-on)) { display: none !important; }
  :is(.print-part, .print-light) .print-first { break-before: auto; }
  .print-light :is(.title, .cover-illu) { display: none !important; }
  .print-light main :is(*, *::before, *::after):not(.squiggle) { background-color: transparent !important; background-image: none !important; box-shadow: none !important; text-shadow: none !important; }
  .print-light .page.background-blue { --pc: #2e5fc8; }
  .print-light .page.background-wine { --pc: #7a2826; }
  .print-light .page.background-red { --pc: #d63a2f; }
  .print-light .page.background-grey { --pc: #5f7d96; }
  .print-light .page.background-purple { --pc: #7a4ea3; }
  .print-light .page:not(.background-white) { color: var(--text); border: .75pt solid var(--pc); }
  /* cards and boxes: a thin grey outline instead of a fill or shadow */
  .print-light :is(.module, .box-blue, .box-mustard, .table-wrap, .note, .coaching-list) { border: .75pt solid #b8bccb; }
  .print-light .coaching-tab { border: .75pt solid #b8bccb; border-bottom: 0; }
  .print-light .note { transform: none; }
  .print-light .page th { border-bottom: .75pt solid #b8bccb; }
  /* text that was white on a dark fill turns dark */
  .print-light .page:not(.background-white) > .page-inner > :is(p, ul, ol, .with-field),
  .print-light .page:not(.background-white) > .page-inner > .with-field .field-label,
  .print-light .page:not(.background-white) > .page-inner > .drawing-wrap .drawing-prompt { color: var(--text); }
  .print-light .page:not(.background-white) :is(h2, h3, h4, .page-heading, .page-inner > p strong) { color: var(--pc); }
  .print-light .page:not(.background-white) .page-number { color: var(--grey); }
  .print-light .label { color: var(--ink); border: .75pt solid currentColor; }
  .print-light .box-highlight p { color: var(--ink); padding: 0; }
  .print-light .link-button a { color: var(--ink); border: .75pt solid #b8bccb; }
  .print-light .box-verse { border: .75pt solid #b8bccb; }
  .print-light .box-verse :is(p, strong) { color: var(--text) !important; }
  .print-light .module-prayer, .print-light .module-prayer p { color: var(--text); }
  .print-light .module-prayer strong { color: var(--ink); }
  .print-light .module-prayer .module-label { color: var(--mustard-text); }
  .print-light .print-value { color: var(--navy) !important; border-bottom-color: #999 !important; }
  .print-light .pair-arrow :is(.pair-head, .pair-a, .pair-b) { color: var(--ink); }
  .print-light .pair-arrow li { border-bottom-color: #b8bccb; }
  .print-light .icons-ring { border: 1pt solid currentColor; --logo-accent: currentColor; }
  .print-light .icons-red .icons-ring { color: var(--red); }
  .print-light .icons-blue .icons-ring { color: #1f3c96; }
  .print-light .statement p, .print-light .statement p strong { color: var(--pc); }
  .print-light .statement-outline p { color: transparent; -webkit-text-stroke-color: var(--pc); }
  .print-light .statement-outline p strong { color: var(--mustard-text); -webkit-text-stroke: 0; }
  .print-light .statement figcaption { color: var(--grey); }
  .print-light .cover-text { color: var(--text); }
  .print-light .cover-kicker { color: var(--mustard-text); }
  .print-light .cover-number { -webkit-text-stroke-color: var(--pc); }
  .print-light :is(.cover-heading, .cover-heading span) { color: var(--pc); }
  .print-light .cover-session a { color: var(--ink); padding-left: 0; }
  .print-light .cover-session span { color: var(--ink); border: .75pt solid currentColor; }
  /* the diagrams with large colour areas become outlines (the traffic light keeps its three lamps) */
  .print-light :is(.illu-wheel6, .illu-tiers, .illu-traffic-light) :is(path, rect, circle, ellipse, polygon):not([fill="none"]) { fill: #fff; stroke: #4a5068; stroke-width: .75pt; vector-effect: non-scaling-stroke; }
  .print-light .illu-traffic-light circle { fill: revert-layer; stroke: none; }
  .print-light :is(.illu-wheel6, .illu-tiers, .illu-traffic-light) text { fill: var(--ink); }
}
@media print { .animate :is(.module, .quote, .statement, .notes, .diagram, .image, .page-illu, .coaching, .cover-illu, .cover-text) { opacity: 1 !important; transform: none !important; } }   /* only the reveal; SVG drawings keep their own transforms */

/* ================================================================ illustrations (WebP from Gemini) */
img.illu { height: auto; }
.cover-illu img.illu { width: auto; max-width: 100%; max-height: min(78vh, 760px); margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(10,20,60,.25)); }
.title-image img.illu { filter: drop-shadow(0 26px 36px rgba(0,0,0,.28)); }
.card-image img.illu { width: 100%; height: 100%; object-fit: contain; }
.image-wide { margin: 28px 0 36px; }
/* never stretched: when a size limit (phone, print) wins over the width, the picture keeps its proportions */
img.illu { object-fit: contain; }
@media (max-width: 860px) { .cover-illu img.illu { max-height: 46vh; } }

/* ================================================================ Mobilise logo */
.brand-ring { color: var(--logo); width: 34px; height: 34px; }
.toc-ring { color: var(--logo); }
.title-brand { margin-bottom: clamp(28px, 4vw, 44px); }
.title-logo { width: auto; height: clamp(96px, 11vw, 132px); color: #fff; }
.footer-logo { width: auto; height: 72px; color: var(--logo); margin: 0 auto 16px; }

/* ================================================================ infographics */
/* full-page decoration (@decor) */
.page-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.page-decor svg { width: 100%; height: 100%; display: block; }
.has-decor::before, .has-decor::after { display: none; }
.has-decor .page-inner { position: relative; z-index: 1; }
.has-decor .page-head { z-index: 2; }
.type-quote.sky { background: linear-gradient(180deg, #132d7a 0%, #2553bd 58%, #3a6fd6 100%); }
.statement-question p { font-size: clamp(28px, 3.9vw, 54px); line-height: 1.12; text-align: center; font-weight: 400; color: #cfe0ff; }
.statement-question p strong { font-style: normal; font-weight: 700; color: #fff; }
.image-flight { margin: clamp(8px, 2vw, 20px) 0; }
.image-flight svg { width: 100%; height: auto; display: block; }

/* big numbers with icons (::: numbers) */
.numbers { margin: 32px 0 20px; }
@media (min-width: 1280px) { .numbers { margin-inline: -80px; } }
.numbers-head, .numbers-line { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); column-gap: 20px; }
.numbers-head > div { text-align: center; font: 700 14px/1.25 var(--sans); color: var(--red); }
.numbers-head .numbers-icon svg { display: block; width: 58px; height: 58px; margin: 0 auto 10px; color: var(--navy); stroke-width: 1.25; }
.numbers-divider { display: flex; align-items: center; gap: 14px; margin: 30px 0 12px; font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.numbers-divider::before, .numbers-divider::after { content: ''; flex: 1; height: 2px; background: var(--red); border-radius: 2px; }
.numbers-line { margin: 0; }
.numbers-line > div { text-align: center; min-width: 0; }
.numbers-line dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.numbers-line dd { margin: 0; font: 700 clamp(22px, 2.4vw, 32px)/1.15 var(--serif); letter-spacing: -.010em; color: var(--navy); white-space: nowrap; }

/* circles with icons (::: icons) */
.page .icons { list-style: none; margin: 28px auto; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(10px, 3vw, 32px); max-width: calc(var(--n) * 150px); }
.page .icons li { margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.page .icons li::before { content: none; }
.icons-ring { width: min(100%, 116px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff; --logo-accent: #fff; box-shadow: 0 10px 24px -12px rgba(22,36,79,.45); }
.icons-red .icons-ring { background: var(--red); }
.icons-blue .icons-ring { background: #1f3c96; }
.icons-ring svg { width: 50%; height: 50%; stroke-width: 1.4; }
.icons-ring .illu-logo-mark { width: 56%; height: 56%; }
.icons-caption { font: 700 14px/1.25 var(--sans); color: var(--ink); }

/* band with wavy edges (box style=wave) */
.box-wave, .box-wave-purple { position: relative; isolation: isolate; border-radius: 0; padding: clamp(56px, 7vw, 80px) 0; margin: 40px 0; }
.box-wave::before, .box-wave-purple::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: -100vmax; right: -100vmax; background: var(--wave);
  --wave-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 30'%3E%3Cpath d='M0 30V15Q60 0 120 15T240 15V30Z'/%3E%3C/svg%3E");
  --wave-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 30'%3E%3Cpath d='M0 0V15Q60 30 120 15T240 15V0Z'/%3E%3C/svg%3E");
  -webkit-mask: var(--wave-h) top left / 240px 30px repeat-x, var(--wave-d) bottom left / 240px 30px repeat-x, linear-gradient(#000 0 0) center / 100% calc(100% - 58px) no-repeat;
          mask: var(--wave-h) top left / 240px 30px repeat-x, var(--wave-d) bottom left / 240px 30px repeat-x, linear-gradient(#000 0 0) center / 100% calc(100% - 58px) no-repeat;
}
.box-wave-purple::before { background: var(--wave-purple); }
.page:has(.box-wave, .box-wave-purple) { overflow-x: clip; }
.box-wave > :first-child, .box-wave-purple > :first-child { margin-top: 0; }
.box-wave > :last-child, .box-wave-purple > :last-child { margin-bottom: 0; }
.box-wave .box-highlight p { background: none; color: var(--ink); padding: 0; font-size: clamp(20px, 2.1vw, 26px); }
.box-wave .quote { margin-bottom: 0; }

/* two columns side by side (::: pair) */
.pair { margin: 8px 0 36px; }
.page .pair ul { list-style: none; margin: 0; padding: 0; }
.page .pair li { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(16px, 4vw, 44px); }
.page .pair li::before { content: none; }
.pair-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 12px; margin: 0 0 18px; }
.pair-arrow .pair-head { font: 700 clamp(34px, 4.6vw, 56px)/1 var(--serif); letter-spacing: -.015em; color: #fff; }
.pair .pair-head > svg.pair-pointer { width: clamp(80px, 12vw, 150px); height: auto; color: #ff8f84; }
.pair-arrow .pair-head { grid-template-columns: 1fr 1fr; column-gap: clamp(16px, 4vw, 44px); }
.pair-arrow .pair-head > span:first-child { grid-area: 1 / 1; }
.pair-arrow .pair-head > svg.pair-pointer { grid-area: 1 / 1; justify-self: end; width: clamp(64px, 9vw, 130px); margin-top: .15em; }
.pair-arrow .pair-head > span:last-child { grid-area: 1 / 2; }
.pair-arrow li { border-bottom: 2px solid rgba(255,255,255,.75); padding: 16px 0 10px !important; align-items: end; }
.pair-arrow .pair-a { font: 600 17px/1.35 var(--sans); color: rgba(255,255,255,.85); }
.pair-arrow .pair-b { font: 700 19px/1.3 var(--serif); color: #fff; }
.pair-contrast .pair-head { font: 700 15px/1.25 var(--sans); color: var(--ink); }
.pair-contrast .pair-head > span:last-child { text-align: right; }
.pair-vs { font: italic 400 22px/1 var(--serif); color: var(--red); }
.pair-contrast li > span { padding: 5px 14px; font-size: 16px; line-height: 1.35; position: relative; }
.pair-contrast .pair-a { border-left: 2px solid var(--red); }
.pair-contrast .pair-b { border-right: 2px solid var(--red); text-align: right; }
.pair-contrast li > span::before { content: ''; position: absolute; top: calc(5px + .7em); width: 9px; height: 2px; background: var(--red); }
.pair-contrast .pair-a::before { left: 0; }
.pair-contrast .pair-b::before { right: 0; }
.pair-contrast li:first-child > span { padding-top: 0; }
.pair-contrast li:first-child > span::before { top: .7em; }

@media (max-width: 640px) {
  .numbers-head { display: none; }
  .numbers-line { grid-template-columns: 1fr 1fr; gap: 10px; }
  .numbers-line > div { text-align: left; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; }
  .numbers-line dt { position: static; width: auto; height: auto; clip: auto; white-space: normal; display: flex; align-items: center; gap: 8px; font: 700 12px/1.2 var(--sans); color: var(--red); margin-bottom: 6px; }
  .numbers-line dt svg { width: 22px; height: 22px; flex: none; color: var(--navy); }
  .numbers-line dd { font-size: 20px; }
  .numbers-divider { margin-top: 26px; }
  .pair-contrast li > span { font-size: 14px; padding-inline: 10px; }
  .pair-arrow .pair-a { font-size: 15px; }
  .pair-arrow .pair-b { font-size: 16px; }
  .image-flight { margin-inline: -8px; }
  .icons-caption { font-size: 12.5px; }
}

/* link instead of a QR code (::: link) */
.link-button { margin: 18px 0 26px; }
.link-button a { display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 14px; background: var(--panel); color: #fff; font: 600 16px/1.3 var(--sans); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, background-color .15s; }
.link-button a:hover { background: var(--panel-hover); transform: translateY(-1px); }
.link-button a:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.link-button svg { width: 22px; height: 22px; flex: none; }
.link-button svg:last-child { width: 18px; height: 18px; opacity: .7; }
@media print { .link-button a::after { content: ' ' attr(href); font-size: 9pt; word-break: break-all; } }

/* cover lettering (graphics/title-playbook.svg, tools/title.py) */
.title-wordmark { margin: 0; }
.title-svg { display: block; width: min(100%, 600px); height: auto; }
.title-author { display: flex; align-items: center; gap: 16px; font: 600 clamp(17px, 1.6vw, 21px)/1.2 var(--sans); opacity: 1; margin-top: 26px; }
.title-arrow { flex: 0 0 clamp(64px, 8vw, 110px); height: auto; color: #ff4d4f; }
.title .btn-primary { background: #fff4ee; color: #5a1719; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }
.title .btn-primary:hover { background: #fff; }
.footer-copy { font-weight: 600; }

/* only the Mobilise mark (M in a ring) in the bar */
.brand .brand-ring { width: 38px; height: 38px; }
.bar-place { flex: 0 1 auto; min-width: 0; }

/* prayer: the figure sits inside the panel (the panel clips it because of the glow), the text wraps around it */
.module-prayer { display: flow-root; }
.module-prayer .module-figure { position: relative; z-index: 1; float: right; top: auto; right: auto; width: clamp(92px, 16%, 128px); margin: -8px -6px 10px 20px; }
.module-prayer > .module-head, .module-prayer > p { position: relative; z-index: 1; }
@media (max-width: 640px) { .module-prayer .module-figure { width: 80px; margin: -6px -8px 6px 12px; } }

/* the label is a <p> – the general paragraph margins on the page would throw off the centring of the page number */
.page-head .label { margin: 0; }

/* timeline (p. 7): on desktop the labels are in the image, on phones they are below it as text */
.diagram-timeline ul { display: none; }
.diagram-spectrum p { margin: 6px 0 0; font-size: 14px; text-align: center; }
@media (min-width: 1280px) { .diagram-timeline { margin-left: -120px; margin-right: -120px; } }
@media (max-width: 640px) {
  .diagram-timeline .timeline-labels { display: none; }
  .diagram-timeline svg { margin: -19% 0 -4px; }
  .diagram-timeline ul { display: block; margin-top: 8px; }
}

/* --- in the content: a red squiggle across the full text width */
.squiggle { border: 0; height: 26px; margin: 48px 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cpath d='M0 13Q30 -3 60 13T120 13' fill='none' stroke='%23d63a2f' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") left center / 120px 26px repeat-x; }

/* title page like the cover of the printed workbook: everything centred, no illustration */
.title-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; max-width: 860px; }
.title-text { display: flex; flex-direction: column; align-items: center; width: 100%; }
.title-brand { justify-content: center; margin-bottom: clamp(28px, 4vw, 48px); }
.title-wordmark { width: 100%; }
.title-svg { width: 100%; max-width: min(560px, 58vh); margin: 0 auto; }
.title .title-logo { height: clamp(76px, 7.5vw, 104px); }
.title .title-brand { margin-bottom: clamp(20px, 3vw, 36px); }
.title { padding-top: clamp(32px, 5vw, 64px); }
.title-author { justify-content: center; margin-top: clamp(20px, 3vw, 34px); }
.title-lede { max-width: 44ch; margin-left: auto; margin-right: auto; }
.title-action { justify-content: center; }
.cards-phases { margin-top: clamp(48px, 7vw, 88px); }
.title-howto { text-align: center; }

/* loading screen (in the <head> of workbook.html): once the styles have loaded, show the content and fade the screen out */
body > :not(.loader) { visibility: visible; }
.loader { animation: loader-out .45s ease .25s forwards; }
.loader.hidden { opacity: 0; pointer-events: none; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@media print { .loader { display: none !important; } }

/* "with Paul Bartlett" must not wrap (flex would squeeze the text to its narrowest width) */
.title-author span { flex: none; white-space: nowrap; }
.title-arrow { width: clamp(64px, 8vw, 110px); }

/* Lexend has no italic – don't let the browser synthesise slanted shapes */
html { font-synthesis-style: none; }

/* narrow phones: long Czech words in big statements must fit (Lexend is wide) */
.statement p { overflow-wrap: break-word; }
@media (max-width: 380px) {
  .statement p { font-size: 27px; }
  .statement-outline p { font-size: 30px; }
  .numbers-line dd { font-size: 17px; }
  .icons-caption { font-size: 11px; overflow-wrap: anywhere; }
}

/* Sentient (Indian Type Foundry, ITF Free Font License) – quotes, prayers, verses */
@font-face { font-family: 'Sentient'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(fonts/sentient.woff2) format('woff2'); }
@font-face { font-family: 'Sentient'; font-style: italic; font-weight: 200 700; font-display: swap; src: url(fonts/sentient-italic.woff2) format('woff2'); }

/* <outlines> – generated by tools/outlines.py: static Lexend instances without overlaps for outlined text */
@font-face { font-family: 'Lexend outline statement'; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/outline-statement-1.woff2) format('woff2'); unicode-range: U+41, U+C1, U+10C, U+10E, U+11A, U+147, U+158, U+160, U+164, U+16E, U+17D; }
@font-face { font-family: 'Lexend outline statement'; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/outline-statement.woff2) format('woff2'); unicode-range: U+21, U+22, U+26, U+27, U+28, U+29, U+2C, U+2D, U+2E, U+2F, U+3A, U+3B, U+3F, U+41, U+42, U+43, U+44, U+45, U+46, U+47, U+48, U+49, U+4A, U+4B, U+4C, U+4D, U+4E, U+4F, U+50, U+51, U+52, U+53, U+54, U+55, U+56, U+57, U+58, U+59, U+5A, U+C1, U+C9, U+CD, U+D3, U+DA, U+DD, U+2013, U+2014, U+201C, U+201D, U+201E, U+2026; }
@font-face { font-family: 'Lexend outline number'; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/outline-number.woff2) format('woff2'); unicode-range: U+30, U+31, U+32, U+33, U+34, U+35, U+36, U+37, U+38, U+39; }
.statement-outline p { font-family: 'Lexend outline statement', var(--sans); }
.cover-number { font-family: 'Lexend outline number', var(--serif) !important; }
/* </outlines> */

/* ================================================================ dark mode (toggle in the bar, defaults to the system setting) */
.btn-theme {
  display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--tint),.2); transition: background .2s;
}
.btn-theme:hover { background: rgba(var(--tint),.06); }
.btn-theme svg { width: 19px; height: 19px; }
.btn-theme .theme-sun, html[data-theme="dark"] .btn-theme .theme-moon { display: none; }
html[data-theme="dark"] .btn-theme .theme-sun { display: block; }
@media (max-width: 640px) { .btn-theme { margin-left: auto; width: 42px; height: 42px; } .menu { margin-left: 0; } }
@media print { .btn-theme, .langmenu { display: none; } }
/* language menu next to the theme toggle: grows with every language version */
.langmenu { position: relative; flex: 0 0 auto; }
.btn-lang {
  list-style: none; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--tint),.2);
  font: 700 12.5px/1 var(--sans); letter-spacing: .08em; transition: background .2s;
}
.btn-lang::-webkit-details-marker { display: none; }
.btn-lang:hover, .langmenu[open] > .btn-lang { background: rgba(var(--tint),.06); }
.btn-lang .chev { width: 15px; height: 15px; color: var(--grey); transition: transform .2s var(--ease); }
.langmenu[open] .chev { transform: rotate(180deg); }
.lang-panel { width: 240px; }
/* a little air between items, so the highlight of one never touches the next */
.menu-panel > button + button, .menu-panel > button + .btn-file, .menu-panel > .btn-file + button { margin-top: 3px; }
.lang-panel button { gap: 10px; }
.lang-panel .lang-name { flex: 1; }
.lang-panel .lang-code { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--grey); }
.lang-panel .lang-check { visibility: hidden; color: var(--navy) !important; }
.lang-panel [aria-checked="true"] { background: rgba(var(--tint),.06); }
.lang-panel [aria-checked="true"] .lang-check { visibility: visible; }
@media (max-width: 640px) { .btn-lang { height: 42px; padding: 0 8px 0 12px; } .lang-panel { position: fixed; left: auto; right: 10px; top: calc(var(--bar) + 8px); } }
/* transition between themes: a circle from the button (animated by workbook.js), a veil in older browsers */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-veil { position: fixed; inset: 0; z-index: 900; pointer-events: none; opacity: 0; }
.btn-theme svg { animation: theme-icon .5s var(--ease); }
@keyframes theme-icon { from { opacity: 0; transform: rotate(-90deg) scale(.6); } }

@media screen {
  html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #eef0f8; --navy: #9db7ff; --text: #cdd2e2; --grey: #98a0b9; --grey-light: #6b7390; --rule: #262f4e;
    --wine: #f29a8f; --blue: #86a8f7; --purple: #c9a9f0; --red-dark: #ff7b70;
    --blue-light: rgba(46,95,200,.24); --mustard-light: #2a2419; --purple-light: rgba(122,78,163,.22);
    --paper: #131a30; --backdrop: #0c1122;
    --panel: #25366c; --panel-hover: #30458c; --card: #1a2241; --tint: 255,255,255;
    --bar-background: rgba(15,21,40,.86); --logo: #f4ebe8;
    --dots: #4a5476; --placeholder: #5f6888; --frame: #3b4568; --frame-background: rgba(255,255,255,.03); --frame-coach: #151c35;
    --th: #212b4d; --remark: #1b2342; --ponder: rgba(214,58,47,.15); --light-page: #171e37;
    --wave: #1b2342; --wave-purple: #241e41; --mustard-text: #f0c35e; --mustard-icon: #f0c35e;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.7);
  }
  html[data-theme="dark"] .module-reflection .module-icon { color: var(--purple); }
  html[data-theme="dark"] .menu-panel { box-shadow: 0 24px 60px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08); }
  html[data-theme="dark"] .module-prayer { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
  html[data-theme="dark"] .drawing-canvas { box-shadow: inset 0 0 0 2px var(--purple); }
  /* diagrams: lighten labels that sit directly on the paper, leave the coloured areas as they are */
  html[data-theme="dark"] .diagram-timeline [fill="#252d45"] { fill: var(--text); }
  html[data-theme="dark"] .diagram-timeline [stroke="#2548b0"] { stroke: #6f93f5; }
  html[data-theme="dark"] .diagram-timeline [fill="#d63a2f"] { fill: #ff7468; }
  html[data-theme="dark"] :is(.diagram-cycle, .diagram-traffic-light, .diagram-spectrum) :is(text, tspan)[fill="#16244f"] { fill: var(--ink); }
  html[data-theme="dark"] .diagram-traffic-light :is(text, tspan)[fill="#283049"] { fill: var(--text); }
  html[data-theme="dark"] .diagram-spectrum :is(text, tspan)[fill="#9a6a0b"] { fill: var(--mustard-text); }
  html[data-theme="dark"] .diagram-spectrum :is(text, tspan)[fill="#2e5fc8"] { fill: var(--blue); }
  html[data-theme="dark"] .diagram-cycle [stroke="#16244f"] { stroke: var(--grey); }
  html[data-theme="dark"] .diagram-cycle path[fill="#16244f"] { fill: var(--grey); }
}
