/* Bitcoin Trade Card — original dark terminal theme.
   Not a copy of any proprietary vendor's palette/layout; built from the brief:
   near-black base, dark gray panels, bright data colors, dense monospace grid. */

:root {
  --bg-base: #0a0c10;
  --bg-panel: #12151b;
  --bg-panel-alt: #171b23;
  --bg-hover: #1c212b;
  --border: #232833;
  --border-light: #2c313d;

  --text-primary: #e6e9ef;
  --text-secondary: #9aa4b2;
  --text-muted: #5b6472;

  --accent: #3b82f6;
  --accent-dim: #1d3a63;
  --positive: #16c784;
  --positive-dim: #0d3327;
  --negative: #ea3943;
  --negative-dim: #3a1418;
  --warning: #f0b90b;
  --warning-dim: #3a2e08;
  --critical: #ff3b5c;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 6px;
  --ticker-h: 28px;
  --topnav-h: 80px;
  --sidebar-w: 220px;
  --sidebar-w-collapsed: 56px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
}

body { margin: 0; overflow: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.text-positive { color: var(--positive) !important; }
.text-negative { color: var(--negative) !important; }
.text-muted-terminal { color: var(--text-muted) !important; }
.text-secondary-terminal { color: var(--text-secondary) !important; }
.text-warning-terminal { color: var(--warning) !important; }

/* ---------- Ticker tape ---------- */
.ms-ticker-tape {
  height: var(--ticker-h);
  background: #05070a;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.ms-ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ms-ticker-scroll 45s linear infinite;
  will-change: transform;
}
.ms-ticker-tape:hover .ms-ticker-track { animation-play-state: paused; }
.ms-ticker-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 0 14px; border-right: 1px solid var(--border);
  color: var(--text-secondary);
}
.ms-ticker-item .sym { font-weight: 700; color: var(--text-primary); }
.ms-ticker-item .chg.text-positive { color: var(--positive); }
.ms-ticker-item .chg.text-negative { color: var(--negative); }
@keyframes ms-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Top navigation ---------- */
.ms-topnav {
  height: var(--topnav-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  position: fixed;
  top: var(--ticker-h); left: 0; right: 0;
  z-index: 1000;
}

.ms-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}
.ms-brand-mark {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 800; color: #fff;
}
.ms-brand-logo-img {
  /* Source file is a wide banner (~5.9:1) — height drives the box, width follows the
     image's real aspect ratio via object-fit so it can never stretch or squish. */
  height: 26px;
  width: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.ms-brand-logo-img-lg {
  height: 40px;
  width: 260px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

.ms-command-bar {
  flex: 1;
  max-width: 640px;
  position: relative;
}
.ms-command-bar input {
  width: 100%;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 12px 7px 32px;
  border-radius: var(--radius);
}
.ms-command-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.ms-command-bar i.fa-terminal {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 12px;
}
.ms-command-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
  border: 1px solid var(--border-light); border-radius: 4px; padding: 1px 5px;
}

.ms-command-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  max-height: 360px; overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  display: none;
  z-index: 1100;
}
.ms-command-results.show { display: block; }
.ms-command-results .item {
  padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.ms-command-results .item:last-child { border-bottom: none; }
.ms-command-results .item:hover, .ms-command-results .item.active { background: var(--bg-hover); }
.ms-command-results .item .sym { font-family: var(--font-mono); font-weight: 700; }
.ms-command-results .item .name { color: var(--text-secondary); font-size: 12px; }

/* Pushes the status pills/clock/icons to the right edge of the top nav — this
   used to be handled by the command bar's flex:1 filling the middle; removed
   with the search bar, so the first right-side item takes over that role. */
#ms-market-status {
  margin-left: auto;
}

.ms-topnav-pill {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--bg-panel-alt); border: 1px solid var(--border-light);
  color: var(--text-secondary); white-space: nowrap;
}
.ms-status-dot { width: 7px; height: 7px; border-radius: 50%; }
.ms-status-dot.live { background: var(--positive); box-shadow: 0 0 6px var(--positive); animation: ms-pulse 1.8s infinite; }
.ms-status-dot.delayed { background: var(--warning); }
.ms-status-dot.down { background: var(--negative); }
@keyframes ms-pulse { 50% { opacity: 0.35; } }

.ms-topnav-icon-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--text-secondary); cursor: pointer; position: relative;
  background: transparent; border: none;
}
.ms-topnav-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.ms-notification-btn::after {
  display: none;
}

