:root {
  color-scheme: dark;
  --bg: #02070d;
  --surface: #06111c;
  --surface-2: #091827;
  --surface-3: #0c2031;
  --line: #173f59;
  --line-soft: #102d41;
  --text: #f2f7fb;
  --muted: #7f9bb0;
  --cyan: #32d5f3;
  --cyan-soft: #123e50;
  --green: #22d6a3;
  --red: #ff5574;
  --gold: #e7b63d;
  --blue: #4e9cff;
  --shadow: 0 16px 40px rgba(0, 0, 0, .26);
  --radius: 8px;
  --font: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
html, body, .ql590-journal-body, .ql590-list > div, .ql590-side,
.ql590-seg, .ql590-tf, select {
  scrollbar-width: thin;
  scrollbar-color: #1686a5 #04111c;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #04111c; }
*::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 2px solid #04111c;
  border-radius: 999px;
  background: linear-gradient(180deg, #1b8dab, #12627e);
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #31c5df, #1688a5); }
*::-webkit-scrollbar-corner { background: #04111c; }
body.ql590 {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.ql590-shell { width: 100%; padding: 10px; }
.ql590-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 258px minmax(170px, 220px) auto auto minmax(120px, 1fr) 104px 114px 38px 38px;
  gap: 8px;
  align-items: stretch;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 0;
  background: #02070d;
  border-bottom: 1px solid rgba(50, 213, 243, .12);
}
.ql590-brand, .ql590-symbol, .ql590-seg, .ql590-tf, .ql590-tools,
.ql590-clock, .ql590-auth, .ql590-icon {
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.ql590-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  color: var(--text);
  text-decoration: none;
}
.ql590-brand img { width: 42px; height: 36px; object-fit: contain; }
.ql590-brand div { min-width: 0; }
.ql590-brand strong { display: block; color: #f6d56a; font-size: 18px; line-height: 1; }
.ql590-brand span { display: block; margin-top: 6px; color: var(--cyan); font-size: 8px; font-weight: 800; }
.ql590-symbol { display: grid; grid-template-rows: auto 1fr; padding: 5px 8px; }
.ql590-symbol > span { color: var(--cyan); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.ql590-symbol select { width: 100%; min-width: 0; padding: 0 22px 0 0; border: 0; background: transparent; color: var(--text); font-weight: 800; }
.ql590-seg, .ql590-tf, .ql590-tools { display: flex; align-items: center; gap: 3px; padding: 4px; }
.ql590-seg button, .ql590-tf button, .ql590-tools button, .ql590-icon {
  min-width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #96b7d4;
  font-weight: 800;
}
.ql590-seg button:hover, .ql590-tf button:hover, .ql590-tools button:hover, .ql590-icon:hover,
.ql590-seg button.is-active, .ql590-tf button.is-active {
  border-color: #20718c;
  background: #08283a;
  color: #e9fbff;
}
.ql590-tools { justify-content: center; }
.ql590-clock { display: grid; place-items: center; padding: 4px; color: #d8e9f4; font-size: 11px; font-weight: 800; text-align: center; }
.ql590-auth { display: grid; grid-template-columns: 10px 1fr; grid-template-rows: 1fr 1fr; align-items: center; padding: 5px 8px; color: var(--text); }
.ql590-auth i { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px currentColor; }
.ql590-auth span, .ql590-auth b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ql590-auth b { color: var(--red); }
.ql590-auth.is-connected i { background: var(--green); color: var(--green); }
.ql590-auth.is-connected b { color: var(--green); }
.ql590-auth.is-pending i { background: var(--gold); color: var(--gold); }
.ql590-auth.is-pending b { color: var(--gold); }

.ql590-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 10px; align-items: start; }
.ql590-main, .ql590-side { min-width: 0; }
.ql590-main { display: grid; gap: 8px; }
.ql590-side { display: grid; gap: 8px; position: sticky; top: 66px; }
.ql590-chart-card, .ql611-manual-panel, .ql590-journal, .ql590-list,
.ql590-balance, .ql590-control, .ql590-ai-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .02);
}
.ql590-chart-card { position: relative; min-height: 520px; }
.ql590-chart-title { position: absolute; z-index: 3; top: 14px; left: 16px; display: flex; align-items: center; gap: 8px; }
.ql590-chart-title strong { font-size: 14px; }
.ql590-chart-title i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.ql590-chart-barrier { position: absolute; z-index: 3; top: 40px; left: 16px; color: #a8bdcc; font-size: 11px; }
.ql590-canvas-wrap { position: relative; width: 100%; height: 520px; min-height: 420px; }
.ql590-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.ql590-price { position: absolute; z-index: 4; top: 19%; right: 16px; display: grid; min-width: 76px; padding: 8px 10px; border-radius: 6px; background: var(--green); color: #001b13; text-align: center; box-shadow: 0 6px 20px rgba(34, 214, 163, .2); }
.ql590-price b { font-size: 13px; }
.ql590-price span { font-size: 9px; font-weight: 800; }
.ql590-contract-overlay { position: absolute; z-index: 5; display: none; max-width: 240px; padding: 9px 11px; border: 1px solid #187c7b; border-radius: 7px; background: rgba(4, 26, 35, .94); box-shadow: var(--shadow); }
.ql590-contract-overlay.is-visible { display: grid; gap: 3px; }
.ql590-contract-overlay b { color: var(--green); font-size: 10px; text-transform: uppercase; }
.ql590-contract-overlay span, .ql590-contract-overlay em { overflow: hidden; color: #e6f1f7; font-size: 11px; font-style: normal; text-overflow: ellipsis; }
.ql590-entry { left: 14%; top: 32%; }
.ql590-active { left: 58%; top: 12%; }
.ql590-result { right: 17%; top: 34%; border-color: var(--gold); }
.ql590-result b { color: var(--gold); }
.ql590-zoom { position: absolute; z-index: 6; left: 16px; bottom: 14px; display: flex; gap: 5px; }
.ql590-zoom button { width: 36px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #061624; color: #dff7ff; font-weight: 800; }

.ql611-manual-panel { padding: 12px; }
.ql611-manual-panel > header, .ql590-journal > header, .ql590-list > header, .ql590-ai-visual > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  gap: 10px;
}
.ql611-manual-panel h2, .ql590-journal h2, .ql590-list h2, .ql590-ai-visual h2, .ql590-control h2 {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}
.ql611-manual-panel > header > span { padding: 5px 9px; border: 1px solid #16765f; border-radius: 999px; color: var(--green); font-size: 9px; font-weight: 800; }
.ql611-manual-grid { display: grid; grid-template-columns: minmax(155px, 1.3fr) repeat(5, minmax(86px, .75fr)); gap: 8px; margin-top: 8px; }
.ql611-field, .ql590-control-grid label { display: grid; gap: 4px; min-width: 0; }
.ql611-field > span, .ql590-control-grid label > span { overflow: hidden; color: #8db2c9; font-size: 10px; font-weight: 700; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.ql611-field input, .ql611-field select, .ql590-control-grid input, .ql590-control-grid select,
.ql590-settings input, .ql590-settings select {
  width: 100%; min-width: 0; height: 36px; padding: 0 11px;
  border: 1px solid #1c526e; border-radius: 6px; background: #071a2b; color: #f3f9fc; font-weight: 700;
}
select, select option { color-scheme: dark; }
select option { background: #071a2b; color: #f3f9fc; }
.ql590-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; margin-top: 10px; }
.ql590-action { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 1fr 1fr; align-items: center; min-width: 0; height: 60px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease, transform .16s ease; }
.ql590-action > span, .ql590-action > img { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 7px; object-fit: contain; font-size: 20px; }
.ql590-action b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ql590-action em { overflow: hidden; color: #9cb5c7; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ql590-up { border-color: #168d75; background: #062a27; }
.ql590-up > span, .ql590-up b { color: #5ff1c6; }
.ql590-down { border-color: #9d3555; background: #25101d; }
.ql590-down > span, .ql590-down b { color: #ff7d9b; }
.ql590-buy { border-color: #a9791e; background: #392806; }
.ql590-buy b { color: #ffe49a; }
.ql590-buy img { border-color: #8a6922; }
.ql590-action:hover { filter: brightness(1.15); transform: translateY(-1px); }
.ql590-action:disabled { cursor: wait; filter: grayscale(.6); opacity: .65; transform: none; }
.ql590-action[data-manual-direction] { opacity: .72; }
.ql590-action[data-manual-direction]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; opacity: 0; transform: scale(.65); transition: opacity .16s ease, transform .16s ease; }
.ql590-action[data-manual-direction].is-active { opacity: 1; transform: translateY(-1px); }
.ql590-action[data-manual-direction].is-active::after { opacity: 1; transform: scale(1); }
.ql590-up.is-active { border-color: #22e5b7; background: linear-gradient(180deg, #07493e, #052d29); box-shadow: inset 0 0 0 1px rgba(34, 229, 183, .22), 0 0 18px rgba(34, 229, 183, .16); }
.ql590-up.is-active::after { background: var(--green); color: var(--green); box-shadow: 0 0 10px var(--green); }
.ql590-down.is-active { border-color: #ff5578; background: linear-gradient(180deg, #49152a, #2c1020); box-shadow: inset 0 0 0 1px rgba(255, 85, 120, .22), 0 0 18px rgba(255, 85, 120, .16); }
.ql590-down.is-active::after { background: var(--red); color: var(--red); box-shadow: 0 0 10px var(--red); }
.ql590-action[data-manual-direction]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.ql590-banner { width: 100%; height: auto; min-height: 0; aspect-ratio: 1258 / 179; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #06111c url('/assets/stage590-reference-lion-banner.png') center / contain no-repeat; }
.ql590-journal header, .ql590-list header, .ql590-ai-visual header { padding: 7px 12px; border-bottom: 1px solid var(--line-soft); background: #082034; }
.ql590-journal header button, .ql590-list header button { height: 24px; border: 1px solid #295873; border-radius: 6px; background: #102c41; color: #d9e8f1; font-weight: 800; }
.ql590-journal-body { height: 220px; overflow: auto; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th, td { height: 38px; padding: 7px 12px; border-bottom: 1px solid #102b3e; color: #dceaf2; font-size: 11px; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 2; background: #071b2e; color: #8ac3e9; font-size: 10px; text-transform: uppercase; }
tbody tr:hover td { background: #092036; }
.ql590-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #6d8798; box-shadow: 0 0 8px currentColor; vertical-align: 1px; }
.ql590-dot.ok, td.ok { color: var(--green); }
.ql590-dot.ok { background: var(--green); }
.ql590-dot.active, td.active { color: var(--cyan); }
.ql590-dot.active { background: var(--cyan); }
.ql590-dot.warn, td.warn { color: #ffd05a; }
.ql590-dot.warn { background: #ffd05a; }
.ql590-dot.loss, td.loss { color: var(--red); }
.ql590-dot.loss { background: var(--red); }
.ql590-journal table { min-width: 760px; }
.ql590-journal td:nth-child(2) { min-width: 150px; font-weight: 750; }
.ql590-journal td:nth-child(3) { min-width: 360px; white-space: normal; line-height: 1.35; }
.ql590-journal td:last-child { font-weight: 850; }
.ql590-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ql590-metrics article { display: grid; min-width: 0; min-height: 94px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ql590-metrics span { color: #7ca0b7; font-size: 9px; text-transform: uppercase; }
.ql590-metrics b { overflow: hidden; align-self: center; color: var(--text); font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.ql590-metrics em { color: #6d8ba0; font-size: 10px; font-style: normal; }
.ql590-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
.ql590-list { min-width: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr); overflow: hidden; }
.ql590-list > header { min-width: 0; min-height: 42px; height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ql590-list > header h2 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.ql590-list-tools { min-width: 190px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ql590-list header b { min-width: 28px; height: 24px; display: grid; place-items: center; margin: 0; padding: 0 7px; border: 1px solid #1c5a73; border-radius: 5px; background: #071b2b; color: var(--cyan); font-size: 11px; }
.ql590-list-status { overflow: hidden; color: #7498ad; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ql590-list > div { min-width: 0; min-height: 290px; height: 290px; overflow: auto; }
.ql590-list table { min-width: 720px; }
.ql590-list th, .ql590-list td { height: 38px; }

.ql590-balance { position: relative; min-height: 118px; display: grid; align-content: center; padding: 16px 92px 16px 18px; background: #0b1721; }
.ql590-balance span { color: #7898ac; font-size: 9px; text-transform: uppercase; }
.ql590-balance strong { margin: 6px 0; color: var(--text); font-size: 30px; }
.ql590-balance em { color: var(--green); font-style: normal; font-weight: 800; }
.ql590-balance-logo { position: absolute; right: 18px; top: 20px; width: 72px; height: 72px; object-fit: contain; }
.ql590-lion-watermark { display: none; }
.ql590-control { padding: 10px; }
.ql590-control-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; margin-bottom: 8px; }
.ql590-control-head span { padding: 4px 6px; border: 1px solid #32536a; border-radius: 999px; color: #b7cad5; font-size: 8px; font-weight: 800; }
.ql590-control-head span.is-on { border-color: #168d75; background: #062720; color: var(--green); }
.ql590-control-head span.is-off { border-color: #7a3044; background: #25101a; color: #ff8aa0; }
.ql590-control-head span.is-recovering { border-color: #8a6a27; background: #241b0b; color: #ffd05a; }
.ql650-runtime-strip {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #29485d;
  border-radius: 6px;
  background: #071725;
}
.ql650-runtime-strip > i { width: 9px; height: 9px; border-radius: 50%; background: #60798b; box-shadow: 0 0 10px currentColor; }
.ql650-runtime-strip > div { display: grid; min-width: 0; gap: 2px; }
.ql650-runtime-strip b { overflow: hidden; color: #dfeef5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ql650-runtime-strip span { overflow: hidden; color: #7898ac; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ql650-runtime-strip[data-state="calibrating"] { border-color: #82682a; background: #211b0c; }
.ql650-runtime-strip[data-state="calibrating"] > i { background: var(--gold); color: var(--gold); }
.ql650-runtime-strip[data-state="waiting"] { border-color: #1b6c86; background: #072232; }
.ql650-runtime-strip[data-state="waiting"] > i { background: var(--cyan); color: var(--cyan); }
.ql650-runtime-strip[data-state="trading"] { border-color: #168d75; background: #062720; }
.ql650-runtime-strip[data-state="trading"] > i { background: var(--green); color: var(--green); }
.ql650-runtime-strip[data-state="recovering"] { border-color: #9a6d24; background: #24190a; }
.ql650-runtime-strip[data-state="recovering"] > i { background: var(--gold); color: var(--gold); animation: ql650-pulse 1.35s ease-in-out infinite; }
.ql650-runtime-strip[data-state="provisional"] { border-color: #8a6424; background: #241a0a; }
.ql650-runtime-strip[data-state="provisional"] > i { background: var(--gold); color: var(--gold); }
.ql654-model-readiness { display: grid; gap: 8px; padding: 10px; border: 1px solid #173f56; border-radius: var(--radius); background: #061827; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.ql659-readiness-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.ql659-readiness-head > div { display: grid; min-width: 0; gap: 2px; }
.ql654-model-readiness span, .ql654-model-readiness small { color: #7398ad; font-size: 8px; font-weight: 800; }
.ql654-model-readiness b { overflow: hidden; color: #e4f2f8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ql659-readiness-head em { flex: 0 0 auto; padding: 3px 6px; border: 1px solid #27526b; border-radius: 4px; background: #092237; color: #8ab0c4; font-size: 7px; font-style: normal; font-weight: 900; }
.ql654-model-progress { position: relative; width: 100%; height: 5px; overflow: hidden; border-radius: 3px; background: #102c3e; }
.ql654-model-progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--cyan); transition: width .25s ease; }
.ql659-readiness-telemetry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid #15384d; }
.ql659-readiness-telemetry > span { display: grid; min-width: 0; gap: 2px; padding: 6px 7px; }
.ql659-readiness-telemetry > span + span { border-inline-start: 1px solid #15384d; }
.ql659-readiness-telemetry small { font-size: 7px; }
.ql659-readiness-telemetry b { font-size: 8px; }
.ql659-readiness-telemetry > span[data-state="live"] b { color: var(--green); }
.ql659-readiness-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql654-model-readiness[data-phase="live"] { border-color: #14765f; background: #06251e; }
.ql654-model-readiness[data-phase="live"] .ql654-model-progress i { background: var(--green); }
.ql654-model-readiness[data-phase="live"] .ql659-readiness-head em { border-color: #168e73; background: #073b30; color: #46e9bd; }
.ql654-model-readiness[data-phase="provisional"] { border-color: #8a6424; background: #211809; }
.ql654-model-readiness[data-phase="provisional"] .ql654-model-progress i { background: var(--gold); }
.ql654-model-readiness[data-phase="provisional"] .ql659-readiness-head em { border-color: #9a7428; background: #40300c; color: #f6d77d; }
.ql654-model-readiness[data-phase="validation_blocked"], .ql654-model-readiness[data-phase="awaiting_model_improvement"], .ql654-model-readiness[data-phase="trainer_retry"], .ql654-model-readiness[data-phase="collection_error"] { border-color: #8a6424; background: #211809; }
.ql654-model-readiness[data-phase="validation_blocked"] .ql654-model-progress i, .ql654-model-readiness[data-phase="awaiting_model_improvement"] .ql654-model-progress i, .ql654-model-readiness[data-phase="trainer_retry"] .ql654-model-progress i, .ql654-model-readiness[data-phase="collection_error"] .ql654-model-progress i { background: var(--gold); }
.ql698-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-block: 0; }
.ql698-pipeline > span { position: relative; min-height: 32px; align-content: center; padding: 5px 5px 5px 13px; border: 1px solid #17394d; border-radius: 4px; background: transparent; }
.ql698-pipeline > span + span { border-inline-start: 1px solid #17394d; }
.ql698-pipeline > span::before { content: ""; position: absolute; inset-inline-start: 5px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #526d7c; transform: translateY(-50%); }
.ql698-pipeline > span small, .ql698-pipeline > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql698-pipeline > span small { font-size: 6px; }
.ql698-pipeline > span b { font-size: 7px; }
.ql698-pipeline > span[data-state="active"] { border-color: #24758b; background: #082535; }
.ql698-pipeline > span[data-state="active"]::before { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.ql698-pipeline > span[data-state="active"] b { color: var(--cyan); }
.ql698-pipeline > span[data-state="complete"] { border-color: #176653; background: #06221d; }
.ql698-pipeline > span[data-state="complete"]::before { background: var(--green); }
.ql698-pipeline > span[data-state="complete"] b { color: var(--green); }
.ql698-pipeline > span[data-state="policy"] { border-color: #8a6424; background: #241a0a; }
.ql698-pipeline > span[data-state="policy"]::before { background: var(--gold); box-shadow: 0 0 7px rgba(243, 200, 95, .5); }
.ql698-pipeline > span[data-state="policy"] b { color: #f6d77d; }
.ql698-pipeline > span[data-state="blocked"], .ql698-pipeline > span[data-state="rejected"] { border-color: #8a6424; background: #241a0a; }
.ql698-pipeline > span[data-state="blocked"]::before, .ql698-pipeline > span[data-state="rejected"]::before { background: var(--gold); box-shadow: 0 0 7px rgba(243, 200, 95, .5); }
.ql698-pipeline > span[data-state="blocked"] b, .ql698-pipeline > span[data-state="rejected"] b { color: var(--gold); }
@keyframes ql650-pulse { 50% { opacity: .38; transform: scale(.72); } }
.ql590-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ql590-control-grid .span2 { grid-column: 1 / -1; }
.ql590-control-grid input, .ql590-control-grid select { height: 32px; font-size: 11px; }
.ql698-policy-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; margin: 7px 0 0; padding: 6px 1px; border-block: 1px solid #17384c; color: #a9bdc8; font-size: 8px; line-height: 1.35; cursor: pointer; }
.ql698-policy-consent[hidden] { display: none !important; }
.ql698-policy-consent input[type="checkbox"] { appearance: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 1px solid #8a6825; border-radius: 3px; background: #071725; cursor: pointer; }
.ql698-policy-consent input[type="checkbox"]::before { content: ""; display: block; width: 9px; height: 5px; margin: 4px 3px; border: solid transparent; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ql698-policy-consent input[type="checkbox"]:checked { border-color: #d2a83e; background: #49390d; }
.ql698-policy-consent input[type="checkbox"]:checked::before { border-color: #f6d77d; }
.ql698-policy-consent input[type="checkbox"]:focus-visible { outline: 2px solid #51dff2; outline-offset: 2px; }
.ql698-policy-consent input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .5; }
.ql698-policy-consent > span { min-width: 0; overflow-wrap: anywhere; letter-spacing: 0; }
.ql590-ai-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0; }
.ql590-ai-buttons button { height: 34px; border: 1px solid #196d81; border-radius: 6px; background: #09243a; color: #ebf9ff; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.ql590-ai-buttons button:last-child { border-color: #b53650; background: #64172a; }
.ql690-demo-smoke-truth { display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0 0 8px; padding: 7px 9px; border: 1px solid #8a6424; border-radius: 6px; background: #211809; }
.ql690-demo-smoke-truth[hidden] { display: none !important; }
.ql690-demo-smoke-truth > i { width: 8px; height: 8px; border-radius: 50%; background: #f3c85f; box-shadow: 0 0 8px rgba(243, 200, 95, .55); }
.ql690-demo-smoke-truth > span { min-width: 0; display: grid; gap: 2px; }
.ql690-demo-smoke-truth b { overflow-wrap: anywhere; color: #f6d77d; font-size: 9px; }
.ql690-demo-smoke-truth small { overflow-wrap: anywhere; color: #b8c3c8; font-size: 8px; line-height: 1.35; }
.ql590-states, .ql607-ai-runtime { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ql607-ai-runtime { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
.ql590-states article, .ql607-ai-runtime article { min-width: 0; min-height: 48px; display: grid; align-content: center; gap: 3px; padding: 6px; border: 1px solid #193e57; border-radius: 6px; background: #071725; overflow: hidden; }
.ql590-states span, .ql607-ai-runtime span { color: #6e93aa; font-size: 7px; text-transform: uppercase; }
.ql590-states b, .ql607-ai-runtime b { display: block; overflow: hidden; color: #edf7fb; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ql590-states article > small { display: block; overflow: hidden; color: #6e93aa; font-size: 6px; font-weight: 800; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
[data-ai-confidence-tile][data-kind="validated"] { border-color: #176653; background: #06221d; }
[data-ai-confidence-tile][data-kind="validated"] [data-ai-confidence] { color: var(--green); }
[data-ai-confidence-tile][data-kind="candidate"] { border-color: #8a6424; background: #241a0a; }
[data-ai-confidence-tile][data-kind="candidate"] [data-ai-confidence] { color: var(--gold); }
[data-ai-confidence-tile][data-kind="candidate"] [data-ai-confidence-note] { color: #d4b96f; }
[data-ai-confidence-tile][data-kind="provisional"] { border-color: #8a6424; background: #241a0a; }
[data-ai-confidence-tile][data-kind="provisional"] [data-ai-confidence] { color: #f6d77d; }
[data-ai-confidence-tile][data-kind="provisional"] [data-ai-confidence-note] { color: var(--cyan); }
.ql590-control footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: #7894a7; font-size: 8px; }
.ql590-control footer b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql590-control footer i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.ql590-control footer em { color: var(--green); font-style: normal; }
.ql590-ai-visual-wrap { height: 205px; }
.ql590-ai-visual-wrap canvas { display: block; width: 100%; height: 100%; }
.ql590-ai-visual header span { padding: 4px 7px; border: 1px solid #168e76; border-radius: 999px; color: var(--green); font-size: 8px; font-weight: 800; }

.ql590-list tbody tr.is-pending { background: rgba(43, 182, 221, .055); }
.ql590-list tbody tr.is-pending td { color: #9fc6d9; }
.ql590-list tbody tr.is-pending td:first-child,
.ql590-list tbody tr.is-pending td:last-child { color: #58dbf5; font-weight: 800; letter-spacing: 0; }

.ql590-settings { width: min(460px, calc(100vw - 24px)); padding: 0; border: 1px solid #26617f; border-radius: var(--radius); background: #081a2d; color: var(--text); box-shadow: 0 30px 80px #000; }
.ql590-settings::backdrop { background: rgba(0, 4, 9, .76); backdrop-filter: blur(5px); }
.ql590-settings form { display: grid; gap: 12px; padding: 20px; }
.ql590-settings h2 { margin: 0; }
.ql590-settings label { display: grid; gap: 6px; }
.ql590-settings menu { display: flex; justify-content: flex-end; gap: 8px; margin: 0; padding: 8px 0 0; }
.ql590-settings button { min-height: 36px; padding: 0 14px; border: 1px solid #26617f; border-radius: 6px; background: #0d2a43; color: var(--text); }

@media (max-width: 1280px) {
  .ql590-topbar { grid-template-columns: 220px minmax(155px, 1fr) auto auto auto 94px 104px 38px; }
  .ql590-topbar > .ql590-icon:last-child { display: none; }
  .ql590-layout { grid-template-columns: minmax(0, 1fr) 350px; }
  .ql590-chart-card, .ql590-canvas-wrap { min-height: 460px; height: 460px; }
  .ql611-manual-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ql590-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .ql590-topbar {
    position: relative;
    grid-template-columns: minmax(210px, 1fr) minmax(160px, .9fr) auto 104px 38px;
    grid-template-areas: "brand symbol segment auth settings" "timeframes timeframes timeframes timeframes timeframes";
  }
  .ql590-brand { grid-area: brand; grid-column: auto; }
  .ql590-symbol { grid-area: symbol; }
  .ql590-seg { grid-area: segment; }
  .ql590-tf { grid-area: timeframes; grid-column: 1 / -1; overflow-x: auto; }
  .ql590-auth { grid-area: auth; }
  .ql590-topbar > [data-settings] { grid-area: settings; }
  .ql590-tools { display: none; }
  .ql590-clock { display: none; }
  .ql590-layout { grid-template-columns: 1fr; }
  .ql590-side { position: static; grid-template-columns: 1fr 1fr; }
  .ql590-control { grid-row: span 2; }
  .ql590-ai-visual-wrap { height: 180px; }
  .ql590-lists { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ql590-shell { padding: 6px; }
  .ql590-topbar {
    grid-template-columns: minmax(0, 1fr) 108px 38px;
    grid-template-areas: "brand auth settings" "symbol symbol symbol" "segment segment segment" "timeframes timeframes timeframes";
    gap: 5px;
  }
  .ql590-brand { grid-area: brand; }
  .ql590-symbol { grid-area: symbol; }
  .ql590-seg { grid-area: segment; overflow-x: auto; }
  .ql590-tf { grid-area: timeframes; overflow-x: auto; }
  .ql590-auth { grid-area: auth; }
  .ql590-topbar > [data-settings] { grid-area: settings; }
  .ql590-clock { display: none; }
  .ql590-chart-card, .ql590-canvas-wrap { min-height: 390px; height: 390px; }
  .ql590-price { right: 8px; }
  .ql611-manual-grid { grid-template-columns: 1fr 1fr; }
  .ql611-barrier-field { display: grid; }
  .ql590-actions { grid-template-columns: 1fr 1fr; }
  .ql590-buy { grid-column: 1 / -1; }
  .ql590-banner { height: auto; min-height: 0; aspect-ratio: 1258 / 179; background-size: contain; background-position: center; }
  .ql590-journal-body { height: 200px; }
  .ql590-metrics { grid-template-columns: 1fr 1fr; }
  .ql590-metrics article { min-height: 82px; }
  .ql590-side { grid-template-columns: 1fr; }
  .ql590-control { grid-row: auto; }
  .ql590-lists { gap: 6px; }
  .ql590-list-tools { min-width: 0; }
  .ql590-list-status { display: none; }
  .ql590-list > div { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
  .ql590-list table { min-width: 760px; }
  th, td { padding: 7px 9px; }
  .ql650-runtime-strip b, .ql650-runtime-strip span { white-space: normal; }
  .ql590-action b { font-size: 13px; }
}
@media (max-width: 430px) {
  .ql698-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ql590-brand strong { font-size: 16px; }
  .ql590-seg button, .ql590-tf button { min-width: 42px; }
  .ql590-chart-card, .ql590-canvas-wrap { min-height: 340px; height: 340px; }
  .ql611-manual-grid { grid-template-columns: 1fr; }
  .ql590-actions { grid-template-columns: 1fr; }
  .ql590-buy { grid-column: auto; }
  .ql590-action { height: 56px; }
  .ql590-banner { height: auto; min-height: 0; aspect-ratio: 1258 / 179; }
  .ql590-metrics { grid-template-columns: 1fr; }
  .ql590-states { grid-template-columns: 1fr 1fr; }
  .ql590-control-grid { grid-template-columns: 1fr; }
  .ql590-control-grid .span2 { grid-column: auto; }
  .ql607-ai-runtime { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
