*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #131722;
    --bg2: #1e222d;
    --bg3: #2a2e39;
    --border: #2a2e39;
    --border2: #363c4e;
    --text: #d1d4dc;
    --text2: #9096a0;
    --text3: #8290a0;
    --up: #26a69a;
    --down: #ef5350;
    --candle-up: #26a69a;
    --candle-down: #ef5350;
    --blue: #4f7fff;
    --accent: #4f7fff;
    --chart-line: #4f7fff;
    --orange: #f6941c;
    --head-bg: #1a1d29;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  }
  [data-theme="mt5"] {
    --bg:      #0f0f0f;
    --bg2:     #1a1a1a;
    --bg3:     #222222;
    --border:  #2e2e2e;
    --border2: #3a3a3a;
    --text:    #e2ddd6;
    --text2:   #9a9a9a;
    --text3:   #666666;
    --up:      #00b050;
    --down:    #e03030;
    --candle-up: #00b061;
    --candle-down: #ff3a3a;
    --blue:    #4f8eff;
    --accent:  #3a3a3a;
    --chart-line: #4f7fff;
    --orange:  #e67e00;
    --head-bg: #141414;
    --font-ui:   'Consolas', 'Menlo', 'Courier New', monospace;
    --font-mono: 'Consolas', 'Menlo', 'Courier New', monospace;
  }
  [data-theme="mt5"] .q-price,
  [data-theme="mt5"] .q-chg,
  [data-theme="mt5"] .q-sym,
  [data-theme="mt5"] #clock,
  [data-theme="mt5"] .font-mono,
  [data-theme="mt5"] td.num,
  [data-theme="mt5"] .mono {
    font-family: 'Consolas', 'Menlo', 'Courier New', monospace !important;
  }
  [data-theme="mt5"] #topbar {
    border-bottom: 1px solid var(--border);
    background: var(--head-bg);
  }
  [data-theme="mt5"] .top-nav a.active {
    border-bottom: 2px solid var(--orange);
    background: var(--bg2);
    color: var(--text);
  }
  [data-theme="mt5"] .panel-head {
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
  }
  [data-theme="mt5"] .sb-head {
    border-left: 2px solid var(--orange);
    padding-left: 6px;
    color: var(--text2);
    background: var(--head-bg);
  }
  [data-theme="mt5"] .q-item {
    border-right: 1px solid var(--border);
    padding: 0 10px;
  }
  [data-theme="mt5"] .q-sym {
    color: var(--text2);
    font-size: 10.5px;
    letter-spacing: 0.03em;
  }
  [data-theme="mt5"] #news-ticker {
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
  }
  [data-theme="mt5"] .ticker-label {
    color: var(--orange);
    border-right: 1px solid var(--border);
  }
  [data-theme="mt5"] table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.022);
  }
  [data-theme="mt5"] #sidebar::-webkit-scrollbar-thumb,
  [data-theme="mt5"] ::-webkit-scrollbar-thumb {
    background: var(--border2);
  }
  [data-theme="mt5"] ::-webkit-scrollbar-track {
    background: var(--head-bg);
  }
  [data-theme="mt5"] #statusbar {
    background: var(--head-bg);
    border-top: 1px solid var(--border);
  }
  [data-theme="mt5"] .h-s-up   { background: #112b1e; }
  [data-theme="mt5"] .h-up     { background: #0f2019; }
  [data-theme="mt5"] .h-flat   { background: var(--bg3); }
  [data-theme="mt5"] .h-down   { background: #2a1515; }
  [data-theme="mt5"] .h-s-down { background: #361818; }

  .gi-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 6px 14px 4px;
    background: var(--bg3);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border2);
  }
  .gi-theme-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text3);
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 0;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
  }
  .gi-theme-btn.active {
    background: var(--border2);
    color: var(--text);
  }
  .gi-theme-btn:hover:not(.active) { color: var(--text2); }
  .gi-theme-label {
    padding: 4px 14px 1px;
    font-size: 9px;
    color: var(--text3);
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 1.4;
    min-height: 100vh;
  }
  #topbar {
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 200;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  #topbar .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    border-right: 1px solid var(--border2);
    margin-right: 8px;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
  }

  #topbar .logo > span {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }

  .logo-text {
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0em;
    line-height: 1.1;
    white-space: nowrap;
  }

  .logo-sub {
    font-family: var(--font-ui);
    font-size: 8px;
    font-weight: 500;
    color: var(--text2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
  }

  .top-nav { display: flex; height: 100%; }
  .top-nav a {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text2);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, background .15s;
  }
  .top-nav a:hover { color: var(--text); background: var(--bg3); }
  .top-nav a.active { color: #fff; background: var(--bg3); }

  .topbar-right {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--text2);
    font-family: var(--font-ui);
  }

  .live-dot {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--up);
    border-radius: 50%;
    margin-right: 4px;
    animation: blink 1.6s infinite;
  }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

  #clock {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    display: inline-block;
    min-width: 9ch;
    white-space: nowrap;
  }

  #session-label {
    white-space: nowrap;
  }
  #tv-ticker-wrap {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    height: 34px;
    flex-shrink: 0;
    position: relative;
  }
  #tv-ticker {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
  }
  #tv-ticker::-webkit-scrollbar { display: none; }
  .qb-arrow {
    flex-shrink: 0;
    width: 26px;
    background: var(--bg2);
    border: none;
    color: var(--text2);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  #qb-prev { border-right: 1px solid var(--border2); display: none; }
  #qb-next { border-left:  1px solid var(--border2); }
  #quotebar-inner {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
  }

  .q-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s;
    flex-shrink: 0;
  }
  .q-item:hover { background: var(--bg3); }
  .q-sym   { font-weight: 700; font-size: 11px; color: var(--text); font-family: var(--font-ui); }
  .q-price { font-size: 12px; font-family: var(--font-mono); }
  .q-chg   { font-size: 10px; font-family: var(--font-mono); }
  #news-ticker {
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
    height: 22px; display: flex; align-items: center;
    overflow: hidden; flex-shrink: 0;
  }
  .ticker-label {
    padding: 0 10px; font-size: 9px; font-weight: 700;
    font-family: var(--font-ui);
    color: var(--accent); text-transform: uppercase; letter-spacing: .10em;
    border-right: 1px solid var(--border2); white-space: nowrap; flex-shrink: 0;
  }
  .ticker-track {
    display: flex; align-items: center;
    white-space: nowrap;
  }
  .ticker-track:hover { animation-play-state: paused; }
  .ticker-item {
    font-size: 10px; color: var(--text2);
    padding: 0 22px; border-right: 1px solid var(--border); flex-shrink: 0;
    font-family: var(--font-ui); cursor: pointer;
    transition: color .12s;
  }
  .ticker-item:hover { color: var(--text); }
  .ticker-item .t-tag { color: var(--text); font-weight: 700; }
  .ticker-item .t-cur { color: var(--orange); font-weight: 700; font-size: 9px; }
  .tk-tooltip {
    display: none;
    position: fixed;
    width: 340px; max-width: calc(100vw - 24px);
    background: var(--bg2); border: 1px solid var(--border2);
    border-radius: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.45);
    padding: 12px 14px; z-index: 500;
    font-family: var(--font-ui);
  }
  .tk-tooltip.tk-open { display: block; }
  .tk-tt-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 7px;
  }
  .tk-tt-src {
    font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--accent);
  }
  .tk-tt-time { font-size: 9px; color: var(--text3); font-family: var(--font-mono); }
  .tk-tt-title {
    font-size: 12px; color: var(--text); font-weight: 600; line-height: 1.4; margin-bottom: 6px;
    white-space: normal;
  }
  .tk-tt-body {
    font-size: 11px; color: var(--text2); line-height: 1.5; margin-bottom: 8px;
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  }
  .tk-tt-link {
    font-size: 10px; color: var(--accent); font-weight: 600; text-decoration: none;
  }
  .tk-tt-link:hover { text-decoration: underline; }
  .tk-tt-cur {
    font-size: 9px; padding: 2px 7px; border-radius: 3px;
    background: var(--bg3); color: var(--text); border: 1px solid var(--border2);
    font-weight: 700; margin-right: 6px;
  }
  .t-up   { color: var(--up); }
  .t-down { color: var(--down); }
  #layout {
    display: grid;
    grid-template-columns: 250px minmax(0,1fr) 260px;
    height: calc(100vh - 92px);
    height: calc(100dvh - 92px);
    overflow: hidden;
    min-width: 0;
    width: 100%;
  }
  #layout.layout--no-right {
    grid-template-columns: 250px 1fr 0;
  }
  #layout.layout--no-right #rightpanel {
    display: none;
  }
  #sidebar {
    background: var(--bg2);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    font-size: 11px;
    display: flex;
    flex-direction: column;
  }
  #watchlist-section {
    flex: 1 0 auto;
    border-bottom: none;
    padding-bottom: 48px;
  }
  #sidebar::-webkit-scrollbar { width: 3px; }
  #sidebar::-webkit-scrollbar-thumb { background: var(--border2); }
  .sb-section div[style*="overflow-y:auto"]::-webkit-scrollbar { width: 3px; }
  .sb-section div[style*="overflow-y:auto"]::-webkit-scrollbar-track { background: transparent; }
  .sb-section div[style*="overflow-y:auto"]::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

  .sb-section { border-bottom: 1px solid var(--border); padding-bottom: 2px; }

  .sb-head {
    padding: 5px 8px 4px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .08em;
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-ui);
  }

  .sb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .1s;
    position: relative;
  }
  .sb-row:hover { background: var(--bg3); }
  .sb-row:last-child { border-bottom: none; }
  .sb-sym   { font-weight: 700; color: var(--text); font-size: 11px; font-family: var(--font-ui); }
  .sb-price { font-family: var(--font-mono); font-size: 11px; }
  .sb-chg   { font-family: var(--font-mono); font-size: 10px; }
  .sb-row.sb-selected { background: var(--bg3) !important; }
  .sb-row.sb-selected .sb-sym::after { content: ' ▾'; font-size: 8px; color: var(--text3); }
  .sb-expand-row { border-bottom: 1px solid var(--border2); background: var(--bg2); overflow: hidden; }
  .sb-expand-inner { max-height: 0; overflow: hidden; transition: max-height .22s ease; }
  .sb-expand-inner .pd-inline-scroll { overflow-x: hidden; }
  .sb-expand-inner .pd-inline { flex-direction: column; width: 100%; }
  .sb-expand-inner .pd-inline-price { display: none; }
  .sb-expand-inner .pd-inline-group {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 4px 8px;
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }
  .sb-expand-inner .pd-inline-group:last-of-type { border-bottom: none; }
  .sb-expand-inner .pd-inline-metrics { gap: 6px 10px; flex-wrap: wrap; }
  .sb-expand-inner .pd-inline-footer { position: static; }



  .up      { color: var(--up);     }
  .down    { color: var(--down);   }
  .flat    { color: var(--text2);  }
  .warning { color: var(--orange); }
  #main {
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;
    min-width: 0;
    width: 100%;
  }
  #main::-webkit-scrollbar { width: 4px; }
  #main::-webkit-scrollbar-thumb { background: var(--border2); }

  .panel { border-bottom: 1px solid var(--border); }
  .tradingview-widget-copyright { display:none !important; height:0 !important; overflow:hidden !important; margin:0 !important; padding:0 !important; }
  #tv-chart-wrap .tradingview-widget-container { margin-bottom:0 !important; padding-bottom:0 !important; }
  #tv-chart-wrap iframe { display:block; pointer-events:auto; }
  #tv-chart-wrap { pointer-events:none; }



  .panel-head {
    background: var(--head-bg);
    border-bottom: 1px solid var(--border);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .panel-title {
    font-size: 11px; font-weight: 700; color: var(--text);
    text-transform: uppercase; letter-spacing: .06em;
    font-family: var(--font-ui);
  }
  .panel-sub { font-size: 10px; color: var(--text2); font-family: var(--font-ui); margin-left: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table[aria-label="Key FX correlations"] td {
    font-size: 10px;
    padding: 2px 4px;
  }
  table[aria-label="Key FX correlations"] th {
    padding: 3px 4px;
  }
  .sig-notif-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto;
    padding: 3px 5px; border-radius: 3px;
    color: var(--text3); background: transparent;
    border: 1px solid var(--border2);
    cursor: pointer; transition: color .15s, border-color .15s, background .15s;
  }
  .sig-notif-toggle:hover { color: var(--accent); border-color: var(--accent); }
  .sig-notif-toggle svg { flex-shrink: 0; display: block; }
  .sig-notif-toggle.sig-notif-on {
    color: var(--accent); border-color: var(--accent);
    background: rgba(79,127,255,.08);
  }
  .sig-notif-toggle.sig-notif-on:hover { background: rgba(79,127,255,.14); }
  .sig-notif-toggle.sig-notif-blocked {
    color: var(--down); border-color: var(--down);
    opacity: .7; cursor: not-allowed;
  }
  #narrative {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 7px 10px;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    position: relative;
  }
  .narr-label {
    font-size: 10px; font-weight: 700; color: var(--text2);
    text-transform: uppercase; letter-spacing: .06em;
    white-space: nowrap; margin-top: 1px;
    padding-right: 10px; border-right: 1px solid var(--border2);
    margin-right: 10px;
    font-family: var(--font-ui);
  }
  .narr-text  {
    font-size: 12px; color: var(--text); line-height: 1.5; flex: 1;
    font-family: var(--font-ui); word-wrap: break-word; overflow-wrap: break-word;
    white-space: normal; min-width: 0;
    display: block;
    cursor: help;
  }
  .narr-meta {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 2;
  }
  .narr-share-btn {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: 4px;
    color: var(--text3);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .18s, border-color .15s, color .15s;
    pointer-events: none;
  }
  #narrative:hover .narr-share-btn,
  #narrative:focus-within .narr-share-btn {
    opacity: 1;
    pointer-events: auto;
  }
  .narr-share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .narr-share-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    opacity: 1;
    pointer-events: auto;
  }
  .narr-share-btn.copied {
    border-color: var(--up) !important;
    color: var(--up) !important;
    opacity: 1;
    pointer-events: none;
  }
  table { width: 100%; border-collapse: collapse; }
  th {
    font-size: 9px; font-weight: 700; color: var(--text2);
    text-transform: uppercase; letter-spacing: .06em;
    padding: 4px 6px; border-bottom: 1px solid var(--border2);
    text-align: right; background: var(--head-bg);
    font-family: var(--font-ui); white-space: nowrap;
  }
  th:first-child { text-align: left; }
  td {
    padding: 4px 6px; border-bottom: 1px solid var(--border);
    text-align: right; font-size: 11px; color: var(--text);
    font-family: var(--font-mono);
  }
  td:first-child { text-align: left; font-family: var(--font-ui); }
  td.sym { font-weight: 700; font-size: 12px; color: #fff; font-family: var(--font-ui); white-space: nowrap; min-width: 52px; }
  tr:hover td { background: var(--bg3); }
  tr:last-child td { border-bottom: none; }
  .heatmap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px; padding: 6px 10px;
  }
  .hm-cell {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 6px 2px; cursor: pointer; font-size: 11px; gap: 2px;
    border: 1px solid transparent;
  }
  .hm-cell:hover { border-color: var(--border2); }
  .hm-sym { font-weight: 700; font-size: 12px; color: #fff; font-family: var(--font-ui); }
  .hm-val { font-size: 10px; font-family: var(--font-mono); }
  .h-s-up   { background: #1a3a34; }
  .h-up     { background: #1a2e2c; }
  .h-flat   { background: var(--bg3); }
  .h-down   { background: #2e1c1c; }
  .h-s-down { background: #3a1a1a; }
  .cot-header {
    display: grid;
    grid-template-columns: 58px 1fr 42px 64px 52px 14px 46px 68px;
    align-items: center; gap: 8px;
    padding: 3px 0 4px 0;
    border-bottom: 1px solid var(--border2);
    margin-bottom: 4px;
  }
  .cot-row {
    display: grid;
    grid-template-columns: 58px 1fr 42px 64px 52px 14px 46px 68px;
    align-items: center; gap: 8px;
    padding: 3px 0; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background .1s;
  }
  .cot-row:hover { background: var(--bg3); }
  .cot-row:last-child { border-bottom: none; }
  .cot-sym { font-weight: 700; color: #fff; font-family: var(--font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cot-scroll-wrap { overflow-x: auto; }
  .cot-scroll-wrap::-webkit-scrollbar { height: 3px; }
  .cot-scroll-wrap::-webkit-scrollbar-thumb { background: var(--border2); }
  .cot-header, .cot-row { min-width: 436px; }
  .cot-bar-outer { height: 10px; min-width: 36px; background: var(--bg3); position: relative; overflow: hidden; }
  .cot-long-fill  { position: absolute; left: 0;  top: 0; height: 100%; background: var(--up);   opacity: .75; }
  .cot-short-fill { position: absolute; right: 0; top: 0; height: 100%; background: var(--down); opacity: .75; }
  .cot-pct { font-size: 10px; font-family: var(--font-mono); }
  .cot-net { text-align: right; font-size: 10px; font-family: var(--font-mono); }
  .cot-wow { text-align: right; font-size: 10px; font-family: var(--font-mono); }
  .cot-div { font-size: 10px; text-align: center; cursor: help; line-height: 1; }
  .cot-div.aligned { color: var(--up); }
  .cot-div.diverge { color: var(--orange, #e8963c); }
  .cot-pcoi { font-size: 10px; font-family: var(--font-mono); text-align: right; }
  .cot-oi { font-size: 10px; font-family: var(--font-mono); color: var(--text2); text-align: right; }
  .cot-oi .oi-up { color: var(--up); font-size: 8px; margin-right: 2px; }
  .cot-oi .oi-dn { color: var(--down); font-size: 8px; margin-right: 2px; }
  .rates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
  .rate-cell  { background: var(--bg); padding: 6px 8px; }
  .rate-cty   { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; font-family: var(--font-ui); }
  .rate-val   { font-size: 18px; font-weight: 700; color: #fff; font-family: var(--font-mono); line-height: 1.1; }
  .rate-chg   { font-size: 10px; margin-top: 1px; font-family: var(--font-mono); }
  .ca-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
  .ca-cell  { background: var(--bg); padding: 7px 8px; cursor: pointer; transition: background .1s; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
  .ca-cell:hover { background: var(--bg3); }
  .ca-cell:nth-child(odd) { border-right: 1px solid var(--border); }
  .ca-name  { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; font-family: var(--font-ui); }
  .ca-val   { font-size: 16px; font-weight: 700; color: #fff; font-family: var(--font-mono); }
  .ca-chg   { font-size: 10px; font-family: var(--font-mono); }
  .risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
  .risk-cell { background: var(--bg); padding: 6px 8px; }
  .risk-lbl  { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; font-family: var(--font-ui); }
  .risk-val  { font-size: 20px; font-weight: 700; font-family: var(--font-mono); line-height: 1.1; }
  .risk-sub  { font-size: 10px; color: var(--text2); margin-top: 1px; font-family: var(--font-mono); }
  .session-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
  .sess { padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--border2); color: var(--text3); font-family: var(--font-ui); white-space: nowrap; }
  .sess.active { border-color: var(--up); color: var(--up); }
  .sessions-table-wrap { overflow-x: auto; }
  .spread-row {
    display: grid; grid-template-columns: 56px 1fr 48px;
    align-items: center; gap: 6px; padding: 3px 0;
    border-bottom: 1px solid var(--border);
  }
  .spread-row:last-child { border-bottom: none; }
  .spr-sym  { color: var(--text); font-weight: 700; font-family: var(--font-ui); }
  .spr-bar  { height: 4px; background: var(--bg3); overflow: hidden; }
  .spr-fill { height: 100%; }
  .spr-val  { text-align: right; font-family: var(--font-mono); color: var(--text2); }
  .alert-row {
    display: flex; flex-wrap: wrap; gap: 0 8px; padding: 5px 10px;
    border-bottom: 1px solid var(--border);
    align-items: center; transition: background .1s;
  }
  .alert-row:hover { background: var(--bg3); }
  .alert-row:last-child { border-bottom: none; }
  .a-time { color: var(--text3); font-size: 10px; white-space: nowrap; min-width: 34px; font-family: var(--font-mono); flex-shrink: 0; }
  .a-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .a-crit { background: var(--down); }
  .a-warn { background: var(--orange); }
  .a-info { background: var(--accent); }
  .a-text { color: var(--text2); flex: 1; font-size: 11px; line-height: 1.4; font-family: var(--font-ui); min-width: 0; }
  .a-text strong { color: var(--text); font-weight: 600; }
  .a-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
  .a-badge { color: var(--text3); font-size: 9.5px; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .a-name { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .a-pair { color: var(--text); font-weight: 600; }
  .a-sev { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .a-sev-crit { background: var(--down); }
  .a-sev-warn { background: var(--orange); }
  .a-sev-info { background: var(--accent); }
  .a-desc { display: block; margin: 4px 0 6px; color: var(--text); }
  .a-foot { border-top: 1px solid var(--border2); padding-top: 6px; margin-top: 2px; font-size: 10.5px; line-height: 1.7; }
  .a-foot-line { color: var(--text2); }
  .a-foot-lbl { color: var(--text3); }
  .a-has-body { cursor: pointer; }
  .a-has-body::after {
    content: '▸'; font-size: 8px; color: var(--text3);
    flex-shrink: 0; margin-left: 6px;
    transition: transform .15s;
  }
  .a-has-body.a-body-open::after { transform: rotate(90deg); }
  .a-body {
    display: none; width: 100%;
    padding: 6px 0 4px calc(34px + 8px + 6px + 8px);
    color: var(--text2); font-size: 11px; line-height: 1.5; font-family: var(--font-ui);
  }
  .a-has-body.a-body-open .a-body { display: block; }
  .a-body-text { margin: 0 0 6px; }
  .a-evidence {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding-top: 5px; border-top: 1px solid var(--border2);
  }
  .a-ev-chip {
    font-size: 9px; font-family: var(--font-mono);
    padding: 2px 6px; border-radius: 3px;
    background: var(--bg3); color: var(--text2);
    border: 0.5px solid var(--border2);
    white-space: nowrap;
  }
  #rightpanel {
    background: var(--bg2); border-left: 1px solid var(--border);
    overflow-y: auto; font-size: 11px; display: flex; flex-direction: column;
    padding-bottom: 26px;
  }
  #rightpanel::-webkit-scrollbar { width: 3px; }
  #rightpanel::-webkit-scrollbar-thumb { background: var(--border2); }
  #cbrates-tbody tr[data-cbr-id]:hover td {
    background: var(--bg3);
  }
  #correlations-tbody tr[data-corr-idx]:hover td {
    background: var(--bg3);
  }
  #correlations-tbody tr[data-corr-idx] td:first-child,
  #correlations-tbody tr[data-corr-idx] td:nth-child(2) {
    white-space: nowrap;
  }
  #correlations-tbody tr[data-corr-idx] td:first-child::after {
    content: ' ›';
    color: var(--text3);
    font-size: 9px;
  }
  .yield-canvas-wrap:hover {
    opacity: 0.88;
  }
  #cbrates-tbody tr[data-cbr-id] td:first-child::after {
    content: ' ›';
    color: var(--text3);
    font-size: 9px;
    opacity: 0;
    transition: opacity .15s;
  }
  #cbrates-tbody tr[data-cbr-id]:hover td:first-child::after {
    opacity: 1;
  }
  .pd-header { display:flex; justify-content:space-between; align-items:center; padding:3px 8px 2px; background:var(--head-bg); border-bottom:1px solid var(--border); }
  .pd-sym { font-size:12px; font-weight:700; color:var(--text); letter-spacing:.03em; }
  .pd-source { font-size:9px; color:var(--text3); font-family:var(--font-mono); }
  .pd-price-block { padding:4px 8px 5px; border-bottom:1px solid var(--border); }
  .pd-price-row { display:flex; align-items:baseline; gap:5px; }
  .pd-price { font-size:15px; font-weight:700; font-family:var(--font-mono); color:var(--text); letter-spacing:-.01em; }
  .pd-price.pd-dim { color:var(--text3); }
  .pd-chg { font-size:11px; font-family:var(--font-mono); font-weight:600; }
  .pd-range { font-size:9px; color:var(--text3); font-family:var(--font-mono); margin-top:1px; }
  .pd-spread-row { font-size:9px; color:var(--text3); font-family:var(--font-mono); margin-top:1px; }
  .pd-section { border-bottom:1px solid var(--border); }
  .pd-section--last { border-bottom:none; }
  .pd-section-lbl { font-size:8px; font-weight:600; text-transform:uppercase; letter-spacing:.07em; color:var(--text3); padding:3px 8px 1px; }
  .pd-grid { display:grid; grid-template-columns:1fr 1fr; }
  .pd-cell { padding:3px 8px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); }
  .pd-cell:nth-child(even) { border-right:none; }
  .pd-cell:last-child { border-bottom:none; }
  .pd-cell:nth-last-child(2):nth-child(odd) { border-bottom:none; }
  .pd-lbl { font-size:9px; color:var(--text3); text-transform:uppercase; letter-spacing:.05em; margin-bottom:0; }
  .pd-val { font-size:11px; font-family:var(--font-mono); color:var(--text); font-weight:600; }
  .pd-up { color:var(--up); }
  .pd-dn { color:var(--down); }
  .pd-val.pd-up { color:var(--up); }
  .pd-val.pd-dn { color:var(--down); }
  .pd-dim { color:var(--text3); }
  .pd-oi-up { color:var(--up); font-size:9px; }
  .pd-oi-dn { color:var(--down); font-size:9px; }
  .pd-cot-summary { font-size:9px; font-family:var(--font-mono); color:var(--text3); padding:2px 8px 4px; border-top:1px solid var(--border); }
  .pd-footer { display:flex; align-items:center; gap:6px; padding:3px 8px; flex-wrap:wrap; border-top:1px solid var(--border); }
  #pd-popover .pd-header { display:flex; justify-content:space-between; align-items:center; padding:3px 8px 2px; background:var(--head-bg); border-bottom:1px solid var(--border); }
  .pd-close { background:none; border:none; color:var(--text3); font-size:13px; line-height:1; cursor:pointer; padding:2px 4px; border-radius:2px; transition:color .1s; }
  .pd-close:hover { color:var(--text); }
  .pd-cell--wide { grid-column: 1 / -1; border-right:none; }
  .pd-cell--wide:last-child { border-bottom:none; }
  .pd-retail-bar { height:4px; background:var(--bg3); border-radius:2px; overflow:hidden; margin:3px 0 2px; }
  .pd-retail-fill { height:100%; background:var(--up); border-radius:2px; opacity:.7; }
  .pd-retail-nums { font-size:10px; font-family:var(--font-mono); color:var(--text2); font-weight:600; }
  .pd-retail-sep { color:var(--text3); margin:0 3px; }
  tr.pd-expand-row td { padding:0; border-bottom:1px solid var(--border2); background:var(--bg2); }
  tr.pd-expand-row td > div {
    overflow:hidden;
    max-height:0;
    transition:max-height 0.18s ease-out;
  }
  tr.pd-expand-row.pd-open td > div { max-height:185px; }
  .pd-inline-scroll {
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
    width:100%;
    box-sizing:border-box;
  }
  .pd-inline { display:flex; align-items:stretch; padding:0; font-family:var(--font-ui); width:100%; }
  .pd-inline-price {
    display:flex; flex-direction:column; justify-content:center;
    padding:6px 10px 6px 10px;
    border-right:1px solid var(--border2);
    min-width:100px; flex-shrink:0;
  }
  .pd-inline-sym { font-size:13px; font-weight:700; color:var(--text); letter-spacing:.02em; line-height:1; }
  .pd-inline-rate { font-size:14px; font-weight:700; font-family:var(--font-mono); color:var(--text); line-height:1.2; margin-top:3px; }
  .pd-inline-chg { font-size:10px; font-family:var(--font-mono); font-weight:600; line-height:1; margin-top:2px; }
  .pd-inline-meta { font-size:9px; color:var(--text3); font-family:var(--font-mono); margin-top:2px; }
  .pd-inline-group {
    display:flex; flex-direction:column; justify-content:flex-start;
    padding:5px 8px 5px 8px;
    border-right:1px solid var(--border2);
    flex:1; min-width:0;
  }
  .pd-inline-group-lbl {
    font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.07em;
    color:var(--text3); margin-bottom:4px; white-space:nowrap;
  }
  .pd-inline-metrics { display:flex; gap:8px; flex-wrap:wrap; }
  .pd-inline-metric { display:flex; flex-direction:column; }
  .pd-inline-lbl { font-size:8px; color:var(--text3); text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; margin-bottom:1px; }
  .pd-inline-val { font-size:11px; font-family:var(--font-mono); font-weight:600; color:var(--text); white-space:nowrap; }
  .pd-inline-val.pd-up { color:var(--up); }
  .pd-inline-val.pd-dn { color:var(--down); }
  .pd-inline-retail-bar { height:3px; width:100%; max-width:90px; background:var(--bg3); border-radius:2px; overflow:hidden; margin:3px 0; }
  .pd-inline-retail-fill { height:100%; background:var(--up); border-radius:2px; opacity:.7; }
  .pd-inline-retail-row { display:flex; align-items:center; gap:2px; font-size:10px; font-family:var(--font-mono); font-weight:600; }
  .pd-inline-retail-avg { display:flex; flex-direction:column; gap:1px; margin-top:3px; }
  .pd-inline-retail-skew { font-size:8px; font-weight:600; letter-spacing:.03em; margin-left:3px; }
  .pd-inline-footer { font-size:8px; color:var(--text3); font-family:var(--font-mono); padding:2px 10px; border-top:1px solid var(--border); background:var(--bg2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  tr.pd-selected td { background:var(--bg3) !important; }
  tr.pd-selected td.sym::after { content:' ▾'; font-size:8px; color:var(--text3); }
  .sb-sym { flex-shrink: 0; }
  .carry-rank-row { display:grid; grid-template-columns:10px 46px 36px 1fr 34px; align-items:center; gap:4px; padding:4px 8px; border-bottom:1px solid var(--border); font-family:var(--font-ui); font-size:11px; cursor:pointer; transition:background .1s; }
  .carry-rank-row:hover { background:var(--bg3); }
  .carry-rank-row:last-child { border-bottom:none; }
  .cr-rank { font-size:9px; color:var(--text3); font-family:var(--font-mono); text-align:left; }
  .cr-pair { font-weight:700; color:var(--text); white-space:nowrap; letter-spacing:.01em; font-size:10px; }
  .cr-spread { font-family:var(--font-mono); font-size:8px; color:var(--text2); white-space:nowrap; }
  .cr-bar-wrap { height:4px; background:var(--bg3); border-radius:2px; overflow:hidden; min-width:8px; }
  .cr-bar { height:100%; background:var(--up); border-radius:2px; opacity:.7; max-width:100%; }
  .cr-diff { font-family:var(--font-mono); font-size:9.5px; text-align:right; white-space:nowrap; }
  .vol-lb-row { display:grid; grid-template-columns:10px 46px 1fr 34px; align-items:center; gap:6px; padding:4px 8px; border-bottom:1px solid var(--border); font-family:var(--font-mono); cursor:pointer; transition:background .1s; }
  .vol-lb-row:hover { background:var(--bg3); }
  .vol-lb-row:last-child { border-bottom:none; }
  .vlr-rank { font-size:9px; color:var(--text3); text-align:left; }
  .vlr-pair { font-weight:700; color:var(--text); white-space:nowrap; letter-spacing:.01em; font-size:10px; }
  .vlr-bar-wrap { height:4px; background:var(--bg3); border-radius:2px; overflow:hidden; min-width:8px; }
  .vlr-bar { height:100%; background:var(--up); border-radius:2px; opacity:.85; max-width:100%; }
  .vlr-val { font-size:9.5px; color:var(--text); text-align:right; white-space:nowrap; }
  .carry-rank-hdr,
  #carry-rank-rows:has(> .carry-rank-hdr) .carry-rank-row {
    display: grid;
    grid-template-columns: 46px 1fr 1fr minmax(54px, max-content);
    align-items: center;
    gap: 0;
  }
  .carry-rank-hdr {
    padding: 3px 4px;
    border-bottom: 1px solid var(--border2);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text3);
    font-family: var(--font-mono);
  }
  #carry-rank-rows:has(> .carry-rank-hdr) .carry-rank-row { padding: 2px 4px; }
  .crh-pair { font-family:var(--font-ui); font-size:8px; }
  .crh-nom  { font-family:var(--font-mono); font-size:8px; text-align:right; padding-right:4px; }
  .crh-cip  { font-family:var(--font-mono); font-size:8px; text-align:right; padding-right:4px; }
  .crh-sig  { font-size:8px; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .cr-nom   { font-family:var(--font-mono); font-size:10px; color:var(--text2); text-align:right; white-space:nowrap; padding-right:4px; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; }
  .cr-cip   { font-family:var(--font-mono); font-size:10px; text-align:right; white-space:nowrap; padding-right:4px; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; }
  .cr-sig   { font-size:10px; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .cr-sig-strong { color:var(--up);   font-weight:700; }
  .cr-sig-pos    { color:var(--up); }
  .cr-sig-neu    { color:var(--text3); }
  .cr-sig-weak   { color:var(--down); }
  .cr-sig-neg    { color:var(--down); font-weight:700; }
  .macro-row {
    display: grid; grid-template-columns: 32px 1fr 36px 36px 42px;
    padding: 4px 8px; border-bottom: 1px solid var(--border);
    font-size: 11px; gap: 2px; align-items: center;
    cursor: pointer; transition: background .1s;
  }
  .macro-row:hover { background: var(--bg3); }
  .macro-row:last-child { border-bottom: none; }
  .m-name  { color: var(--text); font-family: var(--font-ui); }
  .m-prev  { color: var(--text3); text-align: right; font-family: var(--font-mono); }
  .m-exp   { color: var(--text2); text-align: right; font-family: var(--font-mono); }
  .m-act   { text-align: right; font-weight: 700; font-family: var(--font-mono); }
  .impact-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
  .imp-h { background: var(--down); }
  .imp-m { background: var(--orange); }
  .imp-l { background: var(--text3); }
  #news-feed-items::-webkit-scrollbar { width: 3px; }
  #news-feed-items::-webkit-scrollbar-track { background: var(--bg); }
  #news-feed-items::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
  #var-cvar-tbody::-webkit-scrollbar { width: 3px; }
  #var-cvar-tbody::-webkit-scrollbar-track { background: transparent; }
  #var-cvar-tbody::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
  #news-feed-items { scrollbar-width: thin; scrollbar-color: var(--border2) var(--bg); }
  .news-item {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 6px 10px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background .1s;
  }
  .news-item:hover { background: var(--bg3); }
  .news-item:last-child { border-bottom: none; }
  .news-time { font-size: 10px; color: var(--text3); white-space: nowrap;
    padding-top: 1px; min-width: 36px; font-family: var(--font-mono); }
  .news-cur-tag {
    font-size: 9px; font-weight: 700; color: var(--text2);
    border: 1px solid var(--border2); padding: 0 4px;
    border-radius: 2px; white-space: nowrap; font-family: var(--font-ui);
    margin-right: 2px;
  }
  .news-body { flex: 1; min-width: 0; }
  .news-headline { font-size: 11px; color: var(--text); line-height: 1.4; font-family: var(--font-ui); }
  .news-meta { font-size: 9px; color: var(--text3); margin-top: 2px; font-family: var(--font-ui); display: flex; gap: 8px; }
  .news-source { color: var(--text2); }
  #skew-tbody td:not(:first-child) { text-align: right; }
  #skew-tbody closest table,
  #skew-source-label ~ table,
  [aria-label*="Directional positioning bias"] {
    table-layout: fixed;
    width: 100%;
  }
  [aria-label*="Directional positioning bias"] th:nth-child(1),
  [aria-label*="Directional positioning bias"] td:nth-child(1) { width: 52px; }
  [aria-label*="Directional positioning bias"] th:nth-child(2),
  [aria-label*="Directional positioning bias"] td:nth-child(2) { width: 40px; }
  [aria-label*="Directional positioning bias"] th:nth-child(3),
  [aria-label*="Directional positioning bias"] td:nth-child(3) { width: 40px; }
  [aria-label*="Directional positioning bias"] th:nth-child(4),
  [aria-label*="Directional positioning bias"] td:nth-child(4) { width: auto; }
  #tv-pair-tabs::-webkit-scrollbar { display: none; }
  .tv-tab {
    background: none; border: 1px solid var(--border2); border-right: none;
    color: var(--text2); font-size: 10px; font-weight: 700;
    padding: 4px 9px; cursor: pointer; text-transform: uppercase;
    letter-spacing: .04em; transition: all .12s; font-family: var(--font-ui);
    white-space: nowrap; flex-shrink: 0;
  }
  .tv-tab:last-child { border-right: 1px solid var(--border2); }
  .tv-tab:hover { color: var(--text); background: var(--bg3); }
  .tv-tab.active { color: #fff; background: var(--bg3); border-color: var(--border2); }
  .yield-canvas-wrap { padding: 6px 10px 8px; }
  #yield-canvas { display: block; }
  .cb-row {
    display: grid; grid-template-columns: 1fr 46px 44px;
    padding: 3px 8px; border-bottom: 1px solid var(--border);
    align-items: center; font-size: 10px; gap: 2px;
  }
  .cb-row:last-child { border-bottom: none; }
  .cb-bank { color: var(--text); font-family: var(--font-ui); }
  .cb-rate { font-family: var(--font-mono); text-align: right; font-weight: 700; }
  .cb-next { font-family: var(--font-ui); font-size: 9px; text-align: right; }
  #statusbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 22px; background: var(--head-bg);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; flex-wrap: nowrap;
    padding: 0 10px; gap: 10px;
    font-size: 10px; color: var(--text2); z-index: 200;
    font-family: var(--font-ui);
    overflow: visible;
  }
  #statusbar > div:not(.footer-copy) {
    flex-shrink: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #statusbar > div:first-child {
    max-width: 220px;
  }
  @media (max-width: 600px) {
    #statusbar {
      position: relative; height: auto; flex-wrap: wrap;
      gap: 6px; padding: 6px 8px; font-size: 9px;
    }
    #statusbar > div:nth-child(n+3) { display: none; }
    .footer-copy { display: none; }
  }
  .sb-k { color: var(--text3); font-weight: 700; letter-spacing: .04em; }
  .sb-v { color: var(--text2); font-family: var(--font-mono); font-size: 10px; }
  .footer-copy {
    font-size: 10px; color: var(--text3); white-space: nowrap; font-family: var(--font-ui);
    position: absolute; left: 50%; transform: translateX(-50%);
    pointer-events: none;
  }
  @media (max-width: 600px) {
    .footer-copy { display: none; }
  }
  .fi { width: 16px; height: 12px; display: inline-block; }
  #myfxbook-wrap ::-webkit-scrollbar { width: 3px; }
  #myfxbook-wrap ::-webkit-scrollbar-thumb { background: var(--border2); }
  @media (max-width: 900px) {
    #topbar {
      padding: 0 6px;
      height: auto;
      flex-wrap: wrap;
      align-items: center;
    }
    #topbar .logo {
      padding: 6px 8px 6px 0;
      flex-shrink: 0;
      order: 1;
    }
    .topbar-right {
      margin-left: auto;
      font-size: 10px;
      padding: 4px 0;
      order: 2;
      flex-shrink: 0;
      gap: 8px !important;
    }
    #clock { display: none; }
    .live-dot { display: none; }
    #session-label { display: none; }
    .topbar-right > a.site-menu-btn { display: none; }
    .top-nav {
      display: flex;
      overflow-x: auto;
      overflow-y: hidden;
      width: 100%;
      order: 10;
      border-top: 1px solid var(--border2);
      height: auto;
      min-height: 30px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
      mask-image: linear-gradient(to right, black 88%, transparent 100%);
    }
    .top-nav::-webkit-scrollbar { display: none; }
    .top-nav a {
      flex-shrink: 0;
      white-space: nowrap;
      padding: 6px 12px;
      font-size: 11px;
      height: auto;
    }
    #news-ticker { display: none; }
    #layout { display: flex; flex-direction: column; height: auto; overflow: visible; }
    #main      { order: 1; }
    #rightpanel { order: 2; }
    #sidebar   { order: 3; }
    #sidebar {
      width: 100%; max-height: none; overflow-y: visible; overflow-x: auto;
      border-right: none; border-bottom: 1px solid var(--border);
      display: flex; flex-direction: row; flex-wrap: nowrap;
    }
    #sidebar .sb-section { min-width: 160px; border-bottom: none; border-right: 1px solid var(--border); flex-shrink: 0; }
    #sidebar .sb-head { white-space: nowrap; }
    #main { width: 100%; overflow-y: visible; overflow-x: hidden; }
    #rightpanel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
    #narrative { flex-direction: column; gap: 6px; }
    .narr-label { border-right: none; border-bottom: 1px solid var(--border2); padding-right: 0; padding-bottom: 4px; margin-right: 0; }
    .narr-text { font-size: 11px; width: 100%; }
    div[style*="grid-template-columns:1fr 1fr"]:not(#cross-asset-grid):not(.ca-grid) { display: flex !important; flex-direction: column !important; }
    div[style*="grid-template-columns: 1fr 1fr"]:not(#cross-asset-grid):not(.ca-grid) { display: flex !important; flex-direction: column !important; }
    #cross-asset-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; }
    .ca-grid { grid-template-columns: 1fr 1fr !important; }
    .ca-val { font-size: 13px !important; }
    .ca-name { font-size: 9px !important; }
    .risk-grid { grid-template-columns: 1fr 1fr !important; }
    .risk-val { font-size: 13px !important; }
    .rates-grid { grid-template-columns: 1fr 1fr !important; }
    .rate-val { font-size: 15px !important; }
    div[style*="height:320px"] { height: auto !important; max-height: none !important; }
    div[style*="max-height:320px"] { max-height: none !important; }
    div[style*="min-height:320px"] { min-height: 0 !important; }
    div[style*="height:580px"] { height: auto !important; }
    #section-crossasset, #section-risk { align-self: stretch !important; width: 100% !important; border-right: none !important; }
    div[style*="height:440px"] { height: auto !important; flex-direction: column !important; }
    div[style*="height:440px"] > div { height: auto !important; min-height: 0 !important; border-right: none !important; border-bottom: 1px solid var(--border) !important; }
    #news-feed-items { max-height: 300px !important; }
    tv-economic-map { min-height: 260px !important; }
    #intel-scroll {
      display: block !important;
      height: auto !important;
      flex: none !important;
      min-height: 0 !important;
      overflow: visible !important;
    }
    #news-section-feed, #research-section-feed, #trading-section-feed {
      overflow-y: visible !important;
      max-height: none !important;
    }
    .intel-sub-head { position: static !important; }
    div[style*="grid-template-columns:1fr 1fr;border-bottom"] { display: flex !important; flex-direction: column !important; }
    #section-tvcalendar { min-height: 0 !important; flex: none !important; }
    #tvcal-inner { height: 350px !important; flex: none !important; min-height: 0 !important; }
    #tvcal-scale {
      transform: scale(0.88) !important;
      width: 113.6% !important;
      height: 113.6% !important;
    }
    #sessions-table table { min-width: unset; }
    #chart-wrap, .tv-chart-container { width: 100% !important; }
    div[style*="overflow-x:auto"] { overflow-x: auto !important; }
    table { min-width: 480px; }
    .fx-pairs-table table, #fx-pairs-tbody { min-width: 480px; }
    #rightpanel table { min-width: unset !important; width: 100% !important; }
    #cal-hist-modal table { min-width: unset !important; width: 100% !important; }
    #rightpanel td, #rightpanel th { font-size: 10px !important; padding: 2px 4px !important; }
    table:has(#risk-indicators-tbody),
    table:has(#yield-spreads-tbody) { min-width: unset !important; width: 100% !important; }
    #section-risk table,
    #section-rates table { min-width: unset !important; width: 100% !important; }
    #heatmap-wrap { overflow-x: auto !important; }
    #tv-ticker { overflow-x: auto; white-space: nowrap; }
    #quotebar-inner { flex-wrap: nowrap !important; }
    .q-item { display: inline-flex !important; flex-shrink: 0; }
    body { font-size: 11px; }
    .panel-title { font-size: 10px !important; }
    .panel-sub { font-size: 9px !important; }
    #sidebar { flex-direction: column; overflow-x: hidden; }
    #sidebar .sb-section { min-width: unset; width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    div[style*="max-height:520px"] { max-height: none !important; overflow: visible !important; }
    #section-crossasset table { min-width: unset !important; width: 100% !important; }
    #section-crossasset td, #section-crossasset th { font-size: 10px !important; padding: 2px 4px !important; white-space: nowrap; }
    #section-crossasset td:first-child,
    #section-crossasset th:first-child { padding-left: 8px !important; }
    #section-crossasset td:last-child,
    #section-crossasset th:last-child { padding-right: 8px !important; }
    #spreads-rows { width: 100%; box-sizing: border-box; }
    .spread-row { grid-template-columns: 48px 1fr 42px; gap: 4px; }
    #myfxbook-wrap { max-height: 340px !important; flex: none !important; }
    #sent-rows { overflow-y: auto !important; flex: 1 !important; min-height: 0 !important; }
    .signal-col { display: table-cell !important; }
    [id$="-sig"] { display: table-cell !important; }

    table:has(#risk-indicators-tbody),
    table:has(#yield-spreads-tbody),
    #section-risk table,
    #section-rates table {
      table-layout: fixed;
      width: 100%;
    }
    #risk-indicators-tbody td:first-child,
    #yield-spreads-tbody td:first-child,
    table:has(#risk-indicators-tbody) th:first-child,
    table:has(#yield-spreads-tbody) th:first-child {
      width: auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #risk-indicators-tbody td:nth-child(2),
    #yield-spreads-tbody td:nth-child(2),
    #risk-indicators-tbody td:nth-child(3),
    #yield-spreads-tbody td:nth-child(3),
    table:has(#risk-indicators-tbody) th:nth-child(2),
    table:has(#yield-spreads-tbody) th:nth-child(2),
    table:has(#risk-indicators-tbody) th:nth-child(3),
    table:has(#yield-spreads-tbody) th:nth-child(3) {
      width: 58px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #section-risk table td, #section-risk table th,
    #section-rates table td, #section-rates table th {
      font-size: 10px;
      padding: 3px 4px;
    }
    #statusbar {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 4px 10px; font-size: 9px; padding: 4px 8px;
      height: auto; position: relative;
    }
    #statusbar > div:first-child { max-width: none; }
    #statusbar .footer-copy { grid-column: 1 / -1; position: static; transform: none; order: 10; text-align: center; }
    .cot-scroll-wrap {
      overflow-x: visible;
    }
    .cot-header,
    .cot-row {
      grid-template-columns: 44px 60px 30px 48px 40px 10px 40px 52px;
      gap: 4px;
      min-width: 0;
    }
    .cot-sym  { font-size: 9px; }
    .cot-pct, .cot-net, .cot-wow, .cot-pcoi, .cot-oi { font-size: 9px; }
    .cot-div  { font-size: 9px; }
    .cot-bar-outer { min-width: 0; }
    .cot-header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
    #pd-popover {
      position: fixed !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      top: auto !important;
      width: 100% !important;
      max-width: 100% !important;
      max-height: 70vh !important;
      border-radius: 12px 12px 0 0 !important;
      box-shadow: 0 -4px 24px rgba(0,0,0,0.55) !important;
      overflow-y: auto !important;
    }
    #pd-popover::before {
      content: '';
      display: block;
      width: 36px;
      height: 4px;
      background: var(--border2);
      border-radius: 2px;
      margin: 8px auto 4px;
      flex-shrink: 0;
    }
    tr.pd-expand-row.pd-open td > div {
      max-height: none;
      overflow: visible;
    }
  }

  @media (max-width: 480px) {
    .ca-grid { grid-template-columns: 1fr 1fr !important; }
    .rates-grid { grid-template-columns: 1fr 1fr !important; }
    .risk-grid { grid-template-columns: 1fr 1fr !important; }
    table { font-size: 10px; }
    .ca-val { font-size: 13px !important; }
    .rate-val { font-size: 14px !important; }
    #topbar { padding: 0 4px; }
    .logo-text { font-size: 10px !important; }
    .logo-sub { display: block; font-size: 7px !important; }
    .topbar-right { font-size: 9px; gap: 6px !important; }
    .top-nav a { padding: 5px 10px; font-size: 10px; }
    #layout { overflow: visible !important; }
    #main { overflow-x: hidden; overflow-y: visible !important; }
    #liquidity-canvas { height: 110px !important; }
  }
  .site-menu { display: flex; align-items: center; position: relative; }
  .site-menu-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: 1px solid var(--border2);
    color: var(--text2); font-size: 10px; font-family: var(--font-ui);
    padding: 3px 8px; border-radius: 4px; cursor: pointer;
    white-space: nowrap; transition: border-color .15s, color .15s;
  }
  .site-menu-btn:hover { border-color: var(--border); color: var(--text); }
  .site-menu-btn svg { flex-shrink: 0; }
  .site-menu-panel {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 200px; background: var(--bg2);
    border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 0; z-index: 400;
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
  }
  .site-menu:hover .site-menu-panel,
  .site-menu:focus-within .site-menu-panel { display: block; }
  .site-menu::after {
    content: ''; position: absolute; top: 100%;
    left: -8px; right: -8px; height: 8px;
  }
  .site-menu-panel a {
    display: block; padding: 5px 14px;
    color: var(--text2); font-size: 11px; font-family: var(--font-ui);
    text-decoration: none; white-space: nowrap;
    transition: background .12s, color .12s;
  }
  .site-menu-panel a:hover { background: var(--bg3); color: var(--text); }
  .site-menu-divider {
    height: 1px; background: var(--border); margin: 5px 0;
  }
  .site-menu-section {
    padding: 3px 14px 2px; font-size: 9px; color: var(--text3);
    font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .06em;
  }


  #gdpr-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 99999;
    background: #1a1f2e; border-top: 2px solid #4f7fff;
    padding: 14px 20px; display: none; flex-wrap: wrap;
    align-items: center; gap: 12px; font-family: Arial, sans-serif;
    font-size: 13px; color: #d0d6e8; box-shadow: 0 -4px 20px rgba(0,0,0,.5);
  }
  #gdpr-banner p { margin: 0; flex: 1 1 300px; line-height: 1.5; }
  #gdpr-banner a { color: #5b9bd5; }
  #gdpr-banner .gdpr-btns { display: flex; gap: 8px; flex-shrink: 0; }
  #gdpr-banner button {
    padding: 8px 18px; border-radius: 4px; border: none;
    cursor: pointer; font-size: 13px; font-weight: 600;
  }
  #gdpr-accept { background: #4f7fff; color: #fff; }
  #gdpr-accept:hover { background: #1a4fd8; }
  #gdpr-reject { background: transparent; color: #d0d6e8; border: 1px solid #4a5568 !important; }
  #gdpr-reject:hover { background: #2d3748; }
  @media (max-width: 600px) {
    #gdpr-banner { flex-direction: column; }
    #gdpr-banner .gdpr-btns { width: 100%; }
    #gdpr-banner button { flex: 1; }
  }
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 10000;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent, #4f7fff);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent, #4f7fff);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tv-skeleton {
  position: absolute;
  inset: 0;
  background: var(--bg2);
  pointer-events: none;
  z-index: 1;
  transition: opacity .3s ease;
}
.tv-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--bg3) 50%, transparent 100%);
  animation: tv-shimmer 1.6s infinite;
}
@keyframes tv-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.tv-skeleton.loaded {
  opacity: 0;
  pointer-events: none;
}
#user-alerts-list button:hover { color:var(--down) !important; }
#kb-legend {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.kbl-inner {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 6px; padding: 18px 22px; min-width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  cursor: default;
  font-family: var(--font-ui);
}
.kbl-title {
  font-size: 12px; font-weight: 700; color: var(--text);
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.kbl-grid {
  display: grid; grid-template-columns: auto 1fr;
  gap: 6px 14px; align-items: center;
}
.kbl-key {
  font-size: 11px; font-family: var(--font-mono);
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 3px; padding: 2px 7px;
  color: var(--text); white-space: nowrap;
  text-align: center;
}
.kbl-desc { font-size: 12px; color: var(--text2); }
.kbl-footer {
  margin-top: 12px; padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10px; color: var(--text3); text-align: center;
}
#fx-pairs-tbody tr.kb-focus {
  background: var(--bg3) !important;
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.export-btns {
  display: flex; gap: 4px; align-items: center; margin-left: auto; flex-shrink: 0;
}
.export-btn {
  font-size: 9px; font-family: var(--font-mono); font-weight: 600;
  padding: 2px 7px; border-radius: 3px; cursor: pointer;
  background: transparent; border: 1px solid var(--border2);
  color: var(--text3); letter-spacing: .05em;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.export-btn:hover { border-color: var(--accent); color: var(--accent); }
a.export-btn { display: inline-block; text-decoration: none; }
.kb-hint-btn {
  font-size: 9px; font-family: var(--font-mono);
  background: transparent; border: 1px solid var(--border2);
  color: var(--text3); padding: 1px 7px; border-radius: 3px;
  cursor: pointer; letter-spacing: .03em;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.kb-hint-btn:hover { border-color: var(--accent); color: var(--accent); }
.etf-iv-row {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.etf-iv-row:hover { background: var(--row-hover, rgba(255,255,255,.04)); }
.etf-iv-lbl {
  font-size: 10px; font-family: var(--font-mono); font-weight: 600;
  color: var(--text); width: 46px; flex-shrink: 0; letter-spacing: .01em;
}
.etf-iv-bar-wrap {
  flex: 1; height: 4px; background: var(--border2);
  border-radius: 2px; overflow: hidden; min-width: 0;
}
.etf-iv-bar { height: 100%; border-radius: 2px; transition: width .4s; }
.etf-iv-bar-high { background: var(--down, #e05252); }
.etf-iv-bar-mid  { background: var(--orange, #e09f52); }
.etf-iv-bar-low  { background: var(--up, #52b788); }
.etf-iv-val {
  font-size: 10px; font-family: var(--font-mono);
  color: var(--text); width: 34px; text-align: right; flex-shrink: 0;
}
.etf-iv-chg {
  font-size: 9px; font-family: var(--font-mono);
  width: 38px; text-align: right; flex-shrink: 0; color: var(--text3);
}
.pd-cell { position: relative; }
.pd-cell.fx-tip { cursor: help; }
#alerts-panel {
  border-bottom: 1px solid var(--border);
}
.alert-row {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-bottom: 1px solid var(--border);
  font-size: 10px; font-family: var(--font-ui);
}
.alert-row-active { background: rgba(224,82,82,.08); }
.alert-lbl { flex: 1; color: var(--text2); }
.alert-val  { font-family: var(--font-mono); font-size: 9.5px; color: var(--text3); }
.alert-fired { color: var(--down); font-weight: 600; }
.alert-add-row {
  display: flex; gap: 4px; padding: 5px 8px; align-items: center; flex-wrap: wrap;
}
.alert-select, .alert-input {
  font-size: 9.5px; font-family: var(--font-mono);
  background: var(--bg2, #1a1f2e); border: 1px solid var(--border2);
  color: var(--text); border-radius: 3px; padding: 2px 5px;
}
.alert-select { flex: 1; min-width: 80px; }
.rates-base-select {
  font-size: 9.5px; font-family: var(--font-mono);
  background: var(--bg2, #1a1f2e); border: 1px solid var(--border2);
  color: var(--text2); border-radius: 3px; padding: 2px 5px; cursor: pointer;
}
.alert-input  { width: 64px; }
.alert-add-btn {
  font-size: 9px; font-family: var(--font-mono); font-weight: 600;
  background: transparent; border: 1px solid var(--border2);
  color: var(--text3); padding: 2px 8px; border-radius: 3px; cursor: pointer;
  transition: border-color .15s, color .15s; white-space: nowrap;
}
.alert-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.alert-del {
  font-size: 9px; color: var(--text3); cursor: pointer; padding: 0 2px;
  line-height: 1; flex-shrink: 0;
}
.alert-del:hover { color: var(--down); }
.alert-notif-badge {
  display: inline-block; font-size: 8px; padding: 1px 5px;
  border-radius: 10px; margin-left: 4px;
  background: var(--down); color: #fff; font-family: var(--font-mono);
  vertical-align: middle;
}
#alerts-popover {
  position: fixed;
  width: 280px;
  background: var(--bg2, #141820);
  border: 1px solid var(--border2);
  border-radius: 6px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.55);
  z-index: 99999;
  font-family: var(--font-ui);
  overflow: hidden;
}
.alp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px 6px;
  font-size: 11px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  background: var(--head-bg, #1a1f2e);
}
.alp-close {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 11px; padding: 0 2px;
  line-height: 1;
}
.alp-close:hover { color: var(--text); }
.alp-rows {
  max-height: 180px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.alp-rows::-webkit-scrollbar { width: 3px; }
.alp-rows::-webkit-scrollbar-track { background: transparent; }
.alp-rows::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.alp-add {
  display: flex; gap: 4px; padding: 6px 8px;
  align-items: center; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.alp-dir { width: 40px !important; flex: none !important; }
.alp-footer {
  padding: 3px 8px 5px;
  font-size: 9px; color: var(--text3);
  border-top: 1px solid var(--border);
}
@media (min-width: 901px) {
  .gi-layout-handle {
    position: relative;
    z-index: 100;
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.15s ease;
    flex-shrink: 0;
    margin: 0 -3px;
    padding: 0 3px;
    box-sizing: content-box;
  }
  .gi-layout-handle:hover,
  .gi-layout-handle:active {
    background: var(--accent);
    opacity: 0.5;
  }
  .gi-layout-handle::after {
    content: '';
    position: absolute;
    top: 30%;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: var(--border2);
    border-radius: 1px;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }
  .gi-layout-handle:hover::after {
    opacity: 0;
  }
  body.gi-resizing {
    user-select: none;
    -webkit-user-select: none;
    cursor: col-resize !important;
  }
  body.gi-resizing * {
    cursor: col-resize !important;
  }
  body.gi-resizing iframe {
    pointer-events: none;
  }
  #gi-layout-toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-family: var(--font-ui);
    font-size: 11px;
    padding: 5px 14px;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 4000;
    white-space: nowrap;
  }
  #gi-layout-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
#econ-surprise-table {
  table-layout: fixed;
}
#econ-surprise-table th:first-child,
#econ-surprise-table td:first-child {
  width: 34px;
}
#econ-surprise-table th:last-child,
#econ-surprise-table td:last-child {
  width: 28px;
}
.econmx-wrap {
  overflow: auto;
}
.econmx-table {
  min-width: 1180px;
}
.econmx-table th,
.econmx-table td {
  white-space: nowrap;
}
.econmx-table td:first-child {
  font-family: var(--font-ui);
  font-weight: 600;
}
.econmx-table th:first-child,
.econmx-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg);
  box-shadow: 1px 0 0 var(--border);
}
.econmx-table thead th:first-child {
  z-index: 3;
}
.econmx-table td {
  vertical-align: middle;
  line-height: 1.25;
  padding-top: 5px;
  padding-bottom: 5px;
}
.econmx-val {
  font-variant-numeric: tabular-nums;
}
.econmx-ref {
  font-size: 9px;
  color: var(--text2);
  font-weight: 400;
  margin-top: 1px;
}
#fv-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: right;
  color: var(--text2);
  font-weight: 400;
  font-family: var(--font-ui);
  font-size: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
#fv-table th:first-child { text-align: left; }
#fv-table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
#fv-table td:first-child {
  text-align: left;
}
#fv-table tr:hover td { background: var(--bg2); }
#fv-progress-text { color: var(--text); font-variant-numeric: tabular-nums; }
.es-bar-wrap {
  position: relative;
  height: 6px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: visible;
}
.es-bar-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  width: 1px;
  height: 8px;
  background: var(--border2);
  border-radius: 0;
}
.mom-bar-wrap {
  display: inline-block;
  width: 46px;
  height: 6px;
  background: var(--bg3);
  border-radius: 1px;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}
.mom-bar {
  position: absolute;
  top: 0;
  bottom: 0;
}
.mom-bar.pos { background: var(--up); left: 50%; }
.mom-bar.neg { background: var(--down); right: 50%; }
.mom-bar-tick {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border2);
}
.es-bar-fill {
  position: absolute;
  top: 0;
  height: 6px;
  border-radius: 2px;
  transition: width 0.35s ease, background 0.35s ease, left 0.35s ease;
}
#econ-surprise-tbody tr:hover td {
  background: rgba(79,127,255,0.06);
}
#econ-surprise-tbody tr:focus {
  outline: 2px solid var(--blue,#4f7fff);
  outline-offset: -1px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
#tv-ticker::-webkit-scrollbar,
#tv-pair-tabs::-webkit-scrollbar,
#lw-range-bar::-webkit-scrollbar,
#rates-country-tabs::-webkit-scrollbar,
.top-nav::-webkit-scrollbar {
  display: none;
}
.ns-article { padding:9px 14px 10px;border-bottom:1px solid rgba(54,60,78,.35); }
.ns-article:last-child { border-bottom:none; }
.ns-featured { border-left:2px solid var(--accent);padding-left:12px; }
.ns-art-meta { display:flex;align-items:center;gap:6px;margin-bottom:4px; }

.ns-art-source { font-size:8px;font-weight:600;color:var(--accent,var(--blue));font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.05em; }
.ns-art-time   { font-size:8px;color:var(--text2);font-family:var(--font-mono); }
.ns-cur-tag    { font-size:8px;font-weight:700;color:var(--text2);border:1px solid var(--border2);padding:0 4px;border-radius:2px;font-family:var(--font-mono);flex-shrink:0; }
.ns-art-title { font-size:10px;font-weight:600;color:var(--text);line-height:1.35;margin-bottom:5px;font-family:var(--font-ui,'Inter',-apple-system,sans-serif); }
.ns-art-title a { color:inherit;text-decoration:none; }
.ns-art-title a:hover { text-decoration:underline;text-decoration-color:var(--text2); }
.ns-art-body { font-size:10px;color:var(--text2);line-height:1.55;font-family:var(--font-ui,'Inter',-apple-system,sans-serif); }
.ns-cur-pill { font-size:9px;font-family:var(--font-ui);font-weight:600;color:var(--text2);background:transparent;border:1px solid var(--border2);border-radius:2px;padding:1px 6px;cursor:pointer;transition:background .1s,color .1s,border-color .1s;text-transform:uppercase;letter-spacing:.04em; }
.ns-cur-pill:hover { background:var(--bg3);color:var(--text); }
.ns-pill-active { background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important; }
.rs-article { padding:9px 14px 10px;border-bottom:1px solid rgba(54,60,78,.35); }
.rs-article:last-child { border-bottom:none; }
.rs-art-trade-idea { border-left:2px solid var(--up);padding-left:12px; }
.rs-art-meta { display:flex;align-items:center;gap:6px;margin-bottom:4px; }
.rs-art-source { font-size:8px;font-weight:600;color:var(--accent,var(--blue));font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.05em; }
.rs-art-time   { font-size:8px;color:var(--text2);font-family:var(--font-mono); }
.rs-cur-tag    { font-size:8px;font-weight:700;color:var(--text2);border:1px solid var(--border2);padding:0 4px;border-radius:2px;font-family:var(--font-mono);flex-shrink:0; }
.rs-art-title { font-size:10px;font-weight:600;color:var(--text);line-height:1.35;margin-bottom:5px;font-family:var(--font-ui,'Inter',-apple-system,sans-serif); }
.rs-art-title a { color:inherit;text-decoration:none; }
.rs-art-title a:hover { text-decoration:underline;text-decoration-color:var(--text2); }
.rs-art-body { font-size:10px;color:var(--text2);line-height:1.55;font-family:var(--font-ui,'Inter',-apple-system,sans-serif); }
.rs-bank-pill,
.rs-cur-pill { font-size:9px;font-family:var(--font-ui);font-weight:600;color:var(--text2);background:transparent;border:1px solid var(--border2);border-radius:2px;padding:1px 6px;cursor:pointer;transition:background .1s,color .1s,border-color .1s;text-transform:uppercase;letter-spacing:.03em; }
.rs-bank-pill:hover,
.rs-cur-pill:hover  { background:var(--bg3);color:var(--text); }
.rs-pill-active     { background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important; }
.rs-empty { padding:20px 14px;color:var(--text3);font-size:11px; }
#ns-density-toggle {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--border2);
  border-radius: 2px;
  overflow: hidden;
}
.ns-density-btn {
  font-size: 9px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  border: none;
  padding: 2px 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ns-density-btn:first-child { border-right: 1px solid var(--border2); }
.ns-density-btn:hover { background: var(--bg3); color: var(--text); }
.ns-density-active { background: var(--accent) !important; color: #fff !important; }
.ns-density-btn:disabled { opacity: .35; cursor: default; }
.ns-density-btn:disabled:hover { background: transparent; color: var(--text2); }

#section-news.ns-compact .ns-article,
#section-news.ns-compact .rs-article,
#intel-scroll.ns-compact .ns-article,
#intel-scroll.ns-compact .rs-article {
  padding: 4px 14px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
}
#section-news.ns-compact .ns-art-body,
#section-news.ns-compact .rs-art-body,
#intel-scroll.ns-compact .ns-art-body,
#intel-scroll.ns-compact .rs-art-body {
  display: none;
}
#section-news.ns-compact .ns-art-meta,
#section-news.ns-compact .rs-art-meta,
#intel-scroll.ns-compact .ns-art-meta,
#intel-scroll.ns-compact .rs-art-meta {
  margin-bottom: 0;
  display: inline-flex;
  flex-shrink: 0;
}
#section-news.ns-compact .ns-art-title,
#section-news.ns-compact .rs-art-title,
#intel-scroll.ns-compact .ns-art-title,
#intel-scroll.ns-compact .rs-art-title {
  margin-bottom: 0;
  margin-left: 6px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#section-news.ns-compact .ns-art-title a,
#section-news.ns-compact .rs-art-title a,
#intel-scroll.ns-compact .ns-art-title a,
#intel-scroll.ns-compact .rs-art-title a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ns-fontsize-toggle {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: 2px;
  overflow: hidden;
}
.ns-fontsize-btn {
  font-size: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--text2);
  background: transparent;
  border: none;
  padding: 2px 8px;
  cursor: pointer;
}
.ns-fontsize-btn:first-child { border-right: 1px solid var(--border2); }
.ns-fontsize-btn:hover:not(:disabled) { background: var(--bg3); color: var(--text); }
.ns-fontsize-btn:disabled { opacity: .35; cursor: default; }