.ms-notification-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--negative);
  color: #fff;
  border: 1px solid var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
}

.ms-notification-menu {
  width: 340px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-panel);
  box-shadow: 0 16px 34px rgba(0,0,0,0.45);
}

.ms-notification-head,
.ms-notification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border);
}

.ms-notification-head strong {
  font-size: 12px;
}

.ms-notification-head a,
.ms-notification-footer {
  color: var(--accent);
  font-size: 11px;
}

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

.ms-notification-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.ms-notification-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.ms-notification-item.triggered {
  background: linear-gradient(90deg, rgba(234, 57, 67, 0.12), transparent);
}

.ms-notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--warning);
}

.ms-notification-dot.live {
  background: var(--negative);
  box-shadow: 0 0 8px rgba(234, 57, 67, 0.7);
}

.ms-notification-dot.delayed {
  background: var(--accent);
}

.ms-notification-item strong,
.ms-notification-item em,
.ms-notification-item small {
  display: block;
}

.ms-notification-item strong {
  font-family: var(--font-mono);
  font-size: 12px;
}

.ms-notification-item em {
  margin-top: 2px;
  color: var(--text-secondary);
  font-style: normal;
  font-size: 11px;
  line-height: 1.35;
}

.ms-notification-item small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.ms-notification-footer {
  justify-content: center;
  border-bottom: none;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

/* ---------- Sidebar ---------- */
.ms-sidebar {
  position: fixed; top: calc(var(--ticker-h) + var(--topnav-h)); bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 900;
  transition: width 0.15s ease;
}
.ms-sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.ms-sidebar.collapsed .ms-nav-label { display: none; }
.ms-sidebar.collapsed .ms-nav-section-title { display: none; }

.ms-nav-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 14px 14px 6px;
}
.ms-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px; color: var(--text-secondary); font-size: 12.5px;
  cursor: pointer; white-space: nowrap; border-left: 2px solid transparent;
}
.ms-nav-item i { width: 16px; text-align: center; font-size: 13px; }
.ms-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.ms-nav-item.active { background: var(--accent-dim); color: #cfe0ff; border-left-color: var(--accent); }
.ms-nav-item .badge-soon {
  margin-left: auto; font-size: 9px; padding: 1px 5px; border-radius: 4px;
  background: var(--bg-panel-alt); color: var(--text-muted); border: 1px solid var(--border-light);
}

/* ---------- Main content ---------- */
.ms-main {
  position: fixed; top: calc(var(--ticker-h) + var(--topnav-h)); bottom: 0; right: 0;
  left: var(--sidebar-w);
  overflow-y: auto;
  padding: 14px;
  transition: left 0.15s ease;
}
.ms-sidebar.collapsed ~ .ms-main { left: var(--sidebar-w-collapsed); }

/* ---------- Panels / widgets ---------- */
.ms-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.ms-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--bg-panel-alt);
}
.ms-panel-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.ms-panel-body { padding: 12px; }
.ms-panel-body.tight { padding: 0; }

.ms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.ms-stat-tile {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.ms-stat-tile .label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ms-stat-tile .value { font-family: var(--font-mono); font-size: 19px; font-weight: 700; margin-top: 3px; }
.ms-stat-tile .change { font-family: var(--font-mono); font-size: 11.5px; margin-top: 2px; }
.ms-stat-tile .meta { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Long/short ratio bar (derivatives panels) ---------- */
.ms-ratio-bar {
  display: flex; height: 22px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin: 8px 0 6px;
}
.ms-ratio-bar .long { background: var(--positive); }
.ms-ratio-bar .short { background: var(--negative); }
.ms-ratio-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
}
.ms-ratio-labels .long-label { color: var(--positive); }
.ms-ratio-labels .short-label { color: var(--negative); }

/* ---------- Confidence meter (Screener) ---------- */
.ms-confidence-meter {
  position: relative; height: 26px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(90deg,
    var(--text-muted) 0%, var(--text-muted) 59%,
    var(--warning) 59%, var(--warning) 69%,
    #6db36d 69%, #6db36d 79%,
    var(--positive) 79%, var(--positive) 89%,
    #2fd98a 89%, #2fd98a 100%);
}
.ms-confidence-meter .marker {
  position: absolute; top: -3px; bottom: -3px; width: 3px;
  background: var(--text-primary); box-shadow: 0 0 6px rgba(255,255,255,0.7);
}
.ms-confidence-scale {
  display: flex; justify-content: space-between; font-size: 9.5px;
  color: var(--text-muted); font-family: var(--font-mono); margin-top: 3px;
}

/* ---------- Agent consensus list ---------- */
.ms-agent-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: 12.5px; cursor: pointer;
}
.ms-agent-row:last-child { border-bottom: none; }
.ms-agent-row:hover { background: var(--bg-hover); }
.ms-agent-name { color: var(--text-secondary); }
.ms-agent-verdict { font-family: var(--font-mono); font-weight: 700; }
.ms-agent-reason {
  font-size: 11px; color: var(--text-muted); padding: 0 4px 8px; display: none;
  border-bottom: 1px solid var(--border);
}
.ms-agent-reason.show { display: block; }

/* ---------- Signal feed ---------- */
.ms-signal-feed-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid var(--border); font-size: 12px; cursor: pointer;
}
.ms-signal-feed-item:last-child { border-bottom: none; }
.ms-signal-feed-item:hover { background: var(--bg-hover); }
.ms-signal-feed-item .time { color: var(--text-muted); font-family: var(--font-mono); font-size: 10.5px; min-width: 58px; }

