/* assets/worksheets.css — the worksheet maker (/worksheets). New, 23 Nov 2026 (phase G5).
   ITS OWN DESIGN: a teacher's cutting mat. The page is a green cutting mat with its white grid; the nine kinds of
   worksheet lie on it as sheets of paper, a little crooked, and straighten when you point at them. One worksheet is a
   white A4 page on the mat, with typewriter headings (Courier Prime) like a school handout. Night: a darker mat.
   Motion: the sheets are dealt onto the mat once when the page opens, and a new worksheet slides out like paper from
   a printer. Nothing moves with "reduce motion" or on weak phones (html.lk-lite).
   ON PAPER (@media print) only the worksheet and its key are printed: black on white, the key on its own page.
   Every rule starts with #ws. The pictures (.t1-map, .t1-flow, .t1-ch) are drawn by includes/task1_kit_lib.php; here
   they get paper colours: pale fills, black lines, so they also read on a black-and-white printer. */

@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/courier-prime-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/courier-prime-latin-700-normal.woff2') format('woff2'); }

#ws { --mat: #1E6B5A; --mat2: #185748; --ink: #14201C; --soft: #56655F; --rule: #8A9692; --pale: #C3CEC9; --paper: #FFFFFF; --hi: #FFC83D; --pen: #D7263D;
  --type: 'Courier Prime', 'Courier New', Courier, monospace;
  display: block; max-width: 1080px; margin: 0 auto; padding: clamp(18px, 4vw, 40px) clamp(12px, 3vw, 24px) 70px; color: #fff; }
