/* Omnibook human terminal, in the live terminal's look (docs/DESIGN-LANGUAGE.md): theme.css tokens on the ground,
   hairlines, the Omnibook teal for actions that do not trade, focus and live values; green/red for up/down, profit/loss
   and the buttons that place a bet. Nothing animates at rest; only 160ms colour transitions on hover and press. */
:root {
  --panel: var(--ob-panel);
  --raise: var(--ob-muted);
  --line: var(--ob-line);
  --line2: var(--ob-line-hi);
  --fg1: var(--ob-ink-2);
  --upBg: var(--ob-up-bg);
  --downBg: var(--ob-down-bg);
  --sec: rgba(250, 248, 240, 0.08);
  --sec2: rgba(250, 248, 240, 0.12);
  --chip: rgba(250, 248, 240, 0.06);
  --chip2: rgba(250, 248, 240, 0.10);
  --chip3: rgba(250, 248, 240, 0.14);
  --hdr: 48px;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--sans); font-feature-settings: "cv01", "ss03"; font-variant-numeric: lining-nums tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; font-feature-settings: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.num, .tn { font-variant-numeric: lining-nums tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.dim { color: var(--fg3); }
a { color: var(--fg2); text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--fg); } }
h2 { font-size: 13px; font-weight: 510; letter-spacing: 0; color: var(--fg); margin: 0; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
:focus-visible { outline: 3px solid var(--ob-focus); outline-offset: 0; }

/* ---------- top bar: dashboard/nav.css ---------- */

/* ---------- market switcher: a flat instrument bar; the selected market is the segment thumb ---------- */
.mkts { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mkts::-webkit-scrollbar { display: none; }
/* A strip wider than its row fades at the edge it overflows, with an arrow there (human.js mkEdges); a strip
   that fits has no fade */
.mkwrap { position: relative; }
.mkwrap.ovr .mkts { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); }
.mkwrap.ovl .mkts { -webkit-mask-image: linear-gradient(90deg, transparent 8px, #000 64px); mask-image: linear-gradient(90deg, transparent 8px, #000 64px); }
.mkwrap.ovl.ovr .mkts { -webkit-mask-image: linear-gradient(90deg, transparent 8px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 8px)); mask-image: linear-gradient(90deg, transparent 8px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 8px)); }
.mkar { position: absolute; top: 50%; z-index: 3; width: 28px; height: 28px; margin-top: -14px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--ob-popover); border: 0; border-radius: 50%; color: var(--fg1); box-shadow: var(--ob-shadow-pop); cursor: pointer; transition: color var(--ease), background-color var(--ease); }
@media (hover: hover) { .mkar:hover { color: var(--fg); } }
.mkar svg { width: 14px; height: 14px; }
.mkar.l { left: 8px; }
.mkar.r { right: 8px; }
.mkar[hidden] { display: none; }
.mk { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-width: 112px; max-width: 220px; min-height: 40px; padding: 4px 12px; background: transparent; border: 0; border-radius: 6px; cursor: pointer; text-align: left; transition: background-color var(--ease); }
@media (hover: hover) { .mk:hover { background: var(--ob-hover); } }
.mk.on { background: var(--ob-thumb); box-shadow: var(--ob-shadow-thumb); }
.mk .mn { font-size: 12px; line-height: 16px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mk.on .mn { color: var(--fg1); }
.mk .mp { display: flex; align-items: baseline; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--fg); white-space: nowrap; }
.mk .mc { font-size: 12px; font-weight: 510; color: var(--fg2); }
.mk .mc.up { color: var(--up); }
.mk .mc.down { color: var(--down); }
.mk .mx { font-size: 12px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.reqfor { margin: 0 0 6px; font-size: 12px; color: var(--fg2); overflow-wrap: anywhere; }

/* ---------- app layout ---------- */
.app { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--sidew, 440px); height: calc(100vh - var(--chrome, var(--hdr))); min-height: 560px; }
/* the divider between the chart and the trade panel: drag, arrow keys, double-click to reset (desktop and tablet) */
.split { position: absolute; top: 0; bottom: 0; right: var(--sidew, 440px); width: 12px; margin-right: -6px; z-index: 6; cursor: col-resize; touch-action: none; outline: 0; }
.split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: transparent; transition: background-color var(--ease); }
.split:focus-visible::after, body.dragging .split::after { background: var(--line2); }
@media (hover: hover) { .split:hover::after { background: var(--line2); } }
.split:focus-visible::after { background: var(--ob-focus); }
body.dragging, body.dragging * { cursor: col-resize !important; user-select: none !important; }
.chartcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 16px 8px 12px 20px; }
.side { border-left: 1px solid var(--line); min-width: 0; overflow-y: auto; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--ob-fill-hi) transparent; }

