/* trade_ticket.css — BTTradeTicket, both mounts. Layers on colors_and_type.css tokens.
 * Density: regular 28px rule rows (operator default 2026-08-20); compact variant is the
 * R07 rail, not a density mode. No icons, no shadows, no gradients. */

.tt { font-size: var(--fs-12); color: var(--text); }

/* ── compact rail (R07) ── */
.tt-compact { display: flex; flex-direction: column; gap: var(--space-3); width: 176px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); }
.tt-sect { font-family: var(--font-mono); font-size: var(--fs-10); color: var(--text-faint);
  text-transform: lowercase; letter-spacing: 0.5px; margin-top: 2px; }
.tt-desklink { color: var(--accent); font-size: var(--fs-11); text-decoration: none; text-transform: lowercase; }
.tt-desklink:hover { text-decoration: underline; }

/* ── full mount (M01) ── */
.tt-full { display: flex; flex-direction: column; gap: var(--space-4); }
.tt-row1 { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.tt-row1-badge { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-3); }
.tt-row2 { display: flex; align-items: center; gap: var(--space-4); }

.tt-side { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.tt-side button { font-family: var(--font-mono); font-size: var(--fs-11); text-transform: lowercase;
  color: var(--text-dim); background: transparent; border: 0; padding: 3px 12px; cursor: pointer; }
.tt-side button.is-active { background: var(--accent); color: var(--on-accent); }

/* preset chip (B8) — two axes, never merged */
.tt-pchip { display: inline-flex; align-items: center; gap: var(--space-3); height: 20px;
  padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-2); white-space: nowrap; }
.tt-slot { font-family: var(--font-mono); font-size: var(--fs-10); height: 15px; display: inline-flex;
  align-items: center; padding: 0 4px; border-radius: var(--radius-xs); color: var(--text-dim);
  border: 1px solid transparent; background: transparent; cursor: pointer; }
.tt-slot.is-sel { color: var(--accent); background: var(--accent-wash); border-color: var(--accent-line); }
.tt-psum { color: var(--text-dim); font-family: var(--font-mono); font-size: var(--fs-10); }
.tt-psum .v { color: var(--text); }

/* size input with denomination */
.tt-sizein { display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-3); height: 22px; overflow: hidden; }
.tt-sizein input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text);
  background: transparent; border: 0; padding: 0 var(--space-4); font-size: var(--fs-12); width: 64px; min-width: 0; }
.tt-sizein input:focus { outline: none; }
.tt-den { display: inline-flex; height: 100%; border-left: 1px solid var(--border); }
.tt-den button { display: inline-flex; align-items: center; padding: 0 var(--space-3);
  font-family: var(--font-mono); font-size: var(--fs-10); color: var(--text-faint);
  background: transparent; border: 0; cursor: pointer; }
.tt-den button.is-sel { color: var(--accent); background: var(--accent-wash); }

/* buttons */
.tt-btn { display: inline-flex; align-items: center; justify-content: center; height: 22px;
  padding: 0 var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: var(--fs-11); text-transform: lowercase; color: var(--text); background: var(--bg-3); cursor: pointer; }
.tt-btn:hover { border-color: var(--border-hi); }
.tt-btn-buy { border-color: var(--chip-good-bd); color: var(--good); }
.tt-btn-sell { border-color: var(--chip-bad-bd); color: var(--bad); }
.tt-btn-disabled { color: var(--text-faint); background: var(--bg-2); cursor: not-allowed; }
.tt-btn.is-flash { border-color: var(--warn); }
.tt-sellrow { display: flex; gap: var(--space-3); }
.tt-sellrow .tt-btn { flex: 1; }

