/* Play with friends (docs/adr/0081), in the hub's look on the paper
   (site.css, on games/house/paper.css): the facts as chips, how a table
   works in four steps, who plays with how many, and every table game in one
   table, a count bar each. Type keeps to the house's roles
   (docs/guide/design/tokens.md): Label for names and counts, Body for the
   table's cells, Note for its column heads and scale, Heading for each kind. */

.pwf .kicker { margin: 0 0 var(--s2); }
.pwf h1 { margin: 0 0 var(--s2); }
.pwf .lead { margin: 0 0 var(--s3); }
.pwf h2 { margin: var(--s5) 0 var(--s3); }

.pwf-facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.pwf-facts li { font-size: var(--t-note); font-weight: 600; line-height: 1.4; padding: 4px 12px; border: var(--field-edge); border-radius: 999px; background: var(--card); }

/* a real sequence, so numbered */
.pwf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.pwf-steps li { counter-increment: step; display: grid; gap: var(--s1); align-content: start; padding: var(--s3); background: var(--card); border: var(--edge); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.pwf-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: var(--s1); border-radius: 50%; background: var(--ink); color: var(--card); font-size: var(--t-note); font-weight: 700; }
.pwf-steps b { font-size: var(--t-label); }
.pwf-steps span { font-size: var(--t-note); line-height: 1.4; color: var(--ink-soft); }
@media (max-width: 900px) { .pwf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pwf-steps { grid-template-columns: 1fr; } }

.pwf-sizes { display: grid; gap: 12px; margin: 0; max-width: 52em; }
.pwf-sizes div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: var(--s1) var(--s3); align-items: baseline; }
.pwf-sizes dt { font-weight: 700; }
.pwf-sizes dd { margin: 0; }
@media (max-width: 640px) { .pwf-sizes div { grid-template-columns: 1fr; } }

.pwf-table { overflow-x: auto; padding: var(--s1) var(--s2) var(--s2); background: var(--card); border: var(--edge); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.pwf-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pwf-table th, .pwf-table td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: var(--edge); }
.pwf-table thead th { padding-top: 14px; padding-bottom: var(--s2); font-size: var(--t-note); font-weight: 600; color: var(--ink-soft); white-space: nowrap; border-bottom: 1px solid var(--ink); }
.pwf-table tbody tr:last-child > * { border-bottom: 0; }
.pwf-table tbody th { font-weight: 600; white-space: nowrap; }
.pwf-table tbody th a { text-decoration-color: var(--line); text-underline-offset: 4px; }
.pwf-table tbody th a:hover { text-decoration-color: currentColor; }
.pwf-table .pwf-kind th { padding: 26px 12px var(--s2); font: 400 var(--t-heading)/1.3 var(--display); white-space: normal; border-bottom: var(--field-edge); }
.pwf-table tbody:first-of-type .pwf-kind th { padding-top: var(--s3); }
.pwf-table .pwf-kind a { text-decoration-color: var(--line); text-underline-offset: 4px; }
.pwf-kind span { display: block; margin-top: 2px; font: 400 var(--t-note)/1.4 var(--font); color: var(--ink-soft); }
.pwf-n { font-weight: 600; white-space: nowrap; }
.pwf-yes { font-weight: 600; color: var(--good); }
.pwf-no, .pwf-len { color: var(--ink-soft); white-space: nowrap; }
.pwf-barcol { width: 34%; }
.pwf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the scale over the bars: 1, 6 and 12, set where the bars put them */
.pwf-scale { position: relative; display: block; height: 20px; min-width: 160px; }
.pwf-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.pwf-scale span:first-child { left: 0; transform: none; }
.pwf-scale span:last-child { right: 0; transform: none; }
.pwf-bar { position: relative; display: block; height: 12px; min-width: 160px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--paper-edge) 0 1px, transparent 1px calc(100% / 11)), var(--paper);
  box-shadow: inset 0 0 0 1px var(--paper-edge); }
.pwf-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--ink); }
.pwf-bar.one i { width: 12px !important; transform: translateX(-6px); }
.pwf-bar.more i { border-radius: 6px 0 0 6px; background: linear-gradient(90deg, var(--ink) 80%, color-mix(in srgb, var(--ink) 25%, transparent)); }
/* on a phone the counts say it, and the bars give their room to the names */
@media (max-width: 640px) {
  .pwf-table .pwf-barcol { display: none; }
  .pwf-table { padding: 0 var(--s1) var(--s1); }
  .pwf-table th, .pwf-table td { padding: 10px var(--s2); }
}

.pwf-qa { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.pwf-qa div { padding: 14px var(--s3); background: var(--card); border: var(--edge); border-radius: var(--radius); }
.pwf-qa dt { font-weight: 700; margin-bottom: var(--s1); }
.pwf-qa dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) { .pwf-qa { grid-template-columns: 1fr; } }
.pwf-more { margin: var(--s4) 0 0; }
