/* Extracted from wealthtracker.us index.css: chain + ticket chrome */

.chain-root {
  --chain-bg: var(--wt-metal, #111216);
  --chain-row: #14151c;
  --chain-row-alt: #161822;
  --chain-header: #1a1b22;
  --chain-strike: #22242e;
  --chain-hover: rgba(82, 227, 155, 0.1);
  --chain-grid: rgba(255, 255, 255, 0.07);
  --chain-bid: #5bc97d;
  --chain-ask: #ff6c6c;
  --chain-neutral: #d8d8e0;
  /* Reserved: translucent orange on the strike column for ± expected range only */
  --chain-expected-range: rgba(180, 95, 35, 0.38);
  /* Spot / ATM hairline — not the expected-range fill */
  --chain-atm: #e0a020;
  --chain-ivx-chg: #7eb8e8;
  /* Expanded expiry — purple-tinted metal (was blue-navy) */
  --chain-selected-exp: rgba(82, 227, 155, 0.12);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  background: var(--chain-bg);
  color: var(--chain-neutral);
  font-size: 12px;
  font-weight: 500;
}

/* Quiet symbol-switch wait — no fake strike grid */
.chain-load-bar {
  animation: chainLoadSlide 1.1s ease-in-out infinite;
}
@keyframes chainLoadSlide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

/* Chain loading video host + full-bleed veil.
   FADE_MS in ChainLoadingVeil.tsx must match transition duration. */
.chain-loading-host {
  position: relative;
  width: 100%;
}
.chain-loading-host.is-loading {
  min-height: min(320px, 48vh);
}
/* Cold start: cover the scroll body under the sticky column header */
.chain-loading-host--panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 34px; /* CHAIN_HEADER_HEIGHT */
  bottom: 0;
  z-index: 25;
  min-height: min(420px, 62vh);
}
.chain-loading-veil {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  /* Pure black — matches the video's own baked-in background exactly, so the
     object-fit:contain letterbox gap is invisible instead of showing a
     mismatched dark-grey seam around the square clip. */
  background: #000;
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.chain-loading-veil.is-in {
  opacity: 1;
}
/* Same portrait mark as the chart veil. */
.chain-loading-video {
  position: relative;
  width: auto;
  height: 64%;
  max-width: 300px;
  max-height: 460px;
  aspect-ratio: 784 / 1168;
  object-fit: contain;
  object-position: center;
  transform: scale(0.94);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  pointer-events: none;
}
.chain-loading-veil.is-in .chain-loading-video {
  transform: scale(1);
}
.chain-loading-caption {
  position: relative;
  z-index: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a747c;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.chain-loading-row {
  display: grid;
  width: 100%;
  border-bottom: 1px solid #222;
  background: #121212;
}

.chain-loading-row.is-even {
  background: #141414;
}

.chain-loading-cell {
  display: block;
  min-width: 0;
  margin: 4px;
  border-radius: 2px;
  background: #1e1e1e;
}

/* Shared cell alignment (numbers right, strike/DTE center) */
.chain-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border-right: none;
  padding: 0 6px;
  box-sizing: border-box;
}

.chain-cell--end {
  justify-content: flex-end;
  text-align: right;
}

.chain-cell--center {
  justify-content: center;
  text-align: center;
}

.chain-cell--strike {
  position: relative;
  background: var(--chain-strike);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Strike ladder tick marks — short every row, longer every 5th */
.chain-cell--strike::before,
.chain-cell--strike::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 1px;
  background: rgba(180, 180, 180, 0.35);
  pointer-events: none;
}
.chain-cell--strike::before {
  left: 2px;
}
.chain-cell--strike::after {
  right: 2px;
}
.chain-strike-row[data-tick="long"] .chain-cell--strike::before,
.chain-strike-row[data-tick="long"] .chain-cell--strike::after {
  width: 8px;
  background: rgba(200, 200, 200, 0.45);
}

.chain-cell--strike-head {
  background: var(--chain-strike);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #c8c8c8;
  font-weight: 600;
  font-size: 11px;
  padding: 0 6px;
}

/* DTE uses the exact same track + box model as Strike header / strike numbers */
.chain-cell--dte {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #c8c8c8;
  padding: 0 4px;
  line-height: 18px;
  height: 18px;
}

.chain-cell--dte.is-expanded {
  color: #f0f0f0;
}

/* Expiry row center cluster under Strike: Calls | DTE | Puts */
.chain-exp-atm {
  min-width: 0;
}

.chain-exp-dte {
  border-right: none;
}

.chain-exp-side-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
}

.chain-exp-side-tag.is-expanded {
  color: #fff;
}

.chain-exp-meta,
.chain-exp-right {
  min-width: 0;
}

.chain-exp-date {
  font-size: 12px;
  font-weight: 600;
  color: #e8e8e8;
  font-variant-numeric: tabular-nums;
}

.chain-exp-week {
  font-size: 10px;
  font-weight: 700;
  text-transform: lowercase;
  color: #c9a040;
  letter-spacing: 0.02em;
}

.chain-exp-chevron {
  color: #888;
  transition: transform 120ms ease;
  transform: rotate(-90deg);
}
.chain-exp-chevron.is-expanded {
  transform: rotate(0deg);
  color: #aaa;
}