/* fee line — four segments, never collapsed */
.tt-fee { display: flex; align-items: center; flex-wrap: wrap; font-family: var(--font-mono);
  font-size: var(--fs-10); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tt-fee .seg { padding: 0 var(--space-3); border-left: 1px solid var(--row-divider); }
.tt-fee .seg:first-child { border-left: 0; padding-left: 0; }
.tt-fee .v { color: var(--text); }
.tt-fee .net { font-weight: var(--fw-semi); }

/* liveness strip (B6) — one line, never dismissible */
.tt-live { display: flex; align-items: center; gap: var(--space-3); height: 22px; padding: 0 var(--space-4);
  font-size: var(--fs-10); border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text-dim); white-space: nowrap; overflow: hidden; }
.tt-live .tt-dot { font-family: var(--font-mono); font-size: 9px; }
.tt-live .tt-k { color: var(--text); }
.tt-live-ok .tt-dot { color: var(--good); }
.tt-live-none .tt-dot { color: var(--text-faint); }
.tt-live-deg { border-color: var(--chip-warn-bd); background: var(--chip-warn-bg); color: var(--warn); }
.tt-live-deg .tt-dot, .tt-live-deg .tt-k { color: var(--warn); }
/* compact rail: short-form copy still guards against overflow at 176px */
.tt-compact .tt-live { padding: 0 var(--space-3); }

/* ownership badge */
.tt-badge { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: var(--fs-10);
  padding: 0 5px; height: 16px; border-radius: var(--radius-xs); border: 1px solid; white-space: nowrap; align-self: start; }
.tt-badge-action { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.tt-badge-strategy { color: var(--text-dim); border-color: var(--border); background: var(--bg-3); }
.tt-badge-locked { color: var(--warn); border-color: var(--chip-warn-bd); background: var(--chip-warn-bg); }
.tt-badge-why { font-size: var(--fs-11); color: var(--text-dim); margin-left: var(--space-3); }

/* rules panel (B5 over B2 rows) */
.tt-panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.tt-phead { display: flex; align-items: baseline; gap: var(--space-4); padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border); }
.tt-ptitle { font-size: var(--fs-11); color: var(--text); font-weight: var(--fw-semi); }
.tt-pmeta { font-size: var(--fs-11); color: var(--text-dim); }
.tt-rows { padding: 2px 0; }
.tt-rule { display: grid; grid-template-columns: 20px 16px 52px minmax(0,1fr) auto auto 16px;
  align-items: center; gap: var(--space-4); height: 28px; /* regular density */ padding: 0 var(--space-5);
  border-top: 1px solid var(--row-divider); font-size: var(--fs-12); }
.tt-rows .tt-rule:first-child { border-top: 0; }
.tt-rule:hover { background: var(--bg-3); }
.tt-rule.is-drag { opacity: 0.5; }
.tt-ord { color: var(--text-faint); font-size: var(--fs-11); text-align: right; font-variant-numeric: tabular-nums; }
.tt-rule .tt-dot { font-family: var(--font-mono); font-size: 9px; text-align: center; line-height: 1; }
.tt-kind { color: var(--text); text-transform: lowercase; }
.tt-trig { color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tt-cmp { color: var(--text-dim); }
.tt-arm { color: var(--text-dim); font-size: var(--fs-11); white-space: nowrap; }
.tt-eff { color: var(--text); font-family: var(--font-mono); white-space: nowrap; }
.tt-basis { color: var(--text-dim); }
.tt-x { color: var(--text-faint); background: transparent; border: 0; font-size: var(--fs-12);
  cursor: pointer; text-align: center; padding: 0; }
.tt-x:hover { color: var(--bad); }
.tt-fchip { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono);
  font-size: var(--fs-10); background: var(--accent-wash); color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: var(--radius-xs); padding: 0 4px; height: 15px;
  margin-left: 4px; white-space: nowrap; }
.tt-car { color: var(--text-faint); font-size: 9px; }
.tt-tag { font-family: var(--font-mono); font-size: var(--fs-10); padding: 0 4px; height: 15px;
  display: inline-flex; align-items: center; border-radius: var(--radius-xs);
  border: 1px solid var(--chip-warn-bd); color: var(--warn); margin-left: var(--space-3); }