#section-news.ns-fontsize-0 .ns-art-title, #section-news.ns-fontsize-0 .rs-art-title,
#intel-scroll.ns-fontsize-0 .ns-art-title, #intel-scroll.ns-fontsize-0 .rs-art-title,
#section-news.ns-fontsize-0 .ns-art-body,  #section-news.ns-fontsize-0 .rs-art-body,
#intel-scroll.ns-fontsize-0 .ns-art-body,  #intel-scroll.ns-fontsize-0 .rs-art-body {
  font-size: 9px;
}
#section-news.ns-fontsize-2 .ns-art-title, #section-news.ns-fontsize-2 .rs-art-title,
#intel-scroll.ns-fontsize-2 .ns-art-title, #intel-scroll.ns-fontsize-2 .rs-art-title,
#section-news.ns-fontsize-2 .ns-art-body,  #section-news.ns-fontsize-2 .rs-art-body,
#intel-scroll.ns-fontsize-2 .ns-art-body,  #intel-scroll.ns-fontsize-2 .rs-art-body {
  font-size: 12px;
}
#section-news.ns-fontsize-3 .ns-art-title, #section-news.ns-fontsize-3 .rs-art-title,
#intel-scroll.ns-fontsize-3 .ns-art-title, #intel-scroll.ns-fontsize-3 .rs-art-title,
#section-news.ns-fontsize-3 .ns-art-body,  #section-news.ns-fontsize-3 .rs-art-body,
#intel-scroll.ns-fontsize-3 .ns-art-body,  #intel-scroll.ns-fontsize-3 .rs-art-body {
  font-size: 14px;
}
#intel-scroll {
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto minmax(0,1fr) auto minmax(0,1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#news-section-feed,
#research-section-feed,
#trading-section-feed {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
#news-section-feed::-webkit-scrollbar,
#research-section-feed::-webkit-scrollbar,
#trading-section-feed::-webkit-scrollbar { width: 3px; }
#news-section-feed::-webkit-scrollbar-track,
#research-section-feed::-webkit-scrollbar-track,
#trading-section-feed::-webkit-scrollbar-track { background: transparent; }
#news-section-feed::-webkit-scrollbar-thumb,
#research-section-feed::-webkit-scrollbar-thumb,
#trading-section-feed::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.intel-group { display: contents; }
.intel-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  flex-shrink: 0;
}
.intel-sub-head:first-child { border-top: none; }
.intel-sub-head--research { background: var(--bg2); }
.intel-sub-head--trading  { background: var(--bg2); }
.intel-sub-title { display:flex;align-items:baseline;gap:6px; }
.intel-sub-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
  font-family: var(--font-ui);
}
.intel-sub-head--research .intel-sub-label { color: var(--text2); }
.intel-sub-head--trading  .intel-sub-label { color: var(--text2); }
.intel-sub-source {
  font-size: 9px;
  color: var(--text3);
  font-family: var(--font-ui);
}
.intel-sub-count {
  font-size: 9px;
  color: var(--text3);
  font-family: var(--font-ui);
}

