:root {
  color-scheme: dark;
  --bg: #010609;
  --panel: #07131b;
  --panel-hi: #0b2029;
  --ink: #effbff;
  --muted: #7794a0;
  --line: rgba(128, 188, 207, 0.2);
  --cyan: #62e9d1;
  --theme-secondary: #238491;
  --theme-tertiary: #62e9d1;
  --theme-highlight: #f4c858;
  --accent-rgb: 98, 233, 209;
  --body-glow: rgba(35, 132, 145, 0.16);
  --shell-end: #02070b;
  --header-surface: rgba(3, 12, 17, 0.98);
  --control-surface: rgba(4, 14, 20, 0.98);
  --field-surface: #0a1d27;
  --primary-action-start: #136356;
  --primary-action-end: #0a3f3c;
  --primary-action-strong-start: #17806d;
  --primary-action-strong-end: #0b4f49;
  --segment-surface: rgba(6, 19, 27, 0.92);
  --active-panel-start: rgba(22, 117, 105, 0.42);
  --active-panel-end: rgba(6, 37, 39, 0.82);
  --watchlist-surface: rgba(4, 13, 18, 0.98);
  --watchlist-chip: rgba(11, 31, 40, 0.72);
  --slate-glow: rgba(31, 115, 120, 0.16);
  --status-surface: rgba(3, 12, 17, 0.93);
  --advisor-start: rgba(7, 25, 33, 0.98);
  --advisor-end: rgba(4, 14, 20, 0.98);
  --menu-surface: #07171f;
  --workspace-start: rgba(8, 28, 36, 0.96);
  --workspace-end: rgba(3, 12, 17, 0.98);
  --category-surface: #030d12;
  --dialog-start: #091b24;
  --dialog-end: #030b10;
  --search-surface: rgba(0, 7, 11, 0.8);
  --directory-card: rgba(7, 22, 29, 0.84);
  --directory-card-hover: rgba(13, 47, 54, 0.86);
  --layout-start: rgba(5, 19, 26, 0.98);
  --layout-end: rgba(7, 30, 36, 0.96);
  --tools-surface: #02070b;
  --tools-header-start: rgba(3, 13, 19, 0.98);
  --tools-header-end: rgba(3, 13, 19, 0.88);
  --tools-control: #071922;
  /* Trading status colors stay identical in every shell theme. */
  --amber: #f4c858;
  --red: #ff405b;
}

/*
 * IMPERIUM — V7's cinematic default. Blackened steel and forged bronze carry
 * the brand; crimson is restrained to authority accents. Market green/red
 * remain semantic data colors inside the rendered Octave instruments.
 */
:root[data-theme="imperium"] {
  --bg: #020202;
  --panel: rgba(7, 7, 8, 0.992);
  --panel-hi: rgba(19, 17, 15, 0.992);
  --ink: #f2eee5;
  --muted: #9c9588;
  --line: rgba(197, 163, 93, 0.24);
  --cyan: #c5a35d;
  --theme-secondary: #7d1825;
  --theme-tertiary: #d8c69d;
  --theme-highlight: #d5af62;
  --accent-rgb: 197, 163, 93;
  --body-glow: rgba(113, 20, 31, 0.18);
  --shell-end: #020202;
  --header-surface: rgba(5, 5, 6, 0.985);
  --control-surface: rgba(13, 12, 11, 0.99);
  --field-surface: #100e0d;
  --primary-action-start: #6f1722;
  --primary-action-end: #26090e;
  --primary-action-strong-start: #941f2e;
  --primary-action-strong-end: #3a0c14;
  --segment-surface: rgba(12, 11, 10, 0.96);
  --active-panel-start: rgba(125, 24, 37, 0.34);
  --active-panel-end: rgba(16, 13, 12, 0.96);
  --watchlist-surface: rgba(6, 6, 7, 0.99);
  --watchlist-chip: rgba(197, 163, 93, 0.09);
  --slate-glow: rgba(125, 24, 37, 0.16);
  --status-surface: rgba(6, 6, 7, 0.96);
  --advisor-start: rgba(17, 14, 13, 0.99);
  --advisor-end: rgba(5, 5, 6, 0.99);
  --menu-surface: rgba(11, 10, 10, 0.995);
  --workspace-start: rgba(13, 11, 10, 0.99);
  --workspace-end: rgba(4, 4, 5, 0.995);
  --category-surface: #070606;
  --dialog-start: #171311;
  --dialog-end: #030303;
  --search-surface: rgba(4, 4, 5, 0.93);
  --directory-card: rgba(15, 13, 12, 0.94);
  --directory-card-hover: rgba(58, 19, 22, 0.95);
  --layout-start: rgba(5, 5, 6, 0.99);
  --layout-end: rgba(15, 13, 12, 0.99);
  --tools-surface: #020202;
  --tools-header-start: rgba(14, 12, 11, 0.99);
  --tools-header-end: rgba(4, 4, 5, 0.96);
  --tools-control: #15110f;
}

:root[data-theme="ion"] {
  --bg: #020308;
  --panel: rgba(2, 8, 20, 0.97);
  --panel-hi: rgba(4, 14, 30, 0.98);
  --cyan: #00f6ff;
  --theme-secondary: #008cff;
  --theme-tertiary: #7c3cff;
  --theme-highlight: #fbbf24;
  --accent-rgb: 0, 246, 255;
  --body-glow: rgba(0, 140, 255, 0.2);
  --shell-end: #020308;
  --header-surface: rgba(2, 8, 20, 0.97);
  --control-surface: rgba(4, 14, 30, 0.98);
  --field-surface: rgba(4, 14, 30, 0.98);
  --primary-action-start: #075a7d;
  --primary-action-end: #06315e;
  --primary-action-strong-start: #087fa5;
  --primary-action-strong-end: #064b83;
  --segment-surface: rgba(4, 14, 30, 0.92);
  --active-panel-start: rgba(0, 140, 255, 0.36);
  --active-panel-end: rgba(4, 14, 30, 0.92);
  --watchlist-surface: rgba(2, 8, 20, 0.97);
  --watchlist-chip: rgba(0, 140, 255, 0.13);
  --slate-glow: rgba(0, 140, 255, 0.16);
  --status-surface: rgba(2, 8, 20, 0.94);
  --advisor-start: rgba(4, 14, 30, 0.98);
  --advisor-end: rgba(2, 8, 20, 0.97);
  --menu-surface: rgba(4, 14, 30, 0.99);
  --workspace-start: rgba(4, 14, 30, 0.98);
  --workspace-end: rgba(2, 8, 20, 0.97);
  --category-surface: #020713;
  --dialog-start: #06162d;
  --dialog-end: #020308;
  --search-surface: rgba(2, 8, 20, 0.88);
  --directory-card: rgba(4, 14, 30, 0.9);
  --directory-card-hover: rgba(6, 38, 72, 0.92);
  --layout-start: rgba(2, 8, 20, 0.97);
  --layout-end: rgba(4, 14, 30, 0.98);
  --tools-surface: #020308;
  --tools-header-start: rgba(4, 14, 30, 0.98);
  --tools-header-end: rgba(2, 8, 20, 0.92);
  --tools-control: #07182c;
}

:root[data-theme="crimson"] {
  --bg: #080305;
  --panel: rgba(10, 5, 8, 0.97);
  --panel-hi: rgba(16, 7, 10, 0.98);
  --muted: #b8a9ad;
  --cyan: #e5c158;
  --theme-secondary: #ff315f;
  --theme-tertiary: #ff5b2e;
  --theme-highlight: #e5c158;
  --accent-rgb: 229, 193, 88;
  --body-glow: rgba(255, 49, 95, 0.17);
  --shell-end: #080305;
  --header-surface: rgba(10, 5, 8, 0.97);
  --control-surface: rgba(16, 7, 10, 0.98);
  --field-surface: rgba(16, 7, 10, 0.98);
  --primary-action-start: #7e2637;
  --primary-action-end: #47141f;
  --primary-action-strong-start: #a52c45;
  --primary-action-strong-end: #651b2c;
  --segment-surface: rgba(16, 7, 10, 0.94);
  --active-panel-start: rgba(255, 49, 95, 0.28);
  --active-panel-end: rgba(16, 7, 10, 0.94);
  --watchlist-surface: rgba(10, 5, 8, 0.97);
  --watchlist-chip: rgba(255, 49, 95, 0.11);
  --slate-glow: rgba(255, 49, 95, 0.14);
  --status-surface: rgba(10, 5, 8, 0.95);
  --advisor-start: rgba(16, 7, 10, 0.98);
  --advisor-end: rgba(10, 5, 8, 0.97);
  --menu-surface: rgba(16, 7, 10, 0.99);
  --workspace-start: rgba(16, 7, 10, 0.98);
  --workspace-end: rgba(10, 5, 8, 0.97);
  --category-surface: #0d0508;
  --dialog-start: #17090e;
  --dialog-end: #080305;
  --search-surface: rgba(10, 5, 8, 0.9);
  --directory-card: rgba(16, 7, 10, 0.92);
  --directory-card-hover: rgba(59, 15, 27, 0.94);
  --layout-start: rgba(10, 5, 8, 0.97);
  --layout-end: rgba(16, 7, 10, 0.98);
  --tools-surface: #080305;
  --tools-header-start: rgba(16, 7, 10, 0.98);
  --tools-header-end: rgba(10, 5, 8, 0.92);
  --tools-control: #1a090f;
}

