/* Ecofriendly Africa Initiative: the exercise book.
   Cover card in globe blue, ruled newsprint inside, back cover in leaf green.
   Inks by role: printed black for structure, blue ballpoint for notes and
   EFAI's answers, red biro only for the action and the active mark. */

/* Fonts ------------------------------------------------------------------ */
@font-face { font-family: "Corben"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/corben-400-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: "Corben"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/corben-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Corben"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/corben-700-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: "Corben"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/corben-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/andika-400-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: "Andika"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/andika-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/andika-700-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: "Andika"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/andika-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/kalam-400-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: "Kalam"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/kalam-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/kalam-700-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; }

/* Tokens ----------------------------------------------------------------- */
:root {
  --cover: #1b3f8e;        /* globe blue: front cover, strip */
  --cover-dk: #122c66;     /* spine tape */
  --cover-ink: #d9e3f7;    /* secondary text on the cover */
  --back: #2c5a1c;         /* leaf green: back cover */
  --back-ink: #d4e6c6;     /* secondary text on the back cover */
  --back-dk: #1f4313;      /* back cover spine tape */
  --band: #36701f;         /* tagline band on the cover */
  --paper: #f4f7f6;        /* newsprint inside, cool, never cream */
  --label: #fdfefd;        /* name label, prints */
  --rule-c: #b7cbe4;       /* pale blue ruling */
  --margin-c: #e06a64;     /* printed margin line */
  --dot: #7e889c;          /* dotted write-on lines, 3.3:1 on paper */
  --edge: #c9d3df;         /* cut paper edges */
  --ink: #161a22;          /* printed black */
  --ink-2: #434b59;        /* printed secondary */
  --pen: #1d3cae;          /* blue ballpoint */
  --biro: #c3122f;         /* red biro: action and active mark only */
  --biro-dk: #9d0d25;
  --hi: #ffe45a;           /* highlighter: selection, focus on colour */

  --rule: 28px;            /* ruling pitch: the page's only vertical grid */
  --rule-shift: -6px;      /* puts body baselines on the rules */
  --margin: 96px;          /* margin line, from the page's left edge */
  --gutter: 32px;          /* margin line to text */
  --page-max: 1200px;
  --strip-h: 64px;

  --f-print: "Corben", "Cooper Black", Georgia, serif;
  --f-text: "Andika", "Segoe UI", system-ui, sans-serif;
  --f-pen: "Kalam", "Segoe Print", "Comic Neue", cursive;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 760px) {
  :root { --margin: 36px; --gutter: 16px; --strip-h: 56px; }
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--strip-h) + 12px);
  scrollbar-color: var(--cover) var(--paper);
  background: var(--paper);
}
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: 17px;
  line-height: var(--rule);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: lining-nums;
}
img, svg { display: block; max-width: 100%; }
p, ul, ol, dl, dd, figure, blockquote, h1, h2, h3 { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
::selection { background: var(--hi); color: var(--ink); }
input, textarea { caret-color: var(--pen); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
.strip :focus-visible, .cover :focus-visible, .back :focus-visible { outline-color: var(--hi); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--hi); color: var(--ink); padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.pen { font-family: var(--f-pen); color: var(--pen); font-weight: 400; }
.num { font-variant-numeric: tabular-nums lining-nums; font-weight: 700; }

/* Hand-drawn strokes (sprite icons) */
.act__icon, .inline-give svg, .chain__arrow, .cover__open svg {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* Strip: the cover's top edge, kept while reading ------------------------ */
.strip {
  position: sticky; top: 0; z-index: 20;
  background: var(--cover); color: #fff;
  border-bottom: 1px solid var(--cover-dk);
}
.strip__inner {
  max-width: var(--page-max); margin: 0 auto; height: var(--strip-h);
  padding: 0 24px; display: flex; align-items: center; gap: 28px;
}
.strip__brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 19px; letter-spacing: 0.02em;
}
.strip__brand img { width: 40px; height: 40px; background: #fff; border-radius: 50%; padding: 2px; }
.strip__nav { margin-left: auto; }
.strip__nav ul { display: flex; gap: 4px; }
.strip__nav a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-size: 15px; text-decoration: none; color: var(--cover-ink);
}
.strip__nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--hi); }
.strip__give {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
  border-radius: 8px; background: var(--biro); color: #fff; text-decoration: none;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 17px;
  transition: background-color 160ms var(--ease-out);
}
.strip__give:hover { background: var(--biro-dk); }

