/* =========================================================================
   DQ EXECUTION TERMINAL — PROFESSIONAL LAYER STYLES
   v2.0.0 · Parts 24–32

   Extends the existing token system rather than introducing a second
   visual language. Every colour here resolves to a variable already
   declared in styles.css, so theme switching and Crypto Mode keep working
   across the new surfaces without a single override.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Layer-local tokens
   ------------------------------------------------------------------------- */
:root {
  --flash-up:    rgba(33, 230, 161, 0.30);
  --flash-down:  rgba(255, 77, 106, 0.30);
  --dur-flash:   800ms;
  --statusbar-h: 30px;
}

body.has-statusbar { padding-bottom: var(--statusbar-h); }

/* Compact density — a real desk control, not a cosmetic one. Traders
   running four monitors want more rows, not more air. */
body[data-density='compact'] .qb-td { padding: 3px 10px; font-size: 11.5px; }
body[data-density='compact'] .glass-panel { padding: 12px 14px; }
body[data-density='compact'] .qb-label { display: none; }
body[data-density='compact'] .feed-provider { padding: 8px 10px; }


/* -------------------------------------------------------------------------
   Panel header for the new sections. Matches the weight and rhythm of the
   existing *__header blocks rather than introducing a competing style.
   ------------------------------------------------------------------------- */
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hair);
}
.panel-head__sub {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-tertiary);
  margin: 4px 0 0;
  max-width: 68ch;
}

/* =========================================================================
   PART 26 — DATAFEED CONTROL CENTER
   ========================================================================= */
.feed-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.feed-status__led {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
}
.feed-status__led .led-core {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--signal-idle);
  transition: background 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.feed-status__led[data-state='live'] .led-core    { background: var(--signal-long);  box-shadow: 0 0 0 4px var(--signal-long-glow); }
.feed-status__led[data-state='connecting'] .led-core { background: var(--signal-wait); }
.feed-status__led[data-state='degraded'] .led-core{ background: var(--signal-wait);  box-shadow: 0 0 0 4px var(--signal-wait-glow); }
.feed-status__led[data-state='error'] .led-core   { background: var(--signal-short); box-shadow: 0 0 0 4px var(--signal-short-glow); }

/* A live feed breathes. A dead one doesn't. This is the single piece of
   non-user-triggered motion in the layer, and it earns its place: it is
   the fastest read on whether data is arriving. */
.feed-status__led[data-state='live'] .led-core,
.feed-status__led[data-state='connecting'] .led-core { animation: feed-pulse 1.8s ease-in-out infinite; }

@keyframes feed-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

.feed-status__main { flex: 1 1 auto; min-width: 0; }
.feed-status__line { display: flex; align-items: baseline; gap: 10px; }
.feed-status__state { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-tertiary); }
.feed-status__state[data-state='live']     { color: var(--signal-long); }
.feed-status__state[data-state='degraded'] { color: var(--signal-wait); }
.feed-status__state[data-state='error']    { color: var(--signal-short); }
.feed-status__provider { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.feed-status__meta { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }
.feed-status__meta[data-tone='bad'] { color: var(--signal-short); }

.feed-status__gauges { display: flex; gap: 20px; flex: 0 0 auto; }
.gauge { display: flex; flex-direction: column; align-items: flex-end; }
.gauge__val { font-size: 14px; color: var(--text-primary); }
.gauge__lbl { font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.03em; }

/* --- provider picker ----------------------------------------------------- */
.feed-providers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.feed-provider {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out);
}
.feed-provider:hover { border-color: var(--border-hair-strong); }
.feed-provider.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-raised));
}
.feed-provider__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.feed-provider__name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.feed-provider__kind { font-size: 10px; color: var(--text-tertiary); }
.feed-provider__note { font-size: 11px; color: var(--text-secondary); line-height: 1.45; }

