:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #0b1220;
  --line: #1f2a3d;
  --grid: rgba(143, 155, 176, 0.08);
  --text: #d9e2f1;
  --muted: #8f9bb0;
  --green: #19c37d;
  --yellow: #f4b400;
  --red: #ef4444;
  --cyan: #22d3ee;
  --oi: #22d3ee;
  --price-scale-width: 62px;
  --price-scale-reserve: 66px;
  --ui-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "ALSSchlangeslab-Bold";
  src: url("./assets/fonts/ALSSchlangeslab-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

html[data-dashboard-boot="loading"] .dashboard,
html[data-dashboard-boot="loading"] .news-ribbon {
  opacity: 0;
  pointer-events: none;
}

html[data-dashboard-boot="loading"] .topbar {
  opacity: 0.95;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #0b1220;
}

.topbar-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  color: #f5f8fb;
  text-decoration: none;
  font-family: "ALSSchlangeslab-Bold", "ALS Schlange Slab Bold", "Arvo", "Roboto Slab", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 32px;
  line-height: 0.78;
  letter-spacing: -0.025em;
  font-weight: 700;
  white-space: nowrap;
}

.brand-word {
  display: inline-block;
}

.brand-triangle {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid var(--red);
  margin: 0 0 1px;
  transition: border-top-color 160ms ease, border-bottom-color 160ms ease, transform 160ms ease;
}

.brand-mark[data-trend="up"] .brand-triangle {
  border-top: 0;
  border-bottom: 10px solid var(--green);
  transform: translateY(-1px);
}

.brand-mark[data-trend="down"] .brand-triangle {
  border-bottom: 0;
  border-top: 10px solid var(--red);
  transform: translateY(1px);
}

.brand-mark[data-trend="neutral"] .brand-triangle {
  border-top: 0;
  border-bottom: 10px solid var(--green);
  transform: translateY(0);
}

.timeframe-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-left: 1px solid rgba(143, 155, 176, 0.35);
  border-right: 1px solid rgba(143, 155, 176, 0.35);
  height: 42px;
  flex: 0 0 auto;
}

.tf-btn {
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #c8d1df;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  min-height: 28px;
  padding: 5px 8px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
  touch-action: manipulation;
}

.tf-btn:hover {
  color: #f3f7ff;
}

.tf-btn.active {
  color: #ffd768;
  background: rgba(244, 180, 0, 0.13);
  border-color: rgba(244, 180, 0, 0.4);
  box-shadow: inset 0 0 0 1px rgba(244, 180, 0, 0.08);
}

.dashboard-switcher {
  min-width: 0;
  width: auto;
  overflow: hidden;
}

.dashboard-grid-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.08), rgba(11, 18, 32, 0.12));
}

.dashboard-grid-label {
  color: #8f9bb0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-grid-input {
  width: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #dff5ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  outline: none;
}

.dashboard-grid-input::-webkit-outer-spin-button,
.dashboard-grid-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.dashboard-grid-input:focus {
  color: #ffd768;
}

.dashboard-grid-sep {
  color: #8f9bb0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.meta-pill {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0d1525;
  color: var(--muted);
  font-size: 11px;
}

.sync-pill {
  border-color: rgba(34, 211, 238, 0.28);
  color: #dff5ff;
  font-variant-numeric: tabular-nums;
}

.sync-pill[data-state="live"] {
  border-color: rgba(34, 211, 238, 0.36);
  color: #dff5ff;
}

.sync-pill[data-state="updating"] {
  border-color: rgba(244, 180, 0, 0.42);
  color: #fde68a;
}

.sync-pill[data-state="neutral"] {
  border-color: rgba(143, 155, 176, 0.28);
  color: #c8d1df;
}