/* ---------- Quote table ---------- */
.ms-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ms-table th {
  text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 7px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-panel-alt);
}
.ms-table th:first-child, .ms-table td:first-child { text-align: left; }
.ms-table td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); }
.ms-table tbody tr { cursor: pointer; }
.ms-table tbody tr:hover { background: var(--bg-hover); }
.ms-table .sym-cell { font-weight: 700; color: var(--text-primary); }
.ms-table .name-cell { color: var(--text-muted); font-family: var(--font-sans); font-size: 11.5px; }

/* ---------- Data status badges ---------- */
.ms-data-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-family: var(--font-mono); text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px; letter-spacing: 0.03em;
}
.ms-data-status.realtime { background: var(--positive-dim); color: var(--positive); }
.ms-data-status.delayed { background: var(--warning-dim); color: var(--warning); }
.ms-data-status.eod { background: var(--bg-panel-alt); color: var(--text-secondary); border: 1px solid var(--border-light); }
.ms-data-status.estimated { background: var(--bg-panel-alt); color: var(--text-muted); border: 1px dashed var(--border-light); }
.ms-data-status.unavailable { background: var(--negative-dim); color: var(--negative); }
.ms-data-status.needs_key { background: var(--warning-dim); color: var(--warning); }
.ms-data-status.error { background: var(--negative-dim); color: var(--negative); }
.ms-data-status.static { background: var(--bg-panel-alt); color: var(--text-muted); border: 1px dashed var(--border-light); }