.chain-ivx {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.chain-ivx-label {
  color: #c8c8c8;
  font-weight: 600;
}
.chain-ivx-pct {
  color: #fff;
  font-weight: 600;
}
.chain-ivx-chg {
  color: var(--chain-ivx-chg);
  font-weight: 500;
}

.chain-head {
  background: var(--chain-header);
  border-bottom: 1px solid var(--chain-grid);
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chain-head .chain-cell {
  border-right: none;
  font-weight: 600;
  font-size: 11px;
}

.chain-head-bid {
  color: var(--chain-bid) !important;
}
.chain-head-ask {
  color: var(--chain-ask) !important;
}

/* Sticky column header inside scroll body (shared width with rows) */
.chain-head-sticky {
  box-shadow: none;
  border-bottom: 1px solid var(--chain-grid);
  background: var(--chain-header);
}

.chain-exp-track {
  border-right: none;
}

.chain-pill {
  display: inline-flex;
  height: 18px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  text-transform: none;
  box-shadow: none;
}

.chain-pill-working {
  background: #70520b;
  border: 1px solid #b98d24;
  box-shadow: none;
}

.chain-pill-position {
  background: #323232;
  border: 1px solid #4a4a4a;
  box-shadow: none;
}

/* —— Chain side gutters (W / B# / S#) —— */
.chain-gutter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  background: var(--chain-bg);
  border-right: none;
}

.chain-gutter--put {
  border-right: 0;
  border-left: none;
}

.chain-gutter--head,
.chain-gutter--exp {
  background: transparent;
  border-color: transparent;
}

.chain-ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 22px;
  padding: 0 4px;
  border-radius: 2px 0 0 2px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%);
}

.chain-ticket-badge.is-draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.chain-ticket-badge.is-draggable:active {
  cursor: grabbing;
}

/* Pending ticket leg — the entire rail is the drag target, not just B#/S#. */
.chain-pending-leg {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border-radius: 0;
  box-sizing: border-box;
  background: transparent;
  clip-path: none;
  box-shadow: none;
}

.chain-pending-leg.is-draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.chain-pending-leg.is-draggable:active {
  cursor: grabbing;
}

.chain-pending-leg__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 100%;
  min-height: 100%;
  padding: 0 4px;
  border-radius: 0;
  box-sizing: border-box;
  pointer-events: none;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.chain-pending-leg__badge.is-buy {
  background: #1a8f5a;
}

.chain-pending-leg__badge.is-sell {
  background: #b03040;
}

.chain-gutter--call .chain-pending-leg {
  justify-content: flex-start;
}

.chain-gutter--put .chain-pending-leg {
  justify-content: flex-end;
}

.chain-gutter--put .chain-pending-leg__badge {
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%);
}

.chain-ticket-drag-ghost {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chain-ticket-drag-ghost .chain-ticket-badge {
  opacity: 0.95;
}

.chain-ticket-drag-ghost__strike {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #d8d8d8;
  background: #252525;
  border: 1px solid #4a4a4a;
  border-radius: 2px;
  padding: 1px 5px;
}

.chain-strike-row.is-drag-target {
  outline: 1px solid var(--wt-accent);
  outline-offset: -1px;
  box-shadow: inset 0 0 0 1px rgba(82, 227, 155, 0.2), var(--glow-purple);
}

.chain-ticket-badge.is-buy {
  background: #1a8f5a;
  box-shadow: none;
}

.chain-ticket-badge.is-sell {
  background: #b03040;
  box-shadow: none;
}

/* Keep the ticket flag colors aligned with the existing chain palette. */
.chain-pending-leg.is-buy {
  color: #fff;
}

.chain-pending-leg.is-sell {
  color: #fff;
}

/* Plain gold W — call gutter far left, put far right. */
.chain-working-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c9a227;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.chain-working-badge.is-compact {
  font-size: 8px;
  margin-top: 1px;
}

/*
 * Side-only ticket marks (call half vs put half — never both unless each side
 * has its own leg). Working orders use plain gold W in the gutter only.
 * Top/bottom inset lines on side cells; outer edges on gutter + bid/ask edge cells.
 */
.chain-strike-row.chain-side-mark--call-buy .chain-side-call,
.chain-strike-row.chain-side-mark--call-buy .chain-gutter--call {
  box-shadow: inset 0 1.5px 0 0 #2a9d6a, inset 0 -1.5px 0 0 #2a9d6a;
  background-color: rgba(42, 157, 106, 0.06);
}
.chain-strike-row.chain-side-mark--call-buy .chain-gutter--call {
  box-shadow:
    inset 1.5px 0 0 0 #2a9d6a,
    inset 0 1.5px 0 0 #2a9d6a,
    inset 0 -1.5px 0 0 #2a9d6a;
}
.chain-strike-row.chain-side-mark--call-buy .chain-side-edge-end {
  box-shadow:
    inset -1.5px 0 0 0 #2a9d6a,
    inset 0 1.5px 0 0 #2a9d6a,
    inset 0 -1.5px 0 0 #2a9d6a;
}

.chain-strike-row.chain-side-mark--call-sell .chain-side-call,
.chain-strike-row.chain-side-mark--call-sell .chain-gutter--call {
  box-shadow: inset 0 1.5px 0 0 #c04050, inset 0 -1.5px 0 0 #c04050;
  background-color: rgba(192, 64, 80, 0.06);
}
.chain-strike-row.chain-side-mark--call-sell .chain-gutter--call {
  box-shadow:
    inset 1.5px 0 0 0 #c04050,
    inset 0 1.5px 0 0 #c04050,
    inset 0 -1.5px 0 0 #c04050;
}
.chain-strike-row.chain-side-mark--call-sell .chain-side-edge-end {
  box-shadow:
    inset -1.5px 0 0 0 #c04050,
    inset 0 1.5px 0 0 #c04050,
    inset 0 -1.5px 0 0 #c04050;
}

/* Put half mirrors call */
.chain-strike-row.chain-side-mark--put-buy .chain-side-put,
.chain-strike-row.chain-side-mark--put-buy .chain-gutter--put {
  box-shadow: inset 0 1.5px 0 0 #2a9d6a, inset 0 -1.5px 0 0 #2a9d6a;
  background-color: rgba(42, 157, 106, 0.06);
}
.chain-strike-row.chain-side-mark--put-buy .chain-gutter--put {
  box-shadow:
    inset -1.5px 0 0 0 #2a9d6a,
    inset 0 1.5px 0 0 #2a9d6a,
    inset 0 -1.5px 0 0 #2a9d6a;
}
.chain-strike-row.chain-side-mark--put-buy .chain-side-edge-start {
  box-shadow:
    inset 1.5px 0 0 0 #2a9d6a,
    inset 0 1.5px 0 0 #2a9d6a,
    inset 0 -1.5px 0 0 #2a9d6a;
}

.chain-strike-row.chain-side-mark--put-sell .chain-side-put,
.chain-strike-row.chain-side-mark--put-sell .chain-gutter--put {
  box-shadow: inset 0 1.5px 0 0 #c04050, inset 0 -1.5px 0 0 #c04050;
  background-color: rgba(192, 64, 80, 0.06);
}
.chain-strike-row.chain-side-mark--put-sell .chain-gutter--put {
  box-shadow:
    inset -1.5px 0 0 0 #c04050,
    inset 0 1.5px 0 0 #c04050,
    inset 0 -1.5px 0 0 #c04050;
}
.chain-strike-row.chain-side-mark--put-sell .chain-side-edge-start {
  box-shadow:
    inset 1.5px 0 0 0 #c04050,
    inset 0 1.5px 0 0 #c04050,
    inset 0 -1.5px 0 0 #c04050;
}

/* A selected side's wireframe is also a vertical ticket-drag surface. */
.chain-strike-row.chain-side-mark--call-buy [data-chain-side="call"],
.chain-strike-row.chain-side-mark--call-sell [data-chain-side="call"],
.chain-strike-row.chain-side-mark--put-buy [data-chain-side="put"],
.chain-strike-row.chain-side-mark--put-sell [data-chain-side="put"] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

/* ITM is marked by the yellow ITM tags on the ATM band — not an orange wash.
   Orange translucent fill is reserved for expected-range on the strike column only. */

/* ATM separator (between OTM/ITM strikes) — gold line + flanking ITM badges */
.chain-atm-band {
  position: relative;
  display: block;
  height: 18px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--chain-bg);
  border-top: 1px solid var(--chain-atm);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  z-index: 5;
}