.online-pill {
  padding: 2px 2px 2px 6px;
  color: #8f9bb0;
  font-size: 10px;
  border: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.best-setup-pill {
  appearance: none;
  font: inherit;
  text-align: left;
  flex: 0 1 auto;
  max-width: min(320px, 22vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.best-setup-pill[data-compact="true"] {
  flex: 0 0 auto;
  max-width: none;
  padding: 5px 9px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
}

.best-setup-pill[data-actionable="false"] {
  cursor: default;
}

.best-setup-pill[data-actionable="true"]:hover,
.best-setup-pill[data-actionable="true"]:focus-visible {
  border-color: rgba(34, 211, 238, 0.36);
  color: #eef7ff;
  outline: none;
}

.best-setup-pill[data-tone="up"] {
  border-color: rgba(34, 197, 94, 0.34);
  color: #d7ffe8;
}

.best-setup-pill[data-tone="down"] {
  border-color: rgba(248, 113, 113, 0.34);
  color: #ffd8d8;
}

.best-setup-pill[data-tone="neutral"] {
  border-color: rgba(143, 155, 176, 0.28);
  color: #c8d1df;
}

#best-setup[data-tone="up"] {
  border-color: rgba(25, 195, 125, 0.42);
  color: #a7f3d0;
}

#best-setup[data-tone="down"] {
  border-color: rgba(239, 68, 68, 0.42);
  color: #fecaca;
}

#best-setup[data-tone="neutral"] {
  border-color: rgba(143, 155, 176, 0.28);
  color: #c8d1df;
}

#news-tone[data-tone="bullish"] {
  border-color: rgba(25, 195, 125, 0.42);
  color: #a7f3d0;
}

#news-tone[data-tone="bearish"] {
  border-color: rgba(239, 68, 68, 0.42);
  color: #fecaca;
}

#news-tone[data-tone="neutral"] {
  border-color: rgba(244, 180, 0, 0.42);
  color: #fde68a;
}

.dashboard {
  padding: 1px;
  background: var(--line);
  min-height: 0;
  overflow: hidden;
}

.grid {
  --grid-cols: 3;
  --grid-rows: 3;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--grid-rows), minmax(0, 1fr));
  gap: 1px;
}

.card {
  --card-head-height: 0px;
  position: relative;
  min-height: 0;
  background: var(--panel);
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  z-index: 14;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.card-live {
  --card-head-height: 0px;
}

.card-live[data-signal-tone="up"][data-signal-emphasis="watch"]::after {
  border-color: rgba(22, 163, 74, 0.26);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.05);
}

.card-live[data-signal-tone="down"][data-signal-emphasis="watch"]::after {
  border-color: rgba(220, 38, 38, 0.26);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.05);
}

.card-live[data-signal-tone="up"][data-signal-emphasis="active"]::after {
  border-color: rgba(34, 197, 94, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.16),
    0 0 0 1px rgba(34, 197, 94, 0.18),
    0 0 18px rgba(34, 197, 94, 0.18);
}

.card-live[data-signal-tone="down"][data-signal-emphasis="active"]::after {
  border-color: rgba(248, 113, 113, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(248, 113, 113, 0.16),
    0 0 0 1px rgba(248, 113, 113, 0.18),
    0 0 18px rgba(248, 113, 113, 0.18);
}

.card-live[data-signal-tone="up"][data-signal-emphasis="active"][data-signal-fresh="true"]::after {
  border-color: rgba(74, 222, 128, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(74, 222, 128, 0.28),
    0 0 0 1px rgba(74, 222, 128, 0.26),
    0 0 28px rgba(34, 197, 94, 0.28);
}

.card-live[data-signal-tone="down"][data-signal-emphasis="active"][data-signal-fresh="true"]::after {
  border-color: rgba(252, 165, 165, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(252, 165, 165, 0.28),
    0 0 0 1px rgba(252, 165, 165, 0.26),
    0 0 28px rgba(248, 113, 113, 0.28);
}

.card-empty {
  cursor: pointer;
}

.card-empty:hover,
.card-empty:focus-within {
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.card-head {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--card-head-height);
  padding: 6px 9px;
  border-radius: 12px;
  border: 1px solid rgba(26, 51, 86, 0.58);
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.76));
  box-shadow: 0 8px 24px rgba(3, 8, 18, 0.24);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.card-head-live {
  align-items: stretch;
}

.card-head-status {
  --card-head-height: 48px;
}

.symbol-block {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  pointer-events: auto;
}

.symbol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.symbol-trigger {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.symbol-trigger:hover .symbol,
.symbol-trigger:focus-visible .symbol {
  color: #8fe8ff;
}

.symbol-trigger:focus-visible {
  outline: 0;
}

.symbol {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.85);
}

.symbol-empty {
  color: #8fe8ff;
  font-size: 28px;
  line-height: 1;
}

.symbol-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.85);
}

