/* ---------- Who wins? (on the match, race and team pages; docs/design/who-wins/who-wins.css; box: _includes/who-wins.njk, js/who-wins.js) ---------- */
.ww { display: grid; gap: 14px; padding: 18px 20px 16px; border-radius: 16px; background: #FFFFFF; color: var(--ink); text-align: left; box-shadow: 0 0 0 1px var(--line); }
.ww[hidden] { display: none; }
.on-dark .ww { box-shadow: 0 18px 44px -20px rgba(3,6,25,0.55); }
.ww-hero { max-width: 640px; margin: 22px auto 0; }
.ww-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.ww-t { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 800; font-stretch: 112%; color: var(--ink); }
.ww-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--steel); }
.ww-opts { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ww-opts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ww-o { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; min-height: 92px; padding: 12px 8px 16px; border-radius: 12px; border: 1.5px solid #AEB5C7; background: #FFFFFF; color: var(--ink); font: inherit; text-align: center; cursor: pointer; overflow: hidden; }
.ww-o:hover { border-color: var(--blue); }
.ww-o[disabled] { cursor: default; }
.ww-o[disabled]:hover { border-color: #AEB5C7; }
.ww-o img, .ww-eq, .ww-av { width: 32px; height: 32px; flex: none; }
.ww-o img { object-fit: contain; }
.ww-eq { display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--steel); }
.ww-eq i { display: block; width: 14px; height: 2.5px; border-radius: 2px; background: currentColor; box-shadow: 0 6px 0 currentColor; transform: translateY(-3px); }
.ww-av { display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }
.ww-o b { font-size: 15px; line-height: 1.2; font-weight: 750; overflow-wrap: anywhere; }
.ww-o[aria-checked="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--blue-soft); }
.ww-tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #FFFFFF; }
.ww-tick .ic { width: 12px; height: 12px; stroke-width: 3; }
.ww-pct { font-size: 24px; line-height: 1; font-stretch: 72%; font-weight: 800; font-variant-numeric: tabular-nums; }
.ww-pct small { font-size: 14px; font-weight: 700; }
.ww-bar { position: absolute; left: 0; bottom: 0; height: 6px; background: #C9CFDF; border-radius: 0 3px 0 0; }
.ww-o[aria-checked="true"] .ww-bar { background: var(--blue); }
.ww-res { position: absolute; top: 8px; left: 8px; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.ww-foot { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; line-height: 1.45; color: var(--steel); }
.ww-foot:empty { display: none; }
.ww-out { margin: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper); font-size: 15px; line-height: 1.4; }
.ww-out[hidden] { display: none; }
.ww-out .ic { flex: none; }
.ww-out.ok { background: #E3F4EE; color: #0B5A3F; }
.ww-out.no { background: var(--paper); color: var(--ink); }
.ww-out.ww-first { background: var(--blue-soft); color: var(--blue-deep); font-size: 14.5px; font-weight: 650; }
/* A race: one row per horse (not in the design, which had no pick for races; owner 2026-10-19). */
.ww-opts.ww-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.ww-list .ww-o { min-height: 52px; grid-template-columns: minmax(0, 1fr) auto; justify-items: start; align-items: center; padding: 10px 36px 12px 12px; text-align: left; }
.ww-list .ww-res { position: static; grid-column: 1 / -1; order: -1; }
@media (max-width: 719px) {
  .ww { padding: 16px 14px 14px; }
  .ww-t { font-size: 17.5px; }
  .ww-o { min-height: 86px; padding: 10px 6px 14px; }
  .ww-o b { font-size: 14px; }
  .ww-pct { font-size: 22px; }
  .ww-hero { margin-top: 18px; }
  .ww-o:has(.ww-res) { padding-top: 32px; } /* the Result tag clears the crest */
  .ww-list .ww-o:has(.ww-res) { padding-top: 10px; }
  .ww-list .ww-o { min-height: 52px; padding: 10px 36px 12px 12px; }
}
/* Compact (Team page's next-match card, My teams): the same parts without the card frame, smaller buttons. */
.ww.ww-c { padding: 0; gap: 10px; border-radius: 0; box-shadow: none; background: transparent; }
.ww-c .ww-t { font-size: 16px; }
.ww-c .ww-note { font-size: 13px; }
.ww-c .ww-o { min-height: 70px; padding: 10px 6px 12px; gap: 4px; }
.ww-c .ww-o img, .ww-c .ww-eq, .ww-c .ww-av { width: 24px; height: 24px; }
.ww-c .ww-o b { font-size: 14px; }
.ww-c .ww-pct { font-size: 20px; }
.ww-c .ww-foot { font-size: 13px; }
.ww-c .ww-out { font-size: 14px; padding: 8px 10px; }
@media (max-width: 719px) { .ww-c .ww-o { min-height: 66px; padding: 10px 4px 12px; } .ww-c .ww-o b { font-size: 13px; overflow-wrap: break-word; hyphens: auto; } .ww-c .ww-o:has(.ww-res) { padding-top: 30px; } }