:root[data-theme="obsidian"] {
  --bg: #020304;
  --panel: rgba(4, 5, 7, 0.985);
  --panel-hi: rgba(14, 15, 18, 0.995);
  --ink: #f4f7fb;
  --muted: #b8c0ca;
  --cyan: #f3f7fb;
  --theme-secondary: #9aa6b6;
  --theme-tertiary: #ffffff;
  --theme-highlight: #f3f7fb;
  --theme-muted-deep: #7a8491;
  --accent-rgb: 243, 247, 251;
  --body-glow: rgba(154, 166, 182, 0.14);
  --shell-end: #020304;
  --header-surface: rgba(4, 5, 7, 0.985);
  --control-surface: rgba(14, 15, 18, 0.995);
  --field-surface: rgba(14, 15, 18, 0.995);
  --primary-action-start: #353a42;
  --primary-action-end: #1b1e23;
  --primary-action-strong-start: #454b55;
  --primary-action-strong-end: #262a31;
  --segment-surface: rgba(14, 15, 18, 0.96);
  --active-panel-start: rgba(154, 166, 182, 0.24);
  --active-panel-end: rgba(14, 15, 18, 0.96);
  --watchlist-surface: rgba(4, 5, 7, 0.985);
  --watchlist-chip: rgba(154, 166, 182, 0.12);
  --slate-glow: rgba(154, 166, 182, 0.13);
  --status-surface: rgba(4, 5, 7, 0.96);
  --advisor-start: rgba(14, 15, 18, 0.995);
  --advisor-end: rgba(4, 5, 7, 0.985);
  --menu-surface: rgba(14, 15, 18, 0.995);
  --workspace-start: rgba(14, 15, 18, 0.995);
  --workspace-end: rgba(4, 5, 7, 0.985);
  --category-surface: #07080a;
  --dialog-start: #111317;
  --dialog-end: #020304;
  --search-surface: rgba(4, 5, 7, 0.92);
  --directory-card: rgba(14, 15, 18, 0.94);
  --directory-card-hover: rgba(31, 34, 40, 0.96);
  --layout-start: rgba(4, 5, 7, 0.985);
  --layout-end: rgba(14, 15, 18, 0.995);
  --tools-surface: #020304;
  --tools-header-start: rgba(14, 15, 18, 0.995);
  --tools-header-end: rgba(4, 5, 7, 0.94);
  --tools-control: #111317;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 75% -10%, var(--body-glow), transparent 36%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body { padding: clamp(8px, 1.4vw, 22px); }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.workstation-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel), var(--shell-end) 72%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.workstation-bar,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.brand,
.connection { display: flex; align-items: center; }
.brand { gap: 11px; }
.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.58);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.2);
}
.brand-mark::before,
.brand-mark::after { content: ""; position: absolute; left: 7px; top: 14px; width: 15px; height: 1px; background: var(--cyan); }
.brand-mark::after { transform: rotate(60deg); }
.brand small,
.brand strong { display: block; }
.brand small { color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: 0.2em; }
.brand strong { margin-top: 3px; font-size: 14px; letter-spacing: 0.1em; }

.connection { justify-content: flex-end; gap: 8px; color: var(--muted); font-size: 9px; letter-spacing: 0.12em; }
.connection span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.connection[data-tone="ready"] { color: var(--cyan); }
.connection[data-tone="working"] { color: var(--amber); }
.connection[data-tone="error"] { color: var(--red); }

.control-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.control-deck[hidden] { display: none; }
.market-control,
.control-group {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px;
  background: var(--control-surface);
}
.control-group { grid-template-columns: auto minmax(0, 1fr); }
.control-group[hidden] { display: none; }
.control-kicker { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.16em; white-space: nowrap; }

select,
.market-control button,
.ask-form button,
.watchlist-action,
footer button {
  min-height: 34px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 3px;
  background: var(--field-surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}
select { width: 100%; padding: 0 9px; }
.market-control button,
.ask-form button,
.watchlist-action,
footer button { padding: 0 13px; letter-spacing: 0.035em; }
.market-control button,
.ask-form button { background: linear-gradient(135deg, var(--primary-action-start), var(--primary-action-end)); border-color: rgba(var(--accent-rgb), 0.5); }

.segmented { min-width: 0; display: flex; gap: 4px; }
.segmented button {
  min-width: 0;
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(128, 188, 207, 0.18);
  border-radius: 2px;
  background: var(--segment-surface);
  color: #90a8b2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.segmented button[aria-pressed="true"] {
  border-color: rgba(244, 200, 88, 0.58);
  background: linear-gradient(180deg, rgba(244, 200, 88, 0.13), rgba(244, 200, 88, 0.035));
  color: var(--amber);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.panel-control .control-kicker { color: #b4cbd3; }
#panels button {
  min-height: 42px;
  border-color: rgba(var(--accent-rgb), 0.28);
  color: #b6cbd3;
  font-size: 10px;
  letter-spacing: 0.1em;
}
#panels button[aria-pressed="true"] {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: linear-gradient(180deg, var(--active-panel-start), var(--active-panel-end));
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--cyan), 0 0 18px rgba(var(--accent-rgb), 0.12);
}
#panels button[aria-pressed="true"]::before {
  content: "●";
  margin-right: 6px;
  color: var(--cyan);
  font-size: 7px;
}

