/* 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; max-width: calc(100% - 0.75rem); } /* never wider than the column (SVWD-29) */
.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; }
/* The PDF link (1 Dec 2026, SVWD-27; Distro's fix). The page count never splits, and on a phone the size goes on its
   own line: "Download the PDF" over "(A4, 13 pages)". */
.wsp-pdf-size { white-space: nowrap; }
/* .wsp-button is inline-flex, so the words and the size are two flex items and the space between them collapses:
   the gap puts it back on one line ("PDF (A4", not "PDF(A4"). Where the column is narrow but the screen is not (the
   intro column on a desktop, or with bigger text), the size wraps whole onto a second line, never the words. */
.wsp-pdf { flex-wrap: wrap; justify-content: flex-start; align-content: center; column-gap: 0.3em; padding-top: 0.625rem; padding-bottom: 0.625rem; }
/* SVWD-29: on a phone the side padding stays 20px as text grows ("Download" needs 185px at 200% text on a 320px phone),
   and with 200% text on the smallest phones the size may wrap, but only after "(A4," (a no-break space joins the count
   and "pages"). */
@media (max-width: 30rem) {
  .wsp-pdf { flex-direction: column; align-items: flex-start; padding-top: 0.625rem; padding-bottom: 0.625rem; line-height: 1.25; padding-left: 20px; padding-right: 20px; }
  .wsp-pdf-size { white-space: normal; }
}

/* 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; }
/* A Chinese heading's characters stand taller than the Latin font's line, so in print the top of the next page's
   heading showed at the foot of the page before (24 Nov 2026). */
:lang(zh) .wsp-puzzle h2, :lang(zh) .wsp-answers h2 { line-height: 1.35; }
.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;
  /* Two columns only where they are 7em wide (KOOKABURRA, about 7.3em, spills a little into the 1em gap), else one, so
     no list runs off a 320px phone; with 200% text a word wider than the whole column breaks, never runs off (SVWD-29). */
  columns: 7em 2;
  overflow-wrap: break-word;
  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: #646d7b; }
.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: 7em 3; font-size: 1.375rem; }
}
/* SVWD-29: on a phone the band and card side paddings stay at their standard-text 20px as text grows. In rem they
   doubled at 200% text and left too little line for the words (Distro's review of #1262). */
@media (max-width: 30rem) {
  .sv-band-inner { padding-left: 20px; padding-right: 20px; }
  .wsp-puzzle, .wsp-answers { padding-left: 20px; padding-right: 20px; }
}

@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; }
}

/* SVWD-30: with 200% text on a phone the buttons' and answer cards' rem margins stay at their standard-text px sizes,
   and the word list grows only as far as its longest words (SHORTBREAD, KOOKABURRA) still fit whole. Standard text
   keeps its sizes. Chrome 78, which has no min(), keeps the rem sizes. */
@media (max-width: 30rem) {
  .wsp-actions { margin-right: -12px; }
  .wsp-actions > * { margin-right: 12px; max-width: calc(100% - 12px); }
  .wsp-answer { margin-right: 1.5rem; margin-right: min(1.5rem, 24px); }
  .wsp-words { font-size: 1.25rem; font-size: min(1.25rem, max(20px, calc(11.5vw - 10px))); }
}