/* Full-width hit targets: left = chart ATM call, right = chart ATM put */
.chain-atm-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.chain-atm-hit--call {
  left: 0;
  width: 50%;
}
.chain-atm-hit--put {
  right: 0;
  width: 50%;
}
.chain-atm-hit--call:hover {
  background: linear-gradient(
    90deg,
    rgba(20, 220, 110, 0.1),
    rgba(20, 220, 110, 0.02)
  );
}
.chain-atm-hit--put:hover {
  background: linear-gradient(
    270deg,
    rgba(255, 60, 60, 0.1),
    rgba(255, 60, 60, 0.02)
  );
}
.chain-atm-hit.is-active {
  background: rgba(232, 200, 74, 0.12);
}

.chain-atm-itm {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 15px;
  padding: 0 6px 0 5px;
  border-radius: 3px;
  background: #e8c84a;
  color: #111;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.chain-atm-itm-arrow {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  fill: currentColor;
}

.chain-atm-itm--left {
  right: calc(50% + 28px);
}

.chain-atm-itm--right {
  left: calc(50% + 28px);
}

.chain-atm-itm.is-active {
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(232, 200, 74, 0.55);
}

/* Position qty pill on bid/ask */
.chain-pos-qty {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 2px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  background: #e8e8e8;
  color: #111;
  box-shadow: none;
}

.chain-pos-qty.is-short {
  background: #f0c0c8;
  color: #5a1018;
}

.chain-price {
  background: transparent;
  cursor: pointer;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--chain-neutral);
  width: 100%;
  height: 100%;
  transition: none;
}

.chain-price--bid {
  color: var(--chain-bid);
}

.chain-price--ask {
  color: var(--chain-ask);
}

/* Frozen / last-fill when no live book (after hours) */
.chain-price--muted {
  color: #7a7a7a;
  font-weight: 400;
}

.chain-price-up {
  color: var(--chain-bid) !important;
}

.chain-price-down {
  color: var(--chain-ask) !important;
}

.chain-price:hover:not(:disabled) {
  background: var(--chain-hover);
}

.chain-num {
  color: var(--chain-neutral);
  font-size: 12px;
  font-weight: 500;
}

.chain-strike-row {
  background: var(--chain-row);
  border-bottom: 1px solid var(--chain-grid);
  color: var(--chain-neutral);
  font-size: 12px;
  font-weight: 500;
}

.chain-strike-row.is-alt {
  background: var(--chain-row-alt);
}

.chain-strike-row:hover {
  background: var(--chain-hover);
  box-shadow: inset 0 0 0 1px rgba(82, 227, 155, 0.18);
}

/* Staged / selected strike (ticket focus) */
.chain-strike-row.is-selected,
.chain-strike-row.is-staged,
.chain-strike-row[data-selected='true'] {
  background: rgba(82, 227, 155, 0.12);
  box-shadow: inset 2px 0 0 var(--wt-accent);
}

.chain-exp-row {
  background: var(--chain-header);
  border: none;
  border-top: 1px solid var(--chain-grid);
  border-bottom: 1px solid var(--chain-grid);
  color: #c8c8d0;
}

.chain-exp-row.is-expanded {
  background: var(--chain-selected-exp);
  box-shadow: inset 2px 0 0 var(--wt-accent);
}

/* Sticky variant needs an opaque backing — it pins in place while strike rows
   scroll underneath, and a translucent fill let their text bleed through. */
.chain-exp-row.chain-exp-row--sticky {
  background: linear-gradient(var(--chain-selected-exp), var(--chain-selected-exp)), var(--chain-header);
  box-shadow: inset 2px 0 0 var(--wt-accent);
}