.watchlist-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--watchlist-surface);
}
.watchlist-rail[hidden] { display: none; }
.watchlist-heading { display: grid; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.15em; }
.watchlist-heading small { color: var(--cyan); font-size: 8px; }
.watchlist { min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.watchlist button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-left: 2px solid rgba(var(--accent-rgb), 0.32);
  background: var(--watchlist-chip);
  color: #b9ccd3;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
}
.watchlist button[aria-current="true"] { border-left-color: var(--amber); color: #fff; background: rgba(244, 200, 88, 0.1); }
.watchlist-action { min-height: 29px; color: var(--cyan); white-space: nowrap; }

.pixel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #010407;
}
.pixel-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; background: #010407; }
.pixel-stage img[hidden] { display: none; }
.slate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle, var(--slate-glow), transparent 36%);
}
.slate::before,
.live-stream-slate::before {
  content: "";
  position: absolute;
  inset: 7%;
  background: url("/assets/bank-signals-intro-approved-v1.webp") center / contain no-repeat;
  opacity: .17;
  filter: saturate(1.18) drop-shadow(0 0 34px rgba(var(--accent-rgb), .18));
  pointer-events: none;
}
.slate > *,
.live-stream-slate > * { position: relative; z-index: 1; }
.slate[hidden] { display: none; }
.slate-pulse,
.frame-spinner { width: 31px; height: 31px; border: 2px solid rgba(var(--accent-rgb), 0.2); border-top-color: var(--cyan); border-radius: 50%; animation: orbit 1.1s linear infinite; }
.slate[data-state="unavailable"] .slate-pulse,
.slate[data-state="waiting"] .slate-pulse,
.slate[data-state="static"] .slate-pulse,
.decision-slate[data-state="unavailable"] .frame-spinner,
.tools-slate[data-state="unavailable"] .frame-spinner { display: none; }
.slate strong { font-size: clamp(16px, 2vw, 28px); letter-spacing: 0.09em; }
.slate p { max-width: 560px; margin: 0; color: var(--muted); }
.slate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 5px; }
.slate-actions[hidden] { display: none; }
.slate-actions button,
.slate-actions a {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 3px;
  background: rgba(var(--accent-rgb), 0.08);
  color: #eefbff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.slate-actions a { text-decoration: none; }
.slate-actions button:first-child,
.slate-actions a:first-child { border-color: rgba(var(--accent-rgb), 0.75); color: var(--cyan); }
.slate-actions button:hover,
.slate-actions button:focus-visible,
.slate-actions a:hover,
.slate-actions a:focus-visible { background: rgba(var(--accent-rgb), 0.16); outline: 2px solid var(--cyan); outline-offset: 2px; }
.slate-last-checked { color: #708891; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.frame-status {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(760px, calc(100% - 24px));
  min-height: 31px;
  padding: 6px 11px;
  border: 1px solid rgba(244, 200, 88, 0.35);
  border-radius: 4px;
  background: var(--status-surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}
.frame-status[hidden] { display: none; }
.frame-status .frame-spinner { width: 15px; height: 15px; flex: 0 0 auto; }
.frame-status > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.frame-status strong,
.frame-status small { display: block; }
.frame-status strong { color: var(--amber); font-size: 9px; letter-spacing: 0.13em; }
.frame-status small { margin-top: 0; color: #9db3bc; font-size: 8px; }
.frame-status[data-tone="error"] { border-color: rgba(255, 64, 91, 0.45); }
.frame-status[data-tone="error"] strong { color: #ff7388; }
.frame-status[data-tone="error"] .frame-spinner,
.frame-status[data-tone="waiting"] .frame-spinner { display: none; }
@media (max-width: 760px) {
  .frame-status { top: 5px; width: calc(100% - 16px); max-width: none; padding: 6px 8px; }
  .frame-status > div { display: block; }
  .frame-status small { margin-top: 2px; }
}

.advisor {
  display: grid;
  grid-template-columns: auto minmax(300px, 0.95fr) minmax(360px, 1.25fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, var(--advisor-start), var(--advisor-end));
}
.advisor[hidden] { display: none; }
.advisor-heading { display: flex; align-items: center; gap: 10px; min-width: 185px; }
.advisor-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(var(--accent-rgb), 0.5); border-radius: 50%; color: var(--cyan); font-size: 11px; font-weight: 950; }
.advisor-heading small,
.advisor-heading strong { display: block; }
.advisor-heading small { color: var(--cyan); font-size: 7px; font-weight: 900; letter-spacing: 0.14em; }
.advisor-heading strong { margin-top: 3px; font-size: 12px; letter-spacing: 0.12em; }
.ask-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.ask-form input { min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid rgba(128, 188, 207, 0.22); border-radius: 3px; outline: 0; background: rgba(1, 8, 12, 0.86); color: #fff; font-size: 11px; }
.ask-form input:focus { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.08); }
.answer { min-width: 0; padding-left: 13px; border-left: 2px solid rgba(var(--accent-rgb), 0.35); }
.answer span { color: var(--cyan); font-size: 7px; font-weight: 900; letter-spacing: 0.17em; }
.answer p { max-height: 70px; margin: 4px 0 0; overflow-y: auto; color: #c8d9df; font-size: 10px; line-height: 1.45; }
.answer[data-tone="error"] { border-left-color: var(--red); }
.answer[data-tone="error"] span { color: #ff7388; }

footer { min-height: 45px; border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.1em; }
footer button { min-height: 29px; }

@keyframes orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .slate-pulse, .frame-spinner { animation: none; } }

@media (max-width: 980px) {
  .control-deck { grid-template-columns: 1fr 1fr; }
  .market-control { grid-column: 1 / -1; }
  .advisor { grid-template-columns: auto minmax(0, 1fr); }
  .answer { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { padding: 0; }
  .workstation-shell { border-radius: 0; }
  .workstation-bar { min-height: 54px; }
  .brand strong { font-size: 11px; }
  .connection { font-size: 7px; }
  .control-deck { display: block; }
  .market-control,
  .control-group { min-height: 52px; border-bottom: 1px solid var(--line); }
  .watchlist-rail { grid-template-columns: 1fr auto; }
  .watchlist-heading { display: none; }
  .pixel-stage { min-height: 56vw; }
  .advisor { grid-template-columns: 1fr; }
  .advisor-heading { min-width: 0; }
  .answer { grid-column: auto; }
  footer { align-items: flex-start; }
}

/* V7 member navigation */
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 14px;
  top: -70px;
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  background: var(--menu-surface);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: top 120ms ease;
}
.skip-link:focus { top: 14px; }

.member-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--header-surface);
}
.member-primary,
.member-actions { display: flex; align-items: stretch; min-width: 0; }
.member-primary { flex: 1 1 auto; gap: 12px; }
.member-actions { flex: 0 1 auto; }
.theme-control {
  min-width: 142px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 7px 11px;
  border-left: 1px solid var(--line);
}
.theme-control > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.theme-control select {
  width: 100%;
  min-height: 28px;
  padding: 0 6px;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: var(--field-surface);
  color: var(--ink);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
}
.brand {
  flex: 0 0 auto;
  align-self: center;
  color: var(--ink);
  text-decoration: none;
}
.brand strong em { color: var(--cyan); font-style: normal; }
.primary-nav {
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.primary-nav a,
.primary-nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #91aab4;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.primary-nav a::after,
.primary-nav button::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: transparent;
}
.primary-nav a:hover,
.primary-nav button:hover,
.primary-nav .is-active { color: #fff; background: rgba(var(--accent-rgb), 0.035); }
.primary-nav .is-active::after { background: var(--cyan); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.45); }
kbd {
  padding: 2px 5px;
  border: 1px solid rgba(128, 188, 207, 0.2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.035);
  color: #738c97;
  font: 750 7px/1.2 Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.nav-toggle { display: none; }

.current-security,
.account-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: #fff;
}
.current-security > small,
.current-security > strong,
.account-copy small,
.account-copy strong { display: block; }
.current-security > small,
.account-copy small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.current-security > strong,
.account-copy strong {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.current-security:hover,
.account-toggle:hover { background: rgba(var(--accent-rgb), 0.05); }
.connection { min-width: 126px; padding: 0 12px; border-left: 1px solid var(--line); }
.account-menu { position: relative; display: flex; }
.account-toggle { min-width: 170px; border-right: 0; }
.account-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--cyan);
  font-size: 8px;
  font-weight: 950;
}
.account-copy { min-width: 0; text-align: left; }
.account-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: min(286px, calc(100vw - 24px));
  padding: 17px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 6px;
  background: var(--menu-surface);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
}
.account-panel[hidden] { display: none; }
.account-panel-kicker { color: var(--cyan); font-size: 7px; font-weight: 950; letter-spacing: 0.17em; }
.account-panel > strong { display: block; margin-top: 7px; font-size: 16px; }
.account-panel > small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.account-panel nav { display: grid; gap: 1px; margin-top: 14px; border-top: 1px solid var(--line); }
.account-panel nav a,
.account-panel nav button {
  min-height: 38px;
  padding: 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #bfd1d8;
  font-size: 10px;
  font-weight: 800;
  line-height: 38px;
  text-align: left;
  text-decoration: none;
}
.account-panel nav a:hover,
.account-panel nav button:hover { color: var(--cyan); }

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 55px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--workspace-start), var(--workspace-end));
}
.workspace-bar[hidden] { display: none; }
.workspace-title { display: flex; align-items: center; gap: 10px; }
.workspace-title .brand-mark { width: 25px; height: 25px; }
.workspace-title .brand-mark::before,
.workspace-title .brand-mark::after { left: 6px; top: 11px; width: 12px; }
.workspace-title small,
.workspace-title strong { display: block; }
.workspace-title small { color: var(--cyan); font-size: 7px; font-weight: 900; letter-spacing: 0.16em; }
.workspace-title strong { margin-top: 3px; font-size: 11px; letter-spacing: 0.12em; }
.workspace-summary { display: flex; align-items: stretch; }
.workspace-summary > span { min-width: 112px; padding: 0 13px; border-left: 1px solid var(--line); }
.workspace-summary small,
.workspace-summary strong { display: block; }
.workspace-summary small { color: var(--muted); font-size: 7px; font-weight: 900; letter-spacing: 0.14em; }
.workspace-summary strong { margin-top: 5px; color: #d9e8ed; font-size: 9px; letter-spacing: 0.07em; }

.category-quick-nav {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--category-surface);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.category-quick-nav::-webkit-scrollbar,
.security-categories::-webkit-scrollbar { display: none; }
.category-quick-nav[hidden] { display: none; }
.category-quick-nav button {
  flex: 1 0 120px;
  min-height: 33px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #7f9aa5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.category-quick-nav button:hover { color: #fff; background: rgba(var(--accent-rgb), 0.05); }

.market-control { grid-template-columns: auto minmax(180px, 1fr) auto; }
.security-picker-trigger {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 11px !important;
  text-align: left;
}
.security-picker-trigger span { min-width: 0; }
.security-picker-trigger small,
.security-picker-trigger strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.security-picker-trigger small { color: #8ba4ae; font-size: 6px; letter-spacing: 0.13em; }
.security-picker-trigger strong { margin-top: 3px; color: #fff; font-size: 10px; }
.open-market {
  min-height: 40px !important;
  white-space: nowrap;
  border-color: rgba(var(--accent-rgb), 0.72) !important;
  background: linear-gradient(135deg, var(--primary-action-strong-start), var(--primary-action-strong-end)) !important;
  color: #fff;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.12);
}
.open-market:hover { filter: brightness(1.12); }

.workstation-shell > footer nav { display: flex; align-items: center; gap: 14px; }
.workstation-shell > footer a { color: #8fa8b2; text-decoration: none; }
.workstation-shell > footer a:hover { color: var(--cyan); }

.navigator-open { overflow: hidden; }
.security-navigator {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 46px);
}
.security-navigator[hidden] { display: none; }
.security-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 4, 7, 0.82);
  backdrop-filter: blur(10px);
}
.security-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(780px, 100%);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(120px, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--dialog-start), var(--dialog-end));
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.7), 0 0 45px rgba(var(--accent-rgb), 0.08);
}
.security-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 13px;
}
.security-dialog > header span { color: var(--cyan); font-size: 7px; font-weight: 950; letter-spacing: 0.18em; }
.security-dialog h2 { margin: 5px 0 0; font-size: clamp(20px, 3vw, 32px); line-height: 1; }
.security-dialog > header button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: #a9c0c9;
  font-size: 24px;
}
.security-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 20px 13px;
  padding: 0 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 4px;
  background: var(--search-surface);
  color: var(--cyan);
}
.security-search input {
  min-width: 0;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.security-categories { display: flex; min-width: 0; padding: 0 20px; overflow-x: auto; border-bottom: 1px solid var(--line); -ms-overflow-style: none; scrollbar-width: none; }
.security-categories button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #849da7;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.security-categories button small { color: #5e7984; }
.security-categories button[aria-selected="true"] { border-bottom-color: var(--cyan); color: #fff; }
.security-directory-heading { display: flex; justify-content: space-between; gap: 14px; padding: 13px 20px 8px; color: #91abb5; font-size: 8px; font-weight: 900; letter-spacing: 0.13em; }
.security-directory-heading small { color: var(--cyan); }
.security-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  padding: 0 20px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.security-option {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 188, 207, 0.16);
  border-radius: 4px;
  background: var(--directory-card);
  color: #fff;
  text-align: left;
}
.security-option:hover,
.security-option:focus-visible { border-color: rgba(var(--accent-rgb), 0.55); background: var(--directory-card-hover); }
.security-option[aria-selected="true"] { border-color: rgba(244, 200, 88, 0.55); box-shadow: inset 2px 0 0 var(--amber); }
.security-option > strong { min-width: 58px; color: var(--amber); font-size: 12px; letter-spacing: 0.06em; }
.security-option span { min-width: 0; }
.security-option b,
.security-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.security-option b { color: #dbe9ed; font-size: 9px; }
.security-option small { margin-top: 4px; color: #6f8a95; font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.security-option em { color: var(--cyan); font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: 0.09em; white-space: nowrap; }
.security-empty { grid-column: 1 / -1; margin: 18px 0; padding: 36px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.security-dialog > footer { min-height: 40px; padding: 9px 20px; border-top: 1px solid var(--line); border-bottom: 0; background: rgba(0, 6, 9, 0.55); }

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (max-width: 1260px) {
  .primary-nav a,
  .primary-nav button { padding-inline: 8px; }
  .primary-nav a::after,
  .primary-nav button::after { left: 8px; right: 8px; }
  .primary-nav kbd { display: none; }
  .theme-control { min-width: 118px; }
  .theme-control > span { display: none; }
  .account-copy { display: none; }
  .account-toggle { min-width: auto; }
}

@media (max-width: 1040px) {
  .member-header { min-height: 62px; }
  .nav-toggle {
    align-self: center;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.03);
  }
  .nav-toggle > span:first-child,
  .nav-toggle > span:first-child::before,
  .nav-toggle > span:first-child::after { width: 16px; height: 1px; background: var(--cyan); }
  .nav-toggle > span:first-child { position: relative; }
  .nav-toggle > span:first-child::before,
  .nav-toggle > span:first-child::after { content: ""; position: absolute; left: 0; }
  .nav-toggle > span:first-child::before { top: -5px; }
  .nav-toggle > span:first-child::after { top: 5px; }
  .primary-nav {
    position: absolute;
    z-index: 35;
    left: 10px;
    top: calc(100% + 7px);
    width: min(320px, calc(100vw - 20px));
    display: none;
    align-items: stretch;
    padding: 7px;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 6px;
    background: var(--menu-surface);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.62);
  }
  .primary-nav[data-open="true"] { display: grid; }
  .primary-nav a,
  .primary-nav button { justify-content: flex-start; min-height: 42px; padding: 0 12px; border-bottom: 1px solid var(--line); }
  .primary-nav a::after,
  .primary-nav button::after { display: none; }
  .current-security { margin-left: auto; }
  .workspace-summary > span { min-width: 98px; padding-inline: 10px; }
  .security-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .member-header { padding: 0 8px; }
  .member-primary { gap: 8px; }
  .brand small { display: none; }
  .brand strong { font-size: 10px; }
  .theme-control { min-width: 102px; padding-inline: 6px; }
  .theme-control select { min-height: 34px; font-size: 7px; }
  .current-security { padding-inline: 8px; }
  .current-security > small { display: none; }
  .connection { min-width: auto; padding-inline: 9px; }
  .connection strong { display: none; }
  .account-toggle { padding-inline: 8px; }
  .workspace-bar { align-items: flex-start; padding: 10px; }
  .workspace-title { padding-top: 4px; }
  .workspace-summary { display: grid; grid-template-columns: 1fr; }
  .workspace-summary > span { min-width: 126px; padding: 3px 8px; }
  .workspace-summary > span:not(:first-child) { display: none; }
  .market-control { grid-template-columns: auto minmax(0, 1fr); }
  .market-control .open-market { grid-column: 2; min-height: 31px; }
  .security-dialog { max-height: 100%; border-radius: 0; }
  .security-navigator { padding: 0; }
  .security-directory { grid-template-columns: 1fr; padding-inline: 12px; }
  .security-dialog > header { padding-inline: 14px; }
  .security-search { margin-inline: 12px; }
  .security-categories { padding-inline: 7px; }
  .security-directory-heading { padding-inline: 14px; }
  .security-dialog > footer { align-items: flex-start; padding-inline: 14px; }
  .security-dialog > footer small { display: none; }
  .workstation-shell > footer { display: grid; gap: 9px; }
  .workstation-shell > footer nav { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark::before,
  .brand-mark::after { left: 6px; top: 12px; width: 13px; }
  .theme-control { width: 86px; min-width: 86px; }
  .current-security > strong { max-width: 68px; overflow: hidden; text-overflow: ellipsis; }
  .pixel-stage { min-height: 60vw; }
  .security-option { min-height: 61px; }
}

/* Private live-tools layout for the authorized member workspace. */
.chart-layout-control {
  display: flex;
  align-items: center;
  justify-content: stretch;
  gap: 0;
  min-height: 0;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--layout-start), var(--layout-end));
}
.chart-layout-control[hidden] { display: none; }
.layout-segmented { width: 100%; flex: 1 1 auto; }
.layout-segmented button {
  min-height: 34px;
  font-size: 9px;
  border-color: rgba(var(--accent-rgb), 0.24);
}
.layout-segmented button[aria-pressed="true"] {
  border-color: rgba(var(--accent-rgb), 0.7);
  background: linear-gradient(180deg, var(--active-panel-start), var(--active-panel-end));
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--cyan), 0 0 18px rgba(var(--accent-rgb), 0.12);
}
.layout-segmented button[aria-pressed="true"]::before {
  content: "●";
  margin-right: 6px;
  color: var(--cyan);
  font-size: 7px;
}

.workspace-layout {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "chart"
    "news"
    "hud";
  align-items: stretch;
  gap: 1px;
  background: var(--line);
}
.member-trace {
  position: absolute;
  z-index: 18;
  right: 8px;
  bottom: 5px;
  max-width: min(48vw, 520px);
  overflow: hidden;
  color: rgba(223, 231, 235, 0.34);
  font-size: clamp(5px, .34vw, 7px);
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.member-trace[hidden] { display: none; }
.workspace-layout[data-tools="on"] {
  /* 1.473498 : .488889 keeps the 1600x900 chart + 1145x133 HUD
     exactly level with the native 440x900 tools rail. */
  grid-template-columns: minmax(0, 1.473498fr) minmax(0, .488889fr);
  grid-template-areas:
    "chart tools"
    "news tools"
    "hud tools";
}
.workspace-layout[data-tools="on"][data-news="off"] {
  /* The cropped 91px HUD is shorter, so its balanced chart share grows. */
  grid-template-columns: minmax(0, 1.557691fr) minmax(0, .488889fr);
}
.fullscreen-exit {
  display: none;
  position: absolute;
  z-index: 30;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.68);
  border-radius: 4px;
  background: rgba(1, 8, 12, 0.9);
  color: #effcff;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2), inset 0 -2px 0 var(--cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.workspace-layout:fullscreen,
.workspace-layout:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #010407;
}
.workspace-layout:fullscreen,
.workspace-layout:-webkit-full-screen {
  grid-template-rows: minmax(0, 1fr) auto auto;
}
.workspace-layout:fullscreen .fullscreen-exit,
.workspace-layout:-webkit-full-screen .fullscreen-exit { display: block; }
.workspace-layout:fullscreen .pixel-stage,
.workspace-layout:-webkit-full-screen .pixel-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  align-self: stretch;
}
.workspace-layout:fullscreen .market-tools,
.workspace-layout:-webkit-full-screen .market-tools {
  height: 100vh;
  min-height: 0;
}
.workspace-layout:fullscreen .market-tools-frame img,
.workspace-layout:-webkit-full-screen .market-tools-frame img {
  object-position: center;
}
.workspace-layout .pixel-stage {
  grid-area: chart;
  align-self: start;
  background: #010407;
}