.chip {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}
.chip--open   { color: var(--signal-long);  border-color: color-mix(in srgb, var(--signal-long) 35%, transparent); }
.chip--keyed  { color: var(--accent);       border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.chip--locked { color: var(--text-tertiary); border-color: var(--border-hair-strong); }

/* --- key row ------------------------------------------------------------- */
.feed-keyrow { margin-bottom: 14px; }
.feed-keyrow__label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.feed-keyrow__input { display: flex; gap: 8px; align-items: center; }
.feed-keyrow__input input {
  flex: 1 1 auto;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  background: var(--bg-void);
  border: 1px solid var(--border-hair-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.feed-keyrow__input input:focus { outline: none; border-color: var(--accent); }
.feed-keyrow__current { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }

/* The security notice is deliberately not styled as a dismissible toast or
   a muted footnote. It is a standing condition of the configuration, so it
   stays visible for as long as the configuration does. */
.feed-keyrow__warn {
  font-size: 11px;
  line-height: 1.5;
  color: var(--signal-wait);
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 2px solid var(--signal-wait);
  background: color-mix(in srgb, var(--signal-wait) 6%, transparent);
}
.feed-keyrow__safe {
  font-size: 11px;
  line-height: 1.5;
  color: var(--signal-long);
  padding: 8px 10px;
  border-left: 2px solid var(--signal-long);
  background: color-mix(in srgb, var(--signal-long) 6%, transparent);
}
.feed-keyrow__safe code { font-size: 11px; color: var(--text-primary); }

/* --- controls + log ------------------------------------------------------ */
.feed-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.feed-toggle { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); cursor: pointer; }
.feed-chain { font-size: 10px; color: var(--text-tertiary); margin-left: auto; }

.feed-log {
  max-height: 150px;
  overflow-y: auto;
  border-top: 1px solid var(--border-hair);
  padding-top: 8px;
}
.feed-log__line { display: flex; gap: 10px; font-size: 11px; padding: 3px 0; color: var(--text-secondary); }
.feed-log__t { color: var(--text-tertiary); flex: 0 0 auto; }
.feed-log__line--warn { color: var(--signal-wait); }

/* =========================================================================
   PART 27 — QUOTE BOARD

   The flash treatment is the most important thing in this file, so it is
   worth being explicit about the choices:

   · Background flash rather than text colour change. Recolouring the digits
     costs legibility at exactly the moment the trader is trying to read
     them, which defeats the purpose.
   · 600ms with a fast attack and a slow release. Long enough to catch in
     peripheral vision while looking elsewhere on the board, short enough
     that a fast market doesn't smear into a solid block.
   · The arrow persists after the flash decays. Flash answers "did it just
     move", the arrow answers "which way", and those are read at different
     moments.
   ========================================================================= */
.qb-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.qb-tab {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
}
.qb-tab:hover { color: var(--text-secondary); }
.qb-tab.is-active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.qb-tab:disabled { cursor: default; opacity: 1; }

.qb-table { width: 100%; border-collapse: collapse; }

.qb-th {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-hair-strong);
  white-space: nowrap;
  user-select: none;
}
.qb-th--right { text-align: right; }
.qb-th--left  { text-align: left; }
.qb-th.is-sortable { cursor: pointer; }
.qb-th.is-sortable:hover { color: var(--text-secondary); }
.qb-th[data-sort]::after { content: ' ▲'; font-size: 8px; color: var(--accent); }
.qb-th[data-sort='desc']::after { content: ' ▼'; }

.qb-row { border-bottom: 1px solid var(--border-hair); cursor: pointer; }
.qb-row:hover { background: color-mix(in srgb, var(--text-primary) 3%, transparent); }
.qb-row[data-stale='true'] { opacity: 0.45; }

.qb-td { padding: 6px 10px; font-size: 12px; color: var(--text-secondary); }
.qb-td--num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qb-td--sym { display: flex; align-items: center; gap: 8px; }

/* --- daily / weekly change badges, in front of the symbol --------------- */
.qb-chg-pair { display: flex; flex-direction: column; gap: 1px; flex: 0 0 auto; margin-right: 2px; }
.qb-chg-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
  padding: 0 4px;
  border-radius: 2px;
  color: var(--text-tertiary);
  background: var(--bg-void);
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qb-chg-badge[data-tone='pos']  { color: var(--data-positive); background: color-mix(in srgb, var(--data-positive) 12%, var(--bg-void)); }
.qb-chg-badge[data-tone='neg']  { color: var(--data-negative); background: color-mix(in srgb, var(--data-negative) 12%, var(--bg-void)); }
.qb-chg-badge[data-tone='flat'] { color: var(--data-neutral); }

.qb-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: var(--text-tertiary); }
.qb-dot[data-class='forex']       { background: var(--class-forex); }
.qb-dot[data-class='indices']     { background: var(--class-indices); }
.qb-dot[data-class='crypto']      { background: var(--class-crypto); }
.qb-dot[data-class='commodities'] { background: var(--class-commodities); }

