/* Help (views/help.js, 16.11.2026): the front's tiles, a topic's head and chips, and the examples drawn with the app's
   own pieces: tickets (bets.css), price keys, roundels and saddlecloths (board.css), pills, figure strips and the
   segmented control (styles.css), the "i" bubble (account.css). Only what those pieces lack is here, in their tokens.
   Linked after messages.css. Gold stays the player's own: nothing in an example is gold. Last, the link the slip's
   bet type tooltip, the bet builder's "i" and in-play's carry into Help. */

.help { display: grid; gap: 14px; min-width: 0; padding: 0 0 24px; }
.help.is-topic { padding-top: 16px; }
.hp-top { padding-bottom: 0; }
.hp-group-tiles { display: grid; min-width: 0; }
.hp-group-tiles .section-title { margin-top: 10px; }

/* The front: a tile a topic, its mark beside its name, a figure under it where it has one. Two to a row on a phone. */
.hp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hp-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; height: 100%; padding: 10px 12px; border-radius: var(--radius-inner); background: var(--surface); color: var(--text); transition: background-color .16s, transform .12s ease-out; }
.hp-tile:hover { background: var(--surface-2); }
.hp-tile:active { transform: scale(.98); }
.hp-tile-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.hp-tile-text { display: grid; gap: 1px; min-width: 0; }
.hp-tile-name { font-size: calc(15px * var(--type)); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.hp-tile-sub { font-size: calc(13px * var(--type)); font-weight: 500; color: var(--muted); }
.hp-tile-pic .ico { width: 28px; height: 28px; }
.hp-tile-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.hp-tile-ico .ico { width: 20px; height: 20px; }
/* A bet type's selections as the slip's leg stack, in ink (an example is nobody's own), kept to the mark's 40px. */
.hp-tile-stack { width: 40px; justify-content: center; gap: 2px; }
.hp-tile-stack > i, .hp-tile-stack:has(> i:nth-child(6)) > i, .hp-tile-stack:has(> i:nth-child(8)) > i { flex: 0 1 12px; width: auto; min-width: 2px; background: var(--text); }
/* A forecast's first two places, side by side in the mark's 40px. */
.hp-tile-places { display: inline-flex; gap: 2px; }
.hp-tile-places .place-disc { width: 19px; height: 19px; font-size: calc(12px * var(--type)); }
.hp-tile .chip-bog { min-height: 26px; }
@media (min-width: 640px) { .hp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* A topic's head: back to the front, a sport's picture, the title, then its "i" and the terms; its pills under it. */
.hp-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; min-width: 0; }
.hp-head > .hp-back { margin-left: -8px; }
.hp-head:not(:has(.hp-mark)) { grid-template-columns: auto minmax(0, 1fr) auto; }
.hp-mark { width: calc(44px * var(--type)); height: calc(44px * var(--type)); }
.hp-mark .ico { width: calc(28px * var(--type)); height: calc(28px * var(--type)); }
.hp-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: calc(30px * var(--type)); line-height: 1.05; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.hp-title:focus { outline: 0; }
.hp-end { display: flex; align-items: center; gap: 0; }
.hp-pills { margin-top: -4px; }
.hp-pills .pill { min-height: 28px; }
.hp-tip { margin: -4px 0 0; }
/* The head's bubble points up at its "i", the first of the head's two icons at its end. */
.help > .hp-tip::before { right: 54px; }
.hp-chips.sports { padding-top: 0; }
.hp-body { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 1024px) {
  .help.is-topic { max-width: calc(760px * var(--type)); }
}

/* A card's body under its head, as a market's card holds its prices. */
.hp-card { padding-bottom: 14px; }
.hp-card-head { padding-left: 16px; }
.hp-card-name { padding: 12px 0; }
.hp-card .acct-tip { margin: 0 12px 10px; }
.hp-card-body { display: grid; gap: 10px; min-width: 0; padding: 0 16px; }

/* A selection's result: its mark and its state, a tap to change it. */
.hp-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--surface); color: var(--text); transition: background-color .16s, transform .12s ease-out; }
.hp-pick:hover { background: var(--surface-2); }
.hp-pick:active { transform: scale(.96); }
.hp-pick .leg-mark { display: grid; place-items: center; }
.hp-pick .cloth, .hp-cols .cloth { width: 26px; height: 26px; border-radius: 8px; font-size: calc(12px * var(--type)); }
.hp-pick .leg-state { width: 20px; }
.hp-pick.is-lost .leg-mark { opacity: .72; }
.hp-pick.is-void .leg-mark { opacity: .55; }