.chart-label-stack {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 7;
  display: grid;
  gap: 0;
  padding: 5px 7px 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(2, 6, 12, 0.74);
  box-shadow: 0 10px 24px rgba(2, 6, 12, 0.18);
  backdrop-filter: blur(2px);
  min-width: 0;
  max-width: calc(100% - 12px);
  justify-items: start;
  text-align: left;
}

.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.chart-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.chart-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3f8ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.92), 0 0 18px rgba(3, 8, 18, 0.42);
}

.chart-symbol:hover,
.chart-symbol:focus-visible {
  color: var(--yellow);
  outline: 0;
}

.chart-symbol-static {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: #f3f8ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.92), 0 0 18px rgba(3, 8, 18, 0.42);
}

.chart-symbol-empty {
  color: #8fe8ff;
  font-size: 22px;
  line-height: 1;
}

.chart-meta-inline,
.chart-meta-change {
  font-size: 10px;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.88);
}

.chart-meta-inline {
  color: rgba(200, 209, 223, 0.82);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-pg-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 0 rgba(3, 8, 18, 0.8);
}

.chart-pg-chip-up {
  color: #d7ffec;
  background: rgba(25, 195, 125, 0.22);
  border-color: rgba(25, 195, 125, 0.34);
}

.chart-pg-chip-down {
  color: #ffe0e0;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.34);
}

.chart-pg-chip-neutral {
  color: rgba(220, 226, 237, 0.9);
  background: rgba(96, 109, 128, 0.18);
  border-color: rgba(148, 163, 184, 0.2);
}

.chart-pg-why {
  width: 100%;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.22;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.88);
}

.chart-pg-why-up {
  color: rgba(205, 255, 230, 0.9);
}

.chart-pg-why-down {
  color: rgba(255, 220, 220, 0.9);
}

.chart-pg-why-neutral {
  color: rgba(200, 209, 223, 0.72);
}

.chart-meta-change {
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.chart-meta-change.price-change-up {
  color: #19c37d;
}

.chart-meta-change.price-change-down {
  color: #ef4444;
}

.chart-meta-change.price-change-neutral {
  color: var(--muted);
}

.trade-plan {
  display: grid;
  align-content: center;
  gap: 2px;
  flex: 0 1 41%;
  min-width: 132px;
  max-width: min(41%, 248px);
  margin-top: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.trade-plan-main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  justify-content: flex-end;
}

.trade-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.trade-plan-badge-up {
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.24);
  border: 1px solid rgba(22, 163, 74, 0.44);
}

.trade-plan-badge-down {
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.24);
  border: 1px solid rgba(220, 38, 38, 0.44);
}

.trade-plan-badge-neutral {
  color: #dbe7ff;
  background: rgba(51, 65, 85, 0.42);
  border: 1px solid rgba(100, 116, 139, 0.34);
}

.trade-plan-summary {
  min-width: 0;
  color: #edf4ff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.trade-plan-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow: hidden;
}

.trade-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.trade-meta-chip-label {
  color: rgba(226, 232, 240, 0.82);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.trade-meta-chip-up {
  color: #d1fae5;
  background: rgba(21, 128, 61, 0.18);
  border-color: rgba(34, 197, 94, 0.34);
}

.trade-meta-chip-down {
  color: #fee2e2;
  background: rgba(185, 28, 28, 0.18);
  border-color: rgba(248, 113, 113, 0.34);
}

.trade-meta-chip-neutral {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.24);
  border-color: rgba(100, 116, 139, 0.3);
}

.trade-meta-chip-strong {
  color: #d1fae5;
  background: rgba(15, 118, 73, 0.22);
  border-color: rgba(34, 197, 94, 0.38);
}