.gi-alertbell{display:flex;align-items:center;gap:4px;position:relative;margin:0 4px}
.gi-alertbell button{display:flex;align-items:center;justify-content:center;width:26px;height:26px;background:transparent;border:none;color:var(--text3);cursor:pointer;border-radius:5px;position:relative;padding:0}
.gi-alertbell button:hover{background:var(--bg3);color:var(--text)}
#gi-alertbell-btn[aria-expanded="true"]{background:var(--bg3);color:var(--text)}
.gi-alertbell-count{position:absolute;top:1px;right:1px;min-width:14px;height:14px;padding:0 3px;background:var(--down);color:#fff;font-size:9px;font-weight:700;line-height:14px;text-align:center;border-radius:7px;font-family:var(--font-ui)}
#gi-alertsound-btn[aria-pressed="false"] #gi-alertsound-wave{display:none}
#gi-alertsound-btn[aria-pressed="false"]{color:var(--text3);opacity:.55}

.gi-alertbell-tray{position:absolute;top:32px;right:0;width:280px;max-height:360px;background:var(--head-bg);border:1px solid var(--border2);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:400;display:flex;flex-direction:column;overflow:hidden}
.gi-alertbell-tray[hidden]{display:none}
.gi-alertbell-tray-head{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-bottom:1px solid var(--border);font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;font-family:var(--font-ui)}
.gi-alertbell-tray-head button{background:transparent;border:none;color:var(--text3);font-size:10px;text-transform:none;letter-spacing:0;font-weight:500;cursor:pointer;padding:2px 4px}
.gi-alertbell-tray-head button:hover{color:var(--text)}
.gi-alertbell-tray-list{overflow-y:auto;flex:1}
.gi-alertbell-item{padding:8px 10px;border-bottom:1px solid var(--border);cursor:default}
.gi-alertbell-item:last-child{border-bottom:none}
.gi-alertbell-item-title{font-size:11px;font-weight:600;color:var(--text);font-family:var(--font-ui)}
.gi-alertbell-item-body{font-size:10px;color:var(--text2);margin-top:2px;font-family:var(--font-ui);line-height:1.4}
.gi-alertbell-item-time{font-size:9px;color:var(--text3);margin-top:3px;font-family:var(--font-mono)}
.gi-alertbell-item.unread{background:rgba(79,127,255,.06)}
.gi-alertbell-empty{padding:20px 10px;text-align:center;font-size:10px;color:var(--text3);font-family:var(--font-ui)}

#gi-toast-stack{position:fixed;top:56px;right:12px;z-index:500;display:flex;flex-direction:column;gap:8px;width:280px;pointer-events:none}
.gi-toast{pointer-events:auto;background:var(--head-bg);border:1px solid var(--border2);border-left:3px solid var(--accent);border-radius:6px;padding:9px 11px;box-shadow:0 6px 18px rgba(0,0,0,.35);opacity:0;transform:translateX(16px);transition:opacity .18s ease,transform .18s ease;cursor:pointer}
.gi-toast.gi-toast-in{opacity:1;transform:translateX(0)}
.gi-toast.gi-toast-out{opacity:0;transform:translateX(16px)}
.gi-toast.gi-toast-warning{border-left-color:var(--orange)}
.gi-toast.gi-toast-critical{border-left-color:var(--down)}
.gi-toast-row{display:flex;align-items:center;gap:6px}
.gi-toast-title{font-size:11px;font-weight:600;color:var(--text);font-family:var(--font-ui);flex:1}
.gi-toast-close{font-size:11px;color:var(--text3);line-height:1}
.gi-toast-body{font-size:10px;color:var(--text2);margin-top:3px;font-family:var(--font-ui);line-height:1.4}

@media (max-width:640px){
  #gi-toast-stack{left:8px;right:8px;width:auto;top:52px}
  .gi-alertbell-tray{right:-4px;width:260px}
}