/* A bet type's bets: a column a selection, its mark at the head; a row a bet, a slanted bar (the logo's, as a ticket's
   leg stack) where the bet is on a selection, in that selection's state; what the bet paid at the end. */
.hp-lines { padding: 10px 14px 12px; gap: 2px; }
.hp-cols, .hp-row { display: grid; grid-template-columns: minmax(0, 1fr) calc(76px * var(--type)); align-items: center; column-gap: 10px; }
.hp-cells { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); align-items: center; justify-items: center; column-gap: 4px; }
.hp-cols { padding-bottom: 6px; }
.hp-cols .leg-mark { display: grid; place-items: center; }
.hp-row { min-height: 30px; }
.hp-row + .hp-row { box-shadow: inset 0 1px var(--line); }
.hp-cells > i { display: block; width: min(18px, 100%); height: 8px; border-radius: 1px; transform: skewX(calc(var(--lean) * -1)); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.hp-cells > i:not(.is-in) { width: 4px; height: 4px; border-radius: 50%; transform: none; box-shadow: none; background: var(--line-strong); }
.hp-cells > i.is-won { background: var(--text); box-shadow: none; }
.hp-cells > i.is-placed { background: var(--placed); box-shadow: none; }
.hp-cells > i.is-lost { background: var(--loss); box-shadow: none; }
.hp-cells > i.is-void { background: var(--void); box-shadow: none; }
.hp-paid { justify-self: end; font-size: calc(14px * var(--type)); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-row.is-lost .hp-paid { font-weight: 500; }
.hp-group { display: grid; padding-top: 6px; }
.hp-group + .hp-group { margin-top: 4px; box-shadow: inset 0 1px var(--line-strong); }
.hp-group-head { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: calc(14px * var(--type)); font-weight: 700; }
.hp-group-head .hp-paid { margin-left: auto; }
.hp-group-name { min-width: 0; }
.hp-fold { width: 100%; min-height: 44px; text-align: left; color: var(--text); }
.hp-fold .ico { flex: none; width: 16px; height: 16px; color: var(--muted); }
.hp-count { flex: none; }

/* Price keys in a line on a card, as the Board's prices sit on theirs, with what they make: an accumulator's prices
   multiplied. */
.hp-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; padding: 12px; border-radius: var(--radius); background: var(--surface); }
.hp-key { min-width: calc(60px * var(--type)); padding: 6px 10px; cursor: default; }
.hp-op { font-size: calc(17px * var(--type)); font-weight: 600; color: var(--muted); }
@media (max-width: 420px) {
  .hp-key { min-width: 0; padding: 6px 6px; }
  .hp-keys { gap: 4px; }
}

/* Figures in a strip, as the statement's: two to a row at every width (help.css comes after styles.css). */
.hp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Tickets side by side where there is room: each way's two parts. An example's notes wrap, so a dead heat's or a Rule
   4's reason is read whole on a phone. */
.hp-tickets { min-width: 0; }
.hp-tickets .leg-note { white-space: normal; }
/* Figures at a card's foot, as a ticket's stub sets them. */
.hp-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; box-shadow: inset 0 1px var(--line); }
.hp-foot dt { font-size: calc(12px * var(--type)); font-weight: 500; color: var(--faint); }
.hp-foot dd { margin-top: 1px; font-size: calc(16px * var(--type)); font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-foot > div:last-child { text-align: right; }
.hp-pair { display: grid; gap: 10px; }
.hp-part { display: grid; gap: 6px; min-width: 0; }
.hp-part-name { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 640px) {
  .hp-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-pair .tickets { grid-template-columns: 1fr; }
}

/* The places a race pays: each place's roundel, those that pay ringed, the horse's saddlecloth under its own. */
.hp-finish { display: flex; gap: 8px; }
.hp-slot { display: grid; justify-items: center; gap: 6px; }
.hp-slot .cloth { width: 26px; height: 26px; border-radius: 8px; font-size: calc(12px * var(--type)); }
.hp-cloth-gap { display: block; width: 26px; height: 26px; }
.hp-terms { display: grid; }
.hp-terms-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 44px; }
.hp-terms-row + .hp-terms-row { box-shadow: inset 0 1px var(--line); }
.hp-terms-label { font-size: calc(14px * var(--type)); font-weight: 600; }
.hp-discs { display: inline-flex; gap: 4px; }
.hp-discs .place-disc, .hp-place .place-disc, .hp-post .place-disc { width: 24px; height: 24px; font-size: calc(12px * var(--type)); }
.hp-discs.is-row { padding: 2px 0; }

