/* /handoff-check only: the check (tick rows, tally, result, worksheet), the page's quote and count lines, the hidden
   enquiry card and the printed pages 1 to 3. Site chrome, stages, buttons, the FAQ and the enquiry dialog come from
   chrysis.css; every colour and font is one of its tokens. */

/* Hero: the actions centred under the centred copy, then the printed page 1 as the picture */
.hero-center .hero-copy .hero-actions { justify-content: center; }
.hero-center .hero-note { margin-inline: auto; }
.check-text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.check-preview { max-width: 36rem; margin: clamp(1.75rem, 4vw, 2.75rem) auto 0; }
.check-preview img { width: 100%; border-radius: 4px; box-shadow: 0 18px 40px var(--shade-card); }   /* white paper on the dark ground: its own edge */

/* What's in the check: the list, the count line under it, the quote beside it on wide screens */
.check-inside { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 901px) { .check-inside { grid-template-columns: minmax(0, 44rem) minmax(0, 18rem); gap: 2.5rem; } }
.check-count { color: var(--fg-2); }
.check-quote { margin: 1.5rem 0; padding-left: 1rem; border-left: 2px solid var(--accent); }
.check-inside .check-quote { margin: 0; }
.check-quote blockquote { margin: 0; }
.check-quote blockquote p { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; color: var(--fg); }
.check-quote figcaption { margin-top: 0.3rem; font-size: 0.9rem; color: var(--fg-2); }

/* The check: three pages, each a ruled block in one reading column */
.check-head .check-sub { font-weight: 600; color: var(--fg); }
.check-head .btn-ghost { margin-top: 0.4rem; }
.check-page { max-width: 46rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.check-page h3 { font-size: 1.5rem; }   /* Instrument Sans, as every h3: Fraunces stays on H1/H2 */
.check-page h4 { margin-top: 1.75rem; }

/* A tick row: the empty label is laid over the whole row (out of the grid flow), so a click anywhere ticks the box;
   the box keeps the native control and the statement is its accessible name. */
.check-list { list-style: none; margin: 0.5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.check-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.85rem; align-items: start;
  padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--rule); transition: background-color 150ms ease; }
.check-item input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--bronze); }
.check-hit { position: absolute; inset: 0; cursor: pointer; }
.check-item:hover { background: var(--card-hover); }
.check-item:has(input:checked) { background: var(--parchment); }
.check-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.check-item b { white-space: nowrap; }

/* The running tally, the result button and the result itself, above the score table */
.check-score { display: grid; gap: 1rem; margin: 1.75rem 0 1.5rem; padding: 1.25rem; border: 1px solid var(--rule); border-top: 3px solid var(--gold); }
.check-score > * { margin: 0; }
.check-tally { font-weight: 600; font-size: 1.125rem; }
.check-tally output { font-variant-numeric: tabular-nums; }
.check-tally span { white-space: nowrap; }   /* each count stays beside its label on phones */
.check-result { padding: 1rem 1.25rem; background: var(--parchment); border-left: 3px solid var(--accent); }
.check-result:focus { outline: none; }
.check-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.check-result .check-band { font-weight: 600; font-size: 1.25rem; line-height: 1.25; color: var(--fg); }
.check-result p + p { margin-top: 0.75rem; }