.chain-exp-row:hover {
  background: var(--chain-hover);
  filter: none;
}

.chain-exp-row.is-expanded:hover {
  background: rgba(82, 227, 155, 0.16);
}

.chain-exp-row.chain-exp-row--sticky:hover {
  background: linear-gradient(rgba(82, 227, 155, 0.16), rgba(82, 227, 155, 0.16)), var(--chain-header);
}

/* Expanded expiry pins under sticky column header while strikes scroll */
.chain-exp-row--sticky {
  position: sticky;
  top: 34px; /* CHAIN_HEADER_HEIGHT */
  z-index: 25;
  box-shadow: none;
}

/* Chain fits window — vertical scroll only, no horizontal */
.chain-root,
.chain-head-wrap,
.chain-body,
.chain-head,
.chain-strike-row,
.chain-exp-row,
.chain-exp-group {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.chain-root,
.chain-body {
  overflow-x: hidden !important;
}

.chain-head,
.chain-strike-row,
.chain-exp-row {
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  /* Prevent grid from expanding past container (default min-width:auto on items) */
  overflow: hidden;
}

/* Grid children must shrink below content width or fr tracks still overflow */
.chain-head > *:not(.chain-gutter),
.chain-strike-row > *:not(.chain-gutter),
.chain-exp-row > *:not(.chain-gutter) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/*
 * Text-only flash (no background). Soft fade ~200ms.
 * Uses !important so bid/ask color rules don't block the pulse.
 */
.soft-flash-up {
  animation: softFlashTextUp 0.2s ease-in-out;
}

.soft-flash-down {
  animation: softFlashTextDown 0.2s ease-in-out;
}

.soft-flash-up.chain-flash-a {
  animation-name: softFlashTextUpA;
}

.soft-flash-up.chain-flash-b {
  animation-name: softFlashTextUpB;
}

.soft-flash-down.chain-flash-a {
  animation-name: softFlashTextDownA;
}

.soft-flash-down.chain-flash-b {
  animation-name: softFlashTextDownB;
}

@keyframes softFlashTextUp {
  0% {
    color: inherit;
  }
  40% {
    color: #69bd7b !important;
  }
  100% {
    color: inherit;
  }
}

@keyframes softFlashTextDown {
  0% {
    color: inherit;
  }
  40% {
    color: #e05d63 !important;
  }
  100% {
    color: inherit;
  }
}

@keyframes softFlashTextUpA {
  0% {
    color: inherit;
  }
  40% {
    color: #69bd7b !important;
  }
  100% {
    color: inherit;
  }
}

@keyframes softFlashTextUpB {
  0% {
    color: inherit;
  }
  40% {
    color: #69bd7b !important;
  }
  100% {
    color: inherit;
  }
}

@keyframes softFlashTextDownA {
  0% {
    color: inherit;
  }
  40% {
    color: #e05d63 !important;
  }
  100% {
    color: inherit;
  }
}

@keyframes softFlashTextDownB {
  0% {
    color: inherit;
  }
  40% {
    color: #e05d63 !important;
  }
  100% {
    color: inherit;
  }
}

@media (prefers-reduced-motion: reduce) {
  .soft-flash-up,
  .soft-flash-down {
    animation: none;
    transition: none;
  }
  .soft-flash-up.chain-flash-a,
  .soft-flash-up.chain-flash-b,
  .soft-flash-down.chain-flash-a,
  .soft-flash-down.chain-flash-b {
    animation: none;
  }
  .chain-exp-chevron {
    transition: none;
  }
}

/* Symbol search logos — square, sized to fit metric shell height */
.symbol-search-logo {
  position: relative;
  display: inline-flex;
  height: 18px;
  width: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--desk-metric-radius);
  background: #2a2a2a;
}

.symbol-search-logo-fallback {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #c8c8c8;
}

.symbol-search-logo-img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: contain;
  background: #fff;
}

/* ── Chain column settings (IBKR Trade DISPLAY style) ── */
.chain-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.chain-settings-modal {
  display: flex;
  width: min(820px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 48px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #4a5a62;
  background: #1c1c1c;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  color: #d8d8d8;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.chain-settings-header {
  display: grid;
  grid-template-columns: 148px 1fr;
  background: #7a9bb0;
  color: #0f1720;
}

.chain-settings-modules-label {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.chain-settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
}

.chain-settings-title-row h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chain-settings-close {
  display: inline-flex;
  height: 24px;
  width: 24px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #0f1720;
  cursor: pointer;
  border-radius: 2px;
}

.chain-settings-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.chain-settings-body {
  display: grid;
  grid-template-columns: 148px 1fr;
  min-height: 0;
  flex: 1;
}

.chain-settings-nav {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #333;
  background: #151515;
  padding-bottom: 8px;
}

.chain-settings-nav-item {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9a9a9a;
  border-bottom: 1px solid #2a2a2a;
}

.chain-settings-nav-item.is-active {
  background: #3a3a3a;
  color: #f0f0f0;
}

.chain-settings-ok {
  margin: auto 10px 8px;
  height: 26px;
  border: 1px solid #555;
  background: #2a2a2a;
  color: #ddd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.chain-settings-ok:hover {
  background: #333;
  border-color: #777;
}

.chain-settings-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: #1a1a1a;
}

.chain-settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #333;
  background: #222;
  padding: 0 4px;
}

.chain-settings-tab {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8a8a8a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.chain-settings-tab:hover {
  color: #ccc;
}

.chain-settings-tab.is-active {
  color: #fff;
  border-bottom-color: #c8c8c8;
  background: #1a1a1a;
}

.chain-settings-panel {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 16px 18px 14px;
}

.chain-settings-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.chain-settings-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-bottom: 18px;
}