@media (max-width: 900px) {
  .strip__nav { display: none; }
  .strip__give { margin-left: auto; }
}

/* Front cover ------------------------------------------------------------ */
.cover {
  position: relative;
  background: var(--cover);
  color: #fff;
  min-height: min(calc(100svh - var(--strip-h)), 960px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 24px 84px 56px;
  overflow: hidden;
}
/* spine tape and its two staples */
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 26px;
  background: var(--cover-dk);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
}
.cover::after {
  content: ""; position: absolute; left: 11px; top: 22%; width: 4px; height: 56%;
  background:
    linear-gradient(var(--cover-ink), var(--dot)) top / 4px 30px no-repeat,
    linear-gradient(var(--cover-ink), var(--dot)) bottom / 4px 30px no-repeat;
  border-radius: 3px;
}
.cover__frame {
  position: relative;
  width: 100%; max-width: var(--page-max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 22px;
  padding: 48px 48px 48px 56px;
}
.cover__title-block { grid-column: 1 / 8; container-type: inline-size; }
.cover__mark {
  width: clamp(88px, 9vw, 124px); height: auto; aspect-ratio: 1;
  background: #fff; border-radius: 50%; padding: 6px; margin-bottom: 28px;
}
.cover__title {
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700;
  font-size: clamp(2rem, 13cqi, 5.5rem); line-height: 1.04; letter-spacing: -0.01em;
  text-wrap: balance;
}
.cover__band {
  display: inline-block; margin-top: 28px;
  background: var(--band); color: #fff;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 19px; line-height: 1.4;
  padding: 8px 16px; border-radius: 4px; letter-spacing: 0.01em;
}

/* the name label */
.label {
  grid-column: 8 / 13;
  background: var(--label); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 14px;
  outline: 1px solid var(--ink); outline-offset: -8px;
  padding: 28px 28px 24px;
  box-shadow: 0 2px 2px rgba(6, 16, 45, 0.25), 0 18px 30px -16px rgba(6, 16, 45, 0.55);
}
.label__row {
  display: grid; grid-template-columns: 5.6rem 1fr; align-items: end; gap: 10px;
  min-height: 46px; padding-bottom: 2px;
}
.label__row dt {
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1; padding-bottom: 8px;
}
.label__row dd {
  font-size: 21px; line-height: 1.25; padding: 0 2px 4px;
  border-bottom: 2px dotted var(--dot);
}
.label__offer { margin-top: 20px; font-size: 17px; line-height: 26px; color: var(--ink-2); }
.label__actions { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.label__note { margin-top: 14px; font-size: 15px; line-height: 22px; color: var(--ink-2); }

/* actions: red biro is the only red on the page */
.act {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 19px;
  text-decoration: none; line-height: 1.2;
}
.act--give {
  padding: 0 22px; border-radius: 10px; background: var(--biro); color: #fff;
  transition: background-color 160ms var(--ease-out);
}
.act--give:hover { background: var(--biro-dk); }
.act__icon { width: 20px; height: 20px; flex: none; }
.act--join { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.act--join:hover { color: var(--pen); }
.biro-ring {
  position: absolute; left: -16px; top: -12px; width: calc(100% + 32px); height: calc(100% + 24px);
  fill: none; stroke: var(--biro); stroke-width: 2.4; stroke-linecap: round;
  pointer-events: none; overflow: visible;
}
.biro-ring path { stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }

.cover__open {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-size: 15px; color: var(--cover-ink); text-decoration: none;
}
.cover__open svg { width: 20px; height: 20px; }
.cover__open:hover { color: #fff; }

@media (max-width: 1100px) {
  .cover__frame { padding: 40px 32px 40px 44px; }
  .cover__title-block { grid-column: 1 / 7; }
  .label { grid-column: 7 / 13; }
}
@media (max-width: 860px) {
  .cover { padding: 24px 14px 72px 30px; min-height: 0; }
  .cover::before { width: 16px; }
  .cover::after { left: 6px; }
  .cover__frame { display: block; padding: 24px 16px 24px 18px; border-radius: 14px; }
  .cover__mark { margin-bottom: 20px; }
  .cover__band { margin-top: 20px; font-size: 17px; }
  .label { margin-top: 32px; padding: 22px 18px 20px; }
  .label__row { grid-template-columns: 4.6rem 1fr; }
  .label__row dd { font-size: 19px; }
}
@media (max-width: 480px) {
  .label__row { grid-template-columns: 1fr; gap: 0; min-height: 0; padding: 12px 0 0; }
  .label__row:first-child { padding-top: 0; }
  .label__row dt { padding-bottom: 2px; }
  .label__row dd { font-size: 19px; }
}

/* Inside: ruled newsprint ------------------------------------------------ */
.sheet {
  background-color: var(--paper);
  background-image: linear-gradient(180deg, transparent calc(var(--rule) - 1px), var(--rule-c) calc(var(--rule) - 1px));
  background-size: 100% var(--rule);
  background-position: 0 var(--rule-shift);
  border-top: 1px solid var(--edge);
}
.sheet__page {
  position: relative;
  max-width: var(--page-max); margin: 0 auto;
  padding: calc(var(--rule) * 3) 32px calc(var(--rule) * 3) calc(var(--margin) + var(--gutter));
}
/* the printed margin line, full height of the page */
.sheet__page::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin); width: 2px;
  background: var(--margin-c);
}

.note + .note { margin-top: calc(var(--rule) * 4); }
.note__title {
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700;
  font-size: clamp(30px, 3.4vw, 44px); line-height: calc(var(--rule) * 2); letter-spacing: -0.01em;
  max-width: 22ch; text-wrap: balance;
}
@media (max-width: 760px) {
  .note__title { font-size: 23px; line-height: var(--rule); }
  .note + .note { margin-top: calc(var(--rule) * 3); }
}
.note__lead { margin-top: var(--rule); max-width: 62ch; font-size: 19px; color: var(--ink-2); }
.note__source { margin-top: var(--rule); max-width: 70ch; font-size: 15px; color: var(--ink-2); }

/* The lesson: cause, arrow, EFAI's answer in ballpoint */
.chain { margin-top: calc(var(--rule) * 2); counter-reset: step; }
.chain__row {
  position: relative; counter-increment: step;
  display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.15fr); column-gap: 20px; align-items: start;
  padding-bottom: var(--rule);
}
.chain__row::before {
  content: counter(step) ".";
  position: absolute; left: calc(-1 * var(--gutter) - var(--margin) + 8px); width: calc(var(--margin) - 20px);
  top: 0; text-align: right;
  font-family: var(--f-pen); font-size: 21px; color: var(--pen);
}
.chain__cause { font-size: 17px; max-width: 40ch; }
.chain__arrow { width: 56px; height: var(--rule); color: var(--pen); margin-top: 0; }
.chain__answer { font-size: 21px; line-height: var(--rule); }
.u2 {
  text-decoration-line: underline; text-decoration-style: double;
  text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}

@media (max-width: 760px) {
  .chain__row { grid-template-columns: 1fr; row-gap: 0; }
  .chain__row::before { left: calc(-1 * var(--gutter) - var(--margin) + 2px); width: calc(var(--margin) - 8px); font-size: 19px; }
  .chain__arrow { transform: rotate(90deg); width: 28px; height: var(--rule); margin-left: 6px; }
  .chain__answer { font-size: 21px; }
}

/* Programmes: notes with pasted prints */
.prog { position: relative; margin-top: calc(var(--rule) * 3); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
.prog__title {
  grid-column: 1 / -1;
  font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 23px; line-height: var(--rule);
  max-width: 36ch; text-wrap: balance;
}
.prog__year {
  position: absolute; top: 0; left: calc(-1 * var(--gutter) - var(--margin) + 8px); width: calc(var(--margin) - 20px);
  text-align: right; font-family: var(--f-pen); font-weight: 400; font-size: 21px; color: var(--pen);
}
@media (max-width: 760px) {
  .prog__title { font-size: 19px; }
  .prog__year { position: static; display: inline-block; width: auto; margin-left: 6px; }
}
.prog__body { margin-top: var(--rule); }
.prog__body p + p { margin-top: var(--rule); }
.prog__body p { max-width: 64ch; }
.prog__body strong { font-weight: 700; }

.prog--slicap .prog__body { grid-column: 1 / 8; grid-row: 2; }
.prog--slicap .print--small { grid-column: 9 / 13; grid-row: 2; margin-top: calc(var(--rule) * 2); }
.prog--slicap .print--wide { grid-column: 2 / 12; grid-row: 3; margin-top: calc(var(--rule) * 2); }
.prog--slicap .print--wide img { height: calc(var(--rule) * 16); object-position: 50% 72%; }
.prog--masterclass .prog__body { grid-column: 1 / 9; }
.prog--research .print { grid-column: 1 / 6; grid-row: 2; margin-top: var(--rule); }
.prog--research .prog__body { grid-column: 7 / 13; grid-row: 2; }
.prog--adapt .prog__body { grid-column: 1 / 7; }
.prog--adapt .print { grid-column: 7 / 12; margin-top: var(--rule); }
.prog--embers .prog__body { grid-column: 1 / 9; }

.inline-give { color: var(--biro); font-weight: 700; text-decoration-color: var(--biro); }
.inline-give svg { display: inline-block; width: 18px; height: 18px; margin-left: 6px; vertical-align: -3px; }
.nowrap { white-space: nowrap; }
.inline-give:hover { color: var(--biro-dk); }


/* pasted prints: white border, a little askew, photo edges on the rules */
.print { --tilt: 0deg; }
.print img {
  width: 100%; object-fit: cover;
  padding: 12px; background: var(--label);
  box-shadow: 0 1px 1px rgba(20, 30, 50, 0.16), 0 10px 20px -10px rgba(20, 30, 50, 0.4);
  transform: rotate(var(--tilt));
}
.print figcaption { margin-top: 10px; font-size: 19px; line-height: var(--rule); padding-left: 6px; }
.print--tilt-l { --tilt: -1.4deg; }
.print--tilt-r { --tilt: 1.2deg; }
.print--wide img { height: calc(var(--rule) * 14); }
.print--small img { height: calc(var(--rule) * 9); }
.print--mid img { height: calc(var(--rule) * 11); }
.print--tall img { height: calc(var(--rule) * 13); }

@media (max-width: 900px) {
  .prog { display: block; }
  .prog .print { margin-top: calc(var(--rule) * 2); max-width: 560px; }
  .prog--research .print { margin-top: var(--rule); }
  .print--wide img, .prog--slicap .print--wide img { height: calc(var(--rule) * 10); }
  .print--small img, .print--mid img, .print--tall img { height: calc(var(--rule) * 9); }
}

/* Network */
.net { margin-top: calc(var(--rule) * 2); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
.net__text { grid-column: 1 / 7; }
.net__text > p { max-width: 62ch; }
.net .print { grid-column: 8 / 13; }
.groups { margin-top: var(--rule); }
.groups li { position: relative; padding-left: 28px; font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-size: 19px; }
.groups li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 2px;
  background: var(--pen); border-radius: 3px; transform: rotate(-4deg);
}
.quote { margin: calc(var(--rule) * 2) 0 0; }
.quote p { font-size: 23px; line-height: calc(var(--rule) * 1.5); max-width: 30ch; }
.quote footer { margin-top: var(--rule); font-size: 15px; color: var(--ink-2); }
@media (max-width: 900px) {
  .net { display: block; }
  .net .print { margin-top: calc(var(--rule) * 2); max-width: 560px; }
}

/* Homework sheet --------------------------------------------------------- */
.hw { margin-top: calc(var(--rule) * 2); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; }
.hw__choices { grid-column: 1 / 8; border: 0; padding: 0; margin: 0; min-width: 0; }
.hw__lines { grid-column: 1 / 8; margin-top: var(--rule); }
.hw__lines[hidden] { display: none; }
.hw__send { grid-column: 1 / 8; margin-top: calc(var(--rule) * 2); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.hw__preview { grid-column: 9 / 13; grid-row: 1 / 4; align-self: start; }
.hw__hint { flex: 1 1 260px; font-size: 15px; line-height: 24px; color: var(--ink-2); max-width: 46ch; }

.tick {
  position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: start;
  padding: 0 0 var(--rule); cursor: pointer;
}
.tick input { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: 0; opacity: 0; cursor: pointer; }
.tick__box {
  width: 30px; height: 30px; margin-top: -2px; border: 2px solid var(--ink); border-radius: 3px; background: var(--label);
  position: relative;
}
.tick__box svg {
  position: absolute; left: -4px; top: -12px; width: 40px; height: 40px; overflow: visible;
  fill: none; stroke: var(--biro); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round;
}
.tick__box path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 380ms var(--ease-out); }
.tick input:checked + .tick__box path { stroke-dashoffset: 0; }
.tick input:focus-visible + .tick__box { outline: 3px solid var(--pen); outline-offset: 3px; }
.tick:hover .tick__box { border-color: var(--pen); }
.tick__text strong { display: block; font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 19px; line-height: var(--rule); }
.tick__text span { display: block; font-size: 15px; color: var(--ink-2); }
.tick input:checked ~ .tick__text strong { color: var(--ink); }

.line { display: block; padding-bottom: var(--rule); }
.line__label { display: block; font-size: 15px; color: var(--ink-2); line-height: var(--rule); }
.opt { color: var(--ink-2); font-size: 13px; }
.line__input {
  display: block; width: 100%; max-width: 560px;
  border: 0; border-bottom: 2px dotted var(--dot); border-radius: 0; background: transparent;
  font-family: var(--f-pen); font-size: 23px; line-height: var(--rule); color: var(--pen);
  padding: 0 4px; height: var(--rule); margin-top: 0;
}
textarea.line__input {
  height: calc(var(--rule) * 3); border-bottom: 0; resize: vertical; overflow: auto;
}
.line__input:focus { outline: none; border-bottom-color: var(--pen); background: rgba(29, 60, 174, 0.05); }
.line__input:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }

/* rough work: a ruled slip torn from the back of the book */
.rw {
  --tilt: 0.9deg;
  background-color: var(--label);
  background-image: linear-gradient(180deg, transparent calc(var(--rule) - 1px), var(--rule-c) calc(var(--rule) - 1px));
  background-size: 100% var(--rule); background-position: 0 calc(var(--rule-shift) + 20px);
  border: 1px solid var(--edge); border-radius: 3px;
  padding: 20px 22px var(--rule);
  box-shadow: 0 1px 1px rgba(20, 30, 50, 0.16), 0 12px 22px -12px rgba(20, 30, 50, 0.42);
  transform: rotate(var(--tilt));
}
.rw__title { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 19px; line-height: var(--rule); }
.rw__head { margin-top: var(--rule); }
.rw__row { display: grid; grid-template-columns: 4.6rem 1fr; column-gap: 10px; }
.rw__row[hidden] { display: none; }
.rw__row dt { font-size: 13px; line-height: var(--rule); color: var(--ink-2); }
.rw__row dd { font-size: 19px; line-height: var(--rule); overflow-wrap: anywhere; }
.rw__body { margin-top: var(--rule); font-size: 19px; line-height: var(--rule); white-space: pre-line; overflow-wrap: anywhere; }
.rw__body[hidden] { display: none; }

@media (max-width: 900px) {
  .hw { display: block; }
  .hw__preview { margin-top: var(--rule); max-width: 560px; --tilt: 0.5deg; }
}

/* Back cover ------------------------------------------------------------- */
.back { background: var(--back); color: #fff; padding: 84px 24px 56px 56px; position: relative; }
.back::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 26px; background: var(--back-dk);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
}
.back__inner { max-width: var(--page-max); margin: 0 auto; }
.back__title { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; }
.back a { color: #fff; text-decoration-color: var(--hi); }
.back a:hover { text-decoration-thickness: 3px; }

/* one fixed cell grid, like the times tables on a real back cover */
.cells {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid rgba(255, 255, 255, 0.7); border-left: 1.5px solid rgba(255, 255, 255, 0.7);
}
.cell { padding: 16px 18px 18px; border-right: 1.5px solid rgba(255, 255, 255, 0.7); border-bottom: 1.5px solid rgba(255, 255, 255, 0.7); min-height: 112px; }
.cell dt { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--back-ink); line-height: 20px; }
.cell dd { margin-top: 8px; font-size: 17px; line-height: 25px; overflow-wrap: anywhere; }
.cell__links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.back__grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.times { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 24px; }
.times caption { text-align: left; font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 23px; line-height: 1.3; padding-bottom: 14px; }
.times th, .times td { border: 1.5px solid rgba(255, 255, 255, 0.7); padding: 10px 12px; text-align: left; vertical-align: top; }
.times thead th { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--back-ink); font-weight: 700; }
.times tbody th { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 15px; white-space: nowrap; }
.times td.times__srccol { color: var(--back-ink); font-size: 13px; white-space: nowrap; }
.times__src { display: none; }

