/* /secret-santa-vs-white-elephant only. Loaded after styles/site.css; use its tokens (var(--ink), var(--tag), ...). Empty files are not linked. See docs/WRITERS.md. */

/* The comparison table. Wide screens: a table with the game names as a
   column of labels. Phones: each game becomes a card of labelled lines, so
   nothing scrolls sideways. */
.vs-table tbody th { white-space: nowrap; font-family: var(--serif); font-size: 1.05rem; }
.vs-table th, .vs-table td { overflow-wrap: normal; word-break: normal; }
/* Wide screens: the six columns get more room than the text column. */
@media (min-width: 900px) {
  .vs-answer .table-wrap { margin-left: calc((100% - min(60rem, 100vw - 32px)) / 2); margin-right: calc((100% - min(60rem, 100vw - 32px)) / 2); }
}
@media (max-width: 899px) {
  .vs-answer .table-wrap { overflow: visible; }
  .vs-table, .vs-table caption, .vs-table tbody, .vs-table tr, .vs-table th, .vs-table td { display: block; width: auto; }
  .page-body .vs-table { background: none; border: 0; }
  .vs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vs-table tbody tr {
    background: var(--tag); border: 1px solid var(--tag-edge); border-radius: 6px;
    box-shadow: 0 1px 0 var(--edge); margin: 0 0 12px; padding: 4px 0 6px;
  }
  .page-body .vs-table tbody th { border-bottom: 1px solid var(--line-strong); font-size: 1.2rem; padding: 10px 14px 8px; }
  .page-body .vs-table td { border-bottom: 1px solid var(--rule); padding: 7px 14px 8px; }
  .page-body .vs-table tr td:last-child { border-bottom: 0; }
  .vs-table td::before {
    content: attr(data-label); display: block;
    color: var(--muted); font-size: 0.82rem; letter-spacing: 0.06em; font-variant-caps: all-small-caps; font-weight: 600;
  }
}
.vs-src { margin: 0; }

/* The picker: a card with three short questions and the answer under them. */
.vs-picker {
  margin: 22px 0 0;
  background: var(--tag); color: var(--ink);
  border: 1px solid var(--tag-edge); border-radius: 6px;
  box-shadow: 0 1px 0 var(--edge), 0 14px 22px -18px var(--shadow);
  padding: 16px;
}
@media (min-width: 560px) { .vs-picker { padding: 20px 24px; } }
.vs-picker-t { font: 600 1.3rem/1.2 var(--serif); margin: 0 0 0.6rem; }
.vs-q { border: 0; margin: 0 0 0.6rem; padding: 0; min-width: 0; }
.vs-q legend { font-weight: 600; padding: 0; margin: 0 0 0.3rem; }
.vs-q { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.vs-q legend { flex: 1 1 100%; }
.vs-opt {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  min-height: 44px; padding: 6px 14px 6px 10px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: var(--field); font-weight: 500; cursor: pointer;
}
.vs-opt:hover { border-color: var(--ink); }
.vs-opt input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); flex: none; }
.vs-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.vs-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.vs-result { border-top: 1px dashed var(--rule); margin-top: 0.8rem; padding-top: 0.8rem; }
.vs-result p { margin: 0 0 0.5rem; }
.vs-verdict { font: 600 1.25rem/1.25 var(--serif); color: var(--cran); }
.vs-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.75rem !important; }
.vs-go .button:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vs-go .button:first-child:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.vs-nojs { display: none; }
@media (scripting: none) {
  .vs-picker { display: none; }
  .vs-nojs { display: block; margin-top: 1rem; }
}
