/* aitism learn: Reading activities (acts-reading.js). Classes start rd-. Every size in em of the sheet base; Print Black on white;
   the line colour only on the number badges; dashed only for a place to cut or a gap to fill. */

/* left out because of the avoid list: only ever seen in the x-ray, crossed out */
.rd-gone { font-size: .6em; line-height: 1.3; }

/* ---------- yes or no ---------- */
.rd-tf { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; align-content: space-evenly; flex: 1 0 auto; }
.rd-tf .q { justify-content: flex-start; gap: .6em; padding: .4em .6em .4em .9em; }
.rd-tf-pic { flex: none; display: grid; place-items: center; width: 2.9em; height: 2.9em; border: 2px solid #111; border-radius: .35em; background: #fff; }
.rd-tf-pic .em { font-size: 2em; line-height: 1; }
.rd-tf.n3 .rd-tf-pic, .rd-tf.n2 .rd-tf-pic { width: 3.7em; height: 3.7em; }
.rd-tf.n3 .rd-tf-pic .em, .rd-tf.n2 .rd-tf-pic .em { font-size: 2.6em; }
.rd-tf-s { flex: 1; min-width: 0; font-size: .9em; line-height: 1.3; text-wrap: pretty; }
.rd-tf.l1 .rd-tf-s { font-size: .95em; gap: .15em .25em; }
.rd-tf.l3 { gap: .4em; }
.rd-tf.l3 .q { padding: .3em .55em .3em .85em; }
.rd-tf.l3 .rd-tf-s { font-size: .82em; }
.rd-qem { flex: none; line-height: 1; }
.rd-qem .em { font-size: .95em; }
.rd-yn { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: .3em; }
/* with pictures, yes sits over no, so the sentence keeps one line */
.rd-tf.l1 .rd-yn { flex-direction: column; align-items: stretch; gap: .25em; }
.rd-yn .rd-c { display: inline-flex; align-items: center; gap: .22em; height: auto; min-height: 1.85em; padding: .08em .6em .08em .38em; font-size: .78em; }
.rd-tf.l1 .rd-yn .rd-c { justify-content: flex-start; font-size: .82em; min-height: 1.6em; }
.rd-c .em { font-size: 1.05em; line-height: 1; }
.rd-c b { font-weight: 700; }
.rd-trc { display: inline-flex; align-items: center; gap: .22em; }
.rd-trc .em { font-size: .85em; line-height: 1; }
.rd-trc .trace { font-size: 1em; padding: 0 .25em; }
.rd-ynbox { width: 2.9em; }
.rd-tf.l3 .rd-ynbox { height: 1.4em; }
.rd-ynline { width: 3.2em; }
.rd-tf-gone { font-size: .7em; padding-left: 1.2em; }
/* Years 3 to 6: the sentences in groups, each under the heading of the paragraph it comes from */
.rd-tf.l4, .rd-tf.l5 { gap: .45em; }
.rd-tf-sec { display: grid; gap: .25em; }
.rd-tf-g { list-style: none; margin: 0; padding: 0; display: grid; gap: .3em; }
.rd-tf.l4 .q, .rd-tf.l5 .q { padding: .25em .55em .25em .85em; }
.rd-tf.l4 .rd-tf-s { font-size: .76em; }
.rd-tf.l5 .rd-tf-s { font-size: .72em; }
.rd-tf.l4 .rd-ynbox, .rd-tf.l5 .rd-ynbox { height: 1.4em; }
.rd-tf-sec.ghost p { font-size: .7em; }

/* ---------- match up: two columns, a dot at each inner end, room between to draw the lines ---------- */
.rd-mt { display: grid; grid-template-columns: max-content max-content; justify-content: space-between; column-gap: 3em; row-gap: .7em;
  align-content: space-evenly; align-items: center; flex: 1 0 auto; padding: 0 .35em; }
.rd-mt.l3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2.8em; }
.rd-mi { position: relative; display: flex; align-items: center; justify-content: center; gap: .45em; min-height: 2.5em; padding: .3em .9em;
  border: 2px solid #BDBDBD; border-radius: 14px; }
.rd-ml { padding-left: 1.05em; }
.rd-mt.l3 .rd-mi { justify-content: flex-start; padding: .4em .85em .4em 1em; }
.rd-dot { position: absolute; top: 50%; width: .52em; height: .52em; margin-top: -.26em; border-radius: 50%; background: #111; }
.rd-ml .rd-dot { right: -.28em; }
.rd-mr .rd-dot { left: -.28em; }
.rd-mpw { display: flex; align-items: flex-end; gap: .35em; }
.rd-mp { line-height: 1; }
.rd-mp .em { font-size: 2.2em; line-height: 1.05; }
.rd-mt.n3 .rd-mp .em, .rd-mt.n2 .rd-mp .em { font-size: 2.8em; }
.rd-mt.l2 .rd-mp .em { font-size: 1.7em; }
.rd-mt.l2.n4 .rd-mp .em, .rd-mt.l2.n3 .rd-mp .em { font-size: 2.1em; }
.rd-mline { display: block; width: 3.6em; height: 1.1em; border-bottom: 2px solid #111; margin-bottom: .1em; }
.rd-mw { font-weight: 700; font-size: 1.05em; line-height: 1.15; white-space: nowrap; }
.rd-mt.n3 .rd-mw, .rd-mt.n2 .rd-mw { font-size: 1.25em; }
.rd-mt.l2 .rd-mw { font-size: .95em; }
.rd-mtx { font-size: .85em; line-height: 1.3; text-wrap: pretty; }
.rd-mt.l3.n3 .rd-mtx, .rd-mt.l3.n2 .rd-mtx { font-size: .95em; }
/* Years 3 to 6: a word (level 4) or a sentence with its word in bold (level 5), to match to what it means */
.rd-mt.l4 { grid-template-columns: max-content minmax(0, 1fr); column-gap: 2.8em; }
.rd-mt.l5 { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); column-gap: 2.8em; }
.rd-mt.l4 .rd-mi, .rd-mt.l5 .rd-mi { justify-content: flex-start; padding: .4em .85em .4em 1em; }
.rd-mt.l4 .rd-mw { font-size: .95em; }
.rd-mt.l4 .rd-mtx, .rd-mt.l5 .rd-mtx { font-size: .8em; }
.rd-mtx b { font-weight: 700; }

/* ---------- word order: tiles to cut out, and one long gap to stick them in ---------- */
.rd-wo { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; align-content: space-evenly; flex: 1 0 auto; }
.rd-wo .q { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .3em; padding: .55em .6em .4em .9em; }
/* the strip takes the width of the row of tiles, so it reads as their place */
.rd-wo-in { display: grid; gap: .4em; width: fit-content; max-width: 100%; }
.rd-tiles { position: relative; display: flex; flex-wrap: wrap; gap: .3em; font-size: var(--fs, .9em); }
.rd-tiles::before { content: "\2702"; position: absolute; top: -.85em; left: -.55em; font: 400 .8em/1 "Segoe UI Symbol", var(--ui); background: #fff; padding: 0 .12em; color: #444; z-index: 1; }
.rd-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 1.8em; padding: 0 .4em; border: 2px dashed #666; white-space: nowrap; }
.rd-wo.l1 .rd-tile { height: 2.75em; justify-content: flex-end; padding-bottom: .1em; }
.rd-tile .em { font-size: 1.15em; line-height: 1.1; }
.rd-nop { display: block; height: 1.25em; }
.rd-tw { line-height: 1.2; }
/* as tall as the tiles (two rows when a long sentence needs them), and a little more, so every tile fits */
.rd-strip { font-size: var(--fs, .9em); height: calc(var(--rows, 1) * 1.95em + (var(--rows, 1) - 1) * .3em); border: 3px dashed #111; border-radius: .35em; }
.rd-wo.l1 .rd-strip { height: calc(var(--rows, 1) * 2.95em + (var(--rows, 1) - 1) * .3em); }
.rd-wl { font-size: .85em; }

/* ---------- read and draw: an instruction over a big box to draw in ---------- */
.rd-dw-g { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: .75em .7em; flex: 1 1 auto; min-height: 0; }
.rd-dw-g.n2, .rd-dw-g.n1 { grid-template-columns: minmax(0, 1fr); }
.rd-dw-g .q { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .45em; padding: .55em .6em .6em .9em; min-height: 0; }
.rd-dw-t { font-size: .8em; line-height: 1.3; font-weight: 700; text-wrap: pretty; }
.rd-dw-t.sym-line { font-size: 1em; font-weight: 400; gap: .15em .3em; }
.rd-num > span { font-weight: 700; font-size: 1.15em; }
.rd-dw-box { flex: 1; min-height: 4em; border: 3px solid #111; border-radius: 10px; display: flex; align-items: flex-end; justify-content: center; padding: .35em .5em .45em; }
.rd-dw-wl { display: block; min-width: 60%; height: 1.25em; padding: 0 .3em; border-bottom: 2px solid #111; text-align: center; line-height: 1.2; }
.rd-dw-wl .trace { border: 0; white-space: nowrap; font-size: .95em; }
/* Years 3 to 6: one sentence a line; two boxes side by side when Bigger text would make them too short one above the other */
.rd-dw-g.n2.side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rd-dw-s { display: block; }
.rd-dw-g.l4 .rd-dw-t, .rd-dw-g.l5 .rd-dw-t { font-size: .76em; }

/* ---------- first sounds ---------- */
.rd-fs, .rd-ms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75em .7em; align-content: space-evenly; flex: 1 0 auto; }
.rd-fs .q, .rd-ms .q { flex-direction: column; justify-content: center; gap: .4em; padding: .55em .6em .6em; }
.rd-fs-pic { line-height: 1; }
.rd-fs-pic .em { font-size: 2.45em; line-height: 1.08; }
.rd-fs.n4 .rd-fs-pic .em { font-size: 3.2em; }
.rd-lets .choice { min-width: 1.8em; height: 1.8em; font-size: 1.05em; }
.rd-lets.rd-l3 { flex-wrap: nowrap; gap: .25em; }
.rd-lets.rd-l3 .choice { font-size: .78em; font-weight: 700; padding: .1em .45em; white-space: nowrap; }
.rd-lbox { width: 2em; height: 1.75em; }
.rd-lbox.w2 { width: 2.8em; }
.rd-lline { width: 3em; }
.rd-lline.wide { width: 6em; }
.rd-fl { display: inline-flex; align-items: center; gap: .3em; }
.rd-mid { font: 700 .7em/1 var(--ui); letter-spacing: .3em; color: #111; }

/* ---------- missing letters: the word under its picture, a gap where a letter goes ---------- */
.rd-ms-pic { line-height: 1; }
.rd-ms-pic .em { font-size: 2.6em; line-height: 1.08; }
.rd-ms.n4 .rd-ms-pic .em { font-size: 3em; }
/* with letters to circle there is a third line in each card, so the picture gives a little room */
.rd-ms.ci .q { gap: .25em; padding: .45em .5em .5em; }
.rd-ms.ci .rd-ms-pic .em { font-size: 1.8em; }
.rd-ms.ci.n4 .rd-ms-pic .em { font-size: 2.5em; }
.rd-ms.ci .rd-lets .choice { font-size: .9em; }
.rd-ms-wr { display: block; }
.rd-ms-w { display: inline-flex; align-items: flex-end; font-size: 1.45em; font-weight: 700; letter-spacing: .05em; line-height: 1.1; white-space: nowrap; }
.rd-ms.l3 .rd-ms-w { font-size: 1.25em; }
.rd-ms.ci .rd-ms-w { font-size: 1.25em; }
.rd-gaps { display: inline-flex; gap: .08em; margin: 0 .06em; }
.rd-gap { display: inline-block; width: .9em; height: 1.15em; border: 3px dashed #111; border-radius: .18em; }
.rd-gapl { display: inline-block; width: .9em; height: 1.15em; border-bottom: 3px solid #111; }
/* Years 3 to 6: one size of word for the sheet (--fs, the largest that fits a card); the clue is a picture or what the word means;
   the spellings to circle may take two rows */
.rd-ms.l4 .q, .rd-ms.l5 .q { gap: .3em; padding: .5em .55em .55em; }
.rd-ms.l4 .rd-ms-pic .em, .rd-ms.l5 .rd-ms-pic .em { font-size: 2em; }
.rd-ms.l4 .rd-ms-w, .rd-ms.l5 .rd-ms-w { font-size: var(--fs, 1.15em); }
.rd-ms-mean { font-size: .62em; line-height: 1.25; text-align: center; text-wrap: balance; }
.rd-ms.l4 .rd-lets, .rd-ms.l5 .rd-lets { flex-wrap: wrap; justify-content: center; row-gap: .25em; }
.rd-ms.l4 .rd-lets .choice, .rd-ms.l5 .rd-lets .choice { font-size: .85em; }

/* ---------- mixed-up words: letter tiles, the picture as the clue, a box for each letter ---------- */
.rd-sc { list-style: none; margin: 0; padding: 0; display: grid; gap: .6em; align-content: space-evenly; flex: 1 0 auto; }
.rd-sc.l1 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6em; }
.rd-sc .q { justify-content: flex-start; gap: .9em; padding: .55em .6em .6em 1em; }
.rd-sc.l1 .q { flex-direction: column; justify-content: center; gap: .3em; padding: .4em .5em .45em; }
.rd-sc-pic { flex: none; line-height: 1; }
.rd-sc-pic .em { font-size: 2.9em; line-height: 1.05; }
.rd-sc.l1 .rd-sc-pic .em { font-size: 2.1em; }
.rd-sc-main { display: grid; gap: .35em; justify-items: start; min-width: 0; }
.rd-sc.l1 .rd-sc-main { justify-items: center; gap: .3em; }
.rd-sc-tiles { display: flex; flex-wrap: wrap; gap: .22em; }
/* the mixed-up letters are content, in pale tiles; the boxes to write in are the darkest lines on the card */
.rd-lt { display: grid; place-items: center; width: 1.5em; height: 1.45em; border: 2px solid #BDBDBD; border-radius: .3em; font-weight: 700; font-size: 1em; line-height: 1; }
.rd-sc-boxes { display: flex; gap: .2em; }
.rd-sb { display: grid; place-items: center; width: 1.5em; height: 1.65em; border: 3px solid #111; border-radius: .3em; }
.rd-sc.l1 .rd-lt { width: 1.4em; height: 1.35em; }
.rd-sc.l1 .rd-sb { width: 1.4em; height: 1.55em; }
.sheet.big .rd-sc-q.long .rd-lt, .sheet.big .rd-sc-q.long .rd-sb { width: 1.3em; }
.rd-given { color: #B3B3B3; font-size: 1.1em; line-height: 1; }
.rd-sc-ch .choice { font-size: .9em; letter-spacing: .03em; }
.rd-sc.l1 .q { padding-left: .35em; padding-right: .35em; }
.rd-sc.l1 .rd-sc-ch { gap: .2em; justify-content: center; }
.rd-sc.l1 .rd-sc-ch .choice { font-size: .8em; padding: .1em .45em; letter-spacing: 0; }
.rd-sc-line { display: block; }
/* Years 3 to 6: one tile width for the sheet (--lt, narrow enough for the longest word); what a word means sits over its letters */
.rd-sc.l4 .rd-lt, .rd-sc.l5 .rd-lt, .rd-sc.l4 .rd-sb, .rd-sc.l5 .rd-sb { width: var(--lt, 1.5em); }
/* the picture's own slot, so the room left for the letters is the same whichever emoji it is */
.rd-sc.l4 .rd-sc-pic, .rd-sc.l5 .rd-sc-pic { width: 3.2em; display: flex; justify-content: center; }
.rd-sc.l4, .rd-sc.l5 { gap: .5em; }
.rd-sc.l4 .q, .rd-sc.l5 .q { padding: .5em .6em .55em 1em; }
.rd-sc-mean { font-size: .62em; line-height: 1.25; text-wrap: pretty; }

/* first sounds: which word each picture stands for, for the grown-up, in the margin voice */
.rd-key { font: 400 .46em/1.35 var(--ui); color: #444; }

/* ---------- the short read for Years 3 to 6: paragraphs under their headings, then the questions ---------- */
/* The passage is the size of a junior reading book (about 15pt at Years 3 and 4, 14pt at Years 5 and 6), so a longer text
   and its questions share one page; headings are bold, not bigger. */
.rd-text { display: grid; gap: .24em; }
.rd-text .read-t { font-size: .85em; line-height: 1.2; }
.rd-sec { display: grid; gap: .04em; }
/* .sheet: the sheet sits in a column whose h2 rule would otherwise win */
.sheet .rd-h { font-size: .74em; line-height: 1.2; font-weight: 700; }
.rd-text .rd-p { font-size: .7em; line-height: 1.36; }
.sheet .rd-text.l5 .rd-h { font-size: .7em; }
.rd-text.l5 .rd-p { font-size: .66em; }
/* a short answer sits beside its question; a long one, or one that does not fit, goes on the line below */
.rd-rqs { gap: .3em; }
.rd-rqs .rq { display: flex; flex-wrap: wrap; align-items: center; gap: .16em .5em; padding: .22em .6em .28em .9em; }
.rd-rqs .rq-q { flex: 0 1 auto; font-size: .7em; line-height: 1.2; }
.rd-rqs .choices { flex: 0 1 auto; gap: .25em; }
.rd-rqs .choices.words .choice { font-size: .7em; line-height: 1.2; min-height: 1.55em; padding: 0 .6em; }
.rd-rqs .rd-wl, .rd-rqs .longline { flex: 1 1 11em; font-size: .72em; }
.rd-rqs .rd-wl { line-height: 1.3; }
.rd-rqs .longline { height: 1.3em; }
.rd-rqs .wide { flex-basis: 100%; }
