/* Kindergarten spelling words: the lists, each word on its own slip of three-line handwriting paper. */
main :focus { scroll-margin-top: calc(var(--top-h) + 20px); scroll-margin-bottom: 20px; }
main [id] { scroll-margin-top: calc(var(--top-h) + 16px); }

/* The strip: the lap whiteboard lying on the table. Its picture has clear space round the board, so its shadow follows the board's own edge. */
.ksw-band .band-card { max-width: 660px; }
.ksw-band .thing.board-pic img { display: block; width: 100%; height: auto; filter: drop-shadow(8px 12px 10px rgba(80,45,10,.32)); }
.ksw-band .thing { pointer-events: none; }

/* Straight to a list, for a parent back for the next one. */
.jump { margin: 18px 0 0; }
.band-card .jump p { font-size: 16px; line-height: 24px; margin: 0 0 8px; }
.jump ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 400px; }
.jump li { margin: 0; }
.jump a { display: flex; align-items: center; justify-content: center; height: 44px; border: 1.5px solid var(--graphite); border-radius: 4px; background: var(--paper); color: var(--graphite); font-weight: 700; font-size: 18px; text-decoration: none; }
.jump a:hover { background: var(--manila); }
.jump a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* A word on handwriting lines: solid blue top line, dashed blue middle line, red baseline, as on the site's printed tests.
   The lines sit on Andika's own letters (measured by source/tests/andika-metrics.mjs): with line-height 1 its baseline is
   .91em below the top of the line, tall letters (b, d, h, k, l) rise .78em and small letters .5em. With .12em above the
   line, the baseline falls at 1.03em: red line there, dashed line at the top of the small letters (.53em), blue top line
   at the top of the tall ones (.25em). Tails hang to 1.28em, inside the 1.5em slip. */
.wl, .pg .wl { --hw: 30px; list-style: none; margin: 14px 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 10px; }
.pg .wl li, .wl li { margin: 0; }
.wl li, .kid { position: relative; display: inline-block; min-width: 2.9em; padding: 0 .4em; height: 1.5em; font: 400 var(--hw)/1 var(--font); color: var(--graphite); text-align: center; background-color: var(--paper);
  background-image:
    linear-gradient(var(--blue), var(--blue)),
    linear-gradient(var(--red), var(--red));
  background-size: 100% 1.5px, 100% 2px;
  background-position: 0 calc(.25em - .75px), 0 calc(1.03em - 1px);
  background-repeat: no-repeat;
  border: 1px solid rgba(51,54,59,.18); border-radius: 3px; box-shadow: 2px 3px 0 var(--manila);
  padding-top: .12em; }
/* The dashed middle line as a dashed border, which prints as cleanly as it shows. */
.wl li::before, .kid::before { content: ""; position: absolute; left: 0; right: 0; top: calc(.53em - 1px); border-top: 2px dashed rgba(79,134,219,.8); pointer-events: none; }
.wl li, .kid { isolation: isolate; }
.wl li::before, .kid::before { z-index: -1; }
.pg .wl li { font-size: var(--hw); line-height: 1; }
.pg .wl-ten { --hw: 36px; gap: 12px; }
/* List 7: a little more room after each set that changes only the vowel. */
.wl-sets li.set-end { margin-right: 22px; }

.go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 0; }
.pg .go-note { font-size: 16px; line-height: 24px; flex: 1 1 260px; }

/* The eight lists. */
.pg .stages { list-style: none; margin: 22px 0 10px; padding: 0; display: grid; gap: 26px; }
.pg .stages > li.stage { margin: 0; }
.stage { background: var(--paper); border: 1.5px solid var(--graphite); border-radius: 6px; padding: 22px 24px 22px; box-shadow: 6px 6px 0 var(--manila); }
.stage h3 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; }
.stage .st-n { display: block; font-size: 16px; line-height: 22px; color: #b52a1f; margin-bottom: 2px; }
.pg .stage p { font-size: 18px; line-height: 28px; }
.pg .stage .st-heart { margin: 0 0 12px; }
.pg .stage .st-heart i { font-style: normal; font-weight: 700; }
.pg .stage .st-h, .pg .stage .st-group { font-weight: 700; margin: 14px 0 4px; }
.pg .stage .st-group { margin-top: 16px; }
.pg .stage .st-group + .wl { margin-top: 6px; }
.pg .stage .st-when { margin: 0 0 4px; }
.pg .st-sent { margin: 0 0 12px; padding-left: 1.1em; }
.pg .st-sent li { font-size: 21px; line-height: 32px; margin-bottom: 4px; }
.pg .stage .st-tip { background: var(--manila); border-radius: 4px; padding: 12px 14px; margin: 12px 0 14px; font-size: 17px; line-height: 27px; }
.pg .stage .go { margin-top: 4px; }
.pg .print-hint { margin-top: 18px; }

/* What a kindergartner writes for dog. */
.tbl-scroll { overflow-x: auto; margin: 14px 0 18px; }
.tries { width: 100%; border-collapse: collapse; font-size: 18px; line-height: 27px; }
.tries th, .tries td { text-align: left; vertical-align: middle; padding: 12px 12px; border-bottom: 1.5px solid rgba(51,54,59,.18); }
.tries thead th { font-size: 16px; line-height: 22px; border-bottom: 2px solid var(--graphite); padding-top: 4px; padding-bottom: 8px; }
.tries tbody th { width: 128px; font-weight: 400; }
.tries .kid { --hw: 30px; font-size: 30px; }

.ksw-fig { margin: 36px 0 8px; }
.ksw-fig img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 6px 6px 0 var(--manila); }
.ksw-fig figcaption { font-size: 16px; line-height: 24px; margin-top: 12px; }