/* ---------- price block ---------- */
.pxblock { padding: 0 0 6px; } /* the block itself: tradekit.css, shared with the labs */
.pxblock .feed { margin-left: 6px; }
.pxblock .feed.quiet { color: var(--fg2); }
/* the Oracle page for this market: a quiet text link after the name (no pill, no underline) */
.pxblock .feed:empty { display: none; }
.pxblock .orl { margin-left: 0; padding: 0 2px; font-size: 12px; color: var(--fg3); text-decoration: none; }
@media (hover: hover) { .pxblock .orl:hover { color: var(--fg); } }
.pxblock .orl::before { content: "·"; margin-right: 6px; color: var(--fg3); }
@media (max-width: 640px) { .pxblock .orl { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; padding: 0 6px; } }

.chartwrap { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 320px; margin-top: 8px; container-type: inline-size; }
/* a narrow chart column: the three steps stack (no 60px-wide columns of text) */
@container intro (max-width: 520px) { .intro .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
/* the canvas takes the room the first-run steps leave (flex-basis 0 and min-height 0: its own pixel size never feeds back) */
#chart { position: relative; flex: 1 1 0; min-height: 0; width: 100%; display: block; }
/* first run: three steps under the range tabs, outside #chartwrap (the chart keeps its full height at every size),
   once per browser, no animation. A quiet card on the ground: radius 10, a hairline ring */
.intro { container: intro / inline-size; position: static; flex: none; margin: 16px 0 0; background: var(--ob-card); border: 0; border-radius: var(--ob-r-card); padding: 12px 16px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.introh { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.introh b { font-weight: 600; color: var(--fg); }
.introx { height: 32px; padding: 0 14px; background: var(--cyan); color: var(--ob-on-brand); border: 0; border-radius: 6px; font-size: 13px; font-weight: 510; cursor: pointer; flex: 0 0 auto; transition: filter var(--ease); }
@media (hover: hover) { .introx:hover { filter: brightness(1.06); } }
.introx:active { filter: brightness(.94); }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { display: flex; gap: 10px; min-width: 0; }
.steps .sn { flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--ob-fill); color: var(--fg1); font-size: 12px; font-weight: 510; display: inline-flex; align-items: center; justify-content: center; }
.steps b { display: block; font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.3; }
.steps li > div > span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--fg1); }
.tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; background: var(--ob-material); -webkit-backdrop-filter: var(--ob-material-blur); backdrop-filter: var(--ob-material-blur); border: 0; border-radius: 6px; padding: 7px 10px; font-size: 12px; line-height: 1.45; color: var(--fg1); white-space: nowrap; box-shadow: var(--ob-shadow-pop); }
.tip b { color: var(--fg); font-weight: 600; }
.tip b.up { color: var(--up); }
.tip b.down { color: var(--down); }

/* ---------- cards ---------- */
.card { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 28px; }
.ch h2 { font-size: 15px; font-weight: 600; }
.cnt { font-size: 12px; color: var(--fg2); }

/* segmented controls (2.5): one pattern. A track, transparent segments, the selected one a raised thumb that
   cross-fades (no slide) */
