:root {
  --shell-950: #ddd8cc;
  --shell-900: #f4f1e8;
  --shell-850: #ece8de;
  --shell-800: #d8d3c8;
  --shell-line: rgba(23, 37, 44, 0.14);
  --shell-muted: #6f7978;
  --shell-text: #17252c;
  --canvas: #f4f1e8;
  --canvas-raised: #fbfaf5;
  --canvas-quiet: #e9e5db;
  --ink: #17252c;
  --ink-muted: #657178;
  --line: #d5d0c4;
  --up: #07927d;
  --up-deep: #067361;
  --up-soft: rgba(7, 146, 125, 0.13);
  --down: #eb6b5c;
  --down-deep: #c84e42;
  --down-soft: rgba(235, 107, 92, 0.14);
  --amber: #d3972e;
  --amber-deep: #a86f12;
  --amber-soft: rgba(211, 151, 46, 0.15);
  --focus: #2d7388;
  --shadow: 0 22px 60px rgba(23, 37, 44, 0.14);
  --display: "Avenir Next Condensed", "Arial Narrow", "PingFang SC", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--shell-950);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--shell-text);
  background:
    radial-gradient(circle at 74% -15%, rgba(45, 115, 136, 0.12), transparent 32rem),
    var(--shell-950);
  font-family: var(--body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button,
a,
input,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--shell-950);
  background: #fff;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  width: min(1880px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--shell-900);
  box-shadow: var(--shadow);
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 2.2vw, 38px);
  border-bottom: 1px solid var(--shell-line);
  background:
    linear-gradient(90deg, rgba(23, 37, 44, 0.03) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(23, 37, 44, 0.022) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--shell-900);
}

.brand-block,
.topbar-status,
.instrument-title-line,
.chart-legend,
.chart-heading-tools,
.chart-navigation,
.intervals,
.data-origin,
.strategy-note,
.signal-console-title,
.signal-stats,
.desk-footer,
.closed-candle-rule {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
  border: 1px solid rgba(45, 115, 136, 0.34);
  background: rgba(45, 115, 136, 0.07);
}

.brand-mark i {
  width: 4px;
  background: var(--focus);
}

.brand-mark i:nth-child(1) {
  height: 12px;
}

.brand-mark i:nth-child(2) {
  height: 21px;
}

.brand-mark i:nth-child(3) {
  height: 16px;
}

.brand-kicker,
.section-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.brand-kicker {
  color: #2d7388;
}

.brand-block h1 {
  margin: 1px 0 0;
  font-family: var(--display);
  font-size: 23px;
  font-stretch: condensed;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
}

.topbar-status {
  gap: 11px;
}

.readonly-seal,
.connection-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--shell-line);
  color: #526267;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.readonly-seal svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.connection-status {
  min-width: 128px;
  justify-content: center;
  border-color: rgba(7, 146, 125, 0.25);
  color: var(--up-deep);
  background: rgba(7, 146, 125, 0.08);
}

.connection-status.is-loading,
.connection-status.is-degraded {
  border-color: rgba(211, 151, 46, 0.3);
  color: var(--amber-deep);
  background: rgba(211, 151, 46, 0.08);
}

.connection-status.is-offline {
  border-color: rgba(235, 107, 92, 0.32);
  color: var(--down-deep);
  background: rgba(235, 107, 92, 0.08);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(143, 215, 201, 0.1);
}

.connection-status.is-loading .status-dot {
  animation: breathe 1.5s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    opacity: 0.35;
    transform: scale(0.72);
  }
}

.workstation {
  display: grid;
  min-height: calc(100vh - 74px);
  grid-template-columns: 286px minmax(0, 1fr);
}

.market-drawer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 25px 18px 18px;
  border-right: 1px solid var(--shell-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 14rem),
    var(--shell-850);
}

.drawer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 17px;
}

.drawer-heading .section-kicker {
  color: #657178;
}

.drawer-heading h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.watch-count {
  min-width: 32px;
  padding: 2px 4px 1px;
  border-bottom: 2px solid var(--focus);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  text-align: center;
}

.search-box {
  display: grid;
  min-height: 42px;
  align-items: center;
  grid-template-columns: 18px 1fr auto;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--shell-line);
  background: rgba(255, 255, 255, 0.48);
}

.search-box:focus-within {
  border-color: rgba(45, 115, 136, 0.58);
  box-shadow: 0 0 0 2px rgba(45, 115, 136, 0.08);
}

.search-box svg {
  width: 17px;
  fill: none;
  stroke: #6f7978;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--shell-text);
  background: transparent;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #858883;
}

.search-box kbd {
  padding: 1px 5px;
  border: 1px solid #c8c2b7;
  border-bottom-color: #aaa59b;
  color: #6f7978;
  background: #f7f4ed;
  font-family: var(--mono);
  font-size: 10px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  border: 1px solid var(--shell-line);
}