.trade-meta-chip-good {
  color: #dbeafe;
  background: rgba(29, 78, 216, 0.2);
  border-color: rgba(96, 165, 250, 0.34);
}

.trade-meta-chip-weak {
  color: #fef3c7;
  background: rgba(180, 83, 9, 0.22);
  border-color: rgba(245, 158, 11, 0.34);
}

.price-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

.price-head-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.price-head > .price-head-sub:first-child {
  margin-top: 0;
}

.price-head-sub.price-change-up {
  color: #a7f3d0;
}

.price-head-sub.price-change-down {
  color: #fecaca;
}

.price-head-sub.price-change-neutral {
  color: var(--muted);
}

.chart-wrap {
  position: absolute;
  inset: 8px var(--price-scale-reserve) 30px 6px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #0a1322;
  background-size: 100% 20%, 16.666% 100%;
  overflow: hidden;
}

.price-layer,
.trade-guide-layer,
.price-guide-layer,
.volume-layer {
  position: absolute;
}

.price-layer,
.trade-guide-layer,
.price-guide-layer {
  inset: 0;
}

.price-layer svg,
.trade-guide-layer svg,
.price-guide-layer svg,
.volume-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

.price-layer {
  z-index: 3;
}

.trade-guide-layer {
  z-index: 4;
  pointer-events: none;
}

.trade-guide-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.26);
}

.trade-guide-axis {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 0 0 1px rgba(8, 15, 29, 0.14);
}

.trade-guide-axis-up {
  border-left-color: rgba(34, 197, 94, 0.56);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.16);
}

.trade-guide-axis-down {
  border-left-color: rgba(248, 113, 113, 0.56);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.16);
}

.trade-guide-line-entry {
  border-top-style: solid;
}

.trade-guide-line-crosshair {
  border-top-width: 1px;
}

.trade-guide-line-stop {
  border-top-style: dashed;
  border-top-color: rgba(245, 158, 11, 0.42);
}

.trade-guide-line-invalid {
  border-top-style: dashed;
  border-top-color: rgba(148, 163, 184, 0.34);
}

.trade-guide-line-risk {
  border-top-style: dashed;
  border-top-color: rgba(245, 158, 11, 0.34);
}

.trade-guide-line-trail {
  border-top-style: dashed;
  border-top-color: rgba(148, 163, 184, 0.38);
}

.trade-guide-line-lock {
  border-top-style: solid;
  border-top-color: rgba(34, 197, 94, 0.38);
}

.trade-guide-line-up {
  border-top-color: rgba(34, 197, 94, 0.52);
}

.trade-guide-line-down {
  border-top-color: rgba(248, 113, 113, 0.52);
}

.trade-guide-line-up.trade-guide-line-crosshair {
  border-top-color: rgba(34, 197, 94, 0.72);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
}

.trade-guide-line-down.trade-guide-line-crosshair {
  border-top-color: rgba(248, 113, 113, 0.72);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.1);
}

.trade-guide-line-neutral {
  border-top-color: rgba(148, 163, 184, 0.34);
}

.trade-guide-label {
  position: absolute;
  right: 6px;
  top: 0;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(7, 14, 26, 0.88);
  font-size: 8px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(3, 8, 18, 0.46);
}

.trade-guide-label-crosshair {
  background: rgba(7, 14, 26, 0.94);
  box-shadow: 0 0 0 1px rgba(8, 15, 29, 0.34), 0 1px 0 rgba(3, 8, 18, 0.52);
}

.trade-guide-label-trigger.trade-guide-label-up,
.trade-guide-label-entry.trade-guide-label-up {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.3);
}

.trade-guide-label-trigger.trade-guide-label-down,
.trade-guide-label-entry.trade-guide-label-down {
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.3);
}

.trade-guide-label-stop {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.28);
}

.trade-guide-label-invalid {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
}

.trade-guide-label-risk {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.24);
}

.trade-guide-label-trail {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
}

.trade-guide-label-lock {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.28);
}