.decision-deck {
  grid-area: hud;
  position: relative;
  width: 100%;
  aspect-ratio: 1145 / 91;
  min-height: 0;
  overflow: hidden;
  background: #020509;
}
.decision-deck[hidden] { display: none; }
.decision-deck > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 146.153846%;
  display: block;
  object-fit: fill;
  transform: translateY(-31.578947%);
  image-rendering: auto;
}
.decision-deck > img[hidden] { display: none; }
.decision-deck[data-buffering="true"] > img {
  opacity: 1;
  filter: none;
}
.workspace-layout[data-recovery] .decision-deck > img,
.workspace-layout[data-recovery] .market-tools-frame img {
  opacity: 1;
  filter: none;
}
.economic-news-deck {
  grid-area: news;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1145 / 42;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: clamp(6px, .75vw, 13px);
  padding: 0 clamp(8px, .8vw, 15px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 196, 99, .24);
  background: linear-gradient(90deg, rgba(60, 38, 11, .72), rgba(10, 28, 37, .9) 58%, rgba(60, 38, 11, .48));
  color: #f4fbff;
}
.economic-news-deck[hidden] { display: none; }
.economic-news-pulse {
  width: clamp(5px, .5vw, 9px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffc463;
  box-shadow: 0 0 12px rgba(255, 196, 99, .58);
}
.economic-news-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: clamp(6px, .65vw, 12px);
}
.economic-news-copy small,
.economic-news-time small {
  flex: 0 0 auto;
  color: #ffc463;
  font-size: clamp(6px, .48vw, 9px);
  font-weight: 800;
  letter-spacing: .14em;
  white-space: nowrap;
}
.economic-news-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(8px, .68vw, 13px);
  letter-spacing: .05em;
}
.economic-news-meta {
  flex: 0 0 auto;
  padding: clamp(2px, .2vw, 4px) clamp(4px, .45vw, 8px);
  border: 1px solid rgba(255, 196, 99, .24);
  border-radius: 999px;
  color: #ffd995;
  font-size: clamp(6px, .46vw, 9px);
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
}
.economic-news-time {
  min-width: clamp(92px, 8.2vw, 150px);
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: clamp(5px, .5vw, 10px);
}
.economic-news-time strong {
  color: #fff;
  font-size: clamp(8px, .82vw, 15px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: .07em;
  white-space: nowrap;
}
.economic-news-deck[data-state="imminent"] {
  border-color: rgba(255, 102, 125, .5);
  background: linear-gradient(90deg, rgba(82, 23, 31, .82), rgba(15, 31, 40, .94) 58%, rgba(82, 23, 31, .58));
}
.economic-news-deck[data-state="imminent"] .economic-news-pulse {
  background: #ff667d;
  animation: news-live-pulse 1.35s infinite;
}
.economic-news-deck[data-state="recovering"] .economic-news-pulse,
.economic-news-deck[data-state="loading"] .economic-news-pulse {
  background: #7d8c93;
  box-shadow: none;
}
@keyframes news-live-pulse { 50% { opacity: .48; transform: scale(.78); } }
.decision-slate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 12px;
  color: #9db3bc;
  text-align: center;
  background: radial-gradient(circle, var(--slate-glow), transparent 46%), #020509;
}
.decision-slate[hidden] { display: none; }
.decision-deck[data-buffering="true"] .decision-slate {
  inset: auto 5px 5px auto;
  place-content: center;
  max-width: calc(100% - 10px);
  min-height: 0;
  padding: 5px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: #0b0a08;
  box-shadow: none;
  pointer-events: none;
}
.decision-slate .frame-spinner { width: 21px; height: 21px; }
.decision-slate strong { color: #eefbff; font-size: 9px; letter-spacing: .11em; }
.decision-slate small { font-size: 8px; }

.market-tools {
  grid-area: tools;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--tools-surface);
}
.market-tools[hidden] { display: none; }
.market-tools-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: stretch;
  padding: 0;
  background: radial-gradient(circle at 50% 22%, var(--slate-glow), transparent 38%), var(--tools-surface);
}
.tools-poster,
.market-tools-frame img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
}
.tools-poster {
  background-repeat: no-repeat;
  background-position: center top;
  background-size: contain;
}
.market-tools-frame .tools-video {
  grid-area: 1 / 1;
  width: 100%; height: 100%; min-width: 0; min-height: 0;
  object-fit: contain; object-position: center top;
}
.tools-video.awaiting { opacity: 0; }
.tools-poster[hidden],
.market-tools-frame img[hidden] { display: none; }
.market-tools-frame img {
  color: transparent;
  font-size: 0;
}
.market-tools[data-buffering="true"] .market-tools-frame img {
  opacity: 1;
  filter: none;
}
.tools-slate {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 9px;
  max-width: 270px;
  padding: 26px;
  color: #9db3bc;
  text-align: center;
}
.market-tools[data-buffering="true"] .tools-slate {
  position: absolute;
  inset: auto 5px 5px auto;
  align-self: end;
  justify-self: end;
  max-width: calc(100% - 10px);
  min-height: 0;
  padding: 5px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: #0b0a08;
  box-shadow: none;
  pointer-events: none;
}
.tools-slate[hidden] { display: none; }
.tools-slate strong { color: #eefbff; font-size: 10px; letter-spacing: 0.1em; }
.tools-slate small { font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
  .chart-layout-control { align-items: stretch; display: grid; gap: 0; padding: 4px; }
  .chart-layout-control[hidden] { display: none; }
  .layout-segmented { width: 100%; }
  .workspace-layout[data-tools="on"] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chart"
      "news"
      "hud"
      "tools";
  }
  .workspace-layout[data-tools="on"][data-news="off"] { grid-template-columns: 1fr; }
  .market-tools {
    min-height: clamp(520px, 112vw, 720px);
    border-top: 1px solid var(--line);
  }
  .market-tools-frame {
    inset: 0;
    padding: 0;
  }
  .market-tools-frame img {
    object-fit: contain;
    background: var(--tools-surface);
  }
}