.pledge {
  border: 1.5px solid rgba(255, 255, 255, 0.8); outline: 1.5px solid rgba(255, 255, 255, 0.8); outline-offset: 5px;
  padding: 24px 26px; margin: 6px; border-radius: 4px;
}
.pledge__title { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-weight: 700; font-size: 23px; line-height: 1.3; text-align: center; }
.pledge p { margin-top: 14px; font-size: 17px; line-height: 27px; }
.pledge__beliefs { font-family: var(--f-print); font-variant-ligatures: no-common-ligatures; font-size: 15px; color: var(--back-ink); text-align: center; }

.colophon { margin-top: 56px; padding-top: 20px; border-top: 1.5px solid rgba(255, 255, 255, 0.4); font-size: 15px; line-height: 22px; color: var(--back-ink); }
.colophon p + p { margin-top: 4px; }

@media (max-width: 1100px) {
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .back__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .back { padding: 56px 16px 40px 34px; }
  .back::before { width: 18px; }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 0; }
  .times th, .times td { padding: 8px 10px; }
  .times .times__srccol { display: none; }
  .times__src { display: block; margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--back-ink); }
}

/* Motion: ink writes once, ticks drawn once, nothing idles ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-ink] {
    clip-path: inset(-8px 100% -8px -8px);
    transition: clip-path 1100ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 160ms);
  }
  .js [data-ink].is-inked { clip-path: inset(-8px -8px -8px -8px); }
  .js .cover .biro-ring path { stroke-dashoffset: 1; }
  .js .cover.is-ringed .biro-ring path { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease-out) 450ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tick__box path { transition: none; }
}