.price-guide-layer {
  z-index: 5;
  pointer-events: none;
}

.volume-layer {
  inset: auto 0 0 0;
  height: 22%;
  opacity: 0.48;
  z-index: 2;
}

.price-scale {
  position: absolute;
  top: 8px;
  right: 4px;
  bottom: 30px;
  width: var(--price-scale-width);
  z-index: 11;
  pointer-events: none;
  overflow: hidden;
  border-left: 1px solid rgba(31, 42, 61, 0.85);
  background: linear-gradient(180deg, rgba(7, 14, 26, 0.92), rgba(7, 14, 26, 0.72));
}

.liquidity-shelves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.liquidity-shelf {
  position: absolute;
  left: 0;
  height: 4px;
  width: min(var(--shelf-width, 20px), calc(var(--price-scale-width) - 10px));
  transform: translateY(-50%);
  border-radius: 0 999px 999px 0;
  opacity: var(--shelf-opacity, 0.36);
  box-shadow:
    0 0 0 1px rgba(6, 12, 22, 0.22),
    0 0 10px rgba(0, 0, 0, 0.12);
  filter: saturate(1.04) brightness(1.02);
}

.liquidity-shelf-up {
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.14), rgba(34, 197, 94, 0.82));
}

.liquidity-shelf-down {
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.14), rgba(239, 68, 68, 0.84));
}

.price-tick,
.time-tick {
  font-size: 8px;
  line-height: 1;
  color: rgba(143, 155, 176, 0.92);
}

.price-tick {
  position: absolute;
  right: 4px;
  transform: translateY(-50%);
  background: rgba(11, 18, 32, 0.56);
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 9px;
}

.price-tick-extreme {
  color: rgba(188, 199, 219, 0.98);
  background: rgba(11, 18, 32, 0.8);
}

.price-tick-top {
  top: 0;
  transform: none;
}

.price-tick-bottom {
  top: auto;
  bottom: 0;
  transform: none;
}

.price-marker {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: stretch;
  width: 100%;
}

.price-marker-label {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 2px 4px 3px;
  border-radius: 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: right;
  box-shadow: 0 0 0 1px rgba(8, 15, 29, 0.72);
}

.price-marker-price {
  display: block;
  width: 100%;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.price-marker-price-compact {
  font-size: 11px;
  letter-spacing: -0.01em;
}

.price-marker-up .price-marker-label {
  color: #d1fae5;
  background: rgba(15, 118, 73, 0.94);
}

.price-marker-down .price-marker-label {
  color: #fee2e2;
  background: rgba(185, 28, 28, 0.94);
}

.time-scale {
  position: absolute;
  left: 6px;
  right: var(--price-scale-reserve);
  bottom: 28px;
  height: 14px;
  z-index: 4;
  pointer-events: none;
}

.time-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.time-tick-left {
  transform: translateX(0);
}

.time-tick-right {
  transform: translateX(-100%);
}

.time-tick-date {
  color: rgba(209, 213, 219, 0.96);
  font-weight: 700;
}

.signal-badge {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-signal-corner {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 6;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(3, 8, 18, 0.22);
  pointer-events: auto;
}

.signal-up {
  background: rgba(22, 163, 74, 0.24);
  border-color: rgba(22, 163, 74, 0.5);
  color: #bbf7d0;
}

.signal-neutral {
  background: rgba(202, 138, 4, 0.26);
  border-color: rgba(202, 138, 4, 0.5);
  color: #fef3c7;
}

.signal-down {
  background: rgba(220, 38, 38, 0.26);
  border-color: rgba(220, 38, 38, 0.5);
  color: #fecaca;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.metric-pill.price-change-up {
  color: #a7f3d0;
  background: rgba(15, 118, 73, 0.22);
  border-color: rgba(22, 163, 74, 0.38);
}

.metric-pill.price-change-down {
  color: #fecaca;
  background: rgba(185, 28, 28, 0.2);
  border-color: rgba(239, 68, 68, 0.34);
}

.metric-pill.price-change-neutral {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(82, 94, 118, 0.32);
}

.metric-pill-hint {
  position: relative;
  cursor: help;
  pointer-events: auto;
}

.metric-pill-oi {
  color: var(--oi);
}

.metric-pill-liq {
  font-variant-numeric: tabular-nums;
}

.metric-pill-hint::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  min-width: 180px;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(5, 10, 20, 0.96);
  box-shadow: 0 10px 28px rgba(3, 8, 18, 0.36);
  color: #dbe7ff;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms ease, visibility 120ms linear;
  z-index: 8;
}

.metric-pill-hint::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%) translateY(-4px);
  border-width: 0 5px 6px 5px;
  border-style: solid;
  border-color: transparent transparent rgba(5, 10, 20, 0.96) transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms ease, visibility 120ms linear;
  z-index: 8;
}