@media (max-width: 760px) {
  .workspace-layout:fullscreen[data-tools="on"],
  .workspace-layout:-webkit-full-screen[data-tools="on"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 52fr) auto auto minmax(0, 38fr);
    grid-template-areas:
      "chart"
      "news"
      "hud"
      "tools";
  }
  .workspace-layout:fullscreen[data-tools="on"] .pixel-stage,
  .workspace-layout:-webkit-full-screen[data-tools="on"] .pixel-stage { height: 100%; }
  .workspace-layout:fullscreen[data-tools="on"] .market-tools,
  .workspace-layout:-webkit-full-screen[data-tools="on"] .market-tools { height: 100%; }
}

.charts-surface[hidden],
.live-stream-surface[hidden],
.live-stream-frame[hidden] { display: none; }

.live-stream-surface {
  min-height: 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 8%, rgba(var(--accent-rgb), 0.12), transparent 30%),
    linear-gradient(145deg, var(--workspace-start), var(--workspace-end));
}

.live-stream-heading {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(1, 6, 9, 0.34);
}

.live-stream-heading small,
.live-stream-heading h2,
.live-stream-heading p { display: block; margin: 0; }
.live-stream-heading small { color: var(--cyan); font-size: 8px; font-weight: 950; letter-spacing: 0.17em; }
.live-stream-heading h2 { margin-top: 5px; color: var(--ink); font-size: clamp(15px, 1.8vw, 24px); letter-spacing: 0.09em; }
.live-stream-heading p { margin-top: 6px; color: var(--muted); font-size: 11px; }