/* Score table and worksheet */
.check-table { width: 100%; border-collapse: collapse; font-size: 0.975rem; line-height: 1.45; }
.check-table th, .check-table td { padding: 0.6rem 0.75rem 0.6rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.check-table th { font-weight: 600; color: var(--fg); border-bottom-color: var(--fg-3); }
.check-sheet { margin: 1rem 0 1.25rem; }
.check-sheet td:first-child { width: 2.75rem; font-variant-numeric: tabular-nums; }
.check-sheet td:last-child { width: 9rem; padding-right: 0; }
.check-sheet output { display: inline-block; padding-top: 0.55rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.check-money { display: flex; align-items: baseline; gap: 0.3rem; }
.check-sheet input, .check-handoff input {
  width: 100%; min-width: 0; min-height: 2.75rem; padding: 0.4rem 0.6rem; font: inherit; font-size: 1rem;
  color: var(--fg); background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px;
}
.check-sheet input:focus-visible, .check-handoff input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check-sheet input:user-invalid { border-color: var(--err); }
.check-handoff { display: grid; gap: 0.4rem; max-width: none; }
.check-fixes { padding-left: 1.4rem; }
.check-fixes li { margin-bottom: 0.75rem; }
.check-send a { font-weight: 600; }
.check-print-foot { display: none; }

/* Script-only controls: Print, Show my result and the form opener do nothing without scripting, so they hide. The
   enquiry card waits closed (chrysis.js moves it into the dialog); without scripting it stays here, inline. */
@media (scripting: none) { .check-js { display: none; } }
@media (scripting: enabled) { #start > .container > #leadForm { display: none; } }
#start > .container > #leadForm .lead-sub { display: none; }   /* inline, the #start intro above says it; in the dialog it shows (t_097cea5d) */
#start #leadForm { max-width: 32rem; }
#leadForm textarea { min-height: 7rem; }   /* the worked example placeholder reads whole, in the dialog too */
#start .enquiry-cta { margin-top: 0.25rem; }

@media (max-width: 600px) {
  .check-table { font-size: 0.9375rem; }
  .check-table th, .check-table td { padding-right: 0.6rem; }
  #page-1 .check-table td:first-child { width: 5.5rem; font-weight: 600; }
  .check-sheet td:first-child { width: 2rem; }
  .check-sheet td:last-child { width: 6.5rem; }
  .check-item { padding-inline: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) { .check-item { transition: none; } }

/* Print: pages 1 to 3 of the check on white, nothing else. Ticks, typed numbers and the tally print as they stand;
   empty fields print as lines to write on. */
@media print {
  @page { size: letter; margin: 0.55in 0.6in; }
  html, body, main { background: var(--paper); color: var(--ink); }
  body { font-size: 9.5pt; line-height: 1.35; }
  body > :not(main), main > :not(#check), .check-js, .check-result { display: none !important; }
  #check { padding: 0; }
  #check .container { width: auto; }
  #check .stage-head { margin-bottom: 0.6rem; }
  #check .stage-head h2 { font-size: 18pt; margin-bottom: 0.15rem; color: var(--ink); }
  #check .sigil { display: none; }
  #check p, #check .stage-intro, #check .check-sub { max-width: none; color: var(--ink); margin-bottom: 0.35rem; }
  #check .prose { max-width: none; }
  .check-page { max-width: none; margin: 0.7rem 0 0; padding: 0; border: 0; }
  #page-2, #page-3 { break-before: page; margin-top: 0; }
  .check-page h3 { font-size: 15pt; margin-bottom: 0.35rem; }
  .check-page h4 { font-size: 10.5pt; margin: 0.6rem 0 0.15rem; break-after: avoid; }
  .check-groups { columns: 2; column-gap: 0.35in; }   /* A and B beside C and D: page 1 fits one sheet */
  .check-groups h4:first-child { margin-top: 0; }
  .check-list { margin: 0 0 0.5rem; border-top-color: var(--line); break-inside: avoid; }
  .check-item { padding: 0.12rem 0; gap: 0.45rem; border-bottom-color: var(--line); break-inside: avoid; transition: none; }
  .check-item:has(input:checked) { background: none; }
  .check-item input { width: 0.9rem; height: 0.9rem; margin-top: 0.12rem; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .check-hit { display: none; }
  .check-score { margin: 0.5rem 0; padding: 0.4rem 0.7rem; border: 1px solid var(--ink); break-inside: avoid; }
  .check-tally { font-size: 11pt; }
  .check-table { font-size: 9pt; line-height: 1.28; }
  .check-table th, .check-table td { padding: 0.2rem 0.5rem 0.2rem 0; border-bottom-color: var(--line); }
  .check-table tr { break-inside: avoid; }
  .check-sheet input, .check-handoff input { min-height: 0; padding: 0.1rem 0.2rem; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; }
  .check-sheet output { padding-top: 0.1rem; }
  .check-quote { margin: 0.6rem 0; border-left-color: var(--ink); break-inside: avoid; }
  .check-quote blockquote p { font-size: 11pt; color: var(--ink); }
  .check-quote figcaption { color: var(--ink-2); }
  #check a { color: inherit; text-decoration: none; }
  .check-print-foot { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-top: 1rem; padding-top: 0.4rem; border-top: 1px solid var(--line); font-size: 9pt; }
}