.metric-pill-hint:hover::after,
.metric-pill-hint:hover::before,
.metric-pill-hint:focus-visible::after,
.metric-pill-hint:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.signal-band {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 8px;
  padding: 0 8px;
  border-radius: 999px;
  overflow: visible;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background: linear-gradient(
    90deg,
    rgba(185, 28, 28, 0.3) 0%,
    rgba(202, 138, 4, 0.18) 50%,
    rgba(15, 118, 73, 0.3) 100%
  );
  z-index: 3;
}

.signal-band[data-visual="muted"] {
  border-color: rgba(94, 104, 126, 0.26);
  background: linear-gradient(
    90deg,
    rgba(110, 116, 128, 0.22) 0%,
    rgba(136, 142, 154, 0.16) 50%,
    rgba(110, 116, 128, 0.22) 100%
  );
}

.signal-band[data-visual="soft"] {
  border-color: rgba(92, 104, 126, 0.28);
}

.signal-band[data-visual="bias"] {
  border-color: rgba(92, 104, 126, 0.28);
}

.signal-band[data-tooltip],
.card-signal-corner[data-tooltip] {
  cursor: help;
}

.signal-band[data-tooltip]::after,
.card-signal-corner[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 180px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(5, 10, 20, 0.96);
  box-shadow: 0 10px 28px rgba(3, 8, 18, 0.36);
  color: #dbe7ff;
  font-size: 11px;
  line-height: 1.42;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms ease, visibility 120ms linear;
  z-index: 8;
}

.signal-band[data-tooltip]::before,
.card-signal-corner[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 5px 0 5px;
  border-style: solid;
  border-color: rgba(5, 10, 20, 0.96) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms ease, visibility 120ms linear;
  z-index: 8;
}

.signal-band:hover::after,
.signal-band:hover::before,
.signal-band:focus-visible::after,
.signal-band:focus-visible::before,
.card-signal-corner:hover::after,
.card-signal-corner:hover::before,
.card-signal-corner:focus-visible::after,
.card-signal-corner:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.signal-band-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  border-radius: 999px;
  opacity: 0.9;
}

.signal-band[data-visual="muted"] .signal-band-fill {
  opacity: 0.44;
  filter: grayscale(1) saturate(0.08) brightness(0.92);
}

.signal-band[data-visual="soft"] .signal-band-fill {
  opacity: 0.62;
  filter: grayscale(0.55) saturate(0.45) brightness(0.95);
}

.signal-band[data-visual="bias"] .signal-band-fill {
  opacity: 0.68;
  filter: grayscale(0.34) saturate(0.62) brightness(0.97);
}

.signal-band-fill-up {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.9));
}

.signal-band-fill-down {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.9), rgba(239, 68, 68, 0.18));
}

.signal-band-copy {
  position: relative;
  z-index: 2;
  color: #edf4ff;
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(3, 8, 18, 0.9);
}

.signal-band[data-visual="muted"] .signal-band-copy {
  color: rgba(237, 244, 255, 0.82);
}

.signal-band[data-visual="soft"] .signal-band-copy {
  color: rgba(237, 244, 255, 0.9);
}

.signal-band[data-visual="bias"] .signal-band-copy {
  color: rgba(237, 244, 255, 0.92);
}