.chain-settings-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cfcfcf;
  cursor: pointer;
  user-select: none;
}

.chain-settings-check input {
  accent-color: #7a9bb0;
  width: 14px;
  height: 14px;
}

.chain-settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-top: 4px;
  border-top: 1px solid #2e2e2e;
  padding-top: 14px;
}

.chain-settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #e8e8e8;
}

.chain-settings-section-sub {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #7a7a7a;
  max-width: 420px;
}

.chain-settings-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #5eb0e0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 4px 6px;
}

.chain-settings-reset:hover {
  color: #8cc8f0;
}

.chain-settings-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 220px;
}

.chain-col-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border: 1px solid #333;
  background: #141414;
}

.chain-col-list-title {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #b8b8b8;
  border-bottom: 1px solid #2e2e2e;
  background: #1b1b1b;
}

.chain-col-list-body {
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}

.chain-col-empty {
  padding: 24px 10px;
  text-align: center;
  font-size: 11px;
  color: #666;
}

.chain-col-item {
  display: grid;
  grid-template-columns: 16px 72px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 7px 8px;
  border: 1px solid #3a3a3a;
  background: #2c2c2c;
  color: #e6e6e6;
  font-size: 12px;
  cursor: grab;
  user-select: none;
}

.chain-col-item:hover {
  border-color: #555;
  background: #333;
}

.chain-col-item.is-dragging {
  opacity: 0.45;
}

.chain-col-item-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chain-col-item-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #7a7a7a;
}

.chain-settings-footnote {
  margin: 12px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: #5e5e5e;
}

/* Positions page: slide-up order ticket (Close / roll / replace) */
.positions-ticket-shell {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 0;
  border-t: 1px solid #2a2a2a;
  background: #121212;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.4);
  animation: positions-ticket-slide-up 160ms ease-out;
}

@keyframes positions-ticket-slide-up {
  from {
    transform: translateY(12px);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.positions-ticket-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0 10px;
  border-bottom: 1px solid #252525;
  background: #161616;
}

.positions-ticket-chrome-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
}

.positions-ticket-chain-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid #3a4a5c;
  border-radius: 3px;
  background: #1a2430;
  color: #9ecbff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.positions-ticket-chain-btn:hover {
  background: #223044;
  border-color: #5a8fd4;
  color: #c5e0ff;
}

.positions-ticket-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #777;
  cursor: pointer;
}

.positions-ticket-dismiss:hover {
  background: var(--desk-control);
  color: var(--desk-text);
}

.positions-ticket-shell .ticket-bar {
  border-top: 0;
  box-shadow: none;
}

/* Bottom order ticket — flat desk chrome + purple primary (design system §5) */
.ticket-bar {
  background: var(--desk-panel);
  border-color: var(--desk-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.28);
}

.ticket-head {
  height: 22px;
  background: #141414;
}

.ticket-head-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--desk-text-soft);
}

.ticket-head-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px 1px 4px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--desk-text-muted);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ticket-head-link:hover {
  color: var(--wt-info);
  background: rgba(119, 167, 255, 0.08);
}

.ticket-head-link--muted {
  padding: 1px 5px;
  font-weight: 700;
}

.ticket-head-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: #1e1e1e;
  color: #c8c8c8;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}

.ticket-head-action:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: #282828;
}

.ticket-head-action.is-on {
  border-color: rgba(255, 255, 255, 0.28);
  background: #333;
  color: #fff;
}

.ticket-head-action--danger {
  color: #e88;
}

.ticket-head-action--danger:hover {
  color: #ff9aaf;
  border-color: rgba(255, 123, 147, 0.35);
  background: rgba(58, 21, 21, 0.5);
}

.ticket-head-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #777;
  cursor: pointer;
}

.ticket-head-dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ticket-trade-row {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ticket-leg-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  gap: 3px;
  width: min(380px, 40vw);
  height: 100%;
  min-height: 0;
  flex-shrink: 0;
  padding: 4px 12px 4px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  overflow: hidden;
}

.ticket-leg-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  padding-right: 2px;
  line-height: 1;
}

.ticket-leg-col-label {
  font-size: 10px;
  font-weight: 500;
  color: #8a8a8a;
  letter-spacing: 0.01em;
}

.ticket-leg-col-symbol {
  flex-shrink: 0;
  min-width: 44px;
  font-size: 10px;
  font-weight: 600;
  color: #9a9a9a;
  text-align: right;
  letter-spacing: 0.02em;
}