html:has(#ws) body { background-color: #1E6B5A;
  background-image: linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
html.dark:has(#ws) body { background-color: #0D3329; }
html.dark #ws { --paper: #F4F6F3; }
html:has(#ws) #cp { background: transparent; }
#ws * { box-sizing: border-box; }
#ws p, #ws h1, #ws ol, #ws ul, #ws figure { margin: 0; }
#ws ul { padding: 0; list-style: none; }
#ws button { font: inherit; cursor: pointer; }
#ws :focus-visible { outline: 3px solid var(--hi); outline-offset: 3px; border-radius: 6px; }

@keyframes wsDeal { from { opacity: 0; transform: translateY(-34px) rotate(-7deg); } }
@keyframes wsFeed { from { opacity: 0; transform: translateY(-46px); } }

/* ───────────── the nine kinds ───────────── */
#ws .ws-head h1 { font: 700 clamp(46px, 10vw, 96px)/.95 var(--type); letter-spacing: -.045em; color: #fff; }
#ws .ws-head p { max-width: 35em; margin-top: 14px; font-size: 17.500px; line-height: 1.55; color: rgba(255, 255, 255, .88); }
#ws .ws-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 34px; }
#ws .ws-grid li { animation: wsDeal .5s cubic-bezier(.2, .8, .2, 1) backwards; }
#ws .ws-grid li:nth-child(2) { animation-delay: .06s; } #ws .ws-grid li:nth-child(3) { animation-delay: .12s; } #ws .ws-grid li:nth-child(4) { animation-delay: .18s; } #ws .ws-grid li:nth-child(5) { animation-delay: .24s; }
#ws .ws-grid li:nth-child(6) { animation-delay: .3s; } #ws .ws-grid li:nth-child(7) { animation-delay: .36s; } #ws .ws-grid li:nth-child(8) { animation-delay: .42s; } #ws .ws-grid li:nth-child(9) { animation-delay: .48s; }
#ws .ws-grid a { display: block; height: 100%; padding: 18px 20px 20px; color: var(--ink); text-decoration: none; background: var(--paper); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 14px 24px -12px rgba(0, 0, 0, .55); transform: rotate(var(--r, 0deg)); transition: transform .18s ease-out, box-shadow .18s; }
#ws .ws-grid li:nth-child(3n+1) a { --r: -1.300deg; } #ws .ws-grid li:nth-child(3n+2) a { --r: .9deg; } #ws .ws-grid li:nth-child(3n) a { --r: -.5deg; } #ws .ws-grid li:nth-child(5) a { --r: -.8deg; }
#ws .ws-grid a:hover, #ws .ws-grid a:focus-visible { transform: rotate(0deg) translateY(-5px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 22px 30px -14px rgba(0, 0, 0, .6); }
#ws .ws-th { display: block; width: 132px; height: auto; margin-bottom: 14px; }
#ws .ws-th .l { fill: none; stroke: var(--pale); stroke-width: 5; stroke-linecap: round; } #ws .ws-th .d { fill: var(--ink); } #ws .ws-th .d2 { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
#ws .ws-th .y { fill: var(--hi); } #ws .ws-th .o { fill: none; stroke: var(--pale); stroke-width: 3; } #ws .ws-th .on { fill: var(--hi); stroke: var(--ink); stroke-width: 3; }
#ws .ws-th .r { fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; } #ws .ws-th .rf { fill: var(--pen); } #ws .ws-th .bx { fill: none; stroke: var(--ink); stroke-width: 3.500; } #ws .ws-th .ax { fill: none; stroke: var(--pale); stroke-width: 3; stroke-linecap: round; }
#ws .ws-th .mp.a { fill: #BFE3D0; } #ws .ws-th .mp.b { fill: #FFE08A; } #ws .ws-th .mp.c { fill: #F6C9A0; } #ws .ws-th .rd { fill: none; stroke: var(--pale); stroke-width: 8; } #ws .ws-th .rd2 { fill: #fff; stroke: var(--pale); stroke-width: 3; }
#ws .ws-tag { display: block; font: 700 13.500px/1.2 var(--type); color: var(--mat); }
#ws .ws-grid b { display: block; margin-top: 3px; font: 700 22px/1.15 var(--type); letter-spacing: -.02em; }
#ws .ws-grid small { display: block; margin-top: 8px; font-size: 14.500px; line-height: 1.45; color: var(--soft); }
#ws .ws-foot { max-width: 46em; margin-top: 34px; font-size: 15.500px; line-height: 1.6; color: rgba(255, 255, 255, .85); } #ws .ws-foot a { color: #fff; font-weight: 600; text-underline-offset: 3px; }

/* ───────────── one worksheet: the settings on the mat ───────────── */
#ws .ws-desk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; max-width: 210mm; margin: 0 auto; }
#ws .ws-back { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 100%; font: 700 15px/1 var(--type); color: #fff; text-decoration: none; }
#ws .ws-back:hover { text-decoration: underline; text-underline-offset: 4px; }
#ws .ws-sets { display: flex; flex-wrap: wrap; gap: 10px 20px; flex: 1; }
#ws .ws-set { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; } #ws .ws-set.wide { flex: 1 1 100%; }
#ws .ws-set > span { margin-right: 5px; font: 700 14px/1 var(--type); color: rgba(255, 255, 255, .8); }
#ws .ws-set a { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 2px 11px 0; font: 700 15px/1 var(--type); color: #fff; text-decoration: none; border: 1.500px solid rgba(255, 255, 255, .34); border-radius: 8px; transition: background-color .12s; }
#ws .ws-set a:hover { background: rgba(255, 255, 255, .14); } #ws .ws-set a[aria-current] { color: var(--ink); background: #fff; border-color: #fff; } #ws .ws-set a.ws-mix { border-style: dashed; border-color: var(--hi); color: var(--hi); }
#ws .ws-print { display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 2px 26px 0 20px; font: 700 18px/1 var(--type); color: var(--ink); background: var(--hi); border: 0; border-radius: 99px; box-shadow: 0 4px 0 #A87C0B; transition: transform .1s, box-shadow .1s; }
#ws .ws-print:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #A87C0B; } #ws .ws-print:active { transform: translateY(3px); box-shadow: 0 1px 0 #A87C0B; }
#ws .ws-tip { max-width: 210mm; margin: 18px auto 0; font-size: 14.500px; line-height: 1.5; color: rgba(255, 255, 255, .78); }

/* ───────────── the paper ───────────── */
#ws .ws-sheet { position: relative; display: flex; flex-direction: column; width: min(100%, 210mm); margin: 22px auto 0; padding: 13mm 15mm 10mm; color: var(--ink); background: var(--paper); border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 26px 40px -18px rgba(0, 0, 0, .6); font: 400 15.500px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; animation: wsFeed .6s cubic-bezier(.2, .8, .2, 1) both; }
#ws .ws-keypage { animation-delay: .12s; }
#ws .ws-sheet::before, #ws .ws-sheet::after { content: ''; position: absolute; width: 16px; height: 16px; border: 0 solid rgba(255, 255, 255, .7); pointer-events: none; }   /* the cutting marks at two corners */
#ws .ws-sheet::before { left: -11px; top: -11px; border-width: 1.500px 0 0 1.500px; } #ws .ws-sheet::after { right: -11px; bottom: -11px; border-width: 0 1.500px 1.500px 0; }
#ws .ws-sh { display: flex; align-items: flex-end; justify-content: space-between; gap: 6mm; padding-bottom: 3mm; border-bottom: 2px solid var(--ink); }
#ws .ws-kind { font: 700 13px/1.2 var(--type); color: var(--soft); }
#ws .ws-sh h1 { font: 700 25px/1.1 var(--type); letter-spacing: -.03em; }
#ws .ws-name { flex: none; font: 400 13.500px/1 var(--type); white-space: nowrap; } #ws .ws-name span { display: inline-block; width: 42mm; margin: 0 3mm 0 1mm; border-bottom: 1px solid var(--ink); } #ws .ws-name span.s { width: 22mm; margin-right: 0; }
#ws .ws-keypage .ws-sh { border-bottom-color: var(--pen); } #ws .ws-keypage .ws-kind { color: var(--pen); }
#ws .ws-do { margin: 4mm 0 1mm; font-size: 14.500px; font-weight: 600; line-height: 1.45; }
#ws .ws-sec { margin: 5mm 0 2mm; font-size: 14.500px; font-weight: 600; line-height: 1.45; break-after: avoid; }
#ws .ws-sec > b:first-child { display: inline-grid; place-items: center; width: 6mm; height: 6mm; margin-right: 1.500mm; font: 700 13.500px/1 var(--type); color: #fff; background: var(--ink); border-radius: 1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#ws .ws-items { margin-top: 3mm; padding-left: 6.500mm; } #ws .ws-items > li { margin-bottom: 4mm; padding-left: 1mm; break-inside: avoid; } #ws .ws-items > li::marker { font-weight: 700; }
#ws .ws-items.tight > li { margin-bottom: 1.700mm; } #ws .ws-items.abc { list-style: lower-alpha; }
#ws .ws-t { line-height: 1.5; } #ws .ws-t.para { margin-top: 2mm; line-height: 2.150; }
#ws .tw { font-weight: 800; text-decoration: underline; text-decoration-thickness: 1.500px; text-underline-offset: 3px; }
#ws .ws-opts { display: flex; flex-wrap: wrap; gap: 1mm 8mm; margin-top: 1.500mm; font-size: 14.500px; } #ws .ws-opts.col { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2.500mm; } #ws .ws-opts b { margin-right: 1mm; }
#ws .ws-hint { font-size: 13.500px; font-style: italic; color: var(--soft); }
#ws .ws-rule { display: block; height: 8.500mm; border-bottom: 1px solid var(--rule); } #ws .ws-rule.in { flex: 1; height: 6mm; }
#ws .ws-fill { display: flex; align-items: flex-end; gap: 2mm; margin-top: 1.500mm; font-size: 14.500px; }
#ws .ws-gap { display: inline-block; width: 30mm; height: 1.100em; margin: 0 1mm; border-bottom: 1px solid var(--ink); vertical-align: baseline; text-align: left; } #ws .ws-gap.sm { width: 9mm; } #ws .ws-gap.lg { width: 44mm; }
#ws .ws-cm { margin-left: -1mm; }
#ws .ws-gap i { font: 700 11px/1 var(--type); font-style: normal; color: var(--soft); vertical-align: top; }
#ws .ws-box { display: flex; flex-wrap: wrap; gap: 1.500mm 6mm; margin: 2mm 0; padding: 2.500mm 4mm; font-size: 14.500px; font-weight: 600; border: 1.300px solid var(--ink); border-radius: 1.500mm; }
#ws .ws-match { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.100fr); gap: 0 8mm; }
#ws .ws-items.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 9mm; padding-left: 6.500mm; } #ws .ws-items.grid > li { margin-bottom: 1mm; }
#ws .ws-ch { max-width: 56mm; margin-bottom: 1mm; }
#ws .ws-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-top: 4mm; } #ws .ws-fig { max-width: 150mm; margin: 4mm auto 0; }
#ws figcaption { margin-top: 1mm; font: 700 12.500px/1.2 var(--type); text-align: center; }
#ws .ws-sf { display: flex; justify-content: space-between; gap: 6mm; margin-top: auto; padding-top: 6mm; font: 400 11.500px/1.2 var(--type); color: var(--soft); }
#ws .ws-key { margin-top: 4mm; padding-left: 6.500mm; font-size: 14.500px; } #ws .ws-key > li { margin-bottom: 2.200mm; padding-left: 1mm; break-inside: avoid; } #ws .ws-key > li::marker { font-weight: 700; }
#ws .ws-key > li.plain { margin-left: -6.500mm; list-style: none; line-height: 1.8; } #ws .ws-key > li.plain > b:first-child { display: inline-grid; place-items: center; width: 6mm; height: 6mm; margin-right: 2mm; font: 700 13.500px/1 var(--type); color: #fff; background: var(--pen); border-radius: 1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#ws .ws-key i { display: inline-block; margin-right: 5mm; font-style: normal; white-space: nowrap; } #ws .ws-key li > span { display: block; font-size: 13px; color: var(--soft); }
#ws .ws-note { margin-top: 4mm; font-size: 13.500px; font-style: italic; color: var(--soft); }

/* the pictures on paper: pale fills, black lines */
#ws .t1-pic { --paper: #FFFFFF; --ink: #14201C; --soft: #56655F; --bad: #14201C; --maps: #6E7C77; --process: #14201C; --patterns: #14201C; --hi: #D9DFDC; }
#ws .t1-map, #ws .t1-flow, #ws .t1-ch { display: block; width: 100%; height: auto; }
#ws .t1-map { border: 1px solid var(--ink); } #ws .t1-map .land { fill: #F3F5F2; } #ws .t1-map .k-water { fill: #DCE9F2; } #ws .t1-map .k-sand { fill: #F1EAD3; }
#ws .t1-map .road-o { stroke: #8A9692; stroke-width: 19; } #ws .t1-map .road { stroke: #FFFFFF; stroke-width: 15; } #ws .t1-map .round { fill: #FFFFFF; stroke: #8A9692; stroke-width: 2; } #ws .t1-map .round-in { fill: #C9D6CF; stroke: #8A9692; stroke-width: 1.500; }
#ws .t1-map .path { stroke: var(--ink); stroke-width: 2.500; stroke-dasharray: 5 5; } #ws .t1-map .walk { stroke: var(--ink); stroke-width: 6; stroke-dasharray: 2 3; } #ws .t1-map .pier { fill: #B7A48A; stroke: var(--ink); stroke-width: 1; }
#ws .t1-map rect[class^="k-"] { stroke: var(--ink); stroke-width: 1.500; } #ws .t1-map rect.k-water, #ws .t1-map rect.k-sand { stroke: none; }
#ws .t1-map .k-farm { fill: #E7EFC9; } #ws .t1-map .k-homes { fill: #FADFC7; } #ws .t1-map .k-school { fill: #FFF0B8; } #ws .t1-map .k-wood { fill: #C9E6CC; } #ws .t1-map .k-sport { fill: #DDF1E2; } #ws .t1-map .k-dock { fill: #CADFF3; }
#ws .t1-map .k-shop { fill: #F8D5E3; } #ws .t1-map .k-hotel { fill: #E6DAF7; } #ws .t1-map .k-car { fill: #E1E5EA; } #ws .t1-map .k-cafe { fill: #FFE1C7; } #ws .t1-map .k-study { fill: #DDE8FA; } #ws .t1-map .k-new { fill: #FFE9A6; }
#ws .t1-map text { font: 800 12.500px/1 Inter, Arial, sans-serif; letter-spacing: -.01em; fill: var(--ink); text-anchor: middle; } #ws .t1-map text.sm { font-size: 10px; font-weight: 700; text-anchor: start; } #ws .t1-map text.sea { font-size: 12px; opacity: .7; }
#ws .t1-map .compass circle { fill: #fff; stroke: var(--ink); stroke-width: 1.500; } #ws .t1-map .compass path { fill: var(--ink); } #ws .t1-map .compass text { font-size: 11px; }
#ws .t1-flow .st { fill: #fff; stroke: var(--ink); stroke-width: 1.800; } #ws .t1-flow circle.no { fill: var(--ink); } #ws .t1-flow text { font: 700 10.500px/1 Inter, Arial, sans-serif; fill: var(--ink); text-anchor: middle; }
#ws .t1-flow text.no { font-size: 11.500px; font-weight: 800; fill: #fff; } #ws .t1-flow text.cy { font-size: 11px; font-style: italic; } #ws .t1-flow .ar { stroke: var(--ink); stroke-width: 1.800; } #ws .t1-flow marker path { fill: var(--ink); }
#ws .t1-ch .ax { fill: none; stroke: var(--ink); stroke-width: 1.300; } #ws .t1-ch text { font: 700 8.500px/1 Inter, Arial, sans-serif; fill: var(--soft); } #ws .t1-ch text.v { fill: var(--ink); font-size: 9.500px; } #ws .t1-ch text.pv { fill: var(--ink); font-size: 9.500px; }
#ws .t1-ch .ln { fill: none; stroke: var(--ink); stroke-width: 2.600; stroke-linecap: round; stroke-linejoin: round; } #ws .t1-ch .ln.s1 { stroke: #6E7C77; stroke-dasharray: 7 4; } #ws .t1-ch .ln.fc { stroke-dasharray: 1 5; }
#ws .t1-ch .pt { fill: #fff; stroke: var(--ink); stroke-width: 1.800; } #ws .t1-ch .pt.s1 { stroke: #6E7C77; }
#ws .t1-ch .bar.s0, #ws .t1-ch .pie.s0 { fill: #4A5853; } #ws .t1-ch .bar.s1, #ws .t1-ch .pie.s1 { fill: #A9B5B0; } #ws .t1-ch .bar.s2, #ws .t1-ch .pie.s2 { fill: #D9DFDC; } #ws .t1-ch .pie.s3 { fill: #F1F3F1; } #ws .t1-ch .pie { stroke: #fff; stroke-width: 1.500; }
#ws .t1-ch .pie.s0 + text.pv { fill: #fff; }
#ws .t1-map rect, #ws .t1-flow circle, #ws .t1-ch rect, #ws .t1-ch path { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

@media (min-width: 900px) { #ws .ws-sheet { min-height: 297mm; } }
@media (max-width: 860px) {
  #ws .ws-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  #ws .ws-sheet { padding: 22px 18px 16px; } #ws .ws-sh { flex-wrap: wrap; } #ws .ws-name span { width: 30mm; }
}
@media (max-width: 560px) {
  #ws .ws-grid { grid-template-columns: 1fr; } #ws .ws-grid a { --r: 0deg !important; }
  #ws .ws-match, #ws .ws-opts.col, #ws .ws-figs { grid-template-columns: 1fr; }
  #ws .ws-print { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { #ws *, #ws *::before { animation: none !important; transition: none !important; } }
html.lk-lite #ws *, html.lk-lite #ws *::before { animation: none !important; transition: none !important; }

@media print {
  @page { size: A4; margin: 12mm 14mm 11mm; }
  html:has(#ws), html:has(#ws) body { background: #fff !important; }
  html:has(#ws) .lk-skip, html:has(#ws) .lk-top, html:has(#ws) .lk-bottom, html:has(#ws) .lk-foot, html:has(#ws) .lk-scrim, html:has(#ws) .lk-sheet, html:has(#ws) .cp-toast, html:has(#ws) footer:not(.ws-sf), #ws .ws-desk, #ws .ws-tip { display: none !important; }
  #ws { max-width: none; margin: 0; padding: 0; color: #000; }
  #ws .ws-sheet { display: block; width: auto; min-height: 0; margin: 0; padding: 0; background: #fff; box-shadow: none; animation: none !important; font-size: 11pt; }
  #ws .ws-sheet::before, #ws .ws-sheet::after { display: none; }
  #ws .ws-keypage { break-before: page; page-break-before: always; }
  #ws .ws-sf { margin-top: 5mm; padding-top: 0; }
  #ws .ws-do, #ws .ws-sec, #ws .ws-opts, #ws .ws-fill, #ws .ws-box, #ws .ws-key { font-size: 10.500pt; }
  #ws .ws-sh h1 { font-size: 17pt; }
}