.seg { display: flex; background: var(--ob-track); box-shadow: var(--ob-track-edge); border-radius: 6px; padding: 2px; gap: 2px; }
.seg button { flex: 1; min-height: 24px; background: transparent; border: 0; border-radius: 4px; padding: 4px 0; font-size: 13px; font-weight: 510; color: var(--fg2); cursor: pointer; transition: background-color var(--ease), color var(--ease); }
@media (hover: hover) { .seg button:hover { color: var(--fg1); } }
.seg button.on { background: var(--ob-thumb); color: var(--fg); box-shadow: var(--ob-shadow-thumb); }
.seg.hz { height: 32px; }
/* the direction picker (2.7): one 44px track; each side keeps its colour when off, the selected side is tinted */
.seg.dir { height: 44px; padding: 3px; gap: 3px; border-radius: var(--r); }
.seg.dir button { height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 510; border-radius: 6px; background: transparent; box-shadow: none; transition: background-color var(--ease), color var(--ease), box-shadow var(--ease); }
.seg.dir button svg { width: 10px; height: 10px; }
.seg.dir button.up { color: color-mix(in srgb, var(--up) 62%, var(--fg2)); }
.seg.dir button.down { color: color-mix(in srgb, var(--down) 62%, var(--fg2)); }
@media (hover: hover) { .seg.dir button.up:hover { color: var(--up); } }
@media (hover: hover) { .seg.dir button.down:hover { color: var(--down); } }
.seg.dir button.up.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); }
.seg.dir button.down.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); }

.field { margin-top: 14px; }
.flab { display: block; font-size: 12px; color: var(--fg2); margin-bottom: 6px; }
/* fields (2.8): track fill, no border; ring on hover, teal ring plus the halo on focus */
.amt { display: flex; align-items: center; height: 36px; background: var(--ob-track); box-shadow: var(--ob-track-edge); border-radius: var(--r); padding: 0 0 0 12px; border: 0; font-weight: 510; font-size: 15px; color: var(--fg2); min-width: 0; transition: box-shadow var(--ease); }
@media (hover: hover) { .amt:hover { box-shadow: inset 0 0 0 1px rgba(250, 248, 240, 0.16); } }
.amt:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ob-brand) 55%, transparent); }
.amt input { width: 100%; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; padding: 0 10px 0 3px; font-size: 15px; font-weight: 510; color: var(--fg); font-variant-numeric: tabular-nums; }
.amt input::placeholder { color: var(--fg3); }

.mkb { color: var(--fg); font-weight: 510; }
.mkb .num { font-weight: 600; }
.mko .num { color: var(--fg2); }

/* buttons (2.6, 2.7). Teal is the way in for actions that do not trade (Get prices, Got it); a button that places a
   trade is filled in its side's colour with dark ink (Buy on Up / Down, the phone bar's Take now, the card's Take now). No
   movement on press: only brightness. */
.primary { flex: 1; width: 100%; height: 44px; background: var(--cyan); color: var(--ob-on-brand); border: 0; border-radius: var(--r); font-size: 15px; font-weight: 600; cursor: pointer; transition: filter var(--ease), background-color var(--ease), color var(--ease); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .primary:hover { filter: brightness(1.06); } }
.primary:active { filter: brightness(.94); }
.primary:disabled { background: var(--ob-hover); color: var(--fg2); box-shadow: inset 0 0 0 1px var(--line2); cursor: default; filter: none; }
.secondary { flex: 1; width: 100%; height: 44px; background: var(--sec); border: 0; border-radius: var(--r); color: var(--fg); font-size: 15px; font-weight: 510; cursor: pointer; transition: background-color var(--ease); }
@media (hover: hover) { .secondary:hover { background: var(--sec2); } }
.secondary:disabled { color: var(--fg2); cursor: default; background: var(--ob-hover); }

/* status lines: a flat tinted row in its tone. Win: green; a refusal: amber; otherwise neutral. No entry animation. */
.msg { --tone: var(--fg2); position: relative; margin-top: 10px; min-height: 34px; padding: 8px 12px; border-radius: var(--ob-r-card); font-size: 13px; line-height: 18px; color: var(--fg1);
  background: color-mix(in srgb, var(--tone) 8%, var(--ob-material));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent); overflow-wrap: anywhere; }
.msg:empty { display: none; }
.msg.bad { --tone: var(--ob-amber); color: var(--fg); }
.msg.good { --tone: var(--up); color: var(--fg); }
.msg:has(b.down) { --tone: var(--down); }
.msg b { font-weight: 510; color: var(--fg); }
.msg b.up { color: var(--up); }
.msg b.down { color: var(--down); }
.msg.res { font-size: 14px; }