/* ---------- National data metric tiles ---------- */
.ms-stat-tile.is-muted .value { color: var(--text-muted); font-size: 15px; }
.ms-stat-tile .note { font-size: 10px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.ms-stat-tile .note a { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn-terminal {
  background: var(--bg-panel-alt); border: 1px solid var(--border-light); color: var(--text-primary);
  font-size: 12px; padding: 6px 12px; border-radius: var(--radius);
}
.btn-terminal:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-terminal-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-terminal-accent:hover { background: #2f6fdb; color: #fff; }

/* ---------- Tabs ---------- */
.ms-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 4px; }
.ms-tab {
  padding: 8px 14px; font-size: 12px; color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ms-tab:hover { color: var(--text-secondary); }
.ms-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a4050; }

/* ---------- Auth pages ---------- */
.ms-auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 20% 20%, #10151f 0%, var(--bg-base) 60%);
  overflow-y: auto; padding: 24px;
}
.ms-auth-card {
  width: 100%; max-width: 380px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 28px;
}
.ms-auth-card .form-control {
  background: var(--bg-panel-alt); border: 1px solid var(--border-light); color: var(--text-primary);
}
.ms-auth-card .form-control:focus {
  background: var(--bg-panel-alt); border-color: var(--accent); color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.ms-auth-card label { color: var(--text-secondary); font-size: 12.5px; }

.ms-auth-divider {
  display: flex; align-items: center; text-align: center;
  color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  margin: 16px 0;
}
.ms-auth-divider::before, .ms-auth-divider::after {
  content: ""; flex: 1; border-bottom: 1px solid var(--border);
}
.ms-auth-divider span { padding: 0 10px; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border: 1px solid #dadce0; color: #3c4043;
  font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius);
}
.btn-google:hover { background: #f8f9fa; color: #3c4043; }

/* ---------- Misc ---------- */
.ms-skeleton {
  background: linear-gradient(90deg, var(--bg-panel-alt) 25%, var(--bg-hover) 37%, var(--bg-panel-alt) 63%);
  background-size: 400% 100%; animation: ms-shimmer 1.4s ease infinite;
  border-radius: 4px;
}
@keyframes ms-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.ms-empty-state, .ms-error-state {
  padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 12.5px;
}
.ms-error-state i { font-size: 20px; color: var(--negative); margin-bottom: 6px; display: block; }

/* ---------- Chart range selector ---------- */
.ms-range-group { display: flex; gap: 2px; }
.ms-range-btn {
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 4px;
}
.ms-range-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.ms-range-btn.active { color: #cfe0ff; background: var(--accent-dim); border-color: var(--accent); }

/* ---------- Key/value stat rows (fundamentals-style panels) ---------- */
.ms-kv-table { width: 100%; font-size: 12.5px; }
.ms-kv-table tr { border-bottom: 1px solid var(--border); }
.ms-kv-table tr:last-child { border-bottom: none; }
.ms-kv-table td { padding: 7px 4px; }
.ms-kv-table td:first-child { color: var(--text-secondary); }
.ms-kv-table td:last-child { text-align: right; font-family: var(--font-mono); color: var(--text-primary); }

/* ---------- Watchlist mini list ---------- */
.ms-mini-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.ms-mini-list-item:last-child { border-bottom: none; }

/* ---------- AI assistant "coming soon" panel ---------- */
.ms-ai-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; border-bottom: 1px solid var(--border);
}
.ms-ai-panel-header .icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.ms-ai-suggestions { list-style: none; margin: 0; padding: 0; }
.ms-ai-suggestions li {
  padding: 8px 12px; font-size: 12px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border); cursor: default;
}
.ms-ai-suggestions li:last-child { border-bottom: none; }
.ms-ai-suggestions li i { color: var(--text-muted); margin-right: 8px; width: 14px; }

/* ---------- News cards ---------- */
.ms-news-card {
  display: block; height: 100%;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text-primary);
}
.ms-news-card:hover { border-color: var(--border-light); background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.ms-news-card-img { height: 130px; background-size: cover; background-position: center; background-color: var(--bg-panel-alt); }
.ms-news-card-body { padding: 12px; }
.ms-news-card-source { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.ms-news-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.ms-news-card-summary { font-size: 11.5px; color: var(--text-secondary); line-height: 1.4; }

.ms-disclaimer {
  font-size: 10.5px; color: var(--text-muted); border-top: 1px solid var(--border);
  padding: 10px 14px; line-height: 1.5;
}

.ms-badge-density-compact .ms-panel-body { padding: 7px; }
.ms-badge-density-compact .ms-stat-tile { padding: 7px 9px; }

/* ---------- Asset class data pages ---------- */
.asset-class-terminal {
  display: grid;
  gap: 12px;
}

.asset-class-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.asset-class-head h5 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.asset-class-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.asset-class-search {
  position: relative;
}

.asset-class-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.asset-class-search input {
  width: 240px;
  height: 32px;
  padding: 0 10px 0 30px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
}

.asset-class-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.asset-class-filter {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.asset-class-filter:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.asset-class-filter.active {
  color: #cfe0ff;
  background: var(--accent-dim);
  border-color: var(--accent);
}

.asset-class-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.asset-class-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.asset-class-summary-card {
  min-height: 70px;
  padding: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.asset-class-summary-card span {
  display: block;
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.asset-class-summary-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.2;
}

.asset-class-data-table tr[hidden],
.stock-live-table tr[hidden] {
  display: none;
}

.asset-class-data-table tbody tr,
.stock-live-table tbody tr {
  transition: background 0.12s ease;
}

.asset-class-data-table .sym-cell,
.stock-live-table .sym-cell {
  min-width: 140px;
}

.asset-class-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: -4px;
  margin-right: 7px;
}

.asset-class-logo-fx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--positive-dim);
  border: 1px solid rgba(22, 199, 132, 0.35);
  color: var(--positive);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .asset-class-head {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-class-actions {
    justify-content: flex-start;
  }

  .asset-class-search input {
    width: min(100%, 320px);
  }

  .asset-class-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Customizable home terminal ---------- */
.home-terminal {
  min-width: 920px;
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.home-title-block h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.home-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-toolbar-actions {
  display: flex;
  gap: 8px;
}

.home-toolbar-actions .btn-terminal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
}

.home-widget-picker {
  display: none;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  background: #070a0f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-widget-picker.show {
  display: grid;
}

.home-widget-picker button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12px;
}

.home-widget-picker button:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.home-workspace {
  display: grid;
  grid-template-columns: repeat(12, minmax(64px, 1fr));
  grid-auto-rows: 86px;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  background:
    linear-gradient(rgba(44,49,61,0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44,49,61,0.32) 1px, transparent 1px),
    #06080c;
  background-size: calc((100% - 110px) / 12 + 10px) 96px, calc((100% - 110px) / 12 + 10px) 96px, auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
}

.home-widget {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(18, 21, 27, 0.98);
  border: 1px solid #223047;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,0.24);
  overflow: hidden;
}

.home-widget.is-moving {
  z-index: 20;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 16px 40px rgba(0,0,0,0.46);
}

.home-widget-header {
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 10px;
  background: #0e131b;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
}

.home-widget.is-moving .home-widget-header {
  cursor: grabbing;
}

.home-widget-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-widget-title i {
  color: var(--accent);
}

.home-widget-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.home-widget-actions button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
}

.home-widget-actions button:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-primary);
}

