/* sundayvisit.com.au/guides/*-word-search-*: printable large print word searches.
   Loaded after guides.css, on the two word search pages only. Nothing under 18px on screen
   (staticPageTextSize.test.ts). On paper each puzzle fills its own A4 page: the grid at 28 point,
   the word list at 20 point, with the site's address at the foot. Chrome 78: no flex gap, and a
   plain value before any clamp(). */

.wsp-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The two big buttons under the opening: Print (pine) and Play on a phone (outlined). */
.wsp-actions { display: flex; flex-wrap: wrap; margin: 1.5rem -0.75rem 0 0; }
.wsp-actions > * { margin: 0 0.75rem 0.75rem 0; }
.wsp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 1.75rem;
  border: 2px solid var(--pine);
  border-radius: 18px;
  background: var(--pine);
  color: #fffdf8;
  font: 600 1.25rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 16px -8px rgba(19, 36, 59, .5);
}
.wsp-button:hover { background: var(--pine-hover); border-color: var(--pine-hover); color: #fffdf8; }
.wsp-button:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.wsp-button-quiet { background: transparent; color: var(--pine); box-shadow: none; }
.wsp-button-quiet:hover { background: var(--sage); color: var(--pine-hover); }
.wsp-button[hidden] { display: none; }

/* One puzzle. */
.wsp-puzzle, .wsp-answers {
  padding: 1.5rem 1.25rem;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--rule), 0 14px 32px -24px rgba(19, 36, 59, .35);
}
.wsp-puzzle h2, .wsp-answers h2 { margin-top: 0; }
.wsp-how { margin: .25rem 0 1rem; color: var(--ink-soft); font-size: 1.125rem; }
.wsp-grid {
  width: 100%;
  max-width: 34rem;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  table-layout: fixed;
  font: 600 1.375rem/1 var(--sans);
  text-align: center;
}
.wsp-grid td {
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--rule);
  background: #fffdf8;
}
.wsp-words {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  columns: 2;
  font: 600 1.25rem/1.9 var(--sans);
  letter-spacing: .04em;
}
.wsp-from { display: none; }

/* The answers: one small grid per puzzle, the hidden words shaded. */
.wsp-answer { display: inline-block; width: 100%; max-width: 22rem; margin: 0 1.5rem 1.75rem 0; vertical-align: top; }
.wsp-answer h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.wsp-answer-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font: 500 1.125rem/1 var(--sans);
  text-align: center;
}
.wsp-answer-grid td { height: 1.75rem; padding: 0; border: 1px solid var(--rule); color: rgba(19, 36, 59, .4); }
.wsp-answer-grid td.wsp-hit { background: var(--sun); color: var(--ink); font-weight: 700; }

@media (min-width: 40rem) {
  .wsp-puzzle, .wsp-answers { padding: 2rem 2.25rem; }
  .wsp-grid { font-size: 1.875rem; }
  .wsp-grid td { height: 3.25rem; }
  .wsp-words { columns: 3; font-size: 1.375rem; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff; }
  .sv-header, .sv-footer, .sv-signup, .sv-hero, .sv-band-app, .sv-band-faq, .guide-more, .wsp-button, .wsp-actions { display: none !important; }
  .sv-band, .sv-band-inner, .sv-guide { margin: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; max-width: none !important; }
  .wsp-puzzle, .wsp-answers { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .wsp-puzzle { break-after: page; break-inside: avoid; }
  .wsp-puzzle h2, .wsp-answers h2 { font-size: 26pt; margin: 0 0 2mm; }
  .wsp-how { font-size: 14pt; color: #333; margin: 0 0 6mm; }
  .wsp-grid { max-width: none; font-size: 28pt; margin: 0 0 7mm; }
  .wsp-grid td { height: 16mm; border: 1pt solid #888; background: none; }
  .wsp-words { columns: 3; font-size: 20pt; line-height: 1.7; }
  .wsp-from { display: block; margin: 6mm 0 0; font-size: 14pt; color: #444; }
  .wsp-answer { max-width: 85mm; margin: 0 6mm 6mm 0; break-inside: avoid; }
  .wsp-answer h3 { font-size: 14pt; }
  .wsp-answer-grid { font-size: 12pt; }
  .wsp-answer-grid td { height: 7mm; border: .5pt solid #aaa; color: #999; }
  .wsp-answer-grid td.wsp-hit { background: #e8e8e8; color: #000; }
  /* Print this puzzle: only that puzzle and its answer. */
  body.wsp-one .wsp-puzzle:not(.wsp-on), body.wsp-one .wsp-answer:not(.wsp-on) { display: none !important; }
}