.live-stream-status {
  flex: 0 0 auto;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.12em;
}
.live-stream-status[data-tone="ready"] { border-color: rgba(var(--accent-rgb), 0.45); color: var(--cyan); }
.live-stream-status[data-tone="error"] { border-color: rgba(255, 64, 91, 0.42); color: var(--red); }
.live-stream-status[hidden] { display: none; }

.live-player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.live-player-shell > img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
  object-fit: contain;
  image-rendering: auto;
  transform: translateZ(0);
}
.live-player-shell > img[hidden] { display: none; }
.live-stream-slate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle, var(--slate-glow), transparent 40%), #010407;
}
.live-stream-slate[hidden] { display: none; }
.live-stream-slate strong { color: var(--ink); font-size: clamp(15px, 2vw, 25px); letter-spacing: 0.1em; }
.live-stream-slate p { max-width: 570px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.live-audio-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: var(--watchlist-surface);
}
.live-audio-bar strong,
.live-audio-bar small { display: block; }
.live-audio-bar strong { color: var(--ink); font-size: 9px; letter-spacing: 0.14em; }
.live-audio-bar small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.live-audio-bar button {
  flex: 0 0 auto;
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 3px;
  background: linear-gradient(145deg, var(--primary-action-start), var(--primary-action-end));
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.live-audio-bar button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--cyan), 0 0 16px rgba(var(--accent-rgb), 0.14); }
.live-audio-bar button:disabled { cursor: not-allowed; opacity: 0.45; }

@media (max-width: 680px) {
  .live-stream-heading,
  .live-audio-bar { align-items: stretch; display: grid; }
  .live-stream-status { width: max-content; }
  .live-audio-bar button { width: 100%; }
}

/*
 * V7 chart-first shell. This follows the canonical DeepScope control model:
 * one quiet command bar, one glass control drawer, and the program surface
 * left unobstructed until a member explicitly asks for controls.
 */
body {
  padding: 0;
  overflow-x: hidden;
}

.workstation-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #010407;
  box-shadow: none;
}

.v7-command-bar {
  position: sticky;
  z-index: 60;
  top: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 5px 10px 5px 12px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.24);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.045), transparent 34%),
    rgba(1, 6, 9, 0.96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

.command-brand {
  gap: 8px;
  min-width: 126px;
  justify-self: start;
}
.command-brand .brand-mark { width: 26px; height: 26px; }
.command-brand .brand-mark::before,
.command-brand .brand-mark::after { left: 6px; top: 12px; width: 13px; }
.command-brand small { font-size: 7px; letter-spacing: 0.18em; }
.command-brand strong { margin-top: 1px; font-size: 11px; }

.command-view {
  min-width: 0;
  width: min(390px, 100%);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  white-space: nowrap;
  justify-self: center;
}
.command-view small {
  color: var(--cyan);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.17em;
}
.command-view strong {
  overflow: hidden;
  color: #e8f7fb;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
}

.command-actions {
  min-width: 0;
  width: max-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  justify-self: end;
}
.v7-command-bar .connection {
  width: 138px;
  min-width: 138px;
  padding: 0 4px;
  border: 0;
  font-size: 7px;
  justify-content: flex-start;
  overflow: hidden;
  white-space: nowrap;
}
.v7-command-bar .connection strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v7-command-bar .live-stream-status {
  width: 142px;
  min-width: 142px;
  min-height: 24px;
  padding: 0 8px;
  border-color: rgba(var(--accent-rgb), 0.2);
  font-size: 7px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-audio,
.command-news,
.workstation-menu-toggle {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.025));
  color: var(--cyan);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 18px rgba(var(--accent-rgb), 0.06);
}
.command-news { width: 76px; min-width: 76px; }
.command-audio {
  width: 174px;
  min-width: 174px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-audio[aria-pressed="true"] {
  color: var(--amber);
  border-color: rgba(244, 200, 88, 0.52);
  box-shadow: inset 0 -2px 0 var(--amber), 0 0 18px rgba(244, 200, 88, 0.13);
}
.command-news[aria-pressed="true"] {
  color: var(--amber);
  border-color: rgba(244, 200, 88, 0.48);
  box-shadow: inset 0 -2px 0 var(--amber), 0 0 16px rgba(244, 200, 88, 0.1);
}
.command-news[hidden] { display: none; }
.command-audio > span,
.command-audio > strong { display: inline; font: inherit; letter-spacing: inherit; }
.command-audio > span { margin-right: 5px; opacity: 0.68; }
.command-audio[hidden] { display: none; }
.workstation-menu-toggle { min-width: 72px; }
.workstation-menu-toggle::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  vertical-align: 1px;
}
.workstation-shell[data-menu="open"] .workstation-menu-toggle {
  color: var(--amber);
  border-color: rgba(244, 200, 88, 0.5);
}

