/* /do-chess-puzzles-help/ (MAR-189): an answer page on the book template (content-plan.md §3, "Shared templates").
   It loads the hanging-pieces page's book column and chapter rules and adds only what this page has that the others
   don't: an answer kept behind "Show the answer" (a puzzle should be tried before it's solved), and two Safe or gift?
   boards side by side. Tokens only (paper.css, site.css). */

/* "Show the answer": a word in the link colour with a drawn chevron, then the answer and its board. Native details,
   so it opens without the script and the answer stays in the page for search and screen readers. */
.reveal { margin-top: 20px; border-top: var(--hairline); border-bottom: var(--hairline); }
.reveal summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none;
  font-size: var(--t-body); font-weight: 700; color: var(--link); }
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::after { content: ""; width: 8px; height: 8px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform 160ms ease; }
.reveal[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.reveal summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.reveal summary:focus-visible { outline: 2px solid #1D4FD8; outline-offset: 3px; border-radius: 6px; }
.reveal .ans { padding-bottom: 22px; }
.reveal .ans p { font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.reveal .ans p + p { margin-top: 12px; }
.reveal .ans b { font-weight: 700; }
.reveal .frame { margin-top: 16px; }

/* Safe or gift?: the two candidate moves as two boards, each with its question in the app's words and its answer.
   One column on phones, where a half-width board would be too small to read. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.pair .frame { padding: 2.2%; border-radius: 14px; background: var(--frame); box-shadow: var(--shadow-warm); }
.pair .frame img { display: block; width: 100%; height: auto; border-radius: 6px; }
.pair .q { margin-top: 14px; font-size: var(--t-prompt); font-weight: 700; line-height: 1.3; }
.pair .reveal { margin-top: 10px; }
.pair .reveal .frame { padding: 2.2%; }
.pair + .body { margin-top: 32px; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; gap: 40px; } }

/* A chapter without a diagram: its text follows the heading at the diagram's distance. */
.habit .hh + .body { margin-top: 24px; }
.habit .body + .body { margin-top: 16px; }
.habit .body a, .habit .aside a, .faqB .acc-i p a:not(.pill) { color: var(--link); text-underline-offset: 4px; }