.signal-band-marker {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(8, 15, 29, 0.9);
  box-shadow: 0 0 0 1px rgba(5, 10, 20, 0.52), 0 0 12px rgba(8, 15, 29, 0.28);
}

.signal-band[data-visual="muted"] .signal-band-marker {
  opacity: 0.62;
  filter: grayscale(1) saturate(0.08) brightness(0.94);
}

.signal-band[data-visual="soft"] .signal-band-marker {
  opacity: 0.8;
  filter: grayscale(0.55) saturate(0.45) brightness(0.96);
}

.signal-band[data-visual="bias"] .signal-band-marker {
  opacity: 0.84;
  filter: grayscale(0.34) saturate(0.62) brightness(0.97);
}

.signal-band-marker-up {
  background: #22c55e;
}

.signal-band-marker-down {
  background: #ef4444;
}

.signal-band-marker-neutral {
  background: #f59e0b;
}

.pending {
  position: absolute;
  inset: 56px 6px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(143, 155, 176, 0.18);
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.pending-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.pending-empty .pending-title {
  color: #dff5ff;
}

.pending-empty .pending-note {
  max-width: 180px;
  text-align: center;
}

.pending-note {
  font-size: 11px;
}

.error-box {
  position: absolute;
  inset: 56px 6px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  color: #fca5a5;
  font-size: 11px;
}

.news-ribbon {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  background: #0b1220;
  font-family: var(--ui-sans);
}

.ribbon-tone {
  flex: 0 0 auto;
}

.ribbon-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ribbon-nav-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(143, 155, 176, 0.26);
  border-radius: 999px;
  background: rgba(7, 14, 26, 0.76);
  color: rgba(217, 226, 241, 0.88);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.ribbon-nav-btn:hover,
.ribbon-nav-btn:focus-visible {
  color: var(--yellow);
  border-color: rgba(244, 180, 0, 0.42);
  background: rgba(32, 25, 5, 0.84);
  outline: none;
}

.ribbon-nav-btn:disabled {
  opacity: 0.36;
  cursor: default;
}

.ribbon-story {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  transition: color 180ms ease, opacity 180ms ease;
}

.ribbon-story[data-empty="true"] {
  cursor: default;
  pointer-events: none;
}

.ribbon-story:hover,
.ribbon-story:focus-visible {
  color: #f7fbff;
}

.ribbon-headline {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

.ribbon-meta {
  justify-self: end;
  min-width: 0;
  font-size: 12px;
  color: rgba(200, 209, 223, 0.72);
  white-space: nowrap;
  font-family: var(--ui-sans);
}

.hidden {
  display: none !important;
}

.ticker-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 8, 18, 0.68);
  backdrop-filter: blur(12px);
}

.ticker-editor {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 16px;
  background: #0d1525;
  box-shadow: 0 24px 80px rgba(3, 8, 18, 0.55);
  overflow: hidden;
}

.ticker-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.ticker-editor-kicker {
  color: #8fe8ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker-editor-title {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.ticker-editor-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1525;
  color: #c8d1df;
  cursor: pointer;
}

.ticker-editor-close:hover {
  color: #f3f8ff;
}

.ticker-editor-body {
  padding: 16px 18px 12px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.ticker-editor-searchbox {
  display: grid;
  gap: 8px;
}

.ticker-editor-options {
  order: -1;
}

.ticker-editor-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1220;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
}

.ticker-editor-meta {
  min-height: 36px;
  padding: 0 2px;
}

.ticker-editor-suggestions {
  position: static;
  top: auto;
  left: auto;
  right: auto;
}

.ticker-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}

.ticker-editor-options {
  display: grid;
  gap: 8px;
}

.settings-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(78, 92, 115, 0.42);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.52);
}

.settings-group-head {
  display: grid;
  gap: 4px;
}

.settings-group-title {
  color: #f3f8ff;
  font-size: 14px;
  font-weight: 800;
}

.settings-group-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ticker-editor-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-toggle {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(78, 92, 115, 0.42);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.52);
  cursor: pointer;
}

.settings-toggle-compact {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(9, 18, 32, 0.64);
}