.pg .sources li { font-size: 16px; line-height: 25px; }

/* The form's note shows only when the page's signup script (su-send, in the head) has just had a refusal from the site. */
.signup .su-err.su-no:not([hidden]) { display: block; }
.signup .su-no[hidden] { display: none; }

/* Phone-sized targets for the shared menu and footer on this page. */
@media (max-width: 760px) {
  .top .menu summary { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .top .top-tab { padding-top: 1px; padding-bottom: 1px; }
  .top .menu li a { min-height: 44px; display: flex; align-items: center; }
  .foot li { margin: 0; }
  .foot li a { min-height: 44px; display: inline-flex; align-items: center; padding: 0; }
  .signup .tick { min-height: 44px; align-items: center; }
  .stage { padding: 18px 16px; }
  .stage h3 { font-size: 24px; }
  .pg .wl { --hw: 25px; gap: 8px 7px; }
  .pg .wl li { min-width: 2.6em; padding: 0 .3em; padding-top: .12em; }
  .jump ul { gap: 4px; }
  .pg .wl-ten { --hw: 28px; }
  .wl-sets li.set-end { margin-right: 16px; }
  .pg .st-sent li { font-size: 19px; line-height: 29px; }
  .tries tbody th { width: 96px; padding-left: 0; }
  .tries .kid { --hw: 26px; font-size: 26px; }
}

/* Printed: the lists and their sentences, the advice under them, nothing of the screen around them. */
@media print {
  @page { margin: 0.5in; }
  .top, .band-things, .band .row, .jump, .foot, .pg-free, .ksw-fig, .go, .print-hint, #signup { display: none !important; }
  .pg .wl { --hw: 17pt; gap: 6pt; margin: 6pt 0 8pt; }
  .pg .wl-ten { --hw: 20pt; }
  .band { background: none; padding: 0 0 12pt; min-height: 0; overflow: visible; }
  .band::after, .band-card::before, .band-card::after { display: none; }
  .band-in { max-width: none; }
  .band-card { transform: none; box-shadow: none; border: 0; padding: 0; background: none; max-width: none; }
  .band-card h1 { font-size: 22pt; line-height: 1.2; }
  .band-card p { font-size: 11.5pt; line-height: 1.45; }
  .pg .stages { display: block; }
  .pg .stages > li.stage { margin: 0 0 10pt; }
  body { font-size: 12pt; line-height: 1.4; }
  .pg { padding: 0; }
  .pg-in { max-width: none; }
  .pg h2 { margin: 18pt 0 6pt; break-after: avoid; }
  .pg p, .pg li { font-size: 11.5pt; line-height: 1.45; }
  /* Each list prints whole on one page, its words with its heart words, sentences and tip. */
  .pg .stages > li.stage { box-shadow: none; padding: 10pt 12pt; break-inside: avoid; }
  .tbl-scroll, .tries { break-inside: avoid; }
  .sources li, .pg-small { break-inside: avoid; }
  .pg .stage p { font-size: 11pt; line-height: 1.4; }
  .pg .stage .st-tip { padding: 6pt 8pt; margin: 6pt 0 0; }
  .pg .st-sent li { font-size: 12.5pt; line-height: 1.35; margin-bottom: 0; }
  .pg .stage .st-h, .pg .stage .st-group { margin: 6pt 0 2pt; }
  .pg .st-sent { margin-bottom: 4pt; }
  .stage h3, .stage .st-h, .stage .st-group, .stage .st-when, .stage .st-heart { break-inside: avoid; break-after: avoid; }
  .stage .wl, .stage .st-sent, .stage .st-tip { break-inside: avoid; }
  .pg .stages { gap: 10pt; }
  .wl li { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pg .stage .st-tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; }
}
