/* X Trader — right-hand workspace panel.
   Reference is teal/navy (gmilliai); recoloured to house gold per the
   measure-don't-eyeball rule: dimensions copied, palette ours. */

.xt-workspace { display: none; flex-direction: column; gap: 9px; }

.xt-card {
  background: linear-gradient(160deg, rgba(24, 18, 6, .82), rgba(12, 9, 4, .92));
  border: 1px solid rgba(210, 152, 48, .22);
  border-radius: 16px;
  padding: 14px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 26px rgba(0, 0, 0, .34);
  backdrop-filter: blur(6px);
  margin-bottom: 9px;
}

/* ── header ───────────────────────────────────────────────────────────── */
.xt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xt-head-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.xt-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #f5cf6b, #b8862a);
  color: #1a1204; font-size: 20px; font-weight: 900;
  box-shadow: 0 0 16px rgba(210, 152, 48, .3);
}
.xt-title { font-size: 15px; font-weight: 800; color: #ffe9b0; letter-spacing: .01em; }
.xt-sub   { font-size: 10px; color: rgba(200, 178, 130, .7); margin-top: 2px; }
.xt-state {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(120, 100, 65, .18); border: 1px solid rgba(140, 115, 70, .3);
  color: rgba(200, 175, 130, .72);
}
.xt-state.live {
  background: rgba(16, 185, 129, .16); border-color: rgba(16, 185, 129, .4);
  color: #4ade80;
}
/* Workspace open and the analyzer working, but no session running. Gold rather
   than green so it never reads as "trading", and a slow pulse so the panel
   announces that it is doing something. */
.xt-state.scanning {
  background: rgba(210, 152, 48, .14); border-color: rgba(210, 152, 48, .38);
  color: #f0c674; animation: xt-scan-pulse 1.8s ease-in-out infinite;
}
@keyframes xt-scan-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .xt-state.scanning { animation: none; }
}