.settings-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-box {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(120, 140, 172, 0.5);
  background: rgba(7, 14, 26, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-toggle-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(40deg);
}

.settings-toggle-input:checked + .settings-toggle-box {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(10, 30, 48, 0.96);
}

.settings-toggle-input:checked + .settings-toggle-box::after {
  border-color: #8fe8ff;
}

.settings-toggle-input:focus-visible + .settings-toggle-box {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
}

.settings-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-toggle-title {
  color: #f3f8ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.settings-toggle-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.settings-toggle.is-disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .ticker-editor-alert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-cell-meta {
  min-height: 30px;
  padding: 0 4px;
}

.settings-cell-title {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.settings-cell-copy {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.settings-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(78, 92, 115, 0.65);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.98);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.6);
}

.ticker-editor-searchbox .ticker-editor-suggestions {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  margin-top: 2px;
}

.settings-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(13, 21, 37, 0.92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.settings-suggestion:hover,
.settings-suggestion.is-active {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(17, 29, 49, 0.98);
}

.settings-suggestion-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.settings-suggestion-symbol {
  font-size: 13px;
  font-weight: 700;
  color: #f3f8ff;
}

.settings-suggestion-title {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-suggestion-meta {
  color: #8fe8ff;
  font-size: 11px;
  white-space: nowrap;
}

.settings-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1525;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .topbar-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .topbar-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    font-size: 29px;
  }

  .brand-triangle {
    border-left-width: 5px;
    border-right-width: 5px;
  }

  .brand-mark[data-trend="up"] .brand-triangle,
  .brand-mark[data-trend="neutral"] .brand-triangle {
    border-bottom-width: 9px;
  }

  .brand-mark[data-trend="down"] .brand-triangle {
    border-top-width: 9px;
  }

  .timeframe-picker {
    padding: 0 8px;
    gap: 4px;
    height: 36px;
  }

  .dashboard-grid-control {
    min-height: 36px;
  }

  .tf-btn {
    font-size: 13px;
    min-height: 24px;
    padding: 4px 6px;
  }

}

@media (max-width: 700px) {
  .topbar {
    gap: 10px;
    padding-bottom: 12px;
  }

  .topbar-main {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-mark {
    font-size: 24px;
  }

  .brand-triangle {
    border-left-width: 4px;
    border-right-width: 4px;
  }

  .brand-mark[data-trend="up"] .brand-triangle,
  .brand-mark[data-trend="neutral"] .brand-triangle {
    border-bottom-width: 8px;
  }

  .brand-mark[data-trend="down"] .brand-triangle {
    border-top-width: 8px;
  }

  .timeframe-picker {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    border-right: 0;
    border-left: 0;
    height: auto;
  }

  .tf-btn {
    font-size: 12px;
    min-height: 24px;
    padding: 4px 6px;
  }

  .topbar-controls {
    display: grid;
    gap: 8px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    align-items: stretch;
  }

  .dashboard-switcher {
    flex: 1 1 auto;
    width: auto;
  }

  .dashboard-grid-control {
    width: 100%;
    justify-content: flex-end;
  }

  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
    gap: 6px 10px;
  }

  .best-setup-pill,
  .sync-pill {
    order: 1;
  }

  .sync-pill {
    order: 2;
  }

  .online-pill {
    order: 3;
    margin-left: auto;
  }

  .best-setup-pill {
    max-width: 100%;
    width: 100%;
  }

  .best-setup-pill[data-compact="true"] {
    width: auto;
  }

  .news-ribbon {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "tone nav meta"
      "story story story";
    gap: 6px 8px;
    height: auto;
    padding: 6px 10px 8px;
  }

  .ribbon-tone {
    grid-area: tone;
  }

  .ribbon-nav {
    grid-area: nav;
  }

  .ribbon-story {
    grid-area: story;
  }

  .ribbon-meta {
    grid-area: meta;
    justify-self: end;
    font-size: 11px;
  }

  .card-live {
    --card-head-height: 0px;
  }

  .settings-suggestion {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .settings-suggestion-meta {
    white-space: normal;
  }
}