.workstation-menu-backdrop {
  position: fixed;
  z-index: 48;
  inset: 44px 0 0;
  border: 0;
  background: rgba(0, 3, 5, 0.36);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.workstation-menu-backdrop[hidden] { display: none; }

.workstation-menu-panel {
  position: fixed;
  z-index: 50;
  top: 52px;
  right: 8px;
  width: min(680px, calc(100vw - 16px));
  max-height: calc(100vh - 60px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(var(--accent-rgb), 0.27);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%),
    rgba(1, 8, 12, 0.91);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.7), 0 0 34px rgba(var(--accent-rgb), 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.065);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(100% + 28px), 0, 0) scale(0.985);
  transform-origin: top right;
  transition: transform 240ms cubic-bezier(.2, .78, .2, 1), opacity 170ms ease;
  backdrop-filter: blur(18px) saturate(116%);
  -webkit-backdrop-filter: blur(18px) saturate(116%);
}
.workstation-shell[data-menu="open"] .workstation-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.menu-heading {
  display: grid;
  gap: 3px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.055), transparent 62%);
}
.menu-heading span { color: var(--cyan); font-size: 7px; font-weight: 950; letter-spacing: 0.18em; }
.menu-heading strong { color: #eefbff; font-size: 12px; letter-spacing: 0.11em; }
.menu-heading small { color: var(--muted); font-size: 9px; }

.workstation-menu-panel .member-header {
  position: static;
  min-height: 0;
  display: grid;
  gap: 1px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.workstation-menu-panel .member-primary,
.workstation-menu-panel .member-actions { min-width: 0; }
.workstation-menu-panel .member-primary { display: block; }
.workstation-menu-panel .member-primary > .brand,
.workstation-menu-panel .nav-toggle { display: none; }
.workstation-menu-panel .primary-nav {
  position: static;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 6px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}
.workstation-menu-panel .primary-nav a,
.workstation-menu-panel .primary-nav button {
  justify-content: center;
  min-height: 36px;
  padding: 0 7px;
  border: 1px solid rgba(128, 188, 207, 0.11);
  font-size: 8px;
}
.workstation-menu-panel .primary-nav [hidden] { display: none; }
.workstation-menu-panel .primary-nav a::after,
.workstation-menu-panel .primary-nav button::after { left: 7px; right: 7px; }
.workstation-menu-panel .member-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  padding: 6px;
}
.workstation-menu-panel .theme-control,
.workstation-menu-panel .current-security,
.workstation-menu-panel .account-toggle {
  min-width: 0;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid rgba(128, 188, 207, 0.13);
  border-radius: 5px;
}
.workstation-menu-panel .theme-control { display: grid; }
.workstation-menu-panel .theme-control > span { display: block; }
.workstation-menu-panel .theme-control select { min-height: 27px; }
.workstation-menu-panel .current-security { margin: 0; }
.workstation-menu-panel .account-toggle { min-width: 48px; }
.workstation-menu-panel .account-panel { top: calc(100% + 6px); }

.workstation-menu-panel .category-quick-nav { background: rgba(1, 8, 12, 0.7); }
.chart-quality-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 12px; border-top: 1px solid var(--line); align-items: center; }
.chart-quality-control label, .chart-quality-control select { font-size: 14px; }
.chart-quality-control select { min-width: 0; min-height: 36px; width: 100%; }
.chart-quality-control small, .chart-quality-control > span { font-size: 12px; color: var(--muted); }
.workstation-menu-panel .alert-profile-settings { border-top: 1px solid var(--line); background: rgba(2, 10, 14, .62); }
.workstation-menu-panel .alert-profile-settings[hidden],
.workstation-menu-panel .alert-profile-fields[hidden] { display: none; }
.workstation-menu-panel .alert-profile-settings > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 14px; color:#eefbff; cursor:pointer; list-style:none; }
.workstation-menu-panel .alert-profile-settings > summary::-webkit-details-marker { display:none; }
.workstation-menu-panel .alert-profile-settings > summary span { color:var(--cyan); font-size:10px; font-weight:900; letter-spacing:.12em; }
.workstation-menu-panel .alert-profile-settings > summary strong { color:#e8d090; font-size:11px; font-weight:700; }
.workstation-menu-panel .alert-profile-settings > summary:focus-visible,
.workstation-menu-panel .alert-profile-settings :focus-visible { outline:2px solid #e8d090; outline-offset:2px; }
.workstation-menu-panel .alert-profile-body { padding:0 14px 15px; }
.workstation-menu-panel .alert-profile-body p { margin:0 0 12px; color:var(--muted); font-size:12px; line-height:1.45; }
.workstation-menu-panel .alert-profile-link { display:flex; align-items:center; gap:8px; margin-bottom:12px; color:#e6eced; font-size:12px; }
.workstation-menu-panel .alert-profile-link input { width:17px; height:17px; margin:0; accent-color:#d9bd73; flex:none; }
.workstation-menu-panel .alert-profile-fields { display:grid; gap:7px; }
.workstation-menu-panel .alert-profile-fields > label { display:grid; gap:7px; color:var(--muted); font-size:11px; }
.workstation-menu-panel .alert-profile-fields select { width:100%; min-height:38px; padding:7px 9px; border:1px solid rgba(177, 166, 129, .4); border-radius:4px; color:#edf2f2; background:#0d171b; font:inherit; }
.workstation-menu-panel .alert-profile-pair { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.workstation-menu-panel .alert-profile-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:12px; }
.workstation-menu-panel .alert-profile-actions button { min-height:36px; padding:0 12px; border:1px solid rgba(var(--accent-rgb), .5); border-radius:4px; color:#eaf4f5; background:rgba(var(--accent-rgb), .13); font-size:11px; font-weight:800; cursor:pointer; }
.workstation-menu-panel .alert-profile-actions button:disabled { opacity:.5; cursor:not-allowed; }
.workstation-menu-panel .alert-profile-actions small { color:var(--muted); font-size:11px; line-height:1.4; }
.workstation-menu-panel .alert-mode-options { display:grid; gap:5px; }
.workstation-menu-panel .alert-mode-options label { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:32px; padding:6px 8px; border:1px solid rgba(177,166,129,.24); border-radius:4px; color:#e8eeee; font-size:11px; cursor:pointer; }
.workstation-menu-panel .alert-mode-options label:has(input:checked) { border-color:rgba(220,190,113,.7); background:rgba(220,190,113,.09); }
.workstation-menu-panel .alert-mode-options input { width:16px; height:16px; margin:0 2px 0 0; accent-color:#d9bd73; flex:none; }
.workstation-menu-panel .alert-mode-options small { margin-left:auto; color:var(--muted); font-size:10px; }
.workstation-menu-panel .alert-profile-fields > strong,
.workstation-menu-panel .alert-profile-fields > div > strong { color:#e8d090; font-size:11px; }
.workstation-menu-panel .alert-profile-fields > div { min-width:0; }
.workstation-menu-panel .alert-profile-body .alert-profile-note { margin:10px 0 0; font-size:10px; }
.workstation-menu-panel .alert-primary { display:grid; gap:6px; margin-top:6px; color:var(--muted); font-size:11px; }
.workstation-menu-panel .alert-primary[hidden],
.workstation-menu-panel .alert-profile-fields[hidden] { display:none; }
.v7-alert-card .v7-alert-profile { display:inline-block; padding:3px 7px; border:1px solid rgba(216,190,115,.6); border-radius:3px; color:#e8d090; font-size:10px; font-weight:800; letter-spacing:.04em; white-space:nowrap; }
@media (max-width: 460px) { .workstation-menu-panel .alert-profile-pair { grid-template-columns:1fr; } }
.workstation-menu-panel .category-quick-nav button { flex-basis: 96px; min-height: 31px; font-size: 7px; }
.workstation-menu-panel .control-deck,
.workstation-menu-panel .watchlist-rail,
.workstation-menu-panel .chart-layout-control,
.workstation-menu-panel .advisor,
.workstation-menu-panel > footer { border-color: var(--line); }
.workstation-menu-panel .market-control { min-height: 48px; padding: 6px; }
.workstation-menu-panel .watchlist-rail { min-height: 40px; padding: 5px 7px; }
.workstation-menu-panel .chart-layout-control { padding: 5px 6px; }
.workstation-menu-panel .layout-segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.workstation-menu-panel .layout-segmented button { min-height: 33px; font-size: 8px; }
.workstation-menu-panel .advisor {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 8px;
}
.workstation-menu-panel .advisor-heading { min-width: 130px; }
.workstation-menu-panel .answer { grid-column: 1 / -1; min-height: 42px; padding: 8px; }
.workstation-menu-panel > footer { min-height: 42px; padding: 7px 10px; font-size: 8px; }

.live-stream-surface {
  width: 100%;
  height: calc(100vh - 44px);
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 0;
  background: #000;
}
.live-player-shell {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #000;
}
.live-player-shell > img { width: 100%; height: 100%; }

.charts-surface { background: #010407; }

:root[data-theme="imperium"] body {
  background:
    radial-gradient(ellipse at 50% -18%, rgba(197, 163, 93, 0.1), transparent 38%),
    radial-gradient(ellipse at 82% 12%, rgba(112, 17, 31, 0.13), transparent 34%),
    #020202;
}
:root[data-theme="imperium"] .workstation-shell,
:root[data-theme="imperium"] .charts-surface { background: #020202; }
:root[data-theme="imperium"] .v7-command-bar {
  border-bottom-color: rgba(197, 163, 93, 0.34);
  background:
    linear-gradient(90deg, rgba(125, 24, 37, 0.18), transparent 30%, rgba(197, 163, 93, 0.05)),
    linear-gradient(180deg, #0d0c0b, #030303);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(225, 204, 161, 0.08);
}
:root[data-theme="imperium"] .command-view strong,
:root[data-theme="imperium"] .menu-heading strong { color: #f2eee5; }
:root[data-theme="imperium"] .workstation-menu-panel {
  border-color: rgba(197, 163, 93, 0.3);
  background:
    linear-gradient(135deg, rgba(125, 24, 37, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(25, 22, 19, 0.98), rgba(3, 3, 3, 0.985));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.84), 0 0 34px rgba(125, 24, 37, 0.08), inset 0 1px 0 rgba(225, 204, 161, 0.08);
}
:root[data-theme="imperium"] .command-audio,
:root[data-theme="imperium"] .command-news,
:root[data-theme="imperium"] .workstation-menu-toggle {
  background: linear-gradient(180deg, rgba(197, 163, 93, 0.1), rgba(22, 17, 13, 0.22));
  text-shadow: 0 1px 0 #000;
}

/*
 * Use all available desktop width for the private chart and tools. Landscape
 * windows reserve one bounded row below the command bar; the responsive chart
 * occupies the space left above its news and HUD rather than adding a scrollbar.
 */
@media (min-width: 761px) {
  .workstation-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .v7-command-bar { grid-row: 1; }

  .charts-surface,
  .live-stream-surface {
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  .charts-surface {
    display: grid;
    place-items: start center;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .workspace-layout {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  .live-stream-surface {
    height: 100%;
    min-height: 0;
  }
}

/* Desktop landscape stays within one screen. The server redraws the chart
   for its measured aspect, rather than fitting an old fixed 16:9 composition.
   Fill removes only pixel/bucket rounding at the new size, without letterboxes.
   The native tools rail fills the available height without a bottom gap. */
@media (min-width: 761px) and (aspect-ratio > 6 / 5) {
  .charts-surface {
    grid-template-rows: minmax(0, 1fr);
    container: octave-private-chart / size;
  }

  .workspace-layout {
    --fit-tools-width: calc(48.888889dvh - 21.511111px);
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto auto;
    overflow: hidden;
  }

  .workspace-layout[data-tools="on"],
  .workspace-layout[data-tools="on"][data-news="off"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--fit-tools-width));
  }

  .workspace-layout .pixel-stage {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    align-self: stretch;
  }

  .workspace-layout .pixel-stage img { object-fit: fill; }

  @supports (height: 1cqh) {
    .workspace-layout { --fit-tools-width: 48.888889cqh; }
  }

  /* Fullscreen is taller than the ancestor container below the command bar. */
  .workspace-layout:fullscreen,
  .workspace-layout:-webkit-full-screen {
    --fit-tools-width: 48.888889dvh;
  }
}

/* A narrow portrait browser can still be wider than the phone breakpoint.
   In that geometry the desktop side rail makes the complete composition
   width-bound and leaves almost half of the viewport unused. Let the private
   chart composition become a deliberate vertical document instead: the chart
   and HUD stay full-width, while the native 440x900 tools art remains crisp
   and scrolls below without stretching. The live-program surface is untouched. */
@media (min-width: 761px) and (max-aspect-ratio: 6 / 5) {
  .workstation-shell:has(.charts-surface:not([hidden])) {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    overflow: visible;
  }

  .workstation-shell:has(.charts-surface:not([hidden])) .charts-surface {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .workstation-shell:has(.charts-surface:not([hidden])) .workspace-layout,
  .workstation-shell:has(.charts-surface:not([hidden])) .workspace-layout[data-tools="on"],
  .workstation-shell:has(.charts-surface:not([hidden])) .workspace-layout[data-tools="on"][data-news="off"] {
    width: 100%;
    max-width: 100%;
  }

  .workstation-shell:has(.charts-surface:not([hidden])) .workspace-layout[data-tools="on"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "chart"
      "news"
      "hud"
      "tools";
  }

  .workstation-shell:has(.charts-surface:not([hidden])) .market-tools {
    width: min(440px, 100%);
    aspect-ratio: 440 / 900;
    min-height: 0;
    margin-inline: auto;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 1600px) {
  .v7-command-bar .live-stream-status { display: none; }
}

@media (max-width: 1366px) {
  .v7-command-bar .connection { display: none; }
}

@media (max-width: 1080px) {
  .command-view {
    width: min(240px, 100%);
    justify-content: center;
  }
  .command-view small { display: none; }
  .command-news { width: 70px; min-width: 70px; padding-inline: 7px; }
  .command-audio { width: 126px; min-width: 126px; padding-inline: 7px; }
  .command-audio > span { display: none; }
  .workstation-menu-toggle { min-width: 64px; padding-inline: 8px; }
}

@media (max-width: 900px) {
  .v7-command-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 8px;
  }
  .command-brand { min-width: 0; }
  .command-brand div { display: none; }
  .command-view {
    position: static;
    width: 100%;
    max-width: 180px;
    transform: none;
    pointer-events: none;
  }
  .command-actions { position: relative; z-index: 1; }
}

@media (max-width: 760px) {
  .command-view { gap: 1px; }
  .command-view small { font-size: 6px; }
  .command-view strong { font-size: 8px; }
  .v7-command-bar .connection { display: none; }
  .command-news { width: 62px; min-width: 62px; padding-inline: 5px; font-size: 7px; }
  .command-audio { width: 108px; min-width: 108px; max-width: 108px; overflow: hidden; padding-inline: 7px; text-overflow: ellipsis; white-space: nowrap; }
  .workstation-menu-toggle { min-width: 64px; padding-inline: 8px; }
  .workstation-menu-panel { inset: 48px 4px auto; width: auto; max-height: calc(100vh - 52px); border-radius: 7px; }
  .workstation-menu-panel .primary-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workstation-menu-panel .member-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .workstation-menu-panel .market-control { grid-template-columns: minmax(0, 1fr) auto; }
  .workstation-menu-panel .market-control > .control-kicker { display: none; }
  .workstation-menu-panel .market-control .open-market { grid-column: auto; }
  .workstation-menu-panel .advisor { grid-template-columns: 1fr; }
  .workstation-menu-panel .advisor-heading { min-width: 0; }
  .workstation-menu-panel .answer { grid-column: auto; }
}

@media (max-width: 720px) {
  .command-audio { width: 40px; min-width: 40px; max-width: 40px; padding: 0; font-size: 0; }
  .command-audio > span,
  .command-audio > strong { display: none; }
  .command-audio::after { content: "VOX"; font-size: 7px; }
  .workstation-menu-toggle { min-width: 58px; padding-inline: 6px; }
}

@media (max-width: 560px) {
  .command-view { width: 96px; }
  .command-view strong { font-size: 7px; }
  .command-news { width: 58px; min-width: 58px; padding-inline: 3px; font-size: 6px; }
}

@media (max-width: 470px) {
  .workstation-menu-panel .member-actions { grid-template-columns: 1fr 1fr; }
  .workstation-menu-panel .account-menu { grid-column: 1 / -1; }
  .workstation-menu-panel .account-toggle { width: 100%; justify-content: center; }
  .workstation-menu-panel .account-copy { display: block; }
}

@media (max-width: 470px) {
  .command-view { display: none; }
}

/* A network update never chooses the layout. The selected chart, news and
   tools geometry above is also the loading/recovery geometry. Visibility is
   still owned by explicit user choices and authorization via [hidden]. */
.decision-deck[data-continuity="held"] .decision-slate,
.market-tools[data-continuity="held"] .tools-slate {
  display: none;
}
.decision-deck[data-continuity="held"]:not([hidden])::after,
.market-tools[data-continuity="held"]:not([hidden])::after {
  content: "PREVIOUS UPDATE \00b7  U02";
  position: absolute;
  z-index: 20;
  right: 5px;
  bottom: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 2px;
  background: #0b0a08;
  color: #d2ba80;
  font-size: clamp(6px, .5vw, 8px);
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.decision-deck[data-buffering="true"] .decision-slate .frame-spinner,
.market-tools[data-buffering="true"] .tools-slate .frame-spinner {
  display: none;
}

/* Changing connection copy must not resize the command row or the recovery
   notice. The notice is an overlay, never a grid item displacing the chart. */
.v7-command-bar { height: 44px; }
.v7-command-bar .connection,
.v7-command-bar .live-stream-status,
.v7-command-bar .command-news,
.v7-command-bar .command-audio,
.v7-command-bar .workstation-menu-toggle { flex-shrink: 0; }
.frame-status {
  width: min(420px, calc(100% - 24px));
  height: 38px;
  min-height: 38px;
  padding: 5px 9px;
  box-shadow: none;
}
.frame-status > div { min-width: 0; display: grid; gap: 2px; }
.frame-status strong,
.frame-status small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .workstation-menu-panel { transition-duration: 1ms; }
}
#memberMusic{padding:16px;border:1px solid #554627;background:#101317;color:#eee6d8;font-size:14px}
#memberMusic summary{cursor:pointer;font-weight:700;color:#e4c878}
#memberMusic label{display:inline-flex;align-items:center;gap:8px;margin:8px;flex-wrap:wrap}
#memberMusic select{max-width:100%;background:#171b21;color:#eee6d8;padding:8px;border:1px solid #554627}
#memberMusic button{padding:8px 18px;background:#d7ba71;color:#111;border:0;border-radius:4px}
#memberMusic button:disabled{opacity:.5;cursor:not-allowed}
#memberMusic [role=status]{color:#b9c5ce;font-size:13px}
