/* Where to start: the placement check. Its 23 words on paper you can mark, Sam's map beside them where June rings the
   week the check starts a kid at, what each result means, and the check alone when the page is printed. */

/* The band's scrap of lined paper, where your kid wrote group 1 (son for sun counts). */
.note.lined { background-color: #fff; padding: 22px 16px 14px 26px; aspect-ratio: 236 / 170; place-items: start; text-align: left;
  background-image: linear-gradient(to right, transparent 16px, rgba(215,55,42,.55) 16px 17.5px, transparent 17.5px), repeating-linear-gradient(to bottom, transparent 0 33px, rgba(79,134,219,.42) 33px 34.5px);
  background-position: 0 0, 0 18px; }
.note.lined::before { display: none; }
/* The words stay text for everything that reads the page; what shows is the kid's own pencil print, drawn over them in
   the scrap's own coordinates, so it is the same picture on a desk, on a phone, held still and with scripts off. */
.note.lined p { font-size: 27px; line-height: 34px; color: transparent; word-spacing: .18em; }
.note.lined .kid-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  -webkit-mask: url("../img/grain.svg") 0 0 / 240px 240px; mask: url("../img/grain.svg") 0 0 / 240px 240px; }
@media (max-width: 760px) {
  /* The phone's scrap is the desk's at 150/236 of its size, its rules and margin with it, so the writing sits on them. */
  .note.lined { padding: 14px 8px 8px 16px; background-image: linear-gradient(to right, transparent 10.17px, rgba(215,55,42,.55) 10.17px 11.12px, transparent 11.12px), repeating-linear-gradient(to bottom, transparent 0 20.97px, rgba(79,134,219,.42) 20.97px 21.93px); background-position: 0 0, 0 11.44px; }
  .note.lined p { font-size: 17px; line-height: 23px; }
  .note.lined .kid-ink { -webkit-mask-size: 152px 152px; mask-size: 152px 152px; }
}

/* The check and the map, side by side on a desk; the map stays beside the words as you go down them. */
.wts-two { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 40px 56px; align-items: start; }
.wts-side { position: sticky; top: calc(var(--top-h) + 22px); }
.wts-check .lead { font-size: 20px; line-height: 32px; }
.print-only { display: none; }
.nw { white-space: nowrap; }
/* A phone at 200% zoom: "placement" keeps whole on its line. */
@media (max-width: 240px) { .wts .band-card h1 { font-size: 24px; line-height: 30px; } }
.wts-map-card { scroll-margin-top: calc(var(--top-h) + 20px); }
.js-only { display: none; }
html.wts-js .js-only { display: block; }
html.wts-js .wts-print { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0; }
.wts-print span { font-size: 16px; line-height: 24px; }
.wts-hint { background: var(--manila); border-radius: 4px; padding: 10px 14px; font-size: 17px; line-height: 27px; }