.category-tab {
  min-height: 34px;
  padding: 5px 4px;
  border-right: 1px solid var(--shell-line);
  color: #626d72;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.category-tab:last-child {
  border-right: 0;
}

.category-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
}

.category-tab.is-active {
  color: #1e5d6d;
  background: rgba(45, 115, 136, 0.1);
  box-shadow: inset 0 -2px var(--focus);
}

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 4px 8px;
  color: #777c79;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.symbol-nav {
  min-height: 0;
  flex: 1;
  overflow: auto;
  scrollbar-color: #b8b2a7 transparent;
  scrollbar-width: thin;
}

.symbol-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.symbol-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 57px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 10px 9px 14px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.symbol-button::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  background: transparent;
  content: "";
}

.symbol-button:hover {
  background: rgba(255, 255, 255, 0.52);
}

.symbol-button.is-active {
  color: #102b3d;
  background:
    linear-gradient(90deg, rgba(45, 115, 136, 0.14), rgba(45, 115, 136, 0.025)),
    rgba(255, 255, 255, 0.38);
}

.symbol-button.is-active::before {
  background: var(--focus);
  box-shadow: 0 0 12px rgba(45, 115, 136, 0.28);
}

.symbol-main {
  min-width: 0;
}

.symbol-code {
  display: block;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol-name {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #747976;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol-type {
  min-width: 34px;
  padding: 3px 5px;
  border: 1px solid #c8c2b7;
  color: #626d72;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.symbol-button.is-unavailable {
  opacity: 0.48;
}

.empty-symbols {
  margin: 14px 4px;
  padding: 16px;
  border: 1px dashed #b8b2a7;
  color: #747976;
  font-size: 12px;
  line-height: 1.6;
}

.drawer-footnote {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 4px 0;
  border-top: 1px solid var(--shell-line);
  color: #747976;
  font-size: 10px;
}

.drawer-footnote span {
  color: var(--focus);
}

.desk {
  min-width: 0;
  padding: 22px clamp(16px, 2vw, 32px) 14px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(19, 44, 58, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(19, 44, 58, 0.025) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--canvas-quiet);
}

.instrument-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 2px 18px;
}

.instrument-identity {
  min-width: 0;
}

.instrument-title-line {
  min-width: 0;
  gap: 9px;
}