/* ── labels / inputs ──────────────────────────────────────────────────── */
.xt-lbl {
  font-size: 9px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(175, 195, 240, .6); font-weight: 700; margin: 12px 0 6px;
}
.xt-lbl:first-child { margin-top: 0; }
.xt-chip {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 8.5px;
  background: rgba(210, 152, 48, .14); border: 1px solid rgba(210, 152, 48, .3);
  color: #ffd479; letter-spacing: .02em;
}
.xt-input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 10px;
  background: rgba(7, 11, 23, .72); border: 1px solid rgba(140, 168, 226, .22);
  color: #f2f6ff; font-size: 13px; font-weight: 600;
}
.xt-input:focus { outline: none; border-color: rgba(210, 152, 48, .6); }
.xt-input:disabled { opacity: .45; }
.xt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.xt-f { display: block; }
.xt-f > span {
  display: block; font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(175, 195, 240, .6); font-weight: 700; margin: 10px 0 5px;
}
.xt-check {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 10.5px; color: rgba(206, 220, 248, .8); cursor: pointer; line-height: 1.4;
}
.xt-check input { accent-color: #d29830; width: 15px; height: 15px; flex: 0 0 auto; }
.xt-hint { font-size: 10px; color: rgba(175, 195, 240, .58); line-height: 1.5; margin-top: 6px; }

/* ── contract-type tabs ───────────────────────────────────────────────── */
/* one row of five, icon stacked over label — the reference's tab anatomy */
.xt-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.xt-tab svg { width: 16px; height: 16px; display: block; margin: 0 auto 4px; }
.xt-tab {
  padding: 11px 8px; border-radius: 12px; font-size: 11.5px; font-weight: 800;
  background: rgba(7, 11, 23, .6); border: 1px solid rgba(140, 168, 226, .18);
  color: rgba(206, 220, 248, .72); cursor: pointer; transition: all .18s;
}
.xt-tab:hover { border-color: rgba(210, 152, 48, .4); color: #ffe9b0; }
.xt-tab.active {
  background: linear-gradient(150deg, rgba(210, 152, 48, .3), rgba(150, 104, 26, .22));
  border-color: rgba(232, 168, 50, .7); color: #ffe9b0;
  box-shadow: 0 0 14px rgba(210, 152, 48, .2);
}

/* ── direction ────────────────────────────────────────────────────────── */
.xt-sides { display: flex; gap: 8px; }
.xt-side {
  flex: 1; padding: 13px 8px; border-radius: 12px; font-size: 15px; font-weight: 800;
  background: transparent; border: 1px solid rgba(140, 168, 226, .18);
  color: rgba(206, 220, 248, .66); cursor: pointer; transition: all .18s;
}
.xt-side.active {
  background: linear-gradient(150deg, #e0aa3c, #b8862a); border-color: transparent;
  color: #1a1204; box-shadow: 0 0 18px rgba(210, 152, 48, .3);
}

/* ── digit grid ───────────────────────────────────────────────────────── */
.xt-digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.xt-digit {
  aspect-ratio: 1 / 1; min-height: 44px; border-radius: 10px;
  font-size: 15px; font-weight: 800; cursor: pointer; transition: all .16s;
  background: rgba(7, 11, 23, .72); border: 1px solid rgba(140, 168, 226, .14);
  color: rgba(226, 234, 250, .82);
}
.xt-digit:hover { border-color: rgba(210, 152, 48, .5); }
.xt-digit.active {
  background: linear-gradient(150deg, #e0aa3c, #b8862a); border-color: transparent;
  color: #1a1204; box-shadow: 0 0 16px rgba(210, 152, 48, .34);
}

/* ── presets ──────────────────────────────────────────────────────────── */
.xt-presets { display: flex; flex-direction: column; gap: 7px; }
.xt-preset {
  text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(7, 11, 23, .6); border: 1px solid rgba(140, 168, 226, .16);
  transition: all .18s; display: block; width: 100%;
}
.xt-preset:hover { border-color: rgba(210, 152, 48, .45); }
.xt-preset.active {
  border-color: rgba(232, 168, 50, .7);
  background: linear-gradient(150deg, rgba(210, 152, 48, .18), rgba(150, 104, 26, .12));
}
.xt-preset-name { display: block; font-size: 12px; font-weight: 800; color: #ffe9b0; }
.xt-preset-name i {
  font-style: normal; font-size: 8.5px; letter-spacing: .06em; padding: 1px 6px;
  border-radius: 999px; margin-left: 6px; vertical-align: middle;
  background: rgba(16, 185, 129, .16); color: #4ade80; border: 1px solid rgba(16, 185, 129, .34);
}
.xt-preset-meta {
  display: block; font-size: 9.5px; color: rgba(175, 195, 240, .62); margin-top: 3px;
}

/* ── segmented plan ───────────────────────────────────────────────────── */
.xt-seg { display: flex; gap: 6px; }
.xt-seg-btn {
  flex: 1; padding: 9px 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  background: rgba(7, 11, 23, .6); border: 1px solid rgba(140, 168, 226, .18);
  color: rgba(206, 220, 248, .7); cursor: pointer; transition: all .18s;
}
.xt-seg-btn.active {
  background: linear-gradient(150deg, rgba(210, 152, 48, .3), rgba(150, 104, 26, .2));
  border-color: rgba(232, 168, 50, .66); color: #ffe9b0;
}

/* ── depth readout (the honest bit) ───────────────────────────────────── */
.xt-depth {
  margin-top: 11px; padding: 10px 12px; border-radius: 11px; font-size: 10.5px;
  line-height: 1.6; color: rgba(206, 220, 248, .84);
  background: rgba(210, 152, 48, .07); border: 1px solid rgba(210, 152, 48, .22);
}
.xt-depth b { color: #ffe9b0; }
.xt-warn { color: #ffb367; display: block; margin-top: 5px; }

/* ── stats + run ──────────────────────────────────────────────────────── */
.xt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.xt-stat {
  padding: 9px 8px; border-radius: 11px; text-align: center;
  background: rgba(7, 11, 23, .6); border: 1px solid rgba(140, 168, 226, .14);
}
.xt-stat span {
  display: block; font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(175, 195, 240, .58); margin-bottom: 3px;
}
.xt-stat b { font-size: 14px; font-weight: 800; color: #f2f6ff; }
.xt-stat b.up { color: #4ade80; }
.xt-stat b.dn { color: #f87171; }

.xt-run {
  width: 100%; min-height: 48px; border-radius: 14px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 800; letter-spacing: .02em; color: #1a1204;
  background: linear-gradient(135deg, #f5cf6b, #d29830);
  box-shadow: 0 0 22px rgba(210, 152, 48, .28); transition: all .18s;
}
.xt-run:hover:not(:disabled) { box-shadow: 0 0 30px rgba(210, 152, 48, .42); }
.xt-run:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.xt-run.stop {
  background: linear-gradient(135deg, #f87171, #b91c1c); color: #fff;
  box-shadow: 0 0 22px rgba(220, 60, 60, .3);
}
.xt-note {
  margin-top: 9px; font-size: 10px; line-height: 1.55;
  color: rgba(175, 195, 240, .66); text-align: center;
}
.xt-note.err { color: #f87171; }

/* ── history ──────────────────────────────────────────────────────────── */
.xt-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 800; color: #ffe9b0; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 9px;
}
.xt-clear {
  padding: 5px 12px; border-radius: 9px; font-size: 9.5px; font-weight: 800;
  background: rgba(220, 60, 60, .12); border: 1px solid rgba(220, 60, 60, .34);
  color: #f87171; cursor: pointer; letter-spacing: .05em; text-transform: uppercase;
}
.xt-hist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.xt-row {
  display: grid; grid-template-columns: 1fr 1.3fr auto auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 9px; font-size: 10.5px;
  background: rgba(7, 11, 23, .55); border-left: 3px solid rgba(140, 168, 226, .2);
}
.xt-row.win  { border-left-color: #4ade80; }
.xt-row.loss { border-left-color: #f87171; }
.xt-row.open { border-left-color: #d29830; }
.xt-row-l { font-weight: 800; color: #ffe9b0; }
.xt-row-m { color: rgba(175, 195, 240, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xt-row-s { color: rgba(206, 220, 248, .78); }
.xt-row-p { font-weight: 800; text-align: right; }
.xt-row.win  .xt-row-p { color: #4ade80; }
.xt-row.loss .xt-row-p { color: #f87171; }
.xt-row.open .xt-row-p { color: #d29830; }
.xt-empty { text-align: center; padding: 22px 12px; font-size: 10.5px; color: rgba(175, 195, 240, .5); }

/* ── strategy-row logo ────────────────────────────────────────────────── */
.strategy-icon-xtrader {
  background: linear-gradient(150deg, rgba(245, 207, 107, .2), rgba(150, 104, 26, .16));
  border: 1px solid rgba(232, 168, 50, .45);
}
.strategy-mark-xtrader {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 17px; font-weight: 900;
  color: #ffd479; text-shadow: 0 0 10px rgba(210, 152, 48, .5);
}
.strategy-mark-xtrader b { font-style: italic; }

@media (max-width: 430px) {
  .xt-grid2 { grid-template-columns: 1fr; }
  .xt-tabs  { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .xt-tab   { font-size: 8.5px; padding: 8px 2px; }
  .xt-tab svg { width: 13px; height: 13px; }
  .xt-stats { grid-template-columns: repeat(2, 1fr); }
  .xt-digits { grid-template-columns: repeat(5, 1fr); }
  .xt-row { grid-template-columns: 1fr auto auto; }
  .xt-row-m { display: none; }
}

/* ── dropdowns (Market + Preset) — the reference's collapsible pattern ───── */
/* Their layout is a NARROW centred column, not a full-width panel. */
/* their column is Tailwind max-w-lg = exactly 512px; matching it makes
   every derived size (51.75px digit squares) line up too */
.xt-workspace { max-width: 512px; margin: 0 auto; width: 100%; }

.xt-dd {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 13px; border-radius: 12px; cursor: pointer;
  background: rgba(7, 11, 23, .72); border: 1px solid rgba(140, 168, 226, .22);
  color: #f2f6ff; text-align: left; transition: border-color .18s;
}
.xt-dd:hover, .xt-dd.open { border-color: rgba(210, 152, 48, .6); }
.xt-dd-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.xt-dd-cap {
  font-style: normal; font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(175, 195, 240, .6); font-weight: 700; width: 100%;
}
.xt-dd-l b { font-size: 13.5px; font-weight: 800; color: #ffe9b0; }
.xt-dd-l em { font-style: normal; }
.xt-dd-arrow { color: rgba(210, 152, 48, .8); font-size: 12px; transition: transform .18s; }
.xt-dd.open .xt-dd-arrow { transform: rotate(180deg); }

.xt-dd-panel {
  margin-top: 6px; border-radius: 12px; overflow: hidden;
  background: rgba(7, 11, 23, .82); border: 1px solid rgba(140, 168, 226, .18);
  max-height: 260px; overflow-y: auto;
}
.xt-dd-panel[hidden] { display: none; }
.xt-dd-head {
  padding: 8px 12px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(175, 195, 240, .55); border-bottom: 1px solid rgba(140, 168, 226, .12);
}

/* ranked market rows — pair, live counter, measured rate */
.xt-mrow {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: 9px;
  align-items: center; padding: 10px 12px; cursor: pointer;
  font-size: 12px; color: rgba(226, 234, 250, .84); transition: background .15s;
}
.xt-mrow:hover { background: rgba(210, 152, 48, .08); }
.xt-mrow.active { background: rgba(210, 152, 48, .14); color: #ffe9b0; }
.xt-mdot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(140, 168, 226, .35);
}
.xt-mrow.active .xt-mdot { background: #e0aa3c; box-shadow: 0 0 8px rgba(210, 152, 48, .7); }
.xt-mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.xt-mcount { font-size: 9px; color: rgba(175, 195, 240, .5); }
.xt-mrate { font-size: 11px; font-weight: 800; color: rgba(206, 220, 248, .7); min-width: 38px; text-align: right; }
.xt-mrow.active .xt-mrate { color: #ffd479; }

/* presets sit inside the dropdown panel now */
.xt-dd-panel .xt-presets { padding: 6px; gap: 5px; }

/* ── card-per-control layout, matching the reference 1:1 ────────────────── */
/* Their column: max-w-lg (512px), cards space-y-4 (16px), rounded-2xl.
   Paddings copied per card: p-5 (20px), p-3 (12px), p-2 (8px), p-6 ticker. */
.xt-workspace { gap: 16px; }
.xt-card { margin-bottom: 0; }
.xt-p5 { padding: 20px; }
.xt-p3 { padding: 12px; }
.xt-p2 { padding: 8px; }

/* live price ticker — big number + highlighted last digit */
.xt-ticker { padding: 24px; text-align: center; }
.xt-price {
  font-size: 30px; font-weight: 800; letter-spacing: .01em; color: #f2f6ff;
  font-variant-numeric: tabular-nums;
}
.xt-lastd { margin-top: 6px; font-size: 11px; color: rgba(175, 195, 240, .62); }
.xt-lastd b {
  color: #ffd479; font-size: 15px; margin-left: 3px;
  text-shadow: 0 0 10px rgba(210, 152, 48, .5);
}

/* section heading inside a card ("Strategy parameters", "Risk management") */
.xt-sect {
  font-size: 12.5px; font-weight: 800; color: #ffe9b0;
  margin-bottom: 12px; letter-spacing: .01em;
}

/* input with a trailing unit, as the reference renders ticks / USD / x */
.xt-unit { position: relative; }
.xt-unit .xt-input { padding-right: 52px; }
.xt-unit span {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: rgba(175, 195, 240, .55); pointer-events: none;
  text-transform: lowercase;
}

/* auto-switch row card */
.xt-rowcard {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 12px; font-size: 12.5px;
  color: rgba(226, 234, 250, .88); font-weight: 600;
}
.xt-sw { position: relative; display: inline-block; width: 42px; height: 23px; flex: 0 0 auto; }
.xt-sw input { opacity: 0; width: 0; height: 0; }
.xt-sw i {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: rgba(120, 100, 65, .3); border: 1px solid rgba(140, 115, 70, .4);
  transition: background .2s, border-color .2s;
}
.xt-sw i::after {
  content: ''; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px;
  border-radius: 50%; background: rgba(226, 234, 250, .8); transition: transform .2s;
}
.xt-sw input:checked + i {
  background: linear-gradient(150deg, #e0aa3c, #b8862a); border-color: transparent;
}
.xt-sw input:checked + i::after { transform: translateX(19px); background: #1a1204; }

/* Run pinned to the bottom of the column, as the reference does */
.xt-runbar { position: sticky; bottom: 12px; padding-top: 4px; z-index: 3; }
.xt-run { padding: 16px; font-size: 16px; }

/* ── running-state pieces (copied from the reference's live session) ─────── */
/* price: every char its own span, the LAST digit blown up and accented */
.xt-price span { display: inline-block; }
.xt-price .xt-px-last {
  font-size: 1.45em; font-weight: 900; color: #ffd479;
  text-shadow: 0 0 14px rgba(210, 152, 48, .55);
}
.xt-streaks { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }
.xt-sk { display: flex; align-items: center; gap: 6px; }
.xt-sk span { font-size: 9px; text-transform: uppercase; color: rgba(175, 195, 240, .5); letter-spacing: .06em; }
.xt-sk b { font-size: 13px; font-weight: 800; }
.xt-sk b.up { color: #4ade80; }
.xt-sk b.dn { color: #f87171; }

/* live session card — green rail when up, red when down (theirs is green/40) */
.xt-session { padding: 14px 15px; border-radius: 12px; }
.xt-session[hidden] { display: none; }
.xt-session.up { border-color: rgba(74, 222, 128, .4); }
.xt-session.dn { border-color: rgba(248, 113, 113, .4); }
.xt-ses-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xt-ses-top b { font-size: 13px; color: #ffe9b0; font-weight: 800; }
.xt-ses-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px;
  border-radius: 999px; background: rgba(210, 152, 48, .16);
  border: 1px solid rgba(210, 152, 48, .34); color: #ffd479;
}
.xt-ses-ct { font-size: 10.5px; color: rgba(175, 195, 240, .6); }
.xt-ses-bet { margin-top: 6px; font-size: 11.5px; color: rgba(226, 234, 250, .82); font-weight: 600; }
.xt-ses-pl { margin-top: 8px; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.xt-ses-pl.up { color: #4ade80; }
.xt-ses-pl.dn { color: #f87171; }
.xt-ses-meta { margin-top: 4px; font-size: 10.5px; color: rgba(175, 195, 240, .62); }
.xt-ses-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid rgba(140, 168, 226, .14);
}
.xt-ses-grid span {
  display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(175, 195, 240, .5); margin-bottom: 2px;
}
.xt-ses-grid b { font-size: 12px; color: #f2f6ff; font-weight: 800; }
.xt-ses-err {
  margin-top: 10px; padding: 8px 10px; border-radius: 9px; font-size: 10.5px;
  line-height: 1.5; background: rgba(248, 113, 113, .1);
  border: 1px solid rgba(248, 113, 113, .3); color: #fca5a5;
}

/* active-preset row: pulsing dot + name, as the reference shows it */
.xt-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; margin-right: 8px; vertical-align: middle;
  animation: xt-pulse 1.8s ease-in-out infinite;
}
@keyframes xt-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.xt-dd-l b em { font-style: normal; color: #ffd479; }
@media (prefers-reduced-motion: reduce) { .xt-dot { animation: none; } }


/* ── exact geometry, measured from the reference 2026-07-28 ─────────────── */
/* Their digit row is ONE line: grid-template-columns == digit count, 8px gap,
   51.75px square buttons, radius 8px, 18px/700 text. JS sets the column count
   per tab (8 for Over/Under, 10 for Matches). */
.xt-digits { gap: 8px; grid-template-columns: repeat(8, 1fr); }
.xt-digit {
  border-radius: 8px; font-size: 18px; font-weight: 700; min-height: 0;
}

/* Contract tabs are FIVE across in one row (the reference added Accumulator
   in July 2026 and kept grid-cols-5 at every width). */
.xt-tabs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.xt-tab { padding: 10px 2px; font-size: 10px; border-radius: 12px; }

/* Direction: two across, 8px gap. */
.xt-sides { gap: 8px; }

/* Run: their padding 20px, 20px/700 text, 16px radius, left-to-right gradient. */
.xt-run {
  padding: 20px 0; font-size: 20px; font-weight: 700; border-radius: 16px;
  background: linear-gradient(to right, #f5cf6b, #d29830);
}
.xt-run.stop { background: linear-gradient(to right, #f87171, #b91c1c); }

/* Narrow phones: 8 squares will not fit at 51.75px, so wrap to two rows
   rather than overflow the card. */
@media (max-width: 430px) {
  .xt-digits { grid-template-columns: repeat(5, 1fr) !important; }
  .xt-tabs   { grid-template-columns: repeat(5, 1fr); gap: 3px; }
  .xt-tab    { font-size: 8px; padding: 8px 1px; }
  .xt-digit  { font-size: 15px; }
  .xt-run    { padding: 16px 0; font-size: 17px; }
}

/* ── inner boxes inside Strategy parameters / Risk management ────────────── */
/* Theirs nests each control in bg-[#0f1923] rounded-xl p-4 border-white/5. */
.xt-box {
  background: rgba(7, 11, 23, .55);
  border: 1px solid rgba(226,182,104,.13);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.xt-box:last-child { margin-bottom: 0; }
.xt-box .xt-lbl { margin-top: 0; }
.xt-sect { font-size: 16px; }


/* ── typography, measured from the reference (this was the big mismatch) ─── */
/* Their labels are <p class="text-sm text-gray-400 mb-1">: 14px, weight 400,
   sentence case, NO letter-spacing. Ours were 9px uppercase 700 with tracking,
   which made every card read differently even when the boxes matched. */
.xt-lbl,
.xt-f > span {
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(209, 213, 219, .9);
  margin: 0 0 4px;
}
.xt-box .xt-lbl { margin-top: 0; }

/* section heading: h3 text-lg font-bold text-white */
.xt-sect { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 16px; }

/* inner boxes: p-4, rounded-xl, no margin — the 16px gap comes from space-y-4 */
.xt-box { padding: 16px; border-radius: 12px; margin-bottom: 16px; }
.xt-box:last-child { margin-bottom: 0; }

/* the dropdown-cap above the market name keeps its small style */
.xt-dd-cap { font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase; }

/* ── exact type scale, measured card by card from the reference ─────────── */
/* Market card: "Market" 12px/400, counter 14px/700 */
.xt-dd-cap { font-size: 12px; font-weight: 400; letter-spacing: normal;
             text-transform: none; color: rgba(209, 213, 219, .75); }
.xt-chip   { font-size: 14px; font-weight: 700; padding: 1px 8px; }
.xt-dd-l b { font-size: 18px; font-weight: 700; }

/* Ticker: price digits 36px/700, the LAST digit 48px/900 */
.xt-price { font-size: 36px; font-weight: 700; }
.xt-price .xt-px-last { font-size: 48px; font-weight: 900; }
.xt-lastd { font-size: 12px; font-weight: 400; }
.xt-sk span { font-size: 10px; font-weight: 400; text-transform: uppercase; }
.xt-sk b    { font-size: 14px; font-weight: 700; }

/* Session card: meta 10px/400, figures 10px/700 */
.xt-ses-bet, .xt-ses-meta { font-size: 10px; font-weight: 400; }
.xt-ses-pl { font-size: 15px; font-weight: 700; }
.xt-ses-top b { font-size: 11px; }
.xt-ses-grid b { font-size: 11px; }
.xt-ses-grid span { font-size: 9px; }

/* ── completed-session banners (stacked, dismissible) ────────────────────── */
/* Reference: green-bordered card, circular check badge, uppercase reason,
   big signed amount, "Session N ended at HH:MM:SS", Dismiss on the right. */
.xt-done {
  display: flex; align-items: center; gap: 12px; padding: 14px 15px;
  margin-bottom: 16px; border-radius: 12px;
}
.xt-done.ok  { border-color: rgba(74, 222, 128, .4);  background: rgba(74, 222, 128, .06); }
.xt-done.bad { border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .06); }
.xt-done-mark {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.xt-done.ok  .xt-done-mark { background: rgba(74, 222, 128, .16);  color: #4ade80; }
.xt-done.bad .xt-done-mark { background: rgba(248, 113, 113, .16); color: #f87171; }
.xt-done-body { flex: 1; min-width: 0; }
.xt-done-head {
  font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.xt-done.ok  .xt-done-head { color: #4ade80; }
.xt-done.bad .xt-done-head { color: #f87171; }
.xt-done-pl { font-size: 20px; font-weight: 800; margin-top: 2px; }
.xt-done.ok  .xt-done-pl { color: #4ade80; }
.xt-done.bad .xt-done-pl { color: #f87171; }
.xt-done-sub { font-size: 11px; color: rgba(175, 195, 240, .55); margin-top: 2px; }
.xt-dismiss {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 9px; cursor: pointer;
  font-size: 11px; font-weight: 600;
  background: rgba(7, 11, 23, .6); border: 1px solid rgba(140, 168, 226, .22);
  color: rgba(206, 220, 248, .8);
}
.xt-dismiss:hover { border-color: rgba(210, 152, 48, .5); color: #ffe9b0; }

/* ── live activity line: "Waiting for result..." / safeguard countdown ───── */
.xt-ses-act {
  margin-top: 6px; font-size: 10px; font-weight: 600;
  color: rgba(175, 195, 240, .7);
}
/* the countdown is a deliberate pause before a LARGE martingale rung — amber,
   so the user notices they are about to risk a big stake and can stop */
.xt-ses-act.cool { color: #ffb367; }


/* ── layout guard ────────────────────────────────────────────────────────── */
/* The column spaces itself with `gap`, which is ignored on display:block.
   Showing the panel as block once stacked all 14 cards flush and read as an
   empty/broken workspace. Force the flex context whenever it is visible, so a
   stray inline display cannot collapse it again. */
.xt-workspace:not([style*="display: none"]):not([style*="display:none"]) {
  display: flex !important;
  flex-direction: column;
}

/* ── balance fit card ────────────────────────────────────────────────────── */
.xt-fit-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 14px;
}
.xt-sw-sm { width: 38px; height: 21px; }
.xt-sw-sm i::after { width: 15px; height: 15px; }
.xt-sw-sm input:checked + i::after { transform: translateX(17px); }
.xt-fit-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xt-fit-nums > div {
  background: rgba(7, 11, 23, .55); border: 1px solid rgba(226,182,104,.13);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.xt-fit-nums span {
  display: block; font-size: 10px; color: rgba(209, 213, 219, .7); margin-bottom: 3px;
}
.xt-fit-nums b { font-size: 15px; font-weight: 800; color: #ffe9b0; }
.xt-fit-why { margin-top: 11px; font-size: 12px; line-height: 1.5; color: rgba(209, 213, 219, .9); }
.xt-fit-off { font-size: 12px; line-height: 1.5; color: #ffb367; }
/* risk bar — how much of the balance the WHOLE ladder can consume */
.xt-fit-bar {
  margin-top: 11px; height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(7, 11, 23, .7);
}
.xt-fit-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(to right, #4ade80, #e0aa3c);
}
.xt-fit-foot { margin-top: 7px; font-size: 11px; line-height: 1.5; color: rgba(175, 195, 240, .62); }

/* ── live wins counter (market card) ─────────────────────────────────────────
   The reference's colour-toned N/25: what the last 25 ticks DID for the
   current bet. A dot + bold count; tone classes drive both. */
.xt-live { display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  margin-right: 8px; }
.xt-live-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.xt-live b { font-size: 12.5px; font-weight: 800; }
.xt-tone-green .xt-live-dot { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.6); }
.xt-tone-green b { color: #4ade80; }
.xt-tone-amber .xt-live-dot { background: var(--gold-bright); box-shadow: 0 0 6px var(--glow-gold); }
.xt-tone-amber b { color: var(--gold-bright); }
.xt-tone-red .xt-live-dot { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.55); }
.xt-tone-red b { color: #f87171; }
/* collection chip pulses amber while filling, hides at 25/25 (render code) */
.xt-chip.xt-collecting { animation: xtCollectPulse 1.6s ease-in-out infinite; }
@keyframes xtCollectPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ── analyzer footer ("Best: … (13/25 wins)") ───────────────────────────── */
.xt-bestcard { text-align: center; font-size: 12px; color: var(--text-secondary);
  padding: 10px 12px; }

/* ── accumulator view ────────────────────────────────────────────────────── */
/* the digit-only cards hide as a set; the accu panel is its own column */
.xt-workspace.xt-accu-mode .xt-dmode { display: none !important; }
.xt-accu { display: flex; flex-direction: column; gap: 16px; }
.xt-accu[hidden] { display: none; }
.xt-accu-quote { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.xt-accu-quote b { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.xt-accu-quote span { font-size: 11px; color: var(--text-muted); }
.xt-accu-rates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.xt-hint2 { font-size: 11px; color: var(--text-muted); margin-top: 7px; }
.xt-accu-ttwrap { display: inline-flex; align-items: center; gap: 8px; }
.xt-input-xs { width: 64px; padding: 6px 8px; }
.xt-accu-buy { position: static; width: 100%; }
.xt-accu-buy:disabled { opacity: .55; cursor: not-allowed; }
.xt-chip-live { color: #4ade80; border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.12); animation: xtCollectPulse 2s ease-in-out infinite; }
.xt-accu-how { font-size: 12px; line-height: 1.55; color: var(--text-secondary); }
.xt-accu-activecard { border-color: var(--border-bright);
  box-shadow: 0 0 14px var(--glow-gold-soft); padding: 12px 14px; }
.xt-accu-live-top { display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; letter-spacing: .05em; color: var(--text-muted); }
.xt-accu-live-top b { font-size: 15px; }
.xt-accu-live-top b.up { color: #4ade80; } .xt-accu-live-top b.dn { color: #f87171; }
.xt-accu-live-mid { font-size: 12px; margin: 7px 0 10px; color: var(--text-secondary); }
.xt-accu-sell { width: 100%; padding: 9px 0; border-radius: 9px; border: 1px solid rgba(239,68,68,.5);
  background: rgba(239,68,68,.14); color: #f87171; font-weight: 800; cursor: pointer; }
/* Knockout History — measured off the reference. Bucket colours are semantic
   (survival length) and match theirs exactly; the accent is house gold. */
.xt-ko { padding: 0; overflow: hidden; }
.xt-ko-head { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 16px 8px; }
.xt-ko-title { font-size: 13px; font-weight: 600; color: #fff;
  display: inline-flex; align-items: center; gap: 8px; }
.xt-ko-total { font-size: 11px; color: rgba(148,163,184,.7); }
.xt-ko-counts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 16px 12px; border-bottom: 1px solid rgba(226,182,104,.13); }
.xt-ko-count { display: inline-flex; align-items: center; gap: 4px; }
.xt-ko-count i { font-style: normal; font-size: 10px; color: rgba(148,163,184,.6); }
.xt-ko-count b { font-size: 11px; font-variant-numeric: tabular-nums; }
.xt-ko-count b.lit { color: #93c5fd; }
.xt-ko-count b.dim { color: rgba(148,163,184,.35); }
.xt-ko-filter { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px;
  border-bottom: 1px solid rgba(226,182,104,.13); }
.xt-ko-pill { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600;
  background: rgba(7,11,23,.6); color: rgba(148,163,184,.7); border: 1px solid transparent;
  cursor: pointer; transition: all .15s; }
.xt-ko-pill:hover { color: rgba(226,232,240,.9); }
.xt-ko-pill.active { background: rgba(210,149,48,.18); color: var(--gold-bright);
  border-color: rgba(210,149,48,.42); }
.xt-ko-body { padding: 14px 16px 16px; }
.xt-ko-max { font-size: 11px; color: rgba(148,163,184,.6); margin-bottom: 10px; }
.xt-ko-max b { color: #fff; }
.xt-ko-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  margin-bottom: 10px; }
.xt-ko-stats > div { background: rgba(15,20,35,.85); border-radius: 8px;
  padding: 8px 4px; text-align: center; min-width: 0; }
.xt-ko-stats span { display: block; font-size: 10px; color: rgba(148,163,184,.6);
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-ko-stats b { font-size: 13px; font-variant-numeric: tabular-nums; color: #fff; }
.xt-ko-stats b.t-red { color: #f87171; }
.xt-ko-stats b.t-cyan { color: #22d3ee; }
.xt-ko-stats b.t-green { color: #34d399; }
.xt-ko-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.xt-ko-chip { display: flex; align-items: center; justify-content: center;
  height: 32px; border-radius: 4px; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.xt-ko-chip.c-1,  .xt-ko-legend i.c-1  { background: rgba(239,68,68,.25);  color: #f87171; }
.xt-ko-chip.c-2,  .xt-ko-legend i.c-2  { background: rgba(249,115,22,.2);  color: #fb923c; }
.xt-ko-chip.c-3,  .xt-ko-legend i.c-3  { background: rgba(234,179,8,.2);   color: #facc15; }
.xt-ko-chip.c-4,  .xt-ko-legend i.c-4  { background: rgba(16,185,129,.2);  color: #34d399; }
.xt-ko-chip.c-5,  .xt-ko-legend i.c-5  { background: rgba(16,185,129,.3);  color: #34d399; }
.xt-ko-chip.c-done, .xt-ko-legend i.c-done { background: rgba(6,182,212,.25);
  color: #67e8f9; box-shadow: inset 0 0 0 1px rgba(6,182,212,.4); }
.xt-ko-chip.c-live, .xt-ko-legend i.c-live { background: rgba(59,130,246,.25);
  color: #93c5fd; border: 1px solid rgba(59,130,246,.4);
  animation: xtCollectPulse 1.6s ease-in-out infinite; }
.xt-ko-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; }
.xt-ko-legend span { display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: rgba(148,163,184,.5); }
.xt-ko-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