.home-symbol-input {
  width: 58px;
  height: 24px;
  padding: 2px 6px;
  background: #090d13;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.home-widget-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 9px;
}

.home-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

.home-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--border-light);
  border-bottom: 2px solid var(--border-light);
}

.home-loading {
  height: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  color: var(--text-muted);
  font-size: 12px;
}

.home-loading .ms-skeleton {
  display: block;
  width: 72%;
  height: 8px;
}

.home-chart-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.home-chart-meta strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
}

.home-chart-meta span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
}

.home-chart {
  width: 100%;
  height: calc(100% - 48px);
  min-height: 140px;
  display: block;
}

.home-grid-line {
  stroke: rgba(44, 49, 61, 0.72);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.home-time-axis {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.home-quote-tile {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 8px;
  margin-bottom: 7px;
  text-align: left;
  background: #0d1219;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.home-quote-tile:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.home-quote-tile span {
  color: var(--text-secondary);
  font-size: 11px;
}

.home-quote-tile strong,
.home-quote-tile em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
}

.home-quote-tile em {
  grid-column: 2;
}

.home-feed {
  display: grid;
  gap: 8px;
}

.home-feed-item {
  display: block;
  padding: 8px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.home-feed-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.home-feed-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
}

.home-feed-item span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-compact-table th,
.home-compact-table td {
  padding: 6px 7px;
  font-size: 11.5px;
}

.home-ai {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bae6fd;
  font-size: 11px;
  font-weight: 700;
}

.home-ai p {
  margin: 0;
  padding: 8px;
  background: #0d1219;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.35;
}

.home-ai textarea {
  margin-top: auto;
  min-height: 68px;
  resize: none;
  padding: 8px;
  background: #090d13;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
}

.home-tabs {
  display: flex;
  gap: 3px;
  margin: -2px 0 8px;
  overflow-x: auto;
}

.home-tabs button {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 10.5px;
}

.home-tabs button:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.home-tabs button.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #cfe0ff;
}

.home-fundamentals-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.home-fundamentals-head strong {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.2;
}

.home-fundamentals-head span {
  display: block;
  max-width: 260px;
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-fundamentals-head em {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
}

.home-fundamentals-table td {
  padding: 6px 4px;
}

.home-fundamentals-table td:last-child {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-linked-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: right;
}

@media (max-width: 1180px) {
  .home-terminal {
    min-width: 760px;
  }

  .home-widget-picker {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .home-terminal {
    min-width: 0;
  }

  .home-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-widget-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-workspace {
    display: flex;
    flex-direction: column;
    min-height: auto !important;
  }

  .home-widget {
    min-height: 260px;
  }
}

/* ---------- Markets terminal page ---------- */
.markets-terminal {
  min-width: 1120px;
  margin: 0;
  padding-bottom: 32px;
  background: var(--bg-base);
}

.markets-page-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  height: 40px;
  padding: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.markets-page-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.markets-head-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.markets-overview {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
}

.markets-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.markets-toolbar {
  display: flex;
  gap: 8px;
}

.markets-toolbar button,
.markets-search button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12px;
}

.markets-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 8px;
  padding: 10px;
}

.markets-stat-card,
.markets-list-card {
  min-height: 188px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
  overflow: hidden;
}

.markets-card-label,
.markets-card-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.markets-card-title {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.markets-card-title span {
  margin-left: auto;
}

.markets-big-value {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-primary);
}

.markets-big-value span {
  font-size: 13px;
  font-weight: 500;
}

