/* ArbStrike: the arbitrage calculator (site/calculator.html). Loaded after og.css, legal.css and guide.css;
   uses their tokens (--v, --d, --t, --note, --warn) and og.css's .seg, .act, .f-err, .hint.
   Black half: the form, set like a row of the board (a leaning bib, the price in the display face).
   The answer is the hero's ticket: volt while the prices make an arb, dark grey when they do not. The bar
   on it is the idea of the whole site drawn once: each price's share of 100%, and the gap that is left. */

.cx-sec { background: #000; color: #fff; padding: clamp(24px, 2.8vw, 42px) 0 clamp(54px, 7vw, 100px); }
.cx-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px clamp(28px, 4vw, 64px); }
.cx-title { flex: none; max-width: 100%; font-size: clamp(3.4rem, 7vw, 6.7rem); }
.cx-title:focus { outline: none; }
.cx-lede { flex: 1 1 22rem; max-width: 33rem; padding-bottom: .5em; font-size: clamp(1rem, 1.2vw, 1.1rem); line-height: 1.5; color: #D2D2D2; }
.cx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34rem); gap: 0 clamp(36px, 6vw, 104px); align-items: start; margin-top: clamp(26px, 3vw, 42px); }

/* ---- the form ---- */
.cx-in { display: grid; gap: 26px; min-width: 0; }
.cx-set { display: flex; flex-wrap: wrap; gap: 18px 34px; }
.cx-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.cx-fs legend, .cx-lab { display: block; padding: 0; margin-bottom: 8px; font: 700 .72rem/1.2 var(--t); letter-spacing: .14em; text-transform: uppercase; color: #D2D2D2; }
.cx-in .seg span { padding: 11px 15px 7px; font-size: 1.25rem; }
.cx-in .seg span b { font-weight: 900; }
.cx-in .hint { margin-top: 9px; max-width: 34rem; line-height: 1.45; }

.cx-legs { border-top: 3px solid #fff; }
.cx-lh, .cx-leg { display: grid; grid-template-columns: 46px minmax(0, 1fr) 9.4rem 5.8rem; gap: 2px 16px; align-items: center; }
.cx-lh { padding: 9px 0 7px; border-bottom: 1px solid #2A2A2A; font: 700 .66rem var(--t); letter-spacing: .14em; text-transform: uppercase; color: #949494; }
.cx-lh span:nth-child(n+3) { text-align: right; padding-right: 2px; }
.cx-leg { padding: 13px 0 12px; border-bottom: 1px solid #2A2A2A; }
.cx-bib { display: grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 4px 2px 0 0; background: #fff; color: #000; font: italic 900 2.1rem/1 var(--d); transform: skewX(-9deg); }
.cx-leg[data-leg="0"] .cx-bib { background: var(--v); }
.cx-leg[data-leg="1"] .cx-bib { background: #4D4D4D; color: #fff; }
.cx-name { min-width: 0; display: grid; gap: 3px; }
.cx-name b { font: italic 900 1.6rem/.95 var(--d); text-transform: uppercase; letter-spacing: .005em; }
.cx-imp { font-size: .8rem; line-height: 1.3; color: #949494; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-box { width: 100%; min-height: 56px; padding: 7px 13px 2px; background: #000; color: #fff; border: 2px solid #3A3A3A; border-radius: 0; font: italic 900 2.3rem/1 var(--d); letter-spacing: .01em; font-variant-numeric: tabular-nums; text-align: right; }
.cx-box::placeholder { color: #777; opacity: 1; }
.cx-box:focus-visible { outline: none; border-color: var(--v); }
.cx-box[aria-invalid="true"] { border-color: var(--warn); }
.cx-fee { font-size: 1.7rem; color: #D2D2D2; }
.cx-leg .f-err { grid-column: 2 / -1; margin-top: 5px; }

.cx-row { display: flex; flex-wrap: wrap; gap: 20px 34px; align-items: flex-start; }
.cx-stk { flex: 0 1 13rem; min-width: 9rem; }
.cx-stk .f-err { margin-top: 6px; }
.cx-acts { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.cx-acts .act { min-height: 42px; padding: 6px 20px 3px; font-size: 1.2rem; }

/* phones: the verdict rides along while you type, and takes you to the stakes */
.cx-mini { display: none; }

/* ---- the ticket ---- */
.cx-out { position: sticky; top: 84px; min-width: 0; }
.cx-tk { --tk-ink: #000; --tk-rule: rgba(0, 0, 0, .3); margin: 8px 0 0 8px; padding: 20px 24px 22px; background: var(--v); color: var(--tk-ink); box-shadow: -8px -8px 0 #fff; transform: rotate(-1.1deg); transform-origin: 30% 0; scroll-margin-top: 80px; }
.cx-tk[data-state="no"], .cx-tk[data-state="wait"] { --tk-ink: #fff; --tk-rule: #3A3A3A; background: #1B1B1B; box-shadow: -8px -8px 0 #4D4D4D; }
.cx-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 18px; padding-bottom: 13px; border-bottom: 2px solid var(--tk-ink); }
.cx-verdict { flex: none; margin: 0 0 6px 3px; padding: 7px 13px 3px; background: #000; color: var(--v); font: italic 900 1.7rem/1 var(--d); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; transform: skewX(-9deg); }
.cx-tk[data-state="no"] .cx-verdict { background: var(--note); color: #000; }
.cx-tk[data-state="wait"] .cx-verdict { background: #333; color: #CFCFCF; }
.cx-pct { display: block; font: italic 900 clamp(4.6rem, 7.4vw, 6.8rem)/.76 var(--d); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-pct small { font: inherit; font-size: .5em; }
.cx-say { margin-top: 13px; font-size: .97rem; line-height: 1.42; font-weight: 600; }
.cx-tk[data-state="no"] .cx-say, .cx-tk[data-state="wait"] .cx-say { font-weight: 400; color: #D2D2D2; }
.cx-say b { font-weight: 800; }

.cx-bar { position: relative; display: flex; height: 46px; margin-top: 16px; }
.cx-bar:empty { background: repeating-linear-gradient(-60deg, #2E2E2E 0 6px, transparent 6px 12px); }
.cx-bar .sg { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 9px 0; overflow: hidden; white-space: nowrap; font: italic 900 1.3rem/1 var(--d); font-variant-numeric: tabular-nums; }
.cx-bar .sg b { font-weight: 900; font-size: 1.55rem; }
.cx-bar .sg i { font-style: inherit; opacity: .82; }
.cx-bar .sga { background: #000; color: var(--v); }
.cx-bar .sgm { background: #555; color: #fff; }
.cx-bar .sgb { background: #fff; color: #000; }
.cx-bar .gp { flex: 1 0 0; min-width: 3px; background: repeating-linear-gradient(-60deg, #000 0 4px, transparent 4px 8px); outline: 2px solid #000; outline-offset: -2px; }
.cx-tk[data-state="no"] .sga { background: #fff; color: #000; }
.cx-tk[data-state="no"] .sgm { background: #777; color: #000; }
.cx-tk[data-state="no"] .sgb { background: #BDBDBD; color: #000; }
/* over 100%: the part past the line is the margin, struck through with tape */
.cx-bar .ov { position: absolute; top: -6px; bottom: -6px; right: 0; border-left: 3px solid var(--note); background: repeating-linear-gradient(-60deg, rgba(0, 0, 0, .7) 0 4px, transparent 4px 8px); }
.cx-scale { position: relative; height: 1.5em; margin-top: 6px; font: 700 .68rem/1.5 var(--t); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.cx-scale .gl { position: absolute; top: 0; }
.cx-tk[data-state="no"] .cx-scale { color: #B5B5B5; }
.cx-tk[data-state="no"] .cx-scale .gl { color: var(--note); }

.cx-t { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cx-t caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cx-t thead th { padding: 0 0 6px 12px; border-bottom: 2px solid var(--tk-ink); text-align: right; font: 700 .64rem var(--t); letter-spacing: .13em; text-transform: uppercase; }
.cx-t thead th:first-child { text-align: left; padding-left: 0; }
.cx-t td, .cx-t tbody th, .cx-t tfoot th { padding: 9px 0 6px 12px; border-bottom: 1px solid var(--tk-rule); text-align: right; vertical-align: middle; font-size: .98rem; font-weight: 600; white-space: nowrap; }
.cx-t tbody th, .cx-t tfoot th { padding-left: 0; text-align: left; }
.cx-t tbody th { display: flex; align-items: center; gap: 10px; border-bottom: 0; }
.cx-t tbody tr { border-bottom: 1px solid var(--tk-rule); }
.cx-t tbody td { border-bottom: 0; }
.cx-t .cx-bib { width: 30px; height: 30px; padding-top: 3px; background: #000; color: var(--v); font-size: 1.4rem; }
.cx-tk:not([data-state="arb"]) .cx-t .cx-bib { background: #fff; color: #000; }
.cx-rn { font: italic 900 1.2rem/1 var(--d); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.cx-t .st { font: italic 900 2rem/.9 var(--d); letter-spacing: .005em; }
.cx-t .pf.pos { font-weight: 800; }
.cx-t .pf.neg { color: #7A0C05; font-weight: 800; }
.cx-tk:not([data-state="arb"]) .cx-t .pf.neg { color: var(--warn); }
.cx-t tr.on th .cx-rn::after { content: "all profit"; margin-left: 8px; padding: 2px 6px 1px; background: #000; color: var(--v); font: 700 .58rem/1 var(--t); letter-spacing: .1em; vertical-align: 2px; }
.cx-tk:not([data-state="arb"]) .cx-t tr.on th .cx-rn::after { content: none; }
.cx-t tfoot th, .cx-t tfoot td { border-bottom: 0; padding-top: 11px; font-weight: 700; }
.cx-t tfoot th { font: 700 .68rem var(--t); letter-spacing: .13em; text-transform: uppercase; }
.cx-t tfoot .st { font-size: 1.6rem; }
.cx-t tfoot small { font-size: .78rem; font-weight: 400; opacity: .8; white-space: normal; }
.cx-t.w2 .st { font-size: 1.6rem; }
.cx-t.w2 td { font-size: .9rem; }
.cx-note { display: grid; gap: 5px; margin-top: 12px; padding-top: 11px; border-top: 2px solid var(--tk-ink); font-size: .88rem; line-height: 1.42; font-weight: 600; }
.cx-note span { position: relative; padding-left: 18px; }
.cx-note span::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 5px; background: currentColor; transform: skewX(-14deg); }
.cx-nojs { margin-top: 22px; }

/* ---- under the tool ---- */
.cx-how .gd-math { margin-block: 16px; }

/* ---- narrower ---- */
@media (max-width: 1040px) {
  .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cx-in > :not(.cx-mini) { max-width: 42rem; }
  .cx-out { position: static; max-width: 36rem; }
  .cx-tk { transform: rotate(-.6deg); }
  /* the verdict, pinned under the top edge while the form is on screen */
  .cx-on .cx-mini { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 calc(var(--pad) * -1); padding: 6px var(--pad) 4px; background: var(--v); color: #000; text-decoration: none; }
  .cx-mini[data-state="no"], .cx-mini[data-state="wait"] { background: #1B1B1B; color: #fff; border-block: 1px solid #333; }
  .cx-mini b { font: italic 900 1.25rem/1 var(--d); text-transform: uppercase; }
  .cx-mini strong { font: italic 900 2rem/1 var(--d); font-variant-numeric: tabular-nums; }
  .cx-mini span { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 .68rem var(--t); letter-spacing: .13em; text-transform: uppercase; }
  .cx-mini span::after { content: ""; width: 11px; height: 8px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); }
}
@media (max-width: 760px) {
  .cx-sec { padding-top: 22px; }
  .cx-title { font-size: clamp(3.3rem, 16.5vw, 4.6rem); }
  .cx-in { gap: 22px; }
  .cx-set { gap: 16px 22px; }
  .cx-in .seg { display: flex; }
  .cx-in .seg label { flex: 1 1 auto; text-align: center; }
  .cx-in .seg span { padding: 13px 9px 9px; font-size: 1.2rem; }
  .cx-set .cx-fs, .cx-row .cx-fs { flex: 1 1 100%; }
  .cx-lh, .cx-leg { grid-template-columns: 40px minmax(0, 1fr) 6.6rem 4.4rem; gap: 2px 10px; }
  .cx-leg .cx-bib { width: 40px; height: 44px; font-size: 1.9rem; }
  .cx-name b { font-size: 1.35rem; }
  .cx-imp { white-space: normal; font-size: .76rem; }
  .cx-box { font-size: 2rem; padding-inline: 9px; }
  .cx-fee { font-size: 1.5rem; }
  .cx-stk { flex: 1 1 100%; }
  .cx-acts .act { flex: 1 1 auto; min-height: 46px; }
  .cx-tk { margin: 6px 0 0 6px; padding: 16px 15px 18px; box-shadow: -6px -6px 0 #fff; transform: none; }
  .cx-tk[data-state="no"], .cx-tk[data-state="wait"] { box-shadow: -6px -6px 0 #4D4D4D; }
  .cx-pct { font-size: clamp(4rem, 19vw, 5.2rem); }
  .cx-verdict { font-size: 1.45rem; }
  .cx-bar { height: 42px; }
  .cx-bar .sg { padding-inline: 6px; gap: 5px; font-size: 1.1rem; }
  .cx-bar .sg b { font-size: 1.3rem; }
  .cx-t td, .cx-t tbody th, .cx-t tfoot th { font-size: .9rem; padding-left: 8px; }
  .cx-t tbody th, .cx-t tfoot th { padding-left: 0; }
  .cx-t tbody th { gap: 7px; }
  .cx-t .st { font-size: 1.65rem; }
  .cx-t tfoot .st { font-size: 1.4rem; }
  .cx-t .cx-bib { width: 26px; height: 28px; font-size: 1.25rem; }
  .cx-rn { font-size: 1.05rem; }
  .cx-t.w1 .st { font-size: 1.35rem; }
  .cx-t.w1 td { font-size: .8rem; padding-left: 6px; }
  .cx-t.w1 .cx-rn, .cx-t.w1 .cx-x { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cx-t.w2 .st { font-size: 1.3rem; }
  .cx-t.w2 tbody td:nth-child(3), .cx-t.w2 thead th:nth-child(3) { display: none; }          /* stake and profit are what you act on */
  .cx-t.two .cx-rn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cx-t tr.on th .cx-rn::after { display: none; }
}
@media (max-width: 480px) {
  /* the bib names the bet; the words are in the form above (and stay for screen readers) */
  .cx-t .cx-rn, .cx-t .cx-x { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 360px) {
  .cx-tk { padding-inline: 12px; }
  .cx-t.w1 tbody td:nth-child(3), .cx-t.w1 thead th:nth-child(3) { display: none; }
  .cx-t thead th, .cx-t td { padding-left: 5px; }
  .cx-t .st { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .cx-tk { transition: background-color .18s, color .18s, box-shadow .18s; }
}
@media print {
  .cx-sec { background: #fff; color: #000; }
  .cx-acts, .cx-mini { display: none !important; }
  .cx-tk { transform: none; box-shadow: none; border: 2px solid #000; }
}