/* A group of words: a sheet with a red rule under its name, the rule for stopping in red, and each word on a blue line. */
.grp { margin: 26px 0 0; background: var(--paper); border: 1.5px solid var(--graphite); border-radius: 4px; box-shadow: 6px 6px 0 var(--manila), 6px 6px 0 1.5px rgba(51,54,59,.22); }
.grp h3 { margin: 0; padding: 14px 18px 10px; border-bottom: 2px solid var(--red); font-size: 22px; line-height: 28px; }
.grp .g-rule { margin: 0; padding: 10px 18px 2px; color: #b8291e; font-weight: 700; font-size: 16px; line-height: 24px; }
.words { list-style: none; margin: 0; padding: 4px 18px 10px; }
.pg .words li { position: relative; display: grid; grid-template-columns: 30px minmax(5.2em, max-content) minmax(0, 1fr); column-gap: 14px; align-items: baseline; margin: 0; padding: 7px 0 6px; border-bottom: 1px solid rgba(79,134,219,.32); font-size: 17px; line-height: 26px; }
.words li:last-child { border-bottom: 0; }
.words li::before { content: attr(value); color: #5b5f66; font-size: 16px; text-align: right; }
.words .w { font-weight: 700; font-size: 26px; line-height: 30px; }
.words .s { color: #4a4d52; }
/* Marking (scripts on): each row is a tap target, with a box on its right that takes a red pencil cross. */
html.wts-js .pg .words li { grid-template-columns: 30px minmax(5.2em, max-content) minmax(0, 1fr) 30px; min-height: 48px; }
html.wts-js .words li::after { content: ""; align-self: center; width: 26px; height: 26px; border: 1.5px solid rgba(51,54,59,.55); border-radius: 3px; background: #fff center / 22px 22px no-repeat; }
html.wts-js .words li.miss::after { border-color: var(--red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M4 4.5c4.6 4.2 9.4 8.8 14.2 13.3M17.6 3.6C13 8.4 8.6 13 4.3 17.9' fill='none' stroke='%23D7372A' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.words li.miss .w { text-decoration: underline wavy var(--red) 1.5px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
.words .tap { position: absolute; inset: 0; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 3px; -webkit-tap-highlight-color: transparent; }
.words .tap:active { background: rgba(244,239,227,.55); }
.words .tap:focus-visible { outline-offset: -2px; }
.g-act { display: none; }
html.wts-js .g-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 2px 18px 16px; }
.g-ok[aria-pressed="true"] { background: var(--yellow); }
.g-ok[aria-pressed="true"]::before { content: ""; width: 16px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.5 6.4l4.2 4L14.5 1.5' fill='none' stroke='%2333363B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat; }
.pg .g-say { margin: 0; font-size: 16px; line-height: 24px; flex: 1 1 14em; }
.g-say:empty { display: none; }
.g-say a { font-weight: 700; }
.grp.stop { border-color: var(--red); box-shadow: 6px 6px 0 #f7dcd8, 6px 6px 0 1.5px rgba(215,55,42,.35); }
.grp.passed h3::after { content: ""; display: inline-block; width: 22px; height: 16px; margin-left: 10px; vertical-align: -1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.5 6.4l4.2 4L14.5 1.5' fill='none' stroke='%2333363B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.grp.skip { opacity: .55; }
.grp.skip .g-ok { pointer-events: none; }

/* Sam's map, cropped to the drawn map, with the pencil marks drawn over it. */
.wts-map-card { padding: 22px 20px 14px; }
.wts-map-card h2 { margin: 0 0 12px; text-decoration: none; }
@media (min-width: 961px) { .wts-map { width: min(100%, calc((100svh - 450px) * .891)); min-width: min(100%, 300px); margin: 0 auto; } }
.wts-map { position: relative; aspect-ratio: 866 / 972; overflow: hidden; background: #fff; border: 1px solid rgba(51,54,59,.25); border-radius: 2px; isolation: isolate; }
.wts-cam { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
html.wts-move .wts-cam { transition: transform .95s cubic-bezier(.3,.7,.2,1); }
.wts-map-img { position: absolute; max-width: none; width: 115.473%; height: auto; left: -8.083%; top: -15.226%; }
.wts-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wts-ink .fill { mix-blend-mode: multiply; }
.wts-ink .fill path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.wts-ink .fill.on path { stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease-out; }
.wts-ink .maybe { transition: opacity .4s; }
.wts-ink.decided .maybe { opacity: .3; }
.wts-hand { position: absolute; left: 0; top: 0; width: 69.3%; max-width: none; height: auto; pointer-events: none; opacity: 0; filter: drop-shadow(8px 12px 10px rgba(60,40,20,.28)); }
.wts-tag { position: absolute; transform: translate(-50%, 0); padding: 2px 8px; background: #fff; border: 1.5px solid var(--red); border-radius: 3px; font: 700 13px/18px var(--font); color: #b8291e; white-space: nowrap; box-shadow: 2px 2px 0 rgba(51,54,59,.15); opacity: 0; transition: opacity .3s; }
.wts-tag.on { opacity: 1; }
/* Held still (paused, motion off), an answer's marks are simply there. */
html:not(.wts-move) .wts-tag, html:not(.wts-move) .wts-ink .maybe { transition: none; }
.wts-say { margin-top: 14px; }
.wts-say p { font-size: 16px; line-height: 25px; margin: 0 0 8px; }
.wts-say .say-h { font-weight: 700; font-size: 20px; line-height: 26px; margin-bottom: 6px; }
.wts-say .row { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.wts-say .btn { min-height: 44px; }

/* What each result means: each a strip with the map's own yellow spot and its number. */
.pg-wide { max-width: 1180px; margin: 0 auto; }
.wts-res { background: var(--manila); }
.wts-res .lead { max-width: 52em; }
.wts-res .near-price { font-size: 15px; line-height: 22px; margin: -2px 0 22px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* On a wide screen each result is one row of a table you look a result up in: the result, the list, what fits. */
@media (min-width: 900px) {
  .res > div { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .8fr) minmax(0, 1.15fr); grid-template-areas: "if list fits" "h list fits"; column-gap: 28px; align-items: start; }
  .res > div > .res-if { grid-area: if; }
  .res > div > h3 { grid-area: h; }
  .res > div > p:not(.res-if):not(.fits) { grid-area: list; padding-top: 2px; }
  .res > div > .fits { grid-area: fits; padding-top: 2px; }
  #rall > div { grid-template-areas: "if fits fits" "h fits fits"; }
}
.pg .results .res { margin: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--paper); border: 1.5px solid var(--graphite); border-radius: 4px; padding: 16px 18px 12px 14px; box-shadow: 4px 4px 0 rgba(51,54,59,.12); transition: box-shadow .3s, border-color .3s; }
.res .spot { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--graphite); font: 700 21px/1 var(--font); }
.res .spot-all { font-size: 17px; background: #fff; box-shadow: inset 0 0 0 4px var(--yellow); }
.res h3 { font-size: 20px; line-height: 26px; margin: 0 0 8px; }
.pg .res p { font-size: 16px; line-height: 24px; margin: 0 0 6px; }
.pg .res .res-if { color: #b8291e; font-weight: 700; font-size: 15px; line-height: 21px; margin-bottom: 4px; }
.res .fits { font-weight: 700; }
.res.here { border-color: var(--red); box-shadow: 0 0 0 3px #f6c333, 6px 6px 0 rgba(51,54,59,.14); }
.pg .wts-warn { margin: 22px 0 0; font-size: 17px; line-height: 26px; }
.wts-more h2 { margin-top: 0; }

/* The year and the terms, at the foot. */
.wts-end { max-width: 640px; margin: 0 auto; transform: rotate(-.4deg); }
.wts-end .kicker { margin-top: -4px; }
.wts-end .fine a { white-space: nowrap; }
@media (max-width: 259.98px) { .wts-end .fine a { white-space: normal; } }
.wts-end [data-sale="soon"] .fine a { white-space: normal; }
.wts-end .near-price { margin: -4px 0 12px; text-wrap: balance; }
.wts-end .soon { font-size: 16px; line-height: 24px; margin: 6px 0 12px; background: var(--manila); border-radius: 4px; padding: 10px 12px; }
.wts-end .row { margin-top: 4px; }

@media (max-width: 960px) {
  .wts-two { grid-template-columns: minmax(0, 1fr); }
  .wts-side { position: static; max-width: 560px; }
}
@media (max-width: 760px) {
  .wts-check .lead { font-size: 18px; line-height: 29px; }
  .grp { box-shadow: 4px 4px 0 var(--manila), 4px 4px 0 1.5px rgba(51,54,59,.22); }
  .grp h3 { padding: 12px 14px 8px; font-size: 20px; line-height: 26px; }
  .grp .g-rule { padding: 8px 14px 0; font-size: 15px; line-height: 22px; }
  .words { padding: 2px 12px 8px; }
  .pg .words li, html.wts-js .pg .words li { grid-template-columns: 22px minmax(4.4em, max-content) minmax(0, 1fr); column-gap: 10px; font-size: 16px; line-height: 23px; }
  html.wts-js .pg .words li { grid-template-columns: 22px minmax(4.4em, max-content) minmax(0, 1fr) 26px; }
  html.wts-js .words li::after { width: 24px; height: 24px; }
  .words li::before { font-size: 14px; }
  .words .w { font-size: 22px; line-height: 26px; }
  html.wts-js .g-act { padding: 2px 12px 14px; }
  .wts-map-card { padding: 20px 14px 10px; }
  .pg .results .res { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 14px 14px 10px 12px; }
  .res .spot { width: 44px; height: 44px; font-size: 18px; }
  .res .spot-all { font-size: 15px; }
  .res h3 { font-size: 19px; line-height: 25px; }
  .wts-end { transform: none; }
}
@media (max-width: 340px) {
  .pg .words li, html.wts-js .pg .words li { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
  html.wts-js .pg .words li { grid-template-columns: minmax(0, max-content) minmax(0, 1fr) 24px; }
  .words li::before { display: none; }
  .words .s { grid-column: 1 / -1; grid-row: 2; }
  html.wts-js .words li::after { grid-column: -2; grid-row: 1; }
  .pg .results .res { grid-template-columns: minmax(0, 1fr); }
  .res .spot { width: 40px; height: 40px; font-size: 16px; }
}

/* Printed: the check alone on one sheet, US Letter or A4, one-sided. */
@media print {
  @page { size: letter; margin: 0.4in 0.5in; }
  html, body { background: #fff !important; height: auto !important; min-height: 0 !important; }
  main { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
  body > *:not(main), main > *:not(.wts-check):not(.wts-res):not(.wts-more) { display: none !important; }
  body::before, body::after, main::before, main::after { display: none !important; }
  .wts-more, .wts-more > * { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  body { padding: 0 !important; font-size: 10.5pt; line-height: 1.35; color: #222; }
  .top, .bar, .foot, .band, .wts-side, .wts-buy, .pg-free, .js-only, .g-act, .wts-res .lead, .wts-res .near-price, .words .tap { display: none !important; }
  .print-only { display: block; }
  .pg { padding: 0 !important; background: none !important; }
  .wts-two { display: block; max-width: none; }
  .print-head { border-bottom: 2px solid #D7372A; margin-bottom: 6pt; padding-bottom: 3pt; }
  .print-head p { margin: 0; }
  .ph-brand { font-size: 9pt; color: #555; }
  .print-head .ph-title { font-size: 22pt; line-height: 1.1; font-weight: 700; margin: 1pt 0 0; }
  .wts-check h2 { display: none; }
  .wts-check .lead, .wts-check p { font-size: 9.6pt; line-height: 1.34; margin: 0 0 3pt; }
  .grps { columns: 2; column-gap: 16pt; margin-top: 2pt; }
  .grp { display: block; margin: 0 0 5pt; box-shadow: none; border: 1pt solid #333; break-inside: avoid; }
  .grp h3 { padding: 3pt 7pt 2pt; font-size: 11.5pt; line-height: 1.25; border-bottom-width: 1.5pt; }
  .grp .g-rule { padding: 2.5pt 7pt 0; font-size: 8.5pt; line-height: 1.3; }
  .words { padding: 0 7pt 3pt; }
  .pg .words li, html.wts-js .pg .words li { grid-template-columns: 13pt 5.2em minmax(0, 1fr) 13pt; column-gap: 5pt; padding: .8pt 0 .4pt; min-height: 0; font-size: 9pt; line-height: 1.25; align-items: center; }
  .words li::before { font-size: 8pt; }
  .words li::after, html.wts-js .words li::after { content: ""; display: block; width: 10pt; height: 10pt; border: .8pt solid #555; border-radius: 1.5pt; background: none !important; }
  .words .w { font-size: 12pt; line-height: 1.02; }
  .words li.miss .w { text-decoration: none; }
  .grp.skip { opacity: 1; }
  .wts-res { margin-top: 2pt; break-inside: avoid; }
  .wts-res h2 { font-size: 12pt; margin: 0 0 4pt; text-decoration: none; }
  .results { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5pt; }
  .pg .results .res { display: block; padding: 4pt 5pt; box-shadow: none; border: 1pt solid #333; break-inside: avoid; }
  .res .spot { display: none; }
  .res h3 { font-size: 9.5pt; line-height: 1.25; margin: 0 0 2pt; color: #b8291e; }
  .pg .res p { font-size: 8pt; line-height: 1.3; margin: 0 0 2pt; }
  .pg .res .res-if { font-size: 8pt; line-height: 1.3 !important; min-height: 0 !important; color: #222; }
  .pg .results .res > div { display: block; }
  .wts-more p { max-width: none !important; text-wrap: wrap !important; }
  .res.here { box-shadow: none; border-color: #333; }
  .pg .wts-warn { font-size: 8.5pt; line-height: 1.3; margin: 3pt 0 0; }
  .wts-more { margin-top: 4pt; padding: 0 !important; }
  .pg .results .res { padding: 3pt 5pt; }
  .wts-more .pg-two { display: grid; grid-template-columns: 1fr 1.25fr; gap: 0 16pt; max-width: none; }
  .wts-more h2 { font-size: 11pt; margin: 0 0 2pt; text-decoration: none; }
  .wts-res h2, .wts-more h2 { line-height: 1.2; }
  .wts-more p, .wts-more li { font-size: 8.5pt !important; line-height: 1.3 !important; margin: 0 0 2pt; }
  .wts-more ul { padding-left: 1.1em; margin: 0; }
  .print-foot { display: block; margin-top: 5pt; padding-top: 3pt; border-top: .8pt solid #999; font-size: 8pt; line-height: 1.35; color: #555; }
  a { text-decoration: none; }
}