.tt-st-draft .tt-dot { color: var(--text-faint); }
.tt-st-draft .tt-kind, .tt-st-draft .tt-trig, .tt-st-draft .tt-eff { color: var(--text-dim); }
.tt-st-armed .tt-dot { color: var(--good); }
.tt-st-cancel_pending .tt-dot { color: var(--warn); }
.tt-st-cancel_pending .tt-kind, .tt-st-cancel_pending .tt-trig, .tt-st-cancel_pending .tt-eff { color: var(--text-dim); }
.tt-st-cancelled .tt-dot { color: var(--text-faint); }
.tt-st-cancelled .tt-kind, .tt-st-cancelled .tt-trig, .tt-st-cancelled .tt-eff {
  color: var(--text-faint); text-decoration: line-through; }
.tt-st-locked { background: var(--bg-3); }
.tt-st-locked .tt-kind, .tt-st-locked .tt-trig, .tt-st-locked .tt-eff { color: var(--text-faint); }
.tt-rule.has-hint { height: auto; padding-top: 2px; padding-bottom: var(--space-2); }
.tt-hint { grid-column: 3 / 8; margin-top: 2px; padding: 3px var(--space-4); font-size: var(--fs-11);
  color: var(--warn); border-left: 2px solid var(--chip-warn-bd); background: var(--chip-warn-bg); }
.tt-empty { padding: var(--space-4) var(--space-5); font-size: var(--fs-11); color: var(--text-faint); }
.tt-pfoot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border); font-size: var(--fs-11); color: var(--text-dim); }
.tt-add { font: inherit; font-size: var(--fs-10); font-family: var(--font-mono); text-transform: lowercase;
  color: var(--text-dim); background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1px 6px; cursor: pointer; }
.tt-add:hover { border-color: var(--border-hi); color: var(--text); }
.tt-pnote { font-size: var(--fs-10); color: var(--text-faint); margin-left: auto; }
/* risk store state — honesty law 2: local/unsynced is always visible (warn) */
.tt-store { flex-basis: 100%; white-space: nowrap; font-size: var(--fs-10); font-family: var(--font-mono); color: var(--text-faint); }
.tt-store-warn { color: var(--warn); }

/* WO-6a/6b — watcher lease + channel honesty on M01 */
.tt-watcher, .tt-channel-guard {
  font-family: var(--font-mono); font-size: var(--fs-10); padding: 4px var(--space-5);
  border-bottom: 1px solid var(--border);
}
.tt-watcher-bad, .tt-channel-bad { color: var(--warn); background: var(--chip-warn-bg); }
.tt-watcher-faint, .tt-channel-faint { color: var(--text-faint); }
.tt-watcher-ok { display: none; }

/* confirm — blocked with enumerated blockers */
.tt-confirm { display: flex; flex-direction: column; gap: var(--space-3); }
.tt-blockers { border: 1px solid var(--row-divider); border-radius: var(--radius-sm); }
.tt-blockers .bl { display: flex; align-items: baseline; gap: var(--space-3);
  padding: 3px var(--space-4); border-top: 1px solid var(--row-divider);
  font-size: var(--fs-11); color: var(--text-dim); }
.tt-blockers .bl:first-child { border-top: 0; }
.tt-blockers .g { color: var(--warn); font-family: var(--font-mono); }
.tt-blockers .ref { color: var(--text-faint); font-family: var(--font-mono); font-size: var(--fs-10); margin-left: auto; }

/* R07 mount — canvas content beside the rail (operator yes 2026-08-20; ?rail=0 kills) */
.token-with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: var(--space-4); align-items: start; }
.token-with-rail-main { min-width: 0; }
@media (max-width: 960px) { .token-with-rail { grid-template-columns: 1fr; } }