.txtin { height: 32px; background: var(--ob-track); box-shadow: var(--ob-track-edge); border: 0; border-radius: 6px; padding: 0 10px; outline: 0; font-size: 13px; color: var(--fg); }
.txtin:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ob-brand) 55%, transparent); }

/* running combos on the chart: a quiet list, top left, never over the price axis */
.cmbov { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-width: min(420px, calc(100% - 110px)); pointer-events: none; }
.cov { background: var(--ob-material); -webkit-backdrop-filter: var(--ob-material-blur); backdrop-filter: var(--ob-material-blur); border: 0; box-shadow: var(--ob-shadow-pop); border-radius: 6px; padding: 7px 10px; font-size: 12px; color: var(--fg1); }
.cov .covh { color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov .covh b { font-weight: 600; color: var(--fg); }
.cov .covh b.up { color: var(--up); }
.cov .covh b.down { color: var(--down); }
.cov .covc { display: grid; grid-template-columns: 12px 12px minmax(0, auto) minmax(0, 1fr); gap: 0 6px; align-items: baseline; margin-top: 3px; white-space: nowrap; }
.cov .cm { font-weight: 600; color: var(--fg2); }
.cov .cm.up { color: var(--up); }
.cov .cm.down { color: var(--down); }
.cov .ci { color: var(--fg2); font-weight: 600; }
.cov .cw { color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.cov .ct { color: var(--fg2); overflow: hidden; text-overflow: ellipsis; }
.cov .covm { display: none; }
.bet.cmb .b1 { font-size: 13px; }

/* ---------- quotes / offer rows ---------- */
.quotes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.qh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; min-height: 20px; }
.qh h2 { font-size: 15px; font-weight: 600; }
.qh .cnt { flex: 1; }
.colh { font-size: 12px; color: var(--fg2); margin-left: auto; padding-right: 76px; }
.ch .colh { padding-right: 76px; }
.auction { padding: 12px 0; margin-top: 6px; border-top: 1px solid var(--line); }
.auction .at { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fg); }
.auction .at .tn { color: var(--fg2); }
.auction .bar { height: 2px; background: rgba(250, 248, 240, 0.12); border-radius: 1px; margin-top: 10px; overflow: hidden; }
.auction .bar i { display: block; height: 100%; width: 0; background: var(--fg2); }
.auction .as { margin-top: 8px; font-size: 12px; color: var(--fg2); }
.wait { font-size: 13px; color: var(--fg1); padding: 6px 0; }
.wait + .wait { padding-top: 0; }

