/* The weekly puzzle pages (26 Oct; templates/puzzle.html, puzzles.html). The tiles are the site's own drawing
   (.figure in cardlines.css); this sets the rack's size, the chosen tile and the answer. */
.puzzle { max-width: 46rem; }
.puzzle h2 { font-size: 1.35rem; margin-top: 1.6rem; }
.puzzle .eyebrow a { color: inherit; }
.puzzle-hand .figure { margin: 0.3rem 0 0.5rem; }

.puzzle-rack .rack-tiles { --tile-scale: 0.82; gap: 12px; margin: 0.4rem 0 0.8rem; }
.puzzle-rack .tile.pick { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.puzzle-rack .tile.pick:hover { transform: translateY(-4px); }
.puzzle-rack .tile.pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.puzzle-rack .tile.pick .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.puzzle-rack .tile.pick.chosen { transform: translateY(-10px); box-shadow: 0 0 0 3px var(--accent), 0 8px 14px rgba(30, 24, 12, 0.3); }
.puzzle-rack .tile.pick.best { box-shadow: 0 0 0 3px var(--felt), 0 8px 14px rgba(30, 24, 12, 0.3); }
.puzzle-rack .said { font-size: 1.1rem; padding: 0.8rem 1rem; border-radius: var(--radius); background: var(--card); border-left: 5px solid var(--accent); }
.puzzle-rack .said.right { border-left-color: var(--felt); }

.puzzle-answer { margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.puzzle-answer summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 700; }
.puzzle-answer .answer-body { padding: 0 1rem 0.6rem; }
.puzzle-answer .answer-words { font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.puzzle-answer .figure { margin-bottom: 0.8rem; }

.puzzle-next { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin: 0.4rem 0 1.6rem; }
.puzzle-next form { margin: 0; }
.puzzle-next .button[disabled] { opacity: 0.55; cursor: not-allowed; }
.puzzle-video { max-width: 30rem; }

.puzzle-subscribe { margin-top: 1.4rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--paper-2); }
.puzzle-subscribe h2 { margin-top: 0; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.6rem; }
.subscribe-form input[type="email"] { flex: 1 1 14rem; min-width: 0; font: inherit; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.puzzle-subscribe .done { font-weight: 700; color: var(--felt-deep); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the list of puzzles */
.puzzle-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.puzzle-list li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.puzzle-list h2 { font-size: 1.3rem; margin: 0 0 0.3rem; }
.puzzle-list .figure { --tile-scale: 0.42; gap: 6px; margin: 0.5rem 0; }

@media (max-width: 34rem) {
  .puzzle-rack .rack-tiles { --tile-scale: 0.56; gap: 8px; }
  .puzzle h1 { font-size: 2rem; }
  .puzzle-list .figure { --tile-scale: 0.34; }
}
@media (prefers-reduced-motion: reduce) {
  .puzzle-rack .tile.pick { transition: none; }
}

/* the daily puzzle (5 Nov; templates/daily_puzzle.html) */
.daily-puzzle .rack-tiles .tile.shown { display: inline-block; }
.puzzle-offer .figure { --tile-scale: 1; margin: 0.3rem 0 0.6rem; }
.hand-choices { display: grid; gap: 0.8rem; }
.hand-choice { display: grid; gap: 0.4rem; justify-items: start; text-align: left; font: inherit; padding: 0.8rem 1rem; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: inherit; }
.hand-choice:hover { border-color: var(--accent); }
.hand-choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hand-choice .figure { --tile-scale: 0.5; gap: 6px; }
.hand-choice.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.hand-choice.best { border-color: var(--felt); box-shadow: 0 0 0 2px var(--felt); }
.puzzle-buttons { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0; }
.puzzle-buttons .button.chosen { box-shadow: 0 0 0 3px var(--accent); }
.puzzle-buttons .button.best { box-shadow: 0 0 0 3px var(--felt); }
.puzzle-result { margin: 1rem 0 1.4rem; padding: 0.4rem 1rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.puzzle-result .said { font-size: 1.15rem; font-weight: 700; padding: 0.6rem 0.8rem; border-left: 5px solid var(--accent); background: var(--paper-2); border-radius: 8px; }
.puzzle-result .said.best { border-left-color: var(--felt); }
.puzzle-result .said.close { border-left-color: #c9a227; }
.puzzle-result .answer-words { font-family: var(--display); font-size: 1.4rem; font-weight: 700; margin: 0.6rem 0 0.3rem; }
.puzzle-result .share, .puzzle-result .progress { color: var(--ink-2, inherit); }
@media (max-width: 34rem) { .hand-choice .figure { --tile-scale: 0.36; } .puzzle-offer .figure { --tile-scale: 0.8; } }