.qb-sym { color: var(--text-primary); font-size: 12px; font-weight: 500; }
.qb-label { color: var(--text-tertiary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* --- the last-price cell and its flash ----------------------------------- */
.qb-td--last {
  position: relative;
  color: var(--text-primary);
  font-weight: 500;
  border-radius: 2px;
}
.qb-td--last.is-up   { animation: flash-up   var(--dur-flash) var(--ease-out); }
.qb-td--last.is-down { animation: flash-down var(--dur-flash) var(--ease-out); }

@keyframes flash-up {
  0%   { background: var(--flash-up); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal-long) 55%, transparent); }
  35%  { background: var(--flash-up); }
  100% { background: transparent; box-shadow: inset 0 0 0 1px transparent; }
}
@keyframes flash-down {
  0%   { background: var(--flash-down); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal-short) 55%, transparent); }
  35%  { background: var(--flash-down); }
  100% { background: transparent; box-shadow: inset 0 0 0 1px transparent; }
}

.qb-arrow {
  display: inline-block;
  width: 12px;
  font-size: 9px;
  margin-right: 5px;
  color: var(--signal-idle);
  transform-origin: center;
}
.qb-arrow[data-dir='1']  { color: var(--signal-long); }
.qb-arrow[data-dir='-1'] { color: var(--signal-short); }
.qb-arrow.is-pulsing     { animation: arrow-pop 420ms var(--ease-out); }

@keyframes arrow-pop {
  0%   { transform: scale(0.6) translateY(var(--pop-y, 0)); opacity: 0.4; }
  40%  { transform: scale(1.45); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.qb-td--num[data-tone='pos']  { color: var(--data-positive); }
.qb-td--num[data-tone='neg']  { color: var(--data-negative); }
.qb-td--num[data-tone='flat'] { color: var(--data-neutral); }

/* --- day range bar -------------------------------------------------------- */
.qb-range { position: relative; display: block; width: 90px; height: 4px; background: var(--bg-void); border-radius: 2px; overflow: visible; }
.qb-range__fill { position: absolute; left: 0; top: 0; height: 100%; background: color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 2px; transition: width 300ms var(--ease-out); }
.qb-range__mark { position: absolute; top: -2px; width: 2px; height: 8px; background: var(--text-primary); border-radius: 1px; transition: left 300ms var(--ease-out); }

.qb-spark { width: 80px; height: 22px; }
.qb-spark polyline { fill: none; stroke-width: 1.2; stroke: var(--text-tertiary); }
.qb-spark polyline.is-up   { stroke: var(--signal-long); }
.qb-spark polyline.is-down { stroke: var(--signal-short); }

.qb-empty { padding: 24px; text-align: center; color: var(--text-tertiary); font-size: 12px; }

/* =========================================================================
   PART 28 — REFRESH INDICATOR
   ========================================================================= */
.dq-refresh-indicator { display: flex; align-items: center; gap: 12px; }

.rf-ring {
  position: relative;
  width: 40px; height: 40px;
  flex: 0 0 auto;
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rf-ring__svg { position: absolute; inset: 0; width: 40px; height: 40px; transform: rotate(-90deg); }
.rf-ring__track { fill: none; stroke: var(--border-hair-strong); stroke-width: 2; }
.rf-ring__prog {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 260ms linear, stroke 200ms var(--ease-out);
}
.rf-ring__count { font-size: 11px; color: var(--text-secondary); z-index: 1; }

.dq-refresh-indicator[data-imminent='true'] .rf-ring__prog { stroke: var(--signal-wait); }
.dq-refresh-indicator[data-paused='true'] .rf-ring__prog { stroke: var(--signal-idle); }
.dq-refresh-indicator[data-paused='true'] .rf-ring__count { color: var(--text-tertiary); }

/* The refreshing sign: the ring hands over to a sweeping arc for as long
   as work is actually in flight, so "refreshing" is a state the interface
   reports rather than a fixed animation that runs regardless. */
.rf-ring__spinner { display: none; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dq-refresh-indicator[data-running='true'] .rf-ring__spinner { display: block; animation: rf-spin 700ms linear infinite; }
.dq-refresh-indicator[data-running='true'] .rf-ring__prog { opacity: 0.15; }

@keyframes rf-spin { to { transform: rotate(360deg); } }

.rf-meta { display: flex; flex-direction: column; line-height: 1.4; }
.rf-meta__state { font-size: 12px; color: var(--text-primary); }
.rf-meta__last { font-size: 10px; color: var(--text-tertiary); }
.rf-meta__last[data-tone='bad'] { color: var(--signal-short); }

.dq-refresh-indicator[data-running='true'] .rf-meta__state { color: var(--accent); }

.rf-interval {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  background: var(--bg-void);
  color: var(--text-secondary);
  border: 1px solid var(--border-hair-strong);
  border-radius: var(--radius-sm);
}

/* =========================================================================
   PART 29 — INTEL MARKERS & POPOVER
   ========================================================================= */
[data-intel] { position: relative; }

.intel-marker {
  position: absolute;
  top: 6px; right: 6px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 10px;
  line-height: 1;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out);
  z-index: 3;
}
[data-intel]:hover .intel-marker,
.intel-marker:focus-visible { opacity: 1; }
.intel-marker:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.intel-pop {
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--bg-overlay);
  border: 1px solid var(--border-hair-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  z-index: 1200;
  backdrop-filter: blur(var(--blur-glass-strong));
}

.intel-pop__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-hair);
}
.intel-pop__badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--text-tertiary);
  border: 1px solid var(--border-hair-strong);
  flex: 0 0 auto;
}
.intel-pop__badge[data-tone='ai']    { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.intel-pop__badge[data-tone='local'] { color: var(--text-tertiary); }
.intel-pop__title { font-size: 13px; color: var(--text-primary); font-weight: 500; flex: 1 1 auto; line-height: 1.35; }
.intel-pop__close { background: none; border: none; color: var(--text-tertiary); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px; }
.intel-pop__close:hover { color: var(--text-primary); }

.intel-pop__body { padding: 12px 14px; max-height: 340px; overflow-y: auto; }
.intel-read { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 12px; }

.intel-block { margin-bottom: 10px; padding-left: 10px; border-left: 2px solid var(--border-hair-strong); }
.intel-block__k { display: block; font-size: 10px; color: var(--text-tertiary); margin-bottom: 3px; }
.intel-block p { font-size: 11.5px; line-height: 1.55; color: var(--text-secondary); margin: 0; }
.intel-block--inv   { border-left-color: var(--signal-short); }
.intel-block--blind { border-left-color: var(--signal-wait); }

.intel-fallback, .intel-cached { font-size: 10.5px; color: var(--text-tertiary); margin: 8px 0 0; font-style: italic; }

.intel-pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border-hair); }
.intel-conf { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.intel-conf__bar { display: block; flex: 1 1 auto; height: 3px; background: var(--bg-void); border-radius: 2px; overflow: hidden; max-width: 120px; }
.intel-conf__bar i { display: block; height: 100%; width: 0; background: var(--text-tertiary); transition: width 400ms var(--ease-out); }
.intel-conf__bar i[data-tone='high'] { background: var(--signal-long); }
.intel-conf__bar i[data-tone='mid']  { background: var(--signal-wait); }
.intel-conf__bar i[data-tone='low']  { background: var(--signal-short); }
.intel-conf .mono { font-size: 10px; color: var(--text-tertiary); }

.btn--sm { height: 26px; padding: 0 10px; font-size: 11px; }

.intel-skel i { display: block; height: 9px; border-radius: 2px; margin-bottom: 8px; background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-overlay) 50%, var(--bg-raised) 75%); background-size: 200% 100%; animation: skel 1.1s linear infinite; }
.intel-skel i:nth-child(2) { width: 88%; }
.intel-skel i:nth-child(3) { width: 62%; }
@keyframes skel { to { background-position: -200% 0; } }