.ticket-leg-rows {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.ticket-leg-row {
  display: flex;
  flex: 0 0 24px;
  align-items: center;
  gap: 6px;
  height: 24px;
  min-height: 0;
  font-size: 11px;
  line-height: 1.1;
  color: #e8e8e8;
}

/* 4+ legs: equal flex rows inside fixed ticket — scale type/padding down */
.ticket-leg-col[data-leg-count='4'] .ticket-leg-rows,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-rows,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-rows {
  gap: 1px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-row,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-row,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-row {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-row {
  font-size: 10px;
  gap: 4px;
}

.ticket-leg-col[data-leg-count='5'] .ticket-leg-row {
  font-size: 9.5px;
  gap: 3px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-row {
  font-size: 9px;
  gap: 2px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-seg,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-seg {
  padding: 1px 5px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-seg {
  padding: 0 4px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-seg--qty,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-seg--qty {
  min-width: 22px;
  padding: 0 4px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-seg--qty {
  min-width: 20px;
  padding: 0 3px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-dte,
.ticket-leg-col[data-leg-count='4'] .ticket-leg-right,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-dte,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-right {
  font-size: 9px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-dte,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-right {
  font-size: 8px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-tag,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-tag {
  min-width: 28px;
  padding: 1px 4px;
  font-size: 8px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-tag {
  min-width: 26px;
  padding: 0 3px;
  font-size: 7.5px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-price,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-price {
  font-size: 10px;
}

.ticket-leg-col[data-leg-count='6'] .ticket-leg-price {
  font-size: 9px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-price-wrap,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-price-wrap,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-price-wrap {
  width: 42px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-col-head,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-col-head,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-col-head {
  margin-bottom: 1px;
}

.ticket-leg-col[data-leg-count='4'] .ticket-leg-col-label,
.ticket-leg-col[data-leg-count='4'] .ticket-leg-col-symbol,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-col-label,
.ticket-leg-col[data-leg-count='5'] .ticket-leg-col-symbol,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-col-label,
.ticket-leg-col[data-leg-count='6'] .ticket-leg-col-symbol {
  font-size: 9px;
}

.ticket-leg-body {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 3px;
  border-radius: 3px;
  min-height: 0;
}

.ticket-leg-qty-control {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 20px;
  min-width: 63px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: #242424;
}

.ticket-leg-qty-control.is-buy {
  border-color: rgba(54, 190, 123, 0.34);
}

.ticket-leg-qty-control.is-sell {
  border-color: rgba(231, 88, 93, 0.36);
}

.ticket-leg-qty-sign {
  width: 10px;
  color: #aaa;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.ticket-leg-qty-control.is-buy .ticket-leg-qty-sign {
  color: #47c98d;
}

.ticket-leg-qty-control.is-sell .ticket-leg-qty-sign {
  color: #ee6b70;
}

.ticket-leg-qty-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a7a7a7;
  cursor: pointer;
}

.ticket-leg-qty-step:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ticket-leg-qty-step:disabled {
  color: #4e4e4e;
  cursor: not-allowed;
}

.ticket-leg-qty-input {
  width: 23px;
  height: 18px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.ticket-leg-qty-input:focus {
  background: rgba(255, 255, 255, 0.1);
}

.ticket-leg-qty-input::-webkit-outer-spin-button,
.ticket-leg-qty-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.ticket-leg-qty-input[type='number'] {
  appearance: textfield;
}

.ticket-leg-seg {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 2px;
  background: #2a2a2a;
  white-space: nowrap;
}

.ticket-leg-seg--qty {
  justify-content: center;
  min-width: 26px;
  padding: 0 6px;
  font-weight: 700;
  color: #f0f0f0;
  background: #242424;
}

.ticket-leg-seg--exp {
  gap: 5px;
  min-width: 0;
  background: #303030;
}

.ticket-leg-seg--strike {
  gap: 4px;
  background: #242424;
}

.ticket-leg-exp {
  font-weight: 700;
  color: #f2f2f2;
}

.ticket-leg-dte {
  font-size: 10px;
  font-weight: 500;
  color: #8a8a8a;
}

.ticket-leg-strike {
  font-weight: 700;
  color: #fff;
}

.ticket-leg-right {
  font-size: 10px;
  font-weight: 600;
  color: #9a9a9a;
}

.ticket-leg-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  overflow: visible;
  white-space: nowrap;
}

.ticket-leg-tag.is-buy {
  background: #1b5e40;
  color: #fff;
}

.ticket-leg-tag.is-sell {
  background: #8b2e2e;
  color: #fff;
}

.ticket-leg-price-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 48px;
  padding-top: 1px;
}

.ticket-leg-price {
  font-size: 11px;
  font-weight: 600;
  color: #d8d8d8;
}

.ticket-leg-remove {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #555;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ticket-leg-row:hover .ticket-leg-remove {
  opacity: 1;
}

.ticket-leg-remove:hover {
  color: #fff;
}

.ticket-price-col {
  min-width: 0;
}

.ticket-limit-label {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--desk-text-soft);
}

.ticket-upper-band {
  background: #2a2a2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 26px;
  padding: 3px 16px;
}

.ticket-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 2px;
  width: 100%;
  min-width: 0;
}

.ticket-stat {
  display: inline-flex;
  flex: 1 1 0;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ticket-stat-oc {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: -1px;
  font-size: 6px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: #d4ad2a;
}

.ticket-stat-label {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 600;
  color: #8f8f8f;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.1;
  cursor: default;
}

.ticket-stat-value-line {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.1;
  min-width: 0;
}

.ticket-stat-value {
  font-size: 11px;
  font-weight: 700;
  color: #f4f4f4;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.ticket-stat-suffix {
  font-size: 11px;
  font-weight: 700;
  color: #c8c8c8;
  white-space: nowrap;
}

.ticket-stat-value.is-up,
.ticket-stat-suffix.is-up {
  color: #5fd47a;
}

.ticket-stat-value.is-down,
.ticket-stat-suffix.is-down {
  color: #f06a6a;
}

.ticket-stats-expand {
  display: none;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: transparent;
  color: var(--desk-text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ticket-stats-expand:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1280px) {
  .ticket-stats-expand {
    display: inline-flex;
  }

  .ticket-stat.ticket-stat--extra {
    display: none;
  }

  .ticket-upper-band.is-expanded .ticket-stat.ticket-stat--extra {
    display: inline-flex;
  }

  .ticket-upper-band.is-expanded .ticket-stats-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 6px;
  }

  .ticket-upper-band.is-expanded .ticket-stat {
    flex: 0 1 auto;
    min-width: 72px;
  }

  .ticket-upper-band.is-expanded .ticket-stats {
    min-height: 26px;
  }
}

.ticket-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--desk-text-muted);
  cursor: pointer;
}

.ticket-clear-btn:hover {
  color: var(--desk-down, #ff7b93);
  background: rgba(255, 123, 147, 0.08);
}

.ticket-legs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-bottom: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.ticket-leg-chip {
  min-width: 0;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  background: #141414;
}

.ticket-limit-hint {
  margin-left: auto;
  white-space: nowrap;
  opacity: 0.75;
}

.ticket-adv {
  flex-shrink: 0;
  height: 34px;
  border-top: 1px solid rgba(0, 0, 0, 0.22);
  border-bottom: 0;
  background: #2a2a2a;
  overflow: visible;
}

/* Right of ORDER, directly above price / order-type (no separate full-width row) */
.ticket-adv--above-price {
  border-bottom-color: var(--desk-border);
}

/* TOS: equal-width cells, label top, buttons fill cell width at compact height */
.ticket-adv-row {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: stretch;
}

.ticket-tool-group {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.28);
  background: #323232;
}

.ticket-tool-group:last-child {
  border-right: none;
}

/* Strikes — lighter cell; twin chevrons share one matte strip (no per-button chrome) */
.ticket-tool-group.is-highlight {
  background: #3f3f3f;
}

.ticket-tool-btns {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  gap: 0;
  padding: 2px 4px;
}

.ticket-tool-btns.is-merged {
  gap: 0;
  border: 1px solid #555555;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ticket-tool-label {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: 12px;
  padding: 0 4px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #a3a3a3;
  line-height: 12px;
  text-align: center;
  white-space: nowrap;
  background: #222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ticket-adv-legcount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 34px;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #8a8a8a;
  border-left: 1px solid rgba(0, 0, 0, 0.28);
  background: #323232;
}

.ticket-tool-label--spacer {
  visibility: hidden;
}

.ticket-tool-btn {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 4px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  color: #b8b8b8;
  cursor: pointer;
  line-height: 1;
}

.ticket-tool-btn.is-flat {
  border: none;
  background: transparent;
  box-shadow: none;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 3px;
}

.ticket-tool-btn.is-flat + .ticket-tool-btn.is-flat {
  border-left: 1px solid #555555;
}

.ticket-tool-btn.is-flat:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: #555555;
}

.ticket-tool-btn.is-wide {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 4px;
}

.ticket-exp-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ticket-exp-sign {
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
}

.ticket-tool-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ticket-tool-btn:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.ticket-tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ticket-tool-btn.is-danger {
  color: #e44;
  border-color: #404040;
  background: #353535;
}

.ticket-tool-btn.is-danger:hover:not(:disabled) {
  color: #ff5555;
  background: #404040;
  border-color: #585858;
}

.ticket-limit-box {
  display: flex;
  align-items: stretch;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: #1a1a1a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
}

.ticket-limit-side {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #b0b0b0;
  cursor: pointer;
}

.ticket-limit-chevs {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-limit-chev {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #b0b0b0;
  cursor: pointer;
}

.ticket-limit-chev + .ticket-limit-chev {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-limit-chev:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.ticket-limit-chev:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ticket-limit-side:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.ticket-limit-side:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ticket-limit-value {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
}

.ticket-limit-value .desk-picker {
  position: relative;
}

.ticket-limit-value .desk-picker-trigger {
  width: auto !important;
  min-width: 3ch;
  max-width: 10ch;
  height: auto !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  padding: 0 !important;
}

.ticket-limit-box .desk-price-wand,
.ticket-price-picker .desk-price-wand {
  position: fixed;
  left: auto;
  right: 168px;
  bottom: 118px;
  transform: none;
  z-index: 500;
}

.ticket-limit-input {
  width: auto;
  min-width: 3ch;
  max-width: 10ch;
  flex: 0 1 auto;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}

.ticket-limit-suffix {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: #b8b8b8;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ticket-limit-input::placeholder {
  color: #555;
  font-weight: 600;
}

.ticket-limit-input:disabled {
  opacity: 0.45;
}

.ticket-limit-box input[type='number']::-webkit-outer-spin-button,
.ticket-limit-box input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ticket-slider-wrap {
  position: relative;
}

.ticket-slider-labels {
  position: relative;
  z-index: 2; /* above range hit-area so bid/mid/ask clicks never hit the slider */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  align-items: center;
}

.ticket-slider-labels > :first-child {
  text-align: left;
  justify-self: start;
}

.ticket-slider-labels > :last-child {
  text-align: right;
  justify-self: end;
}

/* Clickable bid / mid / ask — one-shot populate limit price */
.ticket-mkt-snap {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  border: 0;
  background: transparent;
  padding: 1px 4px;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: 1.1;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
  z-index: 2;
}

.ticket-mkt-snap:hover:not(:disabled) {
  color: #e8e8e8;
  background: rgba(255, 255, 255, 0.06);
}

.ticket-mkt-snap:active:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ticket-mkt-snap:disabled {
  cursor: default;
  opacity: 0.55;
}

.ticket-mkt-snap--bid:hover:not(:disabled) {
  color: #7dcea0;
}

.ticket-mkt-snap--ask:hover:not(:disabled) {
  color: #f1948a;
}

.ticket-mkt-snap--mid:hover:not(:disabled) {
  color: #c8a84b;
}

.ticket-mkt-snap-main {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ticket-mkt-snap-sub {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.ticket-mkt-snap--mid:not(:disabled) {
  color: #c8c8c8;
}

.ticket-mkt-snap--mid.is-credit:not(:disabled) {
  color: #e87878;
}

.ticket-mkt-snap.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.ticket-mkt-snap--bid.is-active {
  color: var(--desk-up, #3dd68c) !important;
}

.ticket-mkt-snap--ask.is-active {
  color: var(--desk-down, #ff7b93) !important;
}

.ticket-mkt-snap--mid.is-active {
  color: #fff !important;
}

.ticket-mkt-snap--mid.is-credit.is-active {
  color: #ff8a8a !important;
}

/* Value row: only MID tints red on credit — bid/ask stay neutral like TT */
.ticket-slider-wrap > .ticket-slider-labels:last-of-type .ticket-mkt-snap--bid.is-active,
.ticket-slider-wrap > .ticket-slider-labels:last-of-type .ticket-mkt-snap--ask.is-active {
  color: #d8d8d8 !important;
  background: transparent;
  font-weight: 700;
}

.ticket-slider-wrap > .ticket-slider-labels:last-of-type .ticket-mkt-snap--mid.is-credit {
  color: #e07070 !important;
}

.ticket-slider-track {
  position: relative;
  z-index: 1;
  /* Clip oversized range hitbox so it cannot cover bid/mid/ask rows */
  overflow: hidden;
  height: 4px;
  background: #2e2e2e;
  border-radius: 2px;
}

.ticket-slider-fill {
  background: rgba(255, 255, 255, 0.22);
}

.ticket-slider-input {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  /* Keep hit target on the track only — do not overflow into mid buttons */
  height: 5px;
  margin: 0;
  cursor: pointer;
}

.ticket-slider-input:disabled {
  cursor: not-allowed;
}

.ticket-slider-input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.ticket-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 1px solid #888;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.ticket-slider-input::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

.ticket-slider-input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 1px solid #666;
}

.ticket-exec {
  background: transparent;
}

.ticket-field-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #777;
  line-height: 1;
}

.ticket-select {
  height: 26px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: #161616;
  box-shadow: none;
  color: #f1f1f1;
  font-size: 10px;
  font-weight: 600;
  padding: 0 6px;
  text-transform: none;
  cursor: pointer;
}

.ticket-select:focus {
  outline: none;
  border-color: #555;
}

/* Primary send — Tastytrade-style orange CTA */
.ticket-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border: 1px solid #b85a00;
  border-radius: 2px;
  background: #e86f00;
  box-shadow: none;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
  cursor: pointer;
}

.ticket-send-btn:hover:not(:disabled) {
  background: #ff7a12;
  border-color: #d06000;
  color: #111;
}

.ticket-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Instant path — info edge so it reads as “live fire” vs normal send */
.ticket-send-btn.is-instant {
  border-color: var(--wt-info);
  background: #245b72;
  box-shadow: none;
}

.ticket-instant-toggle.is-off {
  display: none;
}

.ticket-instant-toggle {
  height: 18px;
  padding: 0 6px;
  border: 1px solid #333;
  border-radius: 2px;
  background: #1a1a1a;
  color: #666;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}

.ticket-instant-toggle:hover {
  border-color: #555;
  color: #aaa;
}

.ticket-instant-toggle.is-on {
  border-color: #ff9a3a;
  background: #3a2208;
  color: #ffb35c;
}

/* Review / Preview popup */
.ticket-shortcuts-overlay {
  position: fixed;
  inset: 0;
  z-index: 460;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.ticket-shortcuts-modal {
  width: min(400px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #161616;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #ddd;
}

.ticket-shortcuts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
}

.ticket-shortcuts-head strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0f0f0;
}

.ticket-shortcuts-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #888;
  cursor: pointer;
}

.ticket-shortcuts-close:hover {
  color: #fff;
  background: #333;
}

.ticket-shortcuts-body {
  padding: 12px;
  overflow: auto;
}

.ticket-shortcuts-lead {
  margin: 0 0 10px;
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.ticket-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ticket-shortcuts-table th {
  width: 38%;
  padding: 5px 8px 5px 0;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #c8c8c8;
  vertical-align: top;
  white-space: nowrap;
}

.ticket-shortcuts-table td {
  padding: 5px 0;
  color: #aaa;
  vertical-align: top;
}

.ticket-shortcuts-table tr + tr th,
.ticket-shortcuts-table tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.ticket-review-modal {
  display: flex;
  width: min(420px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 48px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #161616;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #ddd;
}

.ticket-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
}

.ticket-review-head strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0f0f0;
}

.ticket-review-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #888;
  cursor: pointer;
}

.ticket-review-close:hover {
  color: #fff;
  background: #333;
}

.ticket-review-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 12px;
}

.ticket-review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  color: #999;
}

.ticket-review-symbol {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.ticket-review-limit {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.ticket-review-legs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
  background: #121212;
  overflow: hidden;
}

.ticket-review-leg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #1e1e1e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #bbb;
}

.ticket-review-leg:last-child {
  border-bottom: 0;
}

.ticket-review-leg .is-buy {
  color: #7dffc9;
}

.ticket-review-leg .is-sell {
  color: #ff9aaf;
}

.ticket-review-tag {
  border-radius: 2px;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 700;
}

.ticket-review-tag.is-buy {
  background: #0b3d2e;
  color: #9dffd0;
}

.ticket-review-tag.is-sell {
  background: #3a1515;
  color: #ffb0b0;
}

.ticket-review-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
  background: #161616;
}

.ticket-review-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.ticket-review-k {
  color: #888;
}

.ticket-review-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #f0f0f0;
}

.ticket-review-fill-pnl {
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid #2a2a2a;
}

.ticket-review-fill-pnl .ticket-review-k {
  color: #bbb;
  font-weight: 600;
}

.ticket-review-pnl.is-up {
  color: #3dd68c;
}

.ticket-review-pnl.is-dn {
  color: #ff7b93;
}

.ticket-review-muted {
  font-size: 12px;
  color: #777;
}

.ticket-review-error {
  font-size: 12px;
  color: #ff9aaf;
}

.ticket-review-warn {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 11px;
  color: #e8c547;
}

.ticket-review-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
}

.ticket-review-secondary {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.ticket-review-secondary:hover:not(:disabled) {
  background: #333;
  color: #fff;
}

.ticket-review-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ticket-review-confirm {
  margin-left: auto;
  width: auto;
  min-width: 140px;
  height: 36px;
  padding: 0 14px;
}


/* ========== Invest module — design system metal + purple (Workstream G) ========== */