.instrument-title-line h2 {
  overflow: hidden;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(25px, 2.1vw, 34px);
  font-weight: 680;
  letter-spacing: 0.02em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instrument-identity p {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.asset-badge,
.availability-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #b8b3a9;
  color: #626d72;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.availability-badge {
  border-color: rgba(7, 146, 125, 0.3);
  color: var(--up-deep);
  background: var(--up-soft);
}

.availability-badge.is-unavailable {
  border-color: rgba(235, 107, 92, 0.34);
  color: var(--down-deep);
  background: var(--down-soft);
}

.quote-strip {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: clamp(15px, 2vw, 30px);
  margin: 0;
}

.quote-strip > div {
  min-width: 60px;
}

.quote-strip dt {
  margin-bottom: 4px;
  color: #8a8e8b;
  font-size: 10px;
}

.quote-strip dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.quote-strip .quote-primary {
  display: grid;
  align-items: baseline;
  grid-template-columns: auto auto;
  gap: 0 9px;
  min-width: 160px;
}

.quote-primary dt {
  grid-column: 1 / -1;
}

.quote-primary dd {
  font-size: clamp(21px, 1.9vw, 29px);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.price-change {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.price-change.is-up {
  color: var(--up-deep);
}

.price-change.is-down {
  color: var(--down-deep);
}

.control-deck {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--canvas-raised);
}

.intervals {
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.intervals::-webkit-scrollbar {
  display: none;
}

.control-label {
  margin-right: 8px;
  color: #848781;
  font-size: 10px;
}

.intervals button {
  min-width: 39px;
  min-height: 30px;
  padding: 4px 8px;
  color: #6e7678;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}

.intervals button:hover {
  color: var(--ink);
  background: #efede6;
}

.intervals button.is-active {
  color: #fff;
  background: var(--shell-800);
}

.intervals button[data-interval="5m"].is-active {
  box-shadow: inset 0 -2px var(--focus);
}

.data-origin {
  flex: 0 0 auto;
  padding-right: 4px;
}

.origin-node {
  display: inline-flex;
  min-width: 38px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8c2b7;
  color: #7a7d7a;
  font-family: var(--mono);
  font-size: 9px;
}

.origin-node.is-stream {
  border-color: rgba(7, 146, 125, 0.38);
  color: var(--up-deep);
}

.origin-link {
  width: 15px;
  height: 1px;
  background: #bbb6ac;
}

.strategy-note {
  gap: 11px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: #626a6d;
  background: #eeebe2;
  font-size: 11px;
  line-height: 1.55;
}

.strategy-note p {
  margin: 0;
}

.strategy-note strong {
  color: var(--ink);
  font-family: var(--mono);
}

.strategy-note-mark {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(211, 151, 46, 0.48);
  color: var(--amber-deep);
  background: var(--amber-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chart-card {
  border: 1px solid var(--line);
  background: var(--canvas-raised);
}

.chart-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}

.chart-heading .section-kicker {
  color: #989990;
}

.chart-heading h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.chart-legend {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 15px;
  color: #7d817f;
  font-size: 9px;
}

.chart-heading-tools {
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.chart-navigation {
  justify-content: flex-end;
  gap: 4px;
}

.chart-navigation-hint,
.zoom-range {
  color: #858883;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.zoom-range {
  min-width: 53px;
  margin-right: 3px;
  color: #626d72;
  text-align: right;
}

.chart-navigation button {
  min-width: 28px;
  height: 25px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: #526267;
  background: #f7f4ed;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
}

.chart-navigation button:hover {
  border-color: rgba(45, 115, 136, 0.48);
  color: #1e5d6d;
  background: rgba(45, 115, 136, 0.08);
}

.chart-navigation button:active {
  transform: translateY(1px);
}

.chart-navigation button.is-text {
  min-width: 42px;
  font-size: 10px;
}

.chart-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #999;
}

.legend-swatch.is-up {
  background: var(--up);
}

.legend-swatch.is-down {
  background: var(--down);
}

.legend-swatch.is-top {
  border-radius: 50%;
  background: var(--down);
  box-shadow: 0 -3px 0 -1px var(--down-deep);
}

.legend-swatch.is-bottom {
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 3px 0 -1px var(--up-deep);
}

.legend-line {
  display: inline-block;
  width: 13px;
  height: 2px;
}

.legend-line.is-macd {
  background: var(--amber);
}

.chart-stage {
  position: relative;
  min-height: 660px;
  background:
    linear-gradient(rgba(23, 37, 44, 0.018) 1px, transparent 1px) 0 0 / 100% 26px,
    var(--canvas);
}

.market-chart {
  width: 100%;
  height: 660px;
}

.chart-tooltip {
  min-width: 218px;
  font-family: var(--body);
}

.tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.tooltip-head strong {
  font-family: var(--mono);
  font-size: 10px;
}

.tooltip-head > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.tooltip-live {
  padding: 1px 4px;
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 15px;
  padding: 8px 0;
}

.tooltip-grid > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
}

.tooltip-grid small {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 9px;
}

.tooltip-up {
  color: var(--up-deep);
}

.tooltip-down {
  color: var(--down-deep);
}

.tooltip-macd,
.tooltip-rule,
.tooltip-signal {
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.tooltip-macd b {
  color: var(--amber-deep);
}

.tooltip-rule {
  color: var(--amber-deep);
}

.tooltip-signal.is-top {
  color: var(--down-deep);
}

.tooltip-signal.is-bottom {
  color: var(--up-deep);
}

.chart-loading,
.chart-error {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #747976;
  background: rgba(244, 241, 232, 0.94);
  font-size: 12px;
}

.chart-loading[hidden],
.chart-error[hidden] {
  display: none;
}

.loading-track {
  position: relative;
  width: 148px;
  height: 2px;
  overflow: hidden;
  background: #d8d3c8;
}

.loading-track i {
  position: absolute;
  width: 44px;
  height: 100%;
  background: var(--up);
  animation: scan 1.1s ease-in-out infinite;
}

@keyframes scan {
  from {
    transform: translateX(-48px);
  }
  to {
    transform: translateX(154px);
  }
}

.chart-error strong {
  color: var(--down-deep);
  font-family: var(--display);
  font-size: 18px;
}

.chart-error span {
  max-width: 440px;
  text-align: center;
}

.chart-error button {
  min-height: 32px;
  padding: 6px 13px;
  border: 1px solid #bfb9ae;
  color: var(--ink);
  background: var(--canvas-raised);
  cursor: pointer;
}

.chart-error button:hover {
  border-color: var(--up);
  color: var(--up-deep);
}

.signal-console {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(205px, 0.7fr) auto minmax(260px, 1.3fr);
  gap: 18px;
  min-height: 70px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 146, 125, 0.03), transparent 44%),
    #efede6;
}

.signal-console-title {
  min-width: 0;
  gap: 10px;
}

.signal-console-title strong,
.signal-console-title small {
  display: block;
}

.signal-console-title strong {
  font-size: 11px;
}

.signal-console-title small {
  overflow: hidden;
  margin-top: 3px;
  color: #858883;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-glyph {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  grid-template-columns: 6px 1fr 6px;
  align-items: center;
}

.rail-glyph::before {
  position: absolute;
  content: "";
}

.rail-glyph b {
  height: 1px;
  background: #a7a69f;
}

.rail-glyph i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.rail-glyph i:first-child {
  background: var(--down);
}

.rail-glyph i:last-child {
  background: var(--up);
}

.signal-stats {
  gap: 6px;
  white-space: nowrap;
}

.signal-stats span {
  padding: 4px 6px;
  border: 1px solid #d3cec3;
  color: #777c79;
  font-family: var(--mono);
  font-size: 9px;
}

.signal-stats b {
  color: var(--ink);
}

.signal-stats .is-top b {
  color: var(--down-deep);
}

.signal-stats .is-bottom b {
  color: var(--up-deep);
}

.signal-list {
  display: flex;
  min-width: 0;
  gap: 5px;
  padding: 3px;
  overflow-x: auto;
  scrollbar-color: #b8b2a7 transparent;
  scrollbar-width: thin;
}

.signal-pill,
.signal-empty {
  flex: 0 0 auto;
  min-height: 29px;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #ccc7bc;
  color: #696f6f;
  background: var(--canvas-raised);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
}

.signal-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.signal-pill.is-top {
  color: var(--down-deep);
}

.signal-pill.is-bottom {
  color: var(--up-deep);
}

.signal-pill:hover {
  border-color: currentColor;
}

.signal-pill.is-selected {
  border-color: var(--amber);
  color: #78520f;
  background: var(--amber-soft);
  box-shadow: inset 0 -2px var(--amber);
}

.signal-empty {
  display: inline-flex;
  align-items: center;
  color: #92948e;
  font-size: 10px;
}

.desk-footer {
  justify-content: space-between;
  gap: 18px;
  min-height: 35px;
  padding: 7px 2px 0;
  color: #787f7f;
  font-family: var(--mono);
  font-size: 9px;
}

.closed-candle-rule {
  gap: 6px;
  white-space: nowrap;
}

.closed-candle-rule i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

@media (max-width: 1180px) {
  .workstation {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .market-drawer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .instrument-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .quote-strip {
    width: 100%;
    justify-content: space-between;
  }

  .signal-console {
    grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1.2fr);
  }

  .signal-stats {
    justify-self: end;
  }

  .signal-list {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .topbar {
    position: sticky;
    top: 0;
  }

  .workstation {
    grid-template-columns: 1fr;
  }

  .market-drawer {
    min-height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--shell-line);
  }

  .drawer-heading {
    padding-bottom: 12px;
  }

  .symbol-nav {
    max-height: 194px;
  }

  .symbol-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer-footnote {
    display: none;
  }

  .desk {
    padding-top: 18px;
  }

  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .chart-heading-tools {
    width: 100%;
    align-items: flex-start;
  }

  .chart-navigation {
    width: 100%;
    justify-content: flex-start;
  }

  .chart-legend {
    justify-content: flex-start;
  }

  .chart-stage,
  .market-chart {
    min-height: 620px;
    height: 620px;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 64px;
    padding: 10px 13px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-block h1 {
    font-size: 18px;
  }

  .brand-kicker {
    font-size: 8px;
  }

  .readonly-seal {
    display: none;
  }

  .connection-status {
    min-width: 0;
    padding: 5px 8px;
    font-size: 9px;
  }

  .market-drawer {
    padding: 14px 12px;
  }

  .symbol-list {
    grid-template-columns: 1fr;
  }

  .symbol-nav {
    max-height: 170px;
  }

  .desk {
    padding: 14px 9px 10px;
  }

  .instrument-title-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .instrument-title-line h2 {
    width: 100%;
    font-size: 26px;
  }

  .quote-strip {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 8px;
  }

  .quote-strip > div,
  .quote-strip .quote-primary {
    min-width: 0;
  }

  .quote-strip .quote-primary {
    display: block;
  }

  .price-change {
    display: block;
    margin-top: 3px;
  }

  .control-deck {
    padding-right: 5px;
    padding-left: 5px;
  }

  .control-label,
  .data-origin {
    display: none;
  }

  .intervals {
    width: 100%;
  }

  .intervals button {
    min-width: 37px;
    flex: 1 0 37px;
  }

  .strategy-note {
    align-items: flex-start;
  }

  .chart-heading {
    padding: 10px;
  }

  .chart-stage,
  .market-chart {
    min-height: 560px;
    height: 560px;
  }

  .chart-legend {
    gap: 7px 10px;
  }

  .chart-navigation-hint {
    display: none;
  }

  .signal-console {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }

  .signal-stats {
    justify-self: start;
  }

  .signal-list {
    grid-column: auto;
  }

  .desk-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
