/* Up / Down (dashboard/updown.js): rows of prices per $1, prediction-market style. The page's tokens (human.css,
   theme.css); Up / Yes in the up colour, Down / No in the down colour, the picked cell tinted as the direction picker
   is. Nothing animates. */
.updown .udtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.updown .udh { margin: 0; font-size: 15px; font-weight: 600; color: var(--fg); }
.updown .udpx { font-size: 13px; color: var(--fg2); }
.updown .udlen { height: 32px; margin-bottom: 12px; }
.updown .udlen button { font-size: 12px; }
.updown .udgrid, .updown .udreach { display: flex; flex-direction: column; }
.updown .udreach { margin-top: 14px; }
.updown .udhd, .updown .udrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px; gap: 6px; align-items: center; }
.updown .udhd { padding: 0 0 6px; font-size: 12px; color: var(--fg3); border-bottom: 1px solid var(--line); }
.updown .udhd span:not(:first-child) { text-align: center; }
.updown .udrow { padding: 4px 0; border-bottom: 1px solid var(--line); }
.updown .udrow:last-child { border-bottom: 0; }
.updown .udrow.atm { padding: 6px 0; }
.updown .udl { font-size: 13px; line-height: 1.3; color: var(--fg1); min-width: 0; overflow-wrap: anywhere; }
.updown .udrow.atm .udl { color: var(--fg); font-weight: 510; display: flex; flex-direction: column; gap: 1px; }
.updown .udl small { font-size: 11px; font-weight: 400; color: var(--fg3); }
/* each row's chance (Kalshi style): what the Up / Yes and Down / No prices imply, the row's one big number */
.updown .udrow .udl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.updown .udrow.atm .udl { flex-direction: row; align-items: center; }
.updown .udl .udq { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.updown .udl .udpct { flex: none; font-size: 15px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.updown .udhd .udhc { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.updown .udhd .udhc > span:first-child { min-width: 0; }
.updown .udc { height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; background: var(--chip); font: inherit; font-size: 13px; font-weight: 510; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color var(--ease), color var(--ease), box-shadow var(--ease); }
.updown .udc .udcl { font-size: 12px; font-weight: 510; }
.updown .udc .udcp { font-weight: 600; }
/* an unpicked price reads in ink with only its Up / Down word in the side's colour, so the Down column is not a wall
   of red cents; the picked one fills in its side's colour */
.updown .udc.u, .updown .udc.d { color: var(--fg1); }
.updown .udc.u .udcl { color: color-mix(in srgb, var(--up) 75%, var(--fg2)); }
.updown .udc.d .udcl { color: color-mix(in srgb, var(--down) 75%, var(--fg2)); }
.updown .udc.on .udcl { color: inherit; }
@media (hover: hover) { .updown .udc.u:hover { background: var(--chip2); color: var(--up); } }
@media (hover: hover) { .updown .udc.d:hover { background: var(--chip2); color: var(--down); } }
.updown .udc.u.on { background: color-mix(in srgb, var(--up) 26%, var(--panel)); color: var(--up); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 45%, transparent); }
.updown .udc.d.on { background: color-mix(in srgb, var(--down) 26%, var(--panel)); color: var(--down); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 45%, transparent); }
.updown .udc:disabled { color: var(--fg3); background: transparent; box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.updown .udc:focus-visible { outline: 2px solid var(--fg3); outline-offset: 1px; }
.updown .udnone { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--fg3); }
/* the amount and the one button stay on screen while the rows scroll (as the old ticket's ask row did) */
.updown .udbuy { position: sticky; bottom: 0; z-index: 2; margin-top: 16px; padding: 14px 0 12px; border-top: 1px solid var(--line); background: var(--bg); }
.updown .udamt .flab { display: block; margin-bottom: 6px; }
.updown .udsz { display: flex; gap: 6px; align-items: center; }
.updown .udsz .amt { flex: 1 1 auto; }
.updown .udsz .amt input { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--fg); font: inherit; font-size: 15px; outline: none; padding: 0 8px 0 4px; }
.updown .udchips { display: flex; gap: 6px; }
.updown .chipb { flex: 0 0 auto; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r); background: var(--chip); color: var(--fg1); font-size: 13px; font-weight: 510; cursor: pointer; transition: background-color var(--ease), color var(--ease); }
@media (hover: hover) { .updown .chipb:hover { background: var(--chip2); } }
.updown .chipb.on { background: var(--chip3); color: var(--fg); }
.updown .udsum { margin: 12px 0 10px; min-height: 36px; font-size: 13px; line-height: 1.45; color: var(--fg2); }
.updown .udsum > span { display: block; }
.updown .udsum .udw { color: var(--fg1); }
.updown .udsum b { color: var(--fg); font-weight: 600; }
.updown .udsum .up { color: var(--up); }
.updown .udgo { width: 100%; }
/* the payoff, a clear number under the button: "Pays $9.80 if right" */
.updown .udpay { margin: 8px 0 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--fg2); }
.updown .udpay:empty { display: none; }
.updown .udpay b { font-size: 17px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.updown .udpay .up { color: var(--up); font-variant-numeric: tabular-nums; }
/* a length makers can't price: the reason, in plain words */
.updown .udwhy { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--fg1); }
/* the one quiet line under the card ("Zero fees · How pricing works") and what its link opens */
.updown .udfine { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--fg3); }
.updown .udfee:not([hidden])::after { content: "\00a0\00b7\00a0"; }
.updown .udhowb { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.updown .udhow[hidden] { display: none; }
/* a side no maker prices: quiet words, nothing to tap */
.updown .udc.none .udcn { font-size: 12px; font-weight: 400; color: var(--fg3); }
.updown .udsum .udx { color: var(--fg2); }
.updown .udmsg { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--fg1); }
.updown .udmsg:empty { display: none; }
.updown .udmsg.bad { color: var(--down); }
/* phones: 44px taps, the amount and its chips on one row */
@media (max-width: 700px) {
  .updown .udhd, .updown .udrow { grid-template-columns: minmax(0, 1fr) 78px 78px; }
  .updown .udc { height: 44px; }
  /* the lengths: one row that scrolls sideways, every chip a 44px tap with its words on one line (nine chips had
     shrunk to 30×38 at 320 and "5 min" wrapped) */
  .updown .udlen { height: auto; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .updown .udlen::-webkit-scrollbar { display: none; }
  .updown .udlen button { flex: 0 0 auto; min-width: 52px; min-height: 44px; padding: 0 12px; white-space: nowrap; }
  .updown .udsz { gap: 4px; }
  .updown .udsz .amt { flex: 1 1 64px; min-width: 64px; height: 44px; }
  .updown .chipb { min-width: 46px; padding: 0 6px; height: 44px; }
  .updown .udchips { gap: 4px; }
  .updown .udgo { height: 48px; }
  /* the sticky block stays small on a phone: no label over the amount, the summary in two short lines */
  .updown .udbuy { padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); margin-top: 12px; }
  .updown .udamt .flab { display: none; }
  .updown .udsum { min-height: 0; margin: 6px 0; font-size: 12px; line-height: 1.35; }
}
