/* aitism learn: What will happen and Day plan activities. Classes start lf-.
   Every size is in em of the sheet base; Print Black on white; the line colour only on route furniture (rails, stops,
   number badges, the reward, coping boxes); dashed only where something is unsettled (a cut, a box to fill). */

/* a picture in a tile with a firm frame, like a step's picture; its size comes from --T */
.lf-pic { width: var(--T, 1.9em); height: var(--T, 1.9em); flex: none; display: grid; place-items: center; border: 2px solid #111; border-radius: .35em; background: #fff; }
.lf-pic .em { font-size: calc(var(--T, 1.9em) * .6); line-height: 1; }

/* ---------- put in order: the route of empty boxes, the cards to cut out beside it ---------- */
.lf-ord { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) .7em minmax(0, calc((100% - .7em - 1.54em) / 2)); }
.lf-left { grid-column: 1; display: flex; flex-direction: column; min-width: 0; }
.lf-route { flex: 1 0 auto; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .16em; min-width: 0; }
.lf-r { flex: none; display: grid; grid-template-columns: 1.12em minmax(0, 1fr); column-gap: .42em; min-width: 0; }
/* the rail runs through every stop, from the first box to the end */
.lf-n { position: relative; display: grid; place-items: center; }
.lf-n::before { content: ""; position: absolute; left: 50%; width: .2em; margin-left: -.1em; top: -.09em; bottom: -.09em; background: var(--line); }
.lf-n.first::before { top: 50%; }
.lf-n.last::before { bottom: 50%; }
.lf-n .step-n { position: relative; }
.lf-n.end .step-n { background: var(--line); box-shadow: 0 0 0 .1em #fff, 0 0 0 .22em var(--line); }
.lf-n.end .step-n b { color: var(--line-ink); }
/* a box to fill: the darkest line on the route */
.lf-slot { border: 3px dashed #111; border-radius: .3em; min-width: 0; }
/* the end of the route takes whatever room the column has left, so the rail always reaches it */
.lf-r.lf-end { flex: 1 0 auto; }
.lf-endt { align-self: center; display: flex; align-items: center; gap: .42em; padding: .15em 0; min-width: 0; }
.lf-endt .lf-pic { --T: var(--Te); }
.lf-endt b { font-size: var(--fe); line-height: 1.22; min-width: 0; }
.lf-side { grid-column: 3; display: flex; flex-direction: column; min-width: 0; }
/* the cards share their cut lines, like the word cards */
.lf-cuts { position: relative; border-top: 2px dashed #666; }
.lf-cuts::before { content: "\2702"; position: absolute; top: -.6em; left: .5em; font: 400 .7em/1 "Segoe UI Symbol", var(--ui); background: #fff; padding: 0 .15em; color: #444; z-index: 1; }
.lf-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .35em; align-items: center; align-content: center;
  padding: .2em .35em; border: 2px dashed #666; border-top: 0; min-width: 0; }
.lf-ct { min-width: 0; font-size: var(--f); line-height: 1.22; }
.lf-ct.w { font-weight: 700; }
.lf-main { display: block; }
.lf-sub { display: block; margin-top: .12em; font-size: .86em; color: #333; }
/* a coping line runs under the whole card; plain wrapping, so the card's height can be worked out before it is drawn */
.lf-card > .cope { grid-column: 1 / -1; justify-self: start; display: flex; max-width: 100%; margin-top: .22em; padding: .05em .45em; gap: .3em;
  font-size: var(--fc); line-height: 1.25; text-wrap: wrap; }
.lf-card > .cope > span:last-child { min-width: 0; }
/* the break card to keep, at the foot of the route like the story's */
.lf-brkrow { flex: none; padding-top: .4em; display: grid; justify-items: start; gap: .15em; }
.lf-brk { display: inline-flex; align-items: center; gap: .35em; border: 3px dashed #111; border-radius: .45em; padding: .15em .7em; font-size: var(--fe); font-weight: 700; line-height: 1.3; }
.lf-brk .em { font-size: 1.25em; line-height: 1; }
/* what can help: printed under the cards, not cut out */
.lf-help { margin-top: auto; border: 2px solid #BDBDBD; border-radius: .45em; padding: .3em .4em; display: grid; gap: .22em; }
.lf-help-k { font-size: var(--fh); font-weight: 700; line-height: 1.22; }
.lf-hr { display: flex; align-items: center; gap: .35em; min-width: 0; }
.lf-pic.h { --T: var(--Th); }
.lf-ht { font-size: var(--fh); line-height: 1.22; min-width: 0; }

/* ---------- cards with a picture, its words and a number badge: the timetable, now and next, first and then ---------- */
.lf-tc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .16em;
  padding: .45em .4em .35em; text-align: center; min-width: 0; min-height: 0; }
.lf-tp { font-size: var(--P); line-height: 1; }
.lf-tp .em { line-height: 1; }
.lf-tw { font-size: var(--f); line-height: 1.2; max-width: 100%; text-wrap: wrap; }
.lf-tt.w .lf-tw, .lf-nn.w .lf-tw, .lf-tc.rw .lf-tw, .lf-tc.done .lf-tw, .lf-ft .lf-tw { font-weight: 700; }
.lf-tn { font-size: .6em; line-height: 1.2; color: #333; max-width: 100%; text-wrap: wrap; }
.lf-tc > .cope { display: flex; max-width: 100%; margin-top: .16em; padding: .05em .45em; gap: .3em; text-align: left;
  font-size: min(calc(var(--f) * .86), .64em); line-height: 1.25; font-weight: 400; text-wrap: wrap; }
.lf-tc > .cope > span:last-child { min-width: 0; }
/* the number badge, like a question's; the reward's is filled, with a double ring, like the end of a route */
.lf-badge { position: absolute; top: .3em; left: .3em; font: 700 .52em/1 var(--ui); width: 2em; height: 2em; border-radius: 50%;
  background: var(--line); color: var(--line-ink); display: grid; place-items: center; }
.lf-badge.end { box-shadow: 0 0 0 .2em #fff, 0 0 0 .4em var(--line); }
/* the reward card wears the line, as the end of the route does */
.lf-tc.rw::after { content: ""; position: absolute; inset: .2em; border: .12em solid var(--line); border-radius: .4em; pointer-events: none; }
.lf-tc.rw .lf-badge { top: .62em; left: .62em; }

/* the timetable: big cards that fill the page */
.lf-tt { flex: 1 0 auto; }

/* ---------- now and next: a board of boxes on a short route, the cards to cut out under it ---------- */
.lf-nn { flex: 1 0 auto; display: flex; flex-direction: column; }
.lf-board { position: relative; flex: 1 0 auto; display: grid; grid-template-columns: repeat(var(--k), minmax(0, 1fr)); column-gap: 1em;
  border: 2px solid #111; border-radius: .5em; padding: .45em .5em .5em; }
.lf-board::before { content: ""; position: absolute; top: 1em; height: .2em; background: var(--line);
  left: calc(.5em + (100% - 1em - (var(--k) - 1) * 1em) / var(--k) / 2); right: calc(.5em + (100% - 1em - (var(--k) - 1) * 1em) / var(--k) / 2); }
.lf-col { display: flex; flex-direction: column; min-width: 0; }
.lf-lab { position: relative; align-self: center; display: inline-flex; align-items: center; gap: .3em; height: 1.3em; padding: 0 .3em; background: #fff; font-weight: 700; line-height: 1; }
.lf-box { flex: 1 0 auto; margin-top: .3em; border: 3px dashed #111; border-radius: .35em; min-height: calc(var(--ch) + .3em); }
.lf-ncs { flex: none; grid-auto-rows: var(--ch); margin-top: .55em; }
/* what can help, under the board: the step's picture, its word and the coping line; the card carries the line's mark */
.lf-nh { flex: none; margin-top: .55em; }
.lf-nh .lf-ht { flex: none; }
.lf-nh .lf-hr .cope { margin-top: 0; padding: .05em .45em; font-size: calc(var(--fh) * .86); line-height: 1.25; text-wrap: wrap; }
.lf-nh .lf-hr .cope > span:last-child { min-width: 0; }
.lf-mark { position: absolute; top: .3em; right: .3em; width: 1.15em; height: 1.15em; border: 2px dashed var(--line); border-radius: 50%;
  display: grid; place-items: center; font-size: .9em; line-height: 1; }
.lf-mark .em { font-size: .7em; }

/* ---------- first and then: two big cards on a board, the same cards to cut out under it ---------- */
.lf-ft { flex: 1 0 auto; display: flex; flex-direction: column; }
.lf-ftb { display: grid; grid-template-columns: minmax(0, 1fr) 1.9em minmax(0, 1fr); }
.lf-fp { display: flex; flex-direction: column; align-items: center; gap: .2em; padding: .35em .5em .45em; border: 3px solid #111; border-radius: .5em; min-width: 0; }
.lf-fl { font-size: 1.1em; line-height: 1.22; }
.lf-fc { flex: none; width: var(--cw); height: var(--ch); border: 2px solid #111; border-radius: .3em; }
/* the reward on the board is drawn by its own ring in the line colour, not a second frame */
.lf-fc.rw { border-color: transparent; }
.lf-fc.rw::after { inset: 0; border-width: .14em; border-radius: .3em; }
.lf-fc.gap { border: 3px dashed #111; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .2em; padding: .4em .4em .5em; }
.lf-fc.gap .lf-tp { font-size: calc(var(--P) * .45); }
.lf-fc.gap .lf-tn { font-size: .62em; text-align: center; }
.lf-arr { align-self: center; justify-self: center; width: 1.5em; height: 1.5em; fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.lf-say { margin-top: .4em; text-align: center; font-size: var(--fs); line-height: 1.3; text-wrap: balance; }
.lf-cutk { margin-top: auto; padding-top: .45em; text-align: center; line-height: 1; }
.lf-fts { grid-template-columns: repeat(var(--cols), var(--cw)); grid-auto-rows: var(--ch); width: fit-content; margin: .35em auto 0; }
