/* Classroom sheets (wave 2, study-docs): study guide, worksheet, fill in the blank.
   Screen preview = print: both use .wk-doc on white. Black and white friendly. */

.sh { display: block; }
.sh-in { margin-bottom: 8px; }
.sh-tabs { margin-bottom: 14px; }
.sh-deckrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.sh-deckrow .tool-select { flex: 1 1 220px; min-width: 0; }

.sh-out { margin-top: 26px; }
.sh-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 22px; margin: 12px 0 16px; }
.sh-fs { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-width: 0; }
.sh-fs legend { width: 100%; padding: 0; margin-bottom: 2px; }
.sh-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.sh-check input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.sh-papersel { display: inline-flex; align-items: center; gap: 8px; }
.sh-views { margin-bottom: 14px; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.sh-btn-alt { background: transparent; border: 1px solid var(--color-border-strong); color: var(--color-text-primary); }
.sh-links a { color: var(--color-accent); font-weight: 500; }

/* The paper on screen */
.sh-paper-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; background: #e9e9ee; padding: 14px; }
.sh-paper { background: #fff; color: #111; box-sizing: border-box; width: 100%; max-width: 794px; min-height: 240px; margin: 0 auto; padding: 22px 24px; box-shadow: 0 1px 6px rgba(0,0,0,.18); }

/* The document itself */
.wk-doc { font-family: 'DM Sans', Arial, 'Noto Sans', sans-serif; color: #111; background: #fff; font-size: 10pt; line-height: 1.38; }
.wk-doc h1 { font-size: 15pt; margin: 0 0 3mm; font-weight: 600; line-height: 1.25; }
.wk-doc h2 { font-size: 11.5pt; margin: 0 0 1.5mm; font-weight: 600; }
.wk-doc p { margin: 0 0 2mm; }
.wk-who { display: flex; gap: 8mm; margin: 0 0 4mm; font-size: 9.5pt; }
.wk-who span { flex: 1; border-bottom: 0.3mm solid #444; padding-bottom: 0.5mm; }
.wk-sec { margin: 0 0 4.5mm; break-inside: avoid; page-break-inside: avoid; }
.wk-ins { font-size: 9.5pt; color: #444; margin-bottom: 1.5mm !important; }
.wk-list { margin: 0; padding-inline-start: 6mm; }
.wk-list li { margin: 0 0 2.2mm; }
.wk-line { border-bottom: 0.3mm solid #888; height: 7mm; }
.wk-model { font-size: 9.5pt; color: #333; margin-top: 0.5mm; padding-inline-start: 2mm; border-inline-start: 0.6mm solid #777; }
.wk-blank { display: inline-block; border-bottom: 0.35mm solid #111; height: 1.15em; vertical-align: baseline; text-align: start; position: relative; margin: 0 0.5mm; }
.wk-blank small, .wk-n { font-size: 6.5pt; color: #555; vertical-align: top; line-height: 1; }
.wk-ans { font-weight: 600; text-decoration: underline; text-decoration-thickness: 0.2mm; text-underline-offset: 0.6mm; }
.wk-bank { display: flex; flex-wrap: wrap; gap: 1.5mm 3mm; margin: 0 0 3mm !important; padding: 1.5mm 2.5mm; border: 0.3mm solid #444; border-radius: 1.5mm; font-size: 10pt; }
.wk-bank span { white-space: nowrap; }
.wk-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 0 8mm; align-items: start; }
.wk-match ol { margin: 0; }
.wk-terms { list-style: decimal; padding-inline-start: 5mm; }
.wk-terms li { margin: 0 0 2mm; display: flex; gap: 2mm; align-items: baseline; }
.wk-letter-blank { display: inline-block; width: 8mm; border-bottom: 0.3mm solid #111; flex: none; }
.wk-defs { list-style: upper-alpha; padding-inline-start: 6mm; }
.wk-defs li { margin: 0 0 2mm; }
.wk-keylist { margin: 0; padding-inline-start: 6mm; }
.wk-cols { columns: 2; column-gap: 8mm; }
.wk-cols li { break-inside: avoid; margin: 0 0 1.2mm; }
.wk-spell li { display: flex; gap: 3mm; align-items: baseline; margin: 0 0 2.5mm; }
.wk-spell .wk-clue { flex: 1 1 40%; font-size: 9.5pt; color: #444; }
.wk-spell .wk-write { flex: 1 1 50%; border-bottom: 0.3mm solid #111; height: 1.1em; }
.wk-pass { font-size: 11pt; line-height: 2; margin-bottom: 3mm; }
.wk-points { margin: 0; padding-inline-start: 5mm; }
.wk-points li { margin: 0 0 1mm; }
.wk-terms-dl { margin: 0; columns: 2; column-gap: 7mm; }
.wk-terms-dl > div { break-inside: avoid; margin: 0 0 1.6mm; }
.wk-terms-dl dt { font-weight: 600; }
.wk-terms-dl dd { margin: 0; font-size: 9.5pt; }
.wk-foot { margin-top: 5mm !important; font-size: 7.5pt; color: #777; }
.wk-keydoc h1 { font-size: 14pt; }

/* The one-page study guide runs smaller than a worksheet so 12 terms and 6 questions fit one page */
.wk-guide { font-size: 8.6pt; line-height: 1.27; }
.wk-guide h1 { font-size: 12.5pt; margin-bottom: 1.5mm; }
.wk-guide h2 { font-size: 10pt; margin-bottom: 1mm; }
.wk-guide .wk-sec { margin-bottom: 3mm; }
.wk-guide .wk-who { margin-bottom: 2.5mm; }
.wk-guide .wk-terms-dl dd { font-size: 8.4pt; }
.wk-guide .wk-terms-dl > div { margin-bottom: 1.2mm; }
.wk-guide .wk-line { height: 5mm; }
.wk-guide .wk-points { columns: 2; column-gap: 7mm; font-size: 8.4pt; }
.wk-guide .wk-points li { break-inside: avoid; }
.wk-guide .wk-list li { margin-bottom: 1.2mm; }
.wk-guide .wk-sec:has(.wk-terms-dl) { break-inside: auto; page-break-inside: auto; }

/* Pick the words (fill in the blank) */
.sh-pickbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 6px; }
.sh-text { padding: 14px; border: 1px solid var(--color-border-strong); border-radius: 12px; line-height: 2.1; font-size: 16px; max-height: 420px; overflow: auto; overflow-wrap: anywhere; }
.fb-w { all: unset; cursor: pointer; padding: 1px 2px; border-radius: 4px; box-sizing: border-box; }
.fb-w:hover { background: var(--color-accent-subtle); }
.fb-w:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.fb-w.is-blank { background: var(--color-accent-subtle); border-bottom: 2px solid var(--color-accent); font-weight: 600; }
.sh-text.is-locked .fb-w { cursor: default; }

/* Playable version */
.wk-play { background: #fff; color: #111; border-radius: 12px; padding: 18px 20px; font-size: 15px; line-height: 1.7; }
.wk-play h3 { font-size: 15px; margin: 8px 0; }
.wk-play-list, .wk-play-match { padding-inline-start: 22px; }
.wk-play-line { margin: 0 0 8px; }
.wk-in { font: inherit; padding: 2px 6px; border: 0; border-bottom: 2px solid #555; background: #f4f4f7; color: #111; border-radius: 4px 4px 0 0; max-width: 100%; box-sizing: border-box; }
.wk-in.is-right { border-bottom-color: #1a7f37; background: #e6f4ea; }
.wk-in.is-wrong { border-bottom-color: #c62828; background: #fdecea; }
.wk-sel { width: auto; min-width: 70px; color: #111; background: #f4f4f7; }
.wk-ta { width: 100%; box-sizing: border-box; color: #111; background: #f4f4f7; margin-top: 4px; }
.wk-play .wk-bank { margin-bottom: 10px !important; }
.wk-play-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wk-play .wk-model { font-size: 14px; }
.wk-play .sd-linkbtn { color: #1a4fd6; }

.sh-printroot { background: #fff; }

@media screen and (max-width: 640px) {
    .sh-paper-wrap { padding: 8px; }
    .sh-paper { padding: 16px 14px; }
    .sh-opts { gap: 10px 14px; }
    .sh-actions .tool-btn-primary { flex: 1 1 100%; }
    .sh-actions .tool-btn-sm { flex: 1 1 auto; }
    .wk-match { grid-template-columns: 1fr; }
    .wk-cols, .wk-terms-dl, .wk-guide .wk-points { columns: 1; }
    .wk-play { padding: 14px 12px; }
    .sh-tabs [role="tab"] { flex: 1 1 auto; }
    .sh-views [role="tab"] { padding: 10px 8px 11px; font-size: 13px; }
}

@media print {
    html.soz-printing .sh-printroot .wk-doc { font-size: 10pt; }
    html.soz-printing .sh-printroot .wk-doc.wk-guide { font-size: 8.6pt; }
    html.soz-printing .wk-bank, html.soz-printing .wk-blank, html.soz-printing .wk-ans { -webkit-print-color-adjust: economy; print-color-adjust: economy; }
    html.soz-printing .wk-doc { break-after: page; page-break-after: always; }
    html.soz-printing .wk-doc:last-child { break-after: auto; page-break-after: auto; }
}
.wk-guide .wk-foot { margin-top: 2mm !important; }

/* the site's reset strips list markers; the sheets need theirs */
.wk-doc ol, .wk-doc ul { list-style-position: outside; }
.wk-doc ol { list-style-type: decimal; }
.wk-doc ul { list-style-type: disc; }
.wk-doc .wk-defs { list-style-type: upper-alpha; }
.wk-doc .wk-spell, .wk-doc .wk-terms { list-style-type: decimal; }
.wk-doc li { display: list-item; }
.wk-doc .wk-spell li, .wk-doc .wk-terms li { display: flex; }
.wk-play ol { list-style-type: decimal; }
.wk-play .wk-defs { list-style-type: upper-alpha; }
.wk-doc .wk-spell, .wk-doc .wk-terms { list-style: none; counter-reset: wkn; padding-inline-start: 0; }
.wk-doc .wk-spell li::before, .wk-doc .wk-terms li::before { counter-increment: wkn; content: counter(wkn) "."; flex: none; min-width: 5mm; }