/* --- intel configuration -------------------------------------------------- */
.intel-cfg__vendors { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.intel-vendor {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.intel-vendor:hover { border-color: var(--border-hair-strong); }
.intel-vendor.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-raised)); }
.intel-vendor__name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.intel-vendor__note { font-size: 11px; color: var(--text-secondary); line-height: 1.45; }
.intel-cfg__status { font-size: 11px; margin-top: 10px; }
.intel-cfg__status[data-tone='ok']   { color: var(--signal-long); }
.intel-cfg__status[data-tone='warn'] { color: var(--signal-wait); }

/* =========================================================================
   PART 30 — ALERTS
   ========================================================================= */
.al-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.al-form select, .al-form input {
  height: 32px; padding: 0 10px; font-size: 12px;
  background: var(--bg-void); color: var(--text-primary);
  border: 1px solid var(--border-hair-strong); border-radius: var(--radius-sm);
}
.al-form input[type='number'] { width: 120px; }
.al-form input[type='text'] { flex: 1 1 160px; min-width: 120px; }
.al-form select:focus, .al-form input:focus { outline: none; border-color: var(--accent); }

.al-list { display: flex; flex-direction: column; gap: 2px; }
.al-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--bg-raised); font-size: 12px; }
.al-row.is-fired { opacity: 0.55; }
.al-row__led { width: 7px; height: 7px; border-radius: 50%; background: var(--signal-idle); flex: 0 0 auto; }
.al-row__led[data-active='true'] { background: var(--signal-long); box-shadow: 0 0 0 3px var(--signal-long-glow); }
.al-row__sym { color: var(--text-primary); font-weight: 500; min-width: 64px; }
.al-row__cond { color: var(--text-secondary); }
.al-row__note { color: var(--text-tertiary); font-size: 11px; font-style: italic; }
.al-row__state { margin-left: auto; font-size: 10px; color: var(--text-tertiary); }
.al-row__x { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.al-row__x:hover { color: var(--signal-short); }
.al-empty { font-size: 12px; color: var(--text-tertiary); padding: 16px 0; }

/* --- toast ---------------------------------------------------------------- */
.dq-toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--statusbar-h) + 16px);
  max-width: 340px;
  padding: 12px 16px;
  background: var(--bg-overlay);
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-modal);
  color: var(--text-primary);
  font-size: 12px;
  z-index: 1300;
  transform: translateX(120%);
  transition: transform 300ms var(--ease-out);
}
.dq-toast.is-in { transform: translateX(0); }