.markets-breakdown {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.markets-breakdown div,
.markets-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.markets-breakdown span {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.markets-breakdown strong,
.markets-row strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 12px;
  white-space: nowrap;
}

.markets-radar-card {
  position: relative;
}

.markets-radar {
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 230px;
  height: 190px;
  opacity: 0.45;
  background:
    repeating-radial-gradient(circle at 55% 60%, transparent 0 26px, var(--border-light) 27px 28px),
    repeating-conic-gradient(from 45deg at 55% 60%, transparent 0deg 13deg, var(--border-light) 14deg 15deg);
  clip-path: polygon(50% 0, 100% 34%, 82% 100%, 18% 100%, 0 34%);
}

.markets-mini-table {
  display: grid;
  gap: 8px;
}

.markets-row {
  cursor: default;
  color: var(--text-secondary);
  font-size: 12px;
}

.markets-row span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.markets-row-grid {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) repeat(3, minmax(64px, auto));
}

.markets-coin-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
}

.markets-coin-icon.type-crypto { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(240, 185, 11, 0.35); }
.markets-coin-icon.type-stock,
.markets-coin-icon.type-etf { background: var(--accent-dim); color: #cfe0ff; border: 1px solid rgba(59, 130, 246, 0.35); }
.markets-coin-icon.type-forex { background: var(--positive-dim); color: var(--positive); border: 1px solid rgba(22, 199, 132, 0.35); }
.markets-coin-icon.type-commodity { background: var(--bg-panel); color: var(--text-secondary); border: 1px solid var(--border-light); }
.markets-coin-icon.type-index { background: var(--bg-panel); color: var(--text-muted); border: 1px solid var(--border-light); }

.markets-loading,
.markets-empty {
  padding: 22px 8px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.markets-table-panel {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
}

.markets-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 44px;
  padding: 0 12px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border);
}

.markets-tabs button {
  align-self: stretch;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
}

.markets-tabs button.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.markets-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.markets-chip-group,
.markets-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.markets-chip-group button {
  height: 26px;
  padding: 0 10px;
  background: var(--bg-panel-alt);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
}

.markets-chip-group button.active {
  color: #cfe0ff;
  background: var(--accent-dim);
  border-color: var(--accent);
}

.markets-search {
  margin-left: auto;
  position: relative;
}

.markets-search > i {
  position: absolute;
  left: 11px;
  color: var(--text-secondary);
  font-size: 12px;
}

.markets-search input {
  width: 244px;
  height: 30px;
  padding: 0 10px 0 32px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
}

.markets-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 580px);
  min-height: 280px;
}

.markets-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.markets-table th,
.markets-table td {
  height: 32px;
  padding: 0 18px;
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
}

.markets-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-panel-alt);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 700;
}

.markets-table th:first-child,
.markets-table th:nth-child(2),
.markets-table td:first-child,
.markets-table td:nth-child(2) {
  text-align: left;
}

.markets-table tbody tr {
  cursor: pointer;
}

.markets-table tbody tr:hover {
  background: var(--bg-hover);
}

.markets-symbol-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.markets-symbol-cell .fa-star {
  color: var(--text-muted);
  font-size: 12px;
}

.markets-symbol-cell strong {
  color: var(--text-primary);
}

.markets-table td:nth-child(2) {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.markets-bottom-tape {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--sidebar-w);
  z-index: 850;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 10px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ms-sidebar.collapsed ~ .ms-main .markets-bottom-tape {
  left: var(--sidebar-w-collapsed);
}

.markets-bottom-tape button {
  height: 24px;
  padding: 0 8px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-primary);
  font-weight: 700;
}

.markets-bottom-tape span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.markets-bottom-tape .markets-coin-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  font-size: 9px;
}

.markets-bottom-tape strong {
  color: var(--text-primary);
}

.markets-bottom-tape em {
  font-style: normal;
}

@media (max-width: 1380px) {
  .markets-card-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  .markets-table-wrap {
    max-height: none;
  }
}

@media (max-width: 900px) {
  .markets-terminal {
    min-width: 0;
    margin: -14px;
  }

  .markets-card-grid {
    grid-template-columns: 1fr;
  }

  .markets-filter-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .markets-tabs {
    overflow-x: auto;
  }

  .markets-search {
    width: 100%;
    flex-wrap: wrap;
  }

  .markets-search input {
    flex: 1 1 220px;
    width: auto;
  }

  .markets-bottom-tape {
    left: 0;
    overflow-x: auto;
  }
}