.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 12px; align-items: center; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); transition: background-color var(--ease); }
.offer:first-child { border-top: 0; }
.offer .om { min-width: 0; }
.offer .ot { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 510; color: var(--fg); min-width: 0; }
.offer .ot .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer .meta { font-size: 12px; color: var(--fg2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer .meta .warn { color: var(--ob-amber); white-space: normal; }
.offer .op { text-align: right; line-height: 1.15; }
.offer .pp { display: block; font-size: 15px; font-weight: 600; color: var(--fg); }
.offer.off .pp { color: var(--fg2); font-size: 15px; }
.offer.off .meta { white-space: normal; }
/* badges (2.10): 18px, 12px/510, neutral on the hover fill */
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 510; line-height: 18px; color: var(--fg2); background: var(--ob-hover); flex: 0 0 auto; }
/* Take on a price row places a trade: a quiet secondary; the best price is filled ink. Never teal. */
.take { width: 64px; background: var(--sec); border: 0; border-radius: 6px; color: var(--fg); padding: 0; height: 32px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color var(--ease), filter var(--ease); }
@media (hover: hover) { .take:hover { background: var(--sec2); } }
.take.hot { background: var(--fg); color: var(--bg); }
@media (hover: hover) { .take.hot:hover { filter: brightness(1.06); } }
.take.hot:active { filter: brightness(.88); }
.take:disabled { background: var(--ob-hover); color: var(--fg2); cursor: default; filter: none; }
.take.hot:disabled { opacity: .4; cursor: default; filter: none; }
@media (hover: hover) { .side .offer[data-prev]:hover .pp { color: var(--fg); } }
@media (hover: hover) { .side .offer[data-prev]:hover { background: var(--ob-hover); } }

/* ---------- your bets: hairline rows; the side word and P&L in their hue; money is never a dash ---------- */
.betlist:empty { display: none; }
.betlist + .betlist { margin-top: 0; }
.bet { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 10px; align-items: center; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); }
.betlist:first-child .bet:first-child, #betsRun:empty + #betsDone .bet:first-child { border-top: 0; }
.dchip { display: inline-flex; align-items: center; gap: 4px; height: 20px; font-size: 12px; font-weight: 510; line-height: 20px; padding: 0 6px; border-radius: 4px; }
.dchip svg { width: 8px; height: 8px; }
.dchip.up { background: var(--upBg); color: var(--up); }
.dchip.down { background: var(--downBg); color: var(--down); }
.dchip.na { background: var(--ob-hover); color: var(--fg2); }
.bet .bm { min-width: 0; }
.bet .b1 { font-size: 13px; font-weight: 510; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet .b2 { margin-top: 2px; font-size: 12px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet .br { text-align: right; line-height: 1.25; }
.bet .pl { display: block; font-size: 13px; font-weight: 600; }
.bet .st { display: block; font-size: 12px; color: var(--fg2); }
.bet .pl.void, .pfsum b.void, .msg b.void { color: var(--fg2); } /* A void's kept fee is grey, never a red loss */
.bet.done .b1 { color: var(--fg1); }
.pfsum { margin: -2px 0 8px; font-size: 12px; color: var(--fg2); }
.pfsum b { font-weight: 600; color: var(--fg1); }
.pfsum b.up { color: var(--up); }
.pfsum b.down { color: var(--down); }
.bets .sub { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-bottom: 4px; font-size: 12px; font-weight: 510; color: var(--fg2); }
.bets .sub:first-of-type { margin-top: 0; }
.bets .sub + .betlist .bet:first-child { border-top: 1px solid var(--line); }
.bet .wv { color: var(--fg2); }
/* Sell now on an open trade (sellback.js): a quiet line under it; armed = one more tap sells. Never animated */
/* Sell: a real button under the trade's words (it was a 23px text link); the armed second tap is filled ink, a
   refusal wraps in its own words. No transition: the price on it changes in place */
.bet .bsell { display: inline-flex; align-items: center; max-width: 100%; min-height: 32px; margin-top: 8px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--tk-fill2, var(--sec)); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; text-align: left; white-space: normal; cursor: pointer; }
@media (hover: hover) { .bet .bsell:hover:not(:disabled) { background: var(--sec2); } }
.bet .bsell.armed { background: var(--fg); color: var(--bg); }
@media (hover: hover) { .bet .bsell.armed:hover:not(:disabled) { background: var(--fg); color: var(--bg); } }
.bet .bsell.down { color: var(--ob-amber); }
.bet .bsell:disabled { color: var(--fg3); cursor: default; }
.bet .b3 { margin-top: 4px; font-size: 12px; color: var(--fg3); }
@media (max-width: 700px) { .bet .bsell { min-height: 44px; padding: 10px 16px; } } /* a 44px tap on a phone */
.blot .bltsell.armed { color: var(--fg); font-weight: 600; }
.bet .b2 a.fix { color: var(--fg); font-weight: 510; text-decoration: none; }
.linkbtn.csv { padding: 0; }
/* ghost text buttons */
.linkbtn { background: transparent; border: 0; padding: 8px 0 0; color: var(--fg2); font-size: 12px; font-weight: 510; cursor: pointer; transition: color var(--ease); }
@media (hover: hover) { .linkbtn:hover { color: var(--fg); } }
/* empty states (2.11): no box, a plain line on the ground */
.empty { font-size: 13px; line-height: 1.5; color: var(--fg2); max-width: 52ch; }

/* ---------- phone sticky bar ---------- */
.mbar { display: none; }

/* ---------- tablet / phone ---------- */
@media (max-width: 1100px) {
  .card { padding: 16px; }
}
@media (max-width: 700px) {
  .app { display: block; height: auto; min-height: 0; }
  .split { display: none; }
  .chartcol { padding: 14px 16px 4px; }
  .side { border-left: 0; overflow: visible; }
  .card { padding: 16px; }
  .mkts { padding: 4px 8px; gap: 2px; }
  .mk { min-width: 104px; min-height: 44px; padding: 4px 10px; }
  .chartwrap { flex: none; height: auto; min-height: 0; }
  #chart { flex: none; height: 260px; }
  /* the page ends above the sticky bar and the home indicator, so the bar never covers the panel's last line */
  :root { --mbar-h: 69px; }
  body.has-mbar .app { padding-bottom: calc(var(--mbar-h) + 12px + env(safe-area-inset-bottom)); }
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
  .mbar[hidden] { display: none !important; }
  .mbar-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 510; color: var(--fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .primary { flex: 0 0 auto; width: auto; height: 48px; padding: 0 20px; border-radius: var(--ob-r-card); font-size: 17px; }
  .cmbov { left: 4px; top: 4px; max-width: calc(100% - 84px); gap: 4px; }
  .cov { padding: 4px 7px; font-size: 12px; }
  .cov .covc { display: none; }
  .cov .covm { display: inline; color: var(--fg2); }
  .cov .covm .cm { font-weight: 600; }
  .intro { margin-top: 12px; padding: 12px 14px 14px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
  .steps li > div > span { margin-top: 1px; }
}
@media (max-width: 480px) {
  .s-hide { display: none; }
}

/* ---------- trade page: answers, warnings, partial fills, holds, phone sizing ---------- */
@media (max-width: 1100px) { #opnlS { display: none; } } /* tablet: the nav keeps its room; the open P&L is in Your bets */
/* a fill or result said in the phone bar (human.js phoneSay): in ink-2 text, no green (a placed trade is not a
   profit) */
.mbar-t.ok { position: relative; padding: 4px 0; color: var(--ob-ink-2); font-weight: 400; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 18px; }

@media (max-width: 700px) {
  /* Every control a thumb can hit, at least 44px tall; the two labels stay ("Ends in", "You win") */
  .seg.dir { height: 50px; }
  .seg.dir button { height: 44px; }
  .amt input { font-size: 16px; }
  .txtin { height: 44px; font-size: 16px; }
  .take { height: 44px; width: 72px; }
  .introx { height: 44px; }
  .linkbtn { min-height: 44px; display: inline-flex; align-items: center; padding-top: 0; }
  /* bet rows: two lines, nothing cut off; the badge keeps its own column */
  .bet { grid-template-columns: 62px minmax(0, 1fr) auto; align-items: start; }
  .bet .dchip { justify-content: center; }
  .bet .b1, .bet .b2 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .offer .meta { white-space: normal; }
}
/* the toast row (2.11): the card's full width, left aligned, never a content-width pill */
.side .msg:not(:empty) { display: block; width: 100%; box-sizing: border-box; text-align: left; align-self: stretch; }

/* ---------- trade page: names, holds, layout at 1280-1440 and on phones ---------- */
/* bet rows: the label lines wrap rather than cut a number off; worth (open) or the settle time (finished) is the
   right-hand column's second line, under the P&L */
.bet .b1, .bet .b2 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.bet .br { align-self: start; padding-top: 1px; }
.bet .st2 { display: block; font-size: 12px; color: var(--fg2); white-space: nowrap; }
.bet .st2 .wv { color: var(--fg1); }
.bet .st { white-space: nowrap; }
.bet.done { cursor: pointer; border-radius: 0; transition: background-color var(--ease); }
@media (hover: hover) { .bet.done:hover { background: var(--ob-hover); } }
.bet.done:focus-visible { outline: 3px solid var(--ob-focus); outline-offset: -3px; }
/* a finished bet's sheet: the floating material (2.3), a hairline ring; under its row on desktop */
.bsheet { position: fixed; z-index: 70; width: min(340px, calc(100vw - 24px)); padding: 12px 14px 12px; background: var(--ob-popover); border-radius: var(--ob-r-card); box-shadow: var(--ob-shadow-pop); font-size: 13px; color: var(--fg1); }
.bsheet[hidden] { display: none; }
.bsh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bsh b { font-size: 13px; font-weight: 600; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
#bsClose { height: 28px; padding: 0 8px; margin: -6px -8px 0 0; background: transparent; border: 0; border-radius: 6px; color: var(--fg1); font-size: 12px; font-weight: 510; cursor: pointer; flex: 0 0 auto; transition: background-color var(--ease), color var(--ease); }
@media (hover: hover) { #bsClose:hover { color: var(--fg); background: var(--ob-hover); } }
.bsl, .bsm { margin: 8px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.bsm b { font-weight: 600; color: var(--fg1); }
.bsm b.up { color: var(--up); }
.bsm b.down { color: var(--down); }
.bsm b.void { color: var(--fg2); }
.bsf:empty { display: none; }
.bsf { margin-top: 8px; }
.bsraw { font-size: 12px; color: var(--fg2); font-weight: 510; text-decoration: none; }
@media (hover: hover) { .bsraw:hover { color: var(--fg); } }
/* the phone bar: line 1 what you pay, line 2 the bet; the market name shortens first, "@ 5m" never does */
.mbar-t .mb1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbar-t .mb2 { display: flex; min-width: 0; color: var(--fg2); font-weight: 400; }
.mbar-t .mb1 + .mb2 { margin-top: 1px; }
.mbar-t .mbn { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the rest gives way only once the name is gone (a payoff notation with no name, "BTC payoff 64000:$0 …"): an
   ellipsis then, never a hard cut */
.mbar-t .mbr { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.mbar-t.ok .mb1 { white-space: normal; }
@media (max-width: 700px) {
  /* the bar: two lines; its height feeds --mbar-h (human.js mbarH) */
  .mbar-t { white-space: normal; line-height: 18px; }
  /* the finished bet's sheet: a bottom sheet */
  .bsheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 14px 14px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  #bsClose { min-height: 44px; margin: -12px -8px -10px 0; }
  .bsraw { display: inline-flex; align-items: center; min-height: 44px; }
  .mkar { width: 36px; height: 36px; margin-top: -18px; }
}

/* the chart's range (docs/TERMINAL-BASICS.md) */
.rng { flex: 0 0 auto; align-self: flex-start; margin-top: 6px; height: 28px; }
.rng button { flex: 0 0 auto; min-width: 44px; padding: 3px 10px; font-size: 12px; }

/* the page heading for screen readers (the market name is the visible title) */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* On a phone the leverage, direction, length and chart-range buttons were 24 px tall; 36 px, as the
   size chips, so a thumb hits the one it means */
@media (hover: none), (max-width: 700px) {
  .side .seg button, .omni .omlev button { height: 36px; }
  .rng { height: auto; }
  .rng button { min-height: 36px; }
}
/* the agent panel open beside the page leaves the header the room of a tablet: the same trims (at
   1440 px "Docs" was clipped and the balance labels collided) */
html.ac-push #opnlS, html.ac-push header.top .stat.s-hide { display: none; }
html.ac-push header.top .ac-toggle .ac-kbd { display: none; }
/* the market strip's room is kept while its markets load (hidden in the markup), except on a one-market server */
html:not(.one-mkt) .mkts[hidden] { display: flex !important; visibility: hidden; height: 56px; } /* its loaded height */
@media (max-width: 700px) { html:not(.one-mkt) .mkts[hidden] { height: 53px; } }
.skip { position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 12px; border-radius: 6px; background: var(--bg); color: var(--fg); }
.skip:focus { top: 8px; }

/* ---------- a calm trade page: raised panels on a darker page, two numbers for a trade, the rest one tap away ---------- */
:root { --surface: var(--ob-surface); --surface-line: var(--ob-surface-line); }
/* desktop and tablet: the chart and the trade panel as raised panels with room between them */
@media (min-width: 701px) {
  .app { gap: 8px; padding: 0 8px 8px; }
  .chartcol, .side { --bg: var(--surface); background: var(--surface); border: 1px solid var(--surface-line); border-radius: 14px; }
  .chartcol { padding: 16px 12px 10px 18px; }
  .side { border-left: 1px solid var(--surface-line); }
  .split { right: calc(var(--sidew, 440px) + 12px); } /* mid-gap: the app's 8px padding and half its 8px gap */
}

/* ---------- phones: one short page ----------
   the chart is short */
@media (max-width: 700px) {
  .chartcol { padding: 10px 16px 0; }
  #chart { height: 180px; }
  .chartwrap { margin-top: 4px; }
  .rng { margin-top: 2px; }
  .stabs { margin: 6px 12px 0; }
  .side .card { padding: 12px 16px; }
  /* Your trades: tight, the empty line short */
  #pf .ch { margin-bottom: 4px; }
}

/* the confirm sheet (trade-guard.js), for Settings > Confirm before placing / confirm above $X: a small dialog over the
   block that placed the trade on desktop, a bottom sheet on a phone. The floating material of the trade's sheet
   (.bsheet); its numbers are set once, never animated */
.tgc-back { position: fixed; inset: 0; z-index: 90; background: transparent; }
.tgc-back.tgc-phone { background: rgba(0, 0, 0, 0.5); }
.tgc-back[hidden], .tgc[hidden] { display: none; }
.tgc { position: fixed; z-index: 91; width: min(340px, calc(100vw - 24px)); padding: 14px 16px; background: var(--ob-popover); border-radius: var(--ob-r-card); box-shadow: var(--ob-shadow-pop); font-size: 13px; color: var(--fg1); }
.tgc-t { margin: 0; font-size: 15px; font-weight: 600; color: var(--fg); }
.tgc-w { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--fg1); overflow-wrap: anywhere; }
.tgc-rows { margin: 10px 0 0; padding: 0; }
.tgc-r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tgc-r:last-child { border-bottom: 0; }
.tgc-r dt { color: var(--fg2); flex: 0 0 auto; }
.tgc-r dd { margin: 0; color: var(--fg); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.tgc-n { margin: 8px 0 0; font-size: 12px; color: var(--fg3); }
.tgc-b { display: flex; gap: 8px; margin-top: 12px; }
.tgc-b .secondary { flex: 0 0 104px; }
.tgc.tgc-phone { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 14px 14px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); font-size: 14px; }
.tgc.tgc-phone .tgc-b .primary, .tgc.tgc-phone .tgc-b .secondary { height: 48px; border-radius: var(--ob-r-card); }

/* Settings > Show settled losses off: "2 losses hidden" under Your trades */
.lhid { margin: 6px 0 0; font-size: 12px; color: var(--fg3); }
.lhid[hidden] { display: none; }
.lhid a { color: var(--fg1); }
@media (hover: hover) { .lhid a:hover { color: var(--fg); } }

/* phones and small tablets (768 px or less): the Leveraged / Fixed payout tabs, the chart range and the leverage chips
   are at least 44 px tall, so a thumb hits the one it means */
@media (max-width: 768px) {
  .side .stabs .stab { min-height: 44px; }
  .rng { height: auto; }
  .rng button { min-height: 44px; }
  .omni .omlev button { min-height: 44px; }
}

/* round 6: a plain Up / Down row has no direction pill (its name says Up or Down) */
.bet.nochip { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 700px) { .bet.nochip { grid-template-columns: minmax(0, 1fr) auto; } }
/* the last seconds and "no price": plain text where the Sell button was, never a dead button shape */
.bet .bsell.plain, .bet .bsell.plain:disabled { background: transparent; padding-left: 0; padding-right: 0; color: var(--fg2); font-weight: 500; cursor: default; }
/* a 44px Sell and list links on every touch screen (critic r6: 92x32 on a tablet) */
@media (pointer: coarse), (max-width: 900px) { .bet .bsell { min-height: 44px; } .tk-hist, #moreDone { min-height: 44px; display: inline-flex; align-items: center; } }
/* round 10: "Show them in Settings" is a real 44px tap on touch sizes (critic r9: a 15px-tall link) */
@media (pointer: coarse), (max-width: 900px) { .lhid a { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; } }

/* tradephone (19 Nov) */
/* a running row's phrases stay whole ("below $68,453.53 · paid" / "$1.00" on a phone) */
.bet .nw { white-space: nowrap; }
/* the Trade page's controls answer a tap at once and two quick taps are two taps (1-tap places a trade each), never a
   double-tap zoom; the chart keeps its own touch handling (its pan, pinch and scrub) */
.rhbar button, .rhc button, .rhc select, .rhc input, .mkwrap button, .bets button, .bet, .otoast button, .tk-asset, .tks button { touch-action: manipulation; }