/* =========================================================================
   PART 31 — COMMAND PALETTE
   ========================================================================= */
.cmdk { position: fixed; inset: 0; z-index: 1400; }
.cmdk__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); }
.cmdk__panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 12vh auto 0;
  background: var(--bg-overlay);
  border: 1px solid var(--border-hair-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.cmdk__input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  font-size: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-hair);
  color: var(--text-primary);
}
.cmdk__input:focus { outline: none; }
.cmdk__input::placeholder { color: var(--text-tertiary); }

.cmdk__list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.cmdk__group { font-size: 10px; color: var(--text-tertiary); padding: 8px 12px 4px; letter-spacing: 0.05em; }
.cmdk__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 8px 12px;
  background: transparent; border: none; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left;
}
.cmdk__item:hover, .cmdk__item.is-cursor { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cmdk__label { font-size: 13px; color: var(--text-primary); }
.cmdk__hint { font-size: 10px; color: var(--text-tertiary); }
.cmdk__empty { padding: 20px; text-align: center; font-size: 12px; color: var(--text-tertiary); }
.cmdk__foot { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--border-hair); font-size: 10px; color: var(--text-tertiary); }

/* =========================================================================
   PART 31b — STATUS BAR
   ========================================================================= */
.dq-statusbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--statusbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: var(--bg-void);
  border-top: 1px solid var(--border-hair-strong);
  font-size: 11px;
  z-index: 900;
}
.sb-item { display: flex; align-items: center; gap: 6px; color: var(--text-tertiary); cursor: default; }
#sb-feed, #sb-refresh { cursor: pointer; }
#sb-feed:hover .sb-txt, #sb-refresh:hover { color: var(--text-primary); }
.sb-led { width: 6px; height: 6px; border-radius: 50%; background: var(--signal-idle); flex: 0 0 auto; }
.sb-led[data-state='live']     { background: var(--signal-long); }
.sb-led[data-state='degraded'] { background: var(--signal-wait); }
.sb-led[data-state='error']    { background: var(--signal-short); }
.sb-led[data-state='connecting'] { background: var(--signal-wait); }
.sb-txt { font-size: 11px; }
.sb-sep { width: 1px; height: 14px; background: var(--border-hair-strong); }
.sb-spacer { flex: 1 1 auto; }
.sb-cmdk {
  padding: 2px 8px;
  font-size: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-hair-strong);
  border-radius: 3px;
  color: var(--text-tertiary);
  cursor: pointer;
}
.sb-cmdk:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================================
   Accessibility & responsive
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .feed-status__led .led-core,
  .rf-ring__spinner,
  .intel-skel i { animation: none !important; }
  .qb-td--last.is-up, .qb-td--last.is-down { animation-duration: 1ms; }
  /* Motion is removed, but the signal is not: direction still reads from
     the arrow and a persistent tint rather than from movement. */
  .qb-td--last.is-up   { background: var(--flash-up); }
  .qb-td--last.is-down { background: var(--flash-down); }
  .qb-arrow.is-pulsing { animation: none; }
}

.intel-marker:focus-visible,
.qb-th.is-sortable:focus-visible,
.rf-ring:focus-visible,
.sb-cmdk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
  .feed-status { flex-wrap: wrap; }
  .feed-status__gauges { width: 100%; justify-content: space-between; }
  .qb-td--spark, .qb-th:nth-child(8) { display: none; }
  .qb-label { display: none; }
  .dq-statusbar { gap: 8px; overflow-x: auto; }
  #sb-ticks, #sb-session { display: none; }
}

@media (max-width: 640px) {
  .qb-td--range, .qb-th:nth-child(7) { display: none; }
  .feed-providers { grid-template-columns: 1fr; }
}