/* Rule 4's bar: the deduction in pence in the pound, then what the bet would have paid, its amount in ink, the
   winnings in the win colour and the deduction cut from them, struck in the lost colour; with a key under it. */
.hp-bar-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.hp-figure { font-size: calc(15px * var(--type)); color: var(--muted); }
.hp-figure b { font-size: calc(28px * var(--type)); font-weight: 700; letter-spacing: -0.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.hp-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.hp-bar > i { flex: var(--w, 1) 1 0; min-width: 2px; }
.hp-bar .is-amount { background: var(--text); }
.hp-bar .is-winnings { background: var(--win); }
.hp-bar .is-taken { background: repeating-linear-gradient(135deg, var(--loss) 0 3px, var(--surface-2) 3px 6px); }
.hp-bar.is-mini { width: 40px; height: 10px; border-radius: 3px; }
.hp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hp-key-item { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--type)); color: var(--muted); }
.hp-key-item b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-key-item i { display: block; width: 12px; height: 12px; border-radius: 3px; }
.hp-key-item .is-amount { background: var(--text); }
.hp-key-item .is-winnings { background: var(--win); }
.hp-key-item .is-taken { background: repeating-linear-gradient(135deg, var(--loss) 0 3px, var(--surface-2) 3px 6px); }

/* The Rule 4 scale: a row a band, its prices, a bar as long as its deduction, the pence; the band chosen in ink. */
.hp-scale { display: grid; gap: 2px; }
.hp-scale-row { display: grid; grid-template-columns: calc(112px * var(--type)) minmax(0, 1fr) calc(36px * var(--type)); align-items: center; gap: 10px; min-height: 28px; color: var(--muted); font-size: calc(13px * var(--type)); }
.hp-scale-price { white-space: nowrap; }
.hp-scale-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.hp-scale-bar > i { display: block; width: calc(var(--w, 0) * 100%); height: 100%; border-radius: 3px; background: var(--faint); }
.hp-scale-pence { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hp-scale-row.is-on { color: var(--text); font-weight: 700; }
.hp-scale-row.is-on .hp-scale-bar > i { background: var(--text); }

/* Best odds: the two prices side by side, the bigger ringed in ink, each with what it pays under it. */
.hp-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hp-side { display: grid; justify-items: stretch; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--surface); }
.hp-side .hp-key { min-height: 60px; }
.hp-side-paid { justify-self: center; font-size: calc(17px * var(--type)); font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-side-paid:not(.is-up) { color: var(--muted); font-weight: 600; }

/* Choices in a row, under their label: the segmented control, scrolling in its own row when wider than a phone. */
.hp-choice-row { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.hp-choice { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hp-choice::-webkit-scrollbar { display: none; }
.hp-seg { flex: none; }

/* A match's time, a period as long as it runs: what a bet settles on in ink, the rest struck. */
.hp-time { display: flex; gap: 3px; min-width: 0; }
.hp-period { flex: var(--w, 1) 1 0; display: grid; place-items: center; min-width: max-content; min-height: 32px; padding: 0 6px; border-radius: 8px; background: var(--surface-2); color: var(--faint); font-size: calc(12px * var(--type)); font-weight: 600; text-decoration: line-through; white-space: nowrap; overflow: hidden; }
.hp-period > span { overflow: hidden; text-overflow: ellipsis; }
.hp-period.is-counted { background: var(--text); color: var(--surface); text-decoration: none; }
.hp-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-score { display: inline-flex; align-items: baseline; gap: 8px; min-height: 32px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--faint); font-size: calc(13px * var(--type)); font-weight: 600; text-decoration: line-through; }
.hp-score b { font-size: calc(15px * var(--type)); font-weight: 800; font-variant-numeric: tabular-nums; }
.hp-score.is-counted { color: var(--text); text-decoration: none; }

/* A rule's cases: what happened, then how it settles, in a ticket's own marks. */
.hp-cases { display: grid; }
.hp-case { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.hp-case + .hp-case { box-shadow: inset 0 1px var(--line); }
.hp-case-what { min-width: 0; font-size: calc(14px * var(--type)); font-weight: 600; }
.hp-muted { color: var(--muted); font-weight: 500; }
.hp-outcome { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: calc(13px * var(--type)); font-weight: 700; }
.hp-outcome.is-won { color: var(--text); }
.hp-outcome.is-lost { color: var(--loss-ink); }
.hp-outcome.is-void { color: var(--void); }
.hp-outcome.is-stands { color: var(--text); }
.hp-outcome .leg-state { width: 18px; color: inherit; }

/* A tennis match's sets, with where a retirement fell. */
.hp-retire { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.hp-sets { display: flex; flex: 1 1 auto; gap: 3px; min-width: 0; max-width: 260px; }
.hp-set { position: relative; flex: 1 1 0; display: grid; place-items: center; min-height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: calc(12px * var(--type)); font-weight: 600; }
.hp-set.is-first { background: var(--surface-3); color: var(--text); }
.hp-stop { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--text); color: var(--surface); }
.hp-stop.is-after { left: 100%; margin-left: -9px; z-index: 1; }
.hp-stop .ico { width: 13px; height: 13px; }
.hp-set:has(.hp-stop:not(.is-after)) > span:last-child { visibility: hidden; }

/* A dead heat at the post: the place and the two saddlecloths that share it; a golf leaderboard's tie. */
.hp-post { display: inline-flex; align-items: center; gap: 6px; }
.hp-post .cloth { width: 26px; height: 26px; border-radius: 8px; font-size: calc(12px * var(--type)); }
.hp-board { display: grid; }
.hp-board-row { display: grid; grid-template-columns: calc(40px * var(--type)) minmax(0, 1fr); align-items: center; min-height: 32px; font-size: calc(14px * var(--type)); }
.hp-board-row + .hp-board-row { box-shadow: inset 0 1px var(--line); }
.hp-board-pos { font-weight: 700; color: var(--muted); }
.hp-board-row.is-picked .hp-board-name { font-weight: 700; }
.hp-related { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-facts-row { padding-bottom: 2px; }
.hp-facts-row .pill .ico { width: 14px; height: 14px; }

/* A forecast's orders: the places with their saddlecloths, its mark and what it paid; the race's result above them. */
.hp-orders { display: grid; }
.hp-order { display: grid; grid-template-columns: minmax(0, 1fr) 22px calc(76px * var(--type)); align-items: center; gap: 8px; min-height: 40px; }
.hp-order + .hp-order { box-shadow: inset 0 1px var(--line); }
.hp-places { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-place { display: inline-flex; align-items: center; gap: 4px; }
.hp-place .cloth { width: 24px; height: 24px; border-radius: 7px; font-size: calc(12px * var(--type)); }
.hp-order.is-lost .hp-places { opacity: .72; }
.hp-result .placing { min-height: 32px; }
.hp-card .race-dividends > div { background: var(--surface-2); }

/* The bet builder (17.11.2026): the tab's strip, still, its bars in ink and its key at the end of its row (no "i" and no
   bin in an example); two prices side by side, as best odds' are, bare inside their card; the tab's barred and ticked
   keys on a line of their own; and the words a tap says, as the toast draws them, in place. */
.hp-builder .bb-bars > i { background: var(--text); }
.hp-builder .bb-end { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "bars meter key"; }
.hp-builder .bb-price { cursor: default; }
.hp-card .hp-side { padding: 0; background: none; }
.hp-side-sub { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; justify-self: center; font-size: calc(14px * var(--type)); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.hp-side-sub .hp-op { font-size: calc(14px * var(--type)); }
.toast.hp-toast { justify-self: start; max-width: 100%; animation: none; box-shadow: none; pointer-events: none; }

/* In-play (17.11.2026): the slip's Place button while the delay runs, Sending in ink on the quiet fill it has then; a
   match's state while suspended, as its page heads it; the two live scores with the bet between them. */
.hp-sending { display: grid; place-items: center; min-height: 56px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: calc(16px * var(--type)); font-weight: 700; }
.hp-ip-state { display: flex; align-items: center; gap: 8px; }
.hp-reads { align-items: center; }
.hp-reads .pill .ico { width: 14px; height: 14px; }

/* The link the slip's bet type tooltip carries into Help ("How a Yankee works"), in the bubble's own ink. */
.tip-link { display: flex; align-items: center; min-height: 44px; margin: 2px 0 -8px; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
