:root {
  --bg-base: #090a0c;
  --bg-panel: #111318;
  --bg-elevated: #171a20;
  --bg-inset: #0d0f13;
  --line: #242933;
  --line-strong: #343b48;
  --text-hi: #f4f2ec;
  --text-mid: #a8abb0;
  --text-low: #737982;
  --gold: #c89a46;
  --gold-bright: #e6c16a;
  --gold-deep: #8a6325;
  --gold-soft: rgba(200, 154, 70, 0.12);
  --terminal-yellow: #d8922d;
  --terminal-yellow-hi: #f0b456;
  --terminal-yellow-soft: rgba(216, 146, 45, 0.16);
  --long: #19b879;
  --short: #d1495b;
  --warn: #ffb020;
  --info: #4da3ff;
  --r-sm: 6px;
  --r-md: 8px;
  --r-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.035), 0 14px 30px rgba(0, 0, 0, 0.32);
  --glow-gold: 0 0 0 1px rgba(200, 154, 70, 0.3), 0 0 18px rgba(230, 193, 106, 0.1);
  --grad-primary: linear-gradient(135deg, #ead08a 0%, #c89a46 48%, #8a6325 100%);
  --grad-primary-hover: linear-gradient(135deg, #f1db9f 0%, #d5aa58 48%, #9a7130 100%);
  --grad-ghost: linear-gradient(135deg, #191d23 0%, #111318 100%);
  --metal-silver: linear-gradient(180deg, #ffffff 0%, #fbfdff 18%, #e9eef5 36%, #c5cfda 58%, #ffffff 78%, #d9e1ea 100%);
  --metal-gold: linear-gradient(180deg, #fff0b8 0%, #dfbd69 28%, #a06f26 64%, #f5df9d 100%);
  --font-ui: "Noto Sans TC", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Jost", "Noto Sans TC", "Avenir Next", "Helvetica Neue", Inter, sans-serif;
  --font-brand: "Michroma", "Syncopate", "Archivo", "Jost", "Avenir Next", "Noto Sans TC", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg-base: #eceeed;
  --bg-panel: #fbfbfa;
  --bg-elevated: #f1f2f1;
  --bg-inset: #e4e7e6;
  --line: #d2d6d4;
  --line-strong: #b9c0bd;
  --text-hi: #14171b;
  --text-mid: #4a515b;
  --text-low: #7a828b;
  --gold: #8f6728;
  --gold-bright: #a87b36;
  --gold-deep: #68491d;
  --gold-soft: rgba(156, 113, 48, 0.09);
  --terminal-yellow: #aa721f;
  --terminal-yellow-hi: #805315;
  --terminal-yellow-soft: rgba(170, 114, 31, 0.1);
  --metal-silver: linear-gradient(180deg, #4b515a 0%, #111418 36%, #747b84 64%, #252a30 100%);
  --metal-gold: linear-gradient(180deg, #ecd596 0%, #bb8a37 36%, #6d4a18 70%, #efe0b5 100%);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 28px rgba(34, 38, 43, 0.1);
  --glow-gold: 0 0 0 1px rgba(156, 113, 48, 0.22), 0 0 14px rgba(156, 113, 48, 0.08);
  --grad-ghost: linear-gradient(135deg, #ffffff 0%, #ececea 100%);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-base);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text-hi);
  background:
    linear-gradient(180deg, rgba(240, 210, 125, 0.038), transparent 280px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 5px),
    var(--bg-base);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

html[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 340px),
    repeating-linear-gradient(0deg, rgba(28, 31, 36, 0.022) 0, rgba(28, 31, 36, 0.022) 1px, transparent 1px, transparent 6px),
    var(--bg-base);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.price,
.data-en,
.tier-num,
.terminal-value,
.chart-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.long {
  color: var(--long);
}

.short {
  color: var(--short);
}

.warn {
  color: var(--warn);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 66px auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 112px;
  padding: 8px 18px 10px;
  background: rgba(10, 11, 13, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .topbar {
  background: rgba(246, 247, 246, 0.94);
}

.brand {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 268px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(255, 193, 7, 0.44);
  border-radius: 50%;
  box-shadow: var(--glow-gold);
}

.brand span {
  position: relative;
  display: grid;
  justify-items: start;
  line-height: 1;
}

.brand span::after {
  display: none;
}

.brand strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.075em;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6fafc 18%, #cdd6df 42%, #ffffff 56%, #8b96a2 82%, #f7fbfd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-feature-settings: "kern" 1, "ss01" 1;
  font-synthesis: none;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34),
    0 2px 0 rgba(0, 0, 0, 0.32),
    0 8px 15px rgba(0, 0, 0, 0.32);
  text-transform: uppercase;
  -webkit-text-stroke: 0.2px rgba(255, 255, 255, 0.34);
  transform: scaleX(1.12);
  transform-origin: left center;
}

.brand small {
  display: block;
  justify-self: start;
  font-family: var(--font-brand);
  color: transparent;
  background: linear-gradient(180deg, #fff1b4 0%, #d8a94e 30%, #7c511b 68%, #f0d284 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.52em;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 rgba(255, 241, 186, 0.18),
    0 2px 0 rgba(0, 0, 0, 0.38),
    0 8px 14px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  transform: scaleX(1.08);
  transform-origin: left center;
}

html[data-theme="light"] .brand strong {
  background: linear-gradient(180deg, #5b636c 0%, #14171b 36%, #828b95 64%, #20262d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 15px rgba(34, 38, 43, 0.12);
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .brand small {
  background: linear-gradient(180deg, #ac7a28 0%, #6e4a18 48%, #c79a4a 78%, #493417 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .brand strong {
  background: linear-gradient(180deg, #565d66 0%, #06080b 42%, #777f89 70%, #15191f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.12);
  text-shadow: none;
}

html[data-theme="light"] .brand small {
  background: linear-gradient(180deg, #7c581f 0%, #20170d 52%, #866127 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.main-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.segmented-control button,
.tab-row button,
.vod-row button,
.live-channel-row button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: transparent;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 720;
  padding: 0 11px;
}

.nav-link:hover,
.segmented-control button:hover,
.tab-row button:hover,
.vod-row button:hover,
.live-channel-row button:hover {
  color: var(--text-hi);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.segmented-control button.is-active,
.tab-row button.is-active {
  color: #1a1300;
  border-color: rgba(255, 193, 7, 0.4);
  background: var(--grad-primary);
  box-shadow: var(--glow-gold);
}

.nav-link.is-active {
  color: var(--text-hi);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}

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

.top-actions {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-member-badge {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 2;
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
}

.nav-member-badge img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  background: transparent;
  border: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

html[data-theme="light"] .nav-member-badge img {
  mix-blend-mode: normal;
  background: transparent;
  filter:
    contrast(1.08)
    saturate(1.1)
    brightness(1.04)
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 8px 14px rgba(28, 31, 36, 0.18))
    drop-shadow(0 0 9px rgba(203, 149, 49, 0.18));
}

html[data-theme="light"] .tier-path img {
  mix-blend-mode: normal;
  filter: contrast(1.05) saturate(1.06) drop-shadow(0 7px 12px rgba(28, 31, 36, 0.1));
}

html[data-theme="light"] #profileTierBadge,
html[data-theme="light"] #profileTierBadgeBack {
  mix-blend-mode: normal;
  background: transparent;
  filter: drop-shadow(0 8px 14px rgba(30, 32, 36, 0.13));
}

.icon-button,
.uid-pill,
.button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--grad-ghost);
  color: var(--text-hi);
}

.icon-button {
  position: relative;
  width: 38px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.bell-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--short);
  box-shadow: 0 0 12px rgba(255, 77, 94, 0.7);
}

.status-pill,
.uid-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
}

.uid-pill {
  border-color: rgba(200, 154, 70, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.08)),
    linear-gradient(135deg, rgba(200, 154, 70, 0.08), rgba(255, 255, 255, 0.018)),
    var(--bg-inset);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48),
    0 8px 16px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .uid-pill {
  border-color: rgba(156, 113, 48, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 225, 220, 0.66)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(104, 73, 29, 0.12),
    0 8px 15px rgba(34, 38, 43, 0.08);
}

#memberTierLabel {
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

html[data-theme="light"] #memberTierLabel {
  color: #2b3037;
}

#memberStatusLabel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(200, 154, 70, 0.48);
  border-radius: 4px;
  font-family: var(--font-brand);
  font-weight: 900;
  letter-spacing: 0.07em;
  font-size: 10px;
  line-height: 1;
  color: #f2d27d !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02) 32%, rgba(0, 0, 0, 0.26) 100%),
    linear-gradient(135deg, #3b2a12, #0f1012 48%, #5b3b12);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 170, 0.17),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54),
    0 1px 3px rgba(0, 0, 0, 0.42);
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.78);
  text-transform: uppercase;
  transform: none;
}

.tier-mini-card strong span,
.tier-path strong {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0.055em;
  background: var(--metal-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.32);
}

body[data-member-tier="bronze"] #memberStatusLabel {
  color: #ffd0a0 !important;
  border-color: rgba(203, 130, 62, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 230, 197, 0.16), rgba(0, 0, 0, 0.22)),
    linear-gradient(135deg, #75421d, #261309 52%, #9b5a24);
}

body[data-member-tier="silver"] #memberStatusLabel {
  color: #eef3f8 !important;
  border-color: rgba(218, 226, 235, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.2)),
    linear-gradient(135deg, #626d78, #1b1f25 52%, #aeb7c0);
}

body[data-member-tier="gold"] #memberStatusLabel {
  color: #ffe29b !important;
  border-color: rgba(226, 181, 80, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 239, 183, 0.18), rgba(0, 0, 0, 0.24)),
    linear-gradient(135deg, #8b651e, #1f1709 52%, #c9973c);
}

body[data-member-tier="black"] #memberStatusLabel,
body[data-member-tier="executive"] #memberStatusLabel {
  color: #efd48b !important;
  border-color: rgba(226, 181, 91, 0.66);
  background:
    linear-gradient(180deg, rgba(255, 232, 170, 0.14), rgba(255, 232, 170, 0.035) 34%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(135deg, #745625, #242019 48%, #987437);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 170, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(226, 181, 91, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.34);
}

html[data-theme="light"] body[data-member-tier="bronze"] #memberStatusLabel {
  color: #7c4317 !important;
  border-color: rgba(155, 89, 35, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(224, 181, 132, 0.34)),
    linear-gradient(135deg, #e4a768, #fff7ed 52%, #a45d25);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] body[data-member-tier="silver"] #memberStatusLabel {
  color: #35404b !important;
  border-color: rgba(104, 114, 124, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(210, 217, 225, 0.38)),
    linear-gradient(135deg, #dfe5eb, #ffffff 52%, #8e9aa6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] body[data-member-tier="gold"] #memberStatusLabel {
  color: #745016 !important;
  border-color: rgba(171, 122, 42, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(226, 190, 102, 0.34)),
    linear-gradient(135deg, #ecc96e, #fff5ce 52%, #9f6b1c);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] body[data-member-tier="black"] #memberStatusLabel,
html[data-theme="light"] body[data-member-tier="executive"] #memberStatusLabel {
  color: #f0d58a !important;
  border-color: rgba(126, 93, 32, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 222, 132, 0.16), rgba(255, 222, 132, 0.045) 40%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(178deg, #8a6a12 0%, #5f4a08 45%, #7a5c12 55%, #8a6a12 100%);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 158, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 1px 5px rgba(42, 37, 27, 0.12);
}

.profile-card h1 {
  display: inline-block;
  margin-top: 2px;
  font-family: var(--font-brand);
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff7cb 0%, #f1ca66 26%, #c58b2e 48%, #7d4d14 66%, #ffe39a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 241, 186, 0.12), 0 7px 15px rgba(0, 0, 0, 0.36);
  text-transform: uppercase;
  -webkit-text-stroke: 0.16px rgba(255, 241, 186, 0.18);
  transform: none;
}

html[data-theme="light"] .profile-card h1 {
  background: linear-gradient(180deg, #303741 0%, #05070a 42%, #4b535d 68%, #10141a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.18);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
}

.status-pill {
  min-height: 30px;
  padding: 0 4px;
  color: var(--text-mid);
  cursor: default;
  user-select: none;
}

.status-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  width: 22px;
  height: 18px;
}

.status-signal i {
  width: 4px;
  border-radius: 2px 2px 1px 1px;
  background: rgba(31, 203, 134, 0.95);
  box-shadow: 0 0 10px rgba(31, 203, 134, 0.42);
}

.status-signal i:nth-child(1) {
  height: 6px;
}

.status-signal i:nth-child(2) {
  height: 9px;
}

.status-signal i:nth-child(3) {
  height: 13px;
}

.status-signal i:nth-child(4) {
  height: 17px;
}

.status-pill.is-delayed .status-signal i {
  background: rgba(255, 176, 32, 0.95);
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.38);
}

.status-pill.is-delayed .status-signal i:nth-child(n+3) {
  opacity: 0.24;
}

.status-pill.is-reconnecting .status-signal i {
  background: rgba(255, 77, 94, 0.95);
  box-shadow: 0 0 10px rgba(255, 77, 94, 0.38);
  opacity: 0.22;
}

.status-pill.is-reconnecting .status-signal i:first-child {
  opacity: 1;
}

.uid-pill span {
  color: var(--text-low);
  font-size: 12px;
}

.uid-pill strong {
  color: var(--gold);
}

.notification-popover,
.settings-popover {
  position: absolute;
  top: 60px;
  right: 18px;
  width: min(360px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: rgba(19, 21, 25, 0.98);
  box-shadow: var(--shadow-card);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
}

html[data-theme="light"] .notification-popover,
html[data-theme="light"] .settings-popover {
  border-color: rgba(156, 113, 48, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 240, 238, 0.94)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 34px rgba(34, 38, 43, 0.16);
}

.settings-popover {
  right: 18px;
  width: min(380px, calc(100vw - 24px));
}

.notification-popover.is-open,
.settings-popover.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.settings-popover label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--text-mid);
  font-size: 13px;
}

.settings-popover select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  background: var(--bg-inset);
}

html[data-theme="light"] .settings-popover select {
  color: #15191f;
  border-color: rgba(37, 42, 49, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(226, 228, 225, 0.72)),
    var(--bg-inset);
}

.tier-mini-card {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.26);
  border-radius: var(--r-md);
  background: rgba(255, 193, 7, 0.08);
}

.tier-mini-card strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tier-mini-card strong span {
  color: var(--gold);
}

.tier-mini-card p,
.tier-mini-card small {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.6;
}

.popover-head,
.section-head,
.chart-head,
.section-title-row,
.indicator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.popover-head span,
.update-time {
  color: var(--text-low);
  font-size: 12px;
}

.notification-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.notification-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.notification-item strong {
  font-size: 13px;
}

.notification-item span {
  color: var(--text-mid);
  font-size: 12px;
}

main {
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 18px 34px;
  flex: 1;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, rgba(200, 154, 70, 0.035), transparent 42%),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38),
    var(--shadow-card);
}

html[data-theme="light"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, rgba(156, 113, 48, 0.04), transparent 46%),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(104, 73, 29, 0.07),
    var(--shadow-card);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 40px);
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html[data-theme="light"] .eyebrow {
  color: #181b1f;
  opacity: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  padding: 0 14px;
  font-weight: 800;
}

.button.primary {
  color: #1a1300;
  border-color: rgba(255, 193, 7, 0.42);
  background: var(--grad-primary);
}

.button.primary:hover {
  background: var(--grad-primary-hover);
  box-shadow: var(--glow-gold);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.button.danger {
  color: var(--short);
  border-color: rgba(255, 77, 94, 0.5);
  background: transparent;
}

.button.is-soft-locked {
  color: var(--text-mid);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.text-button {
  border: 0;
  padding: 0;
  color: var(--gold);
  background: transparent;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.dashboard-hero {
  min-height: 350px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.56fr);
  align-items: stretch;
  gap: 20px;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-copy h1 {
  font-size: clamp(40px, 8vw, 78px);
  line-height: 0.94;
  margin-bottom: 18px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  color: var(--text-mid);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.market-strip {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
}

.market-strip article {
  display: grid;
  gap: 5px;
  padding: 14px 0 14px 14px;
  border-left: 2px solid var(--line-strong);
}

.market-strip article:first-child {
  border-left-color: var(--gold);
}

.market-strip span,
.market-strip em {
  color: var(--text-low);
  font-size: 12px;
  font-style: normal;
}

.market-strip strong {
  font-size: 24px;
}

.live-panel,
.macro-panel,
.mini-board {
  padding: 18px;
}

.live-panel {
  display: grid;
  gap: 14px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(146, 154, 166, 0.34);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 900;
  background: rgba(146, 154, 166, 0.08);
}

.live-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(146, 154, 166, 0.64);
  content: "";
  box-shadow: none;
}

.live-badge.is-live {
  color: #ff9aa4;
  border-color: rgba(255, 77, 94, 0.52);
  background: rgba(255, 77, 94, 0.13);
  box-shadow: 0 0 0 1px rgba(255, 77, 94, 0.08);
}

.live-badge.is-live::before {
  background: var(--short);
  box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.12), 0 0 12px rgba(255, 77, 94, 0.62);
  animation: liveDotPulse 1.65s ease-in-out infinite;
}

.live-badge.is-sync {
  color: var(--gold);
  border-color: rgba(206, 162, 82, 0.38);
  background: rgba(206, 162, 82, 0.08);
}

.live-badge.is-sync::before {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(206, 162, 82, 0.42);
}

.live-badge:not(.is-live):not(.is-sync) {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

@keyframes liveBadgeBreath {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(255, 77, 94, 0.12);
    filter: saturate(1);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 77, 94, 0.28);
    filter: saturate(1.12);
  }
}

@keyframes liveDotPulse {
  0%,
  100% {
    transform: scale(0.94);
    box-shadow:
      0 0 0 2px rgba(255, 77, 94, 0.08),
      0 0 9px rgba(255, 77, 94, 0.48);
  }
  45% {
    transform: scale(1);
    box-shadow:
      0 0 0 7px rgba(255, 77, 94, 0.18),
      0 0 18px rgba(255, 77, 94, 0.76);
  }
}

.video-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 196px;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.16), transparent 58%),
    radial-gradient(circle at center, rgba(255, 77, 94, 0.18), transparent 45%),
    #07080a;
}

.video-frame::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: transparent;
  pointer-events: none;
}

.video-frame.has-thumbnail {
  background: #050608;
}

.video-frame.has-thumbnail::before {
  background:
    linear-gradient(180deg, rgba(4, 5, 7, 0.18), rgba(4, 5, 7, 0.68)),
    linear-gradient(90deg, rgba(4, 5, 7, 0.72), rgba(4, 5, 7, 0.2) 46%, rgba(4, 5, 7, 0.72)),
    var(--live-thumbnail) center / cover no-repeat;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.015);
}

.video-frame.has-thumbnail::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 72%;
  content: "";
  background: linear-gradient(180deg, rgba(4, 5, 7, 0), rgba(4, 5, 7, 0.88));
  pointer-events: none;
}

.video-frame.has-thumbnail .play-mark {
  width: 52px;
  height: 52px;
  background: rgba(9, 10, 12, 0.58);
  backdrop-filter: blur(5px);
  box-shadow:
    0 0 0 1px rgba(244, 199, 114, 0.28),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.video-frame.has-thumbnail .play-mark::after {
  top: 15px;
  left: 20px;
}

.video-frame.has-thumbnail strong {
  color: #fff7e6;
}

.video-frame.has-thumbnail span {
  color: rgba(246, 242, 232, 0.82);
}

.video-frame strong,
.video-frame span {
  display: block;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.64);
}

.video-frame span {
  color: var(--text-mid);
  font-size: 13px;
}

.play-mark {
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 193, 7, 0.52);
  background: rgba(255, 193, 7, 0.12);
  position: relative;
}

.play-mark::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 22px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid var(--gold);
}

.vod-row,
.live-channel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vod-row button,
.live-channel-row button {
  flex: 1;
  padding: 0 10px;
  background: var(--bg-inset);
}

html[data-theme="light"] .live-panel .eyebrow,
html[data-theme="light"] .live-panel h2 {
  color: #17191d;
}

html[data-theme="light"] .video-frame {
  border-color: rgba(112, 119, 128, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(236, 235, 229, 0.72)),
    #f3f2ed;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 22px rgba(44, 48, 54, 0.06);
}

html[data-theme="light"] .video-frame.has-thumbnail {
  background: #111318;
}

html[data-theme="light"] .video-frame.has-thumbnail::before {
  background:
    linear-gradient(180deg, rgba(10, 12, 15, 0.08), rgba(10, 12, 15, 0.72)),
    linear-gradient(90deg, rgba(10, 12, 15, 0.68), rgba(10, 12, 15, 0.18) 48%, rgba(10, 12, 15, 0.66)),
    var(--live-thumbnail) center / cover no-repeat;
}

html[data-theme="light"] .video-frame.has-thumbnail strong {
  color: #fff7e6;
}

html[data-theme="light"] .video-frame.has-thumbnail span {
  color: rgba(246, 242, 232, 0.82);
}

html[data-theme="light"] .video-frame strong {
  color: #15181d;
  font-weight: 850;
}

html[data-theme="light"] .video-frame span {
  color: #4a525c;
  font-weight: 650;
}

html[data-theme="light"] .play-mark {
  border-color: rgba(156, 113, 48, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.86), rgba(230, 214, 180, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 9px 18px rgba(120, 91, 42, 0.1);
}

html[data-theme="light"] .live-channel-row button {
  border-color: rgba(112, 119, 128, 0.24);
  color: #1b2027;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(231, 232, 228, 0.54)),
    var(--bg-panel);
  font-weight: 760;
}

.macro-panel,
.mini-board {
  margin-top: 0;
}

.macro-list,
.admin-list,
.journal-list,
.tape-list,
.orderbook {
  display: grid;
  gap: 8px;
}

.macro-list {
  margin-top: 16px;
}

.journal-entry,
.tape-row,
.book-row,
.auth-row,
.admin-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.journal-entry:last-child,
.tape-row:last-child,
.book-row:last-child,
.auth-row:last-child {
  border-bottom: 0;
}

.journal-entry span,
.tape-row span,
.book-row span {
  min-width: 0;
  color: var(--text-mid);
}

.macro-event {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.macro-event:last-child {
  border-bottom: 0;
}

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

.macro-main span {
  min-width: 0;
  color: var(--text-hi);
  font-weight: 800;
}

.macro-main strong {
  color: var(--text-mid);
  font-size: 13px;
}

.macro-main em {
  color: var(--text-low);
  font-size: 12px;
  font-style: normal;
}

.macro-negative .macro-main em,
.macro-negative .impact-badge {
  color: var(--short);
  border-color: rgba(255, 77, 94, 0.36);
}

.macro-neutral .macro-main em {
  color: var(--text-mid);
}

.macro-watch .macro-main em {
  color: var(--warn);
}

.macro-values {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.macro-values span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-low);
  background: var(--bg-inset);
  font-size: 12px;
}

.macro-values b {
  color: var(--text-hi);
}

.macro-analysis {
  display: grid;
  grid-template-columns: minmax(118px, 132px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
}

.macro-analysis p {
  margin: 0;
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.5;
}

.macro-analysis-text {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 42px;
}

.macro-scenario {
  color: var(--text-low) !important;
}

.macro-analysis .impact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  align-self: center;
  width: 100%;
  min-width: 118px;
  min-height: 38px;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}

.signal-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.signal-summary p {
  margin-bottom: 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.quick-stats span {
  display: grid;
  gap: 4px;
  color: var(--text-low);
  font-size: 12px;
}

.quick-stats b {
  color: var(--text-hi);
  font-size: 24px;
}

.strategy-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.strategy-card:hover,
.strategy-card:focus-visible {
  border-color: rgba(255, 193, 7, 0.48);
  outline: 0;
  transform: translateY(-1px);
  box-shadow: var(--glow-gold);
}

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

.strategy-signal strong {
  line-height: 1.45;
}

.strategy-levels {
  display: grid;
  gap: 8px;
}

.strategy-levels span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: var(--bg-inset);
}

.grade-badge,
.tradability-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.025em;
}

.grade-s {
  color: #1a1300;
  border-color: rgba(255, 215, 64, 0.62);
  background: var(--grad-primary);
  animation: sPulse 2.2s ease-in-out infinite;
}

.grade-a {
  color: var(--gold);
  border-color: rgba(255, 193, 7, 0.5);
}

.grade-b {
  color: var(--text-hi);
}

.grade-c {
  color: var(--text-low);
}

.grade-d {
  color: var(--short);
  opacity: 0.75;
}

@keyframes sPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 193, 7, 0);
  }
  50% {
    box-shadow: var(--glow-gold);
  }
}

.section-title-row {
  margin-bottom: 16px;
}

#view-screener .section-title-row {
  align-items: flex-end;
  margin-bottom: 18px;
}

#view-screener .section-title-row .segmented-control {
  align-self: flex-end;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-inset);
}

.segmented-control button {
  flex: 0 0 auto;
  padding: 0 12px;
}

.segmented-control.compact button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.screener-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.screener-weight-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.006)),
    color-mix(in srgb, var(--bg-elevated) 88%, #000 12%);
}

.screener-table-panel .screener-weight-panel {
  margin: 0 0 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 18%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 14px 32px rgba(0, 0, 0, 0.12);
}

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

.screener-weight-head h2 {
  margin: 4px 0 0;
  color: var(--text-hi);
  font-size: 18px;
  letter-spacing: 0;
}

.screener-weight-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.screener-weight-actions span {
  color: color-mix(in srgb, var(--gold-bright) 82%, #fff 18%);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.5;
  text-align: right;
}

.screener-weight-actions .button {
  min-width: 88px;
  height: 34px;
  border-color: rgba(215, 166, 66, 0.48);
  color: color-mix(in srgb, var(--gold-bright) 88%, #fff 12%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.008)),
    #08090c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.screener-weight-note {
  margin: -6px 0 0;
  color: color-mix(in srgb, var(--text-mid) 88%, #fff 12%);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.6;
}

.screener-weight-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.screener-weight-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006)),
    var(--bg-inset);
  color: var(--text-hi);
  opacity: 1;
  filter: none;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.screener-weight-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--terminal-yellow);
  filter: none;
}

.screener-weight-option strong {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--text-hi) 96%, #fff 4%);
  opacity: 1;
  font-size: 12px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screener-weight-option b {
  color: color-mix(in srgb, var(--gold-bright) 92%, #fff 8%);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 1;
  text-shadow: 0 0 10px rgba(230, 193, 106, 0.12);
}

.screener-weight-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
  background:
    linear-gradient(180deg, rgba(200, 154, 70, 0.11), rgba(200, 154, 70, 0.026)),
    var(--bg-inset);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent);
}

.screener-weight-option:hover {
  border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
}

.screener-weight-option:not(:has(input:checked)) {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.004)),
    color-mix(in srgb, var(--bg-inset) 88%, #000 12%);
}

.screener-weight-option:not(:has(input:checked)) input {
  opacity: 1;
}

.screener-weight-option:not(:has(input:checked)) strong {
  color: color-mix(in srgb, var(--text-hi) 92%, var(--text-mid));
}

.screener-weight-option:not(:has(input:checked)) b {
  color: color-mix(in srgb, var(--gold-bright) 86%, var(--text-mid));
}

html[data-theme="light"] .screener-weight-panel .eyebrow,
html[data-theme="light"] .screener-weight-head h2,
html[data-theme="light"] .screener-weight-actions span,
html[data-theme="light"] .screener-weight-note,
html[data-theme="light"] .screener-weight-option {
  color: #181b1f;
  opacity: 1;
}

html[data-theme="light"] .screener-weight-option {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 233, 230, 0.5)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(39, 43, 48, 0.05);
}

html[data-theme="light"] .screener-table-panel .screener-weight-panel {
  border-color: rgba(150, 119, 59, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(235, 236, 232, 0.62)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 32px rgba(34, 38, 43, 0.06);
}

html[data-theme="light"] .screener-weight-actions .button {
  border-color: rgba(127, 91, 36, 0.34);
  color: #2a1c08;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(226, 224, 216, 0.68)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -2px 0 rgba(104, 73, 29, 0.12),
    0 10px 18px rgba(34, 38, 43, 0.08);
}

html[data-theme="light"] .screener-weight-option strong {
  color: #07090c;
}

html[data-theme="light"] .screener-weight-option b {
  color: #583b12;
  text-shadow: none;
}

html[data-theme="light"] .screener-weight-option:not(:has(input:checked)) {
  border-color: rgba(24, 27, 31, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(222, 224, 222, 0.36)),
    var(--bg-panel);
}

html[data-theme="light"] .screener-weight-option:not(:has(input:checked)) strong {
  color: #20262d;
}

html[data-theme="light"] .screener-weight-option:not(:has(input:checked)) b {
  color: #73511f;
}

.screener-layout.is-xstocks {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
}

.screener-filters,
.screener-table-panel {
  min-width: 0;
  padding: 18px;
}

.major-flow-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.major-flow-cards[hidden] {
  display: none;
}

.major-flow-card {
  position: relative;
  --leader-accent: 255, 193, 7;
  --leader-contrast: 255, 248, 214;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(145deg, rgba(200, 154, 70, 0.035), transparent 42%),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.36),
    var(--shadow-card);
}

.major-flow-card::before,
.major-flow-card::after {
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  opacity: 0;
}

.major-flow-card::before {
  inset: -2px;
  z-index: 2;
  padding: 2px;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(var(--leader-accent), 1) 44%, rgba(var(--leader-contrast), 0.95) 50%, rgba(var(--leader-accent), 0.92) 56%, transparent 72%) top left / 260% 3px no-repeat,
    linear-gradient(180deg, transparent 0 28%, rgba(var(--leader-accent), 1) 44%, rgba(var(--leader-contrast), 0.95) 50%, rgba(var(--leader-accent), 0.92) 56%, transparent 72%) top right / 3px 260% no-repeat,
    linear-gradient(270deg, transparent 0 28%, rgba(240, 210, 125, 1) 44%, rgba(var(--leader-accent), 0.95) 50%, rgba(240, 210, 125, 0.82) 56%, transparent 72%) bottom right / 260% 3px no-repeat,
    linear-gradient(0deg, transparent 0 28%, rgba(240, 210, 125, 1) 44%, rgba(var(--leader-accent), 0.95) 50%, rgba(240, 210, 125, 0.82) 56%, transparent 72%) bottom left / 3px 260% no-repeat;
  background-position: -145% 0, 100% -145%, 145% 100%, 0 145%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.major-flow-card::after {
  inset: 0;
  z-index: 0;
}

.major-flow-card > * {
  position: relative;
  z-index: 1;
}

.major-flow-card.is-long {
  --leader-accent: 31, 203, 134;
  --leader-contrast: 213, 255, 232;
  border-color: rgba(31, 203, 134, 0.28);
}

.major-flow-card.is-short {
  --leader-accent: 255, 77, 94;
  --leader-contrast: 255, 223, 226;
  border-color: rgba(255, 77, 94, 0.28);
}

html[data-theme="light"] .major-flow-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), transparent 30%),
    linear-gradient(145deg, rgba(156, 113, 48, 0.04), transparent 45%),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(104, 73, 29, 0.08),
    var(--shadow-card);
}

html[data-theme="light"] .major-momentum-meter {
  border-color: rgba(134, 141, 148, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(226, 228, 224, 0.58)),
    var(--bg-inset);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(104, 73, 29, 0.1);
}

html[data-theme="light"] .major-momentum-meter i {
  border-color: rgba(36, 41, 48, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(207, 211, 212, 0.6), rgba(255, 255, 255, 0.54)),
    rgba(214, 217, 216, 0.78);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.72),
    inset -1px 0 0 rgba(35, 39, 44, 0.08);
}

html[data-theme="light"] .major-flow-grid span,
html[data-theme="light"] .major-flow-metrics span {
  color: #4e5660;
  border-color: rgba(134, 141, 148, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(232, 233, 230, 0.48)),
    var(--bg-inset);
}

.major-flow-leader-strip {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(200, 154, 70, 0.2);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
    linear-gradient(135deg, rgba(200, 154, 70, 0.08), transparent 62%),
    var(--bg-panel);
  box-shadow: var(--shadow-card);
}

.major-flow-leader-strip[hidden] {
  display: none;
}

.major-leader-label {
  display: grid;
  gap: 4px;
}

.major-leader-label span {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 700;
}

.major-leader-label strong {
  color: var(--text-hi);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.major-strength-lines {
  display: grid;
  gap: 9px;
}

.major-strength-line {
  display: grid;
  grid-template-columns: 42px 1fr minmax(72px, auto);
  gap: 10px;
  align-items: center;
  color: var(--text-mid);
  font-size: 12px;
}

.major-strength-line b,
.major-strength-line em {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 800;
  white-space: nowrap;
}

.major-strength-line i {
  position: relative;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-inset);
}

.major-strength-line i span {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(116, 122, 130, 0.36), rgba(168, 171, 176, 0.72));
}

.major-strength-line.is-long i span {
  background: linear-gradient(90deg, rgba(24, 122, 80, 0.62), rgba(31, 203, 134, 0.96));
}

.major-strength-line.is-short i span {
  background: linear-gradient(90deg, rgba(136, 40, 54, 0.62), rgba(255, 77, 94, 0.96));
}

.major-strength-line.is-leader {
  color: var(--text-hi);
}

.major-strength-line.is-leader i {
  border-color: rgba(240, 210, 125, 0.38);
  box-shadow: 0 0 18px rgba(200, 154, 70, 0.12);
}

html[data-theme="light"] .major-flow-leader-strip {
  border-color: rgba(156, 113, 48, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), transparent 52%),
    linear-gradient(135deg, rgba(156, 113, 48, 0.065), transparent 66%),
    var(--bg-panel);
}

html[data-theme="light"] .major-strength-line i {
  border-color: rgba(134, 141, 148, 0.22);
  background: #e2e5e4;
}

.major-flow-card.is-market-leader {
  border-color: rgba(240, 210, 125, 0.58);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(var(--leader-accent), 0.18),
    0 0 24px rgba(var(--leader-accent), 0.16);
}

.major-flow-card.is-market-leader::before {
  opacity: 1;
  animation: majorLeaderEdgeTravel 1.9s linear infinite;
}

.major-flow-card.is-market-leader::after {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(var(--leader-accent), 0.055), transparent 42%),
    linear-gradient(135deg, rgba(240, 210, 125, 0.045), transparent 52%);
}

.major-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.major-flow-title {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
}

.major-flow-head span,
.major-flow-metrics span,
.major-flow-card p {
  color: var(--text-low);
}

.major-flow-head strong {
  color: var(--text-hi);
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.045em;
}

.major-side-badge {
  justify-self: start;
  min-width: 86px;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.major-momentum-meter {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 5px;
  min-width: 154px;
  min-height: 31px;
  padding: 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
}

.major-momentum-meter::before {
  display: none;
}

.major-momentum-meter i {
  position: relative;
  z-index: 1;
  display: block;
  width: 10px;
  min-height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.18)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.06),
    inset -1px 0 0 rgba(0, 0, 0, 0.24);
}

.major-momentum-meter.is-long i.is-filled {
  border-color: rgba(31, 203, 134, 0.9);
  background:
    linear-gradient(90deg, rgba(0, 71, 23, 0.82), rgba(42, 238, 34, 0.96) 62%, rgba(21, 146, 25, 0.82)),
    rgba(31, 203, 134, 0.7);
  box-shadow:
    inset 0 0 10px rgba(193, 255, 196, 0.32),
    0 0 10px rgba(31, 203, 134, 0.9),
    0 0 24px rgba(31, 203, 134, 0.38);
}

.major-momentum-meter.is-short i.is-filled {
  border-color: rgba(255, 77, 94, 0.9);
  background:
    linear-gradient(90deg, rgba(79, 0, 10, 0.84), rgba(255, 27, 27, 0.98) 62%, rgba(160, 16, 24, 0.88)),
    rgba(255, 77, 94, 0.72);
  box-shadow:
    inset 0 0 10px rgba(255, 199, 199, 0.3),
    0 0 10px rgba(255, 77, 94, 0.9),
    0 0 24px rgba(255, 77, 94, 0.36);
}

.major-momentum-meter.is-market-leader i.is-filled {
  animation: majorLeaderBarPulse 1.9s ease-in-out infinite;
}

@keyframes majorLeaderEdgeTravel {
  0% {
    background-position: -155% 0, 100% -155%, 155% 100%, 0 155%;
    filter: brightness(1.15) drop-shadow(0 0 7px rgba(var(--leader-accent), 0.64));
  }
  25% {
    background-position: 25% 0, 100% -25%, -25% 100%, 0 25%;
    filter: brightness(1.55) drop-shadow(0 0 11px rgba(var(--leader-accent), 0.8));
  }
  50% {
    background-position: 155% 0, 100% 155%, -155% 100%, 0 -155%;
    filter: brightness(1.18) drop-shadow(0 0 7px rgba(var(--leader-accent), 0.62));
  }
  75% {
    background-position: 25% 0, 100% 25%, -25% 100%, 0 -25%;
    filter: brightness(1.55) drop-shadow(0 0 11px rgba(var(--leader-accent), 0.8));
  }
  100% {
    background-position: -155% 0, 100% -155%, 155% 100%, 0 155%;
    filter: brightness(1.15) drop-shadow(0 0 7px rgba(var(--leader-accent), 0.64));
  }
}

@keyframes majorLeaderBarPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.24);
  }
}

.major-flow-balance {
  display: flex;
  height: 10px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-inset);
}

.major-flow-balance i {
  display: block;
  min-width: 3px;
}

.major-flow-balance .long {
  background: linear-gradient(90deg, rgba(31, 203, 134, 0.28), rgba(31, 203, 134, 0.92));
}

.major-flow-balance .short {
  background: linear-gradient(90deg, rgba(255, 77, 94, 0.9), rgba(255, 77, 94, 0.28));
}

.major-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.major-flow-grid span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-low);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--bg-inset);
  font-size: 12px;
  font-weight: 650;
}

.major-flow-grid b {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-hi);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.major-flow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.major-flow-metrics span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  font-size: 12px;
}

.major-flow-card p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--text-mid);
}

.toggle-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  appearance: none;
  border: 1px solid rgba(255, 193, 7, 0.38);
  border-radius: var(--r-pill);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    var(--bg-inset);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5f6f7, #9aa1aa);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
  transition: left 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-row input[type="checkbox"]:checked {
  border-color: rgba(255, 193, 7, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.28), rgba(255, 215, 64, 0.12)),
    rgba(255, 193, 7, 0.12);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.08), inset 0 0 0 1px rgba(255, 193, 7, 0.12);
}

.toggle-row input[type="checkbox"]:checked::after {
  left: 24px;
  background: linear-gradient(180deg, #ffd740, #ffc107);
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.48), 0 4px 10px rgba(0, 0, 0, 0.45);
}

.toggle-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255, 193, 7, 0.72);
  outline-offset: 3px;
}

.filter-rules {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.sort-note {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 193, 7, 0.26);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 13px;
  line-height: 1.6;
}

.sort-note.neutral {
  color: var(--text-mid);
  border-color: var(--line);
  background: var(--bg-inset);
}

.filter-rules span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: var(--bg-inset);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.screener-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.screener-table th,
.screener-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.screener-table th:first-child,
.screener-table td:first-child {
  text-align: left;
}

.screener-table th:last-child,
.screener-table td:last-child {
  min-width: 320px;
  max-width: 430px;
  text-align: left;
  white-space: normal;
}

.screener-table th {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 800;
}

.screener-table tr {
  transition: 0.16s ease;
}

.screener-table tbody tr:hover,
.screener-table tbody tr.is-selected {
  background: rgba(255, 193, 7, 0.07);
}

.screener-table tr.is-row-locked {
  position: relative;
}

.row-secure {
  display: inline-block;
  filter: blur(5px);
  opacity: 0.35;
  user-select: none;
}

.row-lock-message {
  display: block;
  max-width: 320px;
  margin-top: 5px;
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  white-space: normal;
}

.screener-comment-cell {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.screener-comment-cell > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  color: var(--text-hi);
  font-weight: 700;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.48;
  text-align: left;
  white-space: normal;
}

.row-expand-button {
  flex: 0 0 auto;
  position: relative;
  align-self: center;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 166, 66, 0.7);
  border-radius: var(--r-sm);
  color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    #08090c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.38),
    0 9px 18px rgba(0, 0, 0, 0.24);
  font-size: 0;
  font-weight: 900;
  line-height: 0;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.row-expand-button.is-unneeded {
  display: none;
}

.screener-comment-cell:has(.row-expand-button.is-unneeded):not(:has(.row-more-button)) {
  gap: 0;
}

.row-expand-button::before {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(245, 246, 247, 0.96);
  border-bottom: 2px solid rgba(245, 246, 247, 0.96);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  transform: translateY(-2px) rotate(45deg);
  transform-origin: 50% 50%;
  content: "";
}

html[data-theme="light"] .row-expand-button {
  border-color: rgba(156, 113, 48, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(232, 233, 230, 0.62)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -2px 0 rgba(104, 73, 29, 0.14),
    0 8px 14px rgba(34, 38, 43, 0.08);
}

html[data-theme="light"] .row-expand-button::before {
  border-right-color: #181b1f;
  border-bottom-color: #181b1f;
  filter: none;
}

.row-expand-button:hover,
.row-expand-button.is-open {
  border-color: rgba(240, 210, 125, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(215, 166, 66, 0.05)),
    var(--bg-elevated);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 10px 22px rgba(0, 0, 0, 0.26),
    0 0 0 3px rgba(215, 166, 66, 0.08);
}

html[data-theme="light"] .row-expand-button:hover,
html[data-theme="light"] .row-expand-button.is-open {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(228, 220, 204, 0.72)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 0 rgba(104, 73, 29, 0.16),
    0 9px 18px rgba(34, 38, 43, 0.1),
    0 0 0 3px rgba(156, 113, 48, 0.08);
}

.row-expand-button.is-open {
  transform: none;
}

.row-expand-button.is-open::before {
  transform: translateY(2px) rotate(225deg);
}

.screener-comment-full {
  display: none;
  margin-top: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  background: rgba(255, 193, 7, 0.055);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.65;
  text-align: left;
  white-space: normal;
}

html[data-theme="light"] .screener-comment-cell > span,
html[data-theme="light"] .screener-comment-full {
  color: #1d2228;
}

.screener-comment-full.is-open {
  display: block;
}

.row-more-button {
  flex: 0 0 auto;
  align-self: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 193, 7, 0.32);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.row-more-button:hover {
  border-color: rgba(255, 193, 7, 0.58);
  box-shadow: var(--glow-gold);
}

.symbol-cell {
  display: grid;
  gap: 3px;
}

.symbol-cell small {
  color: var(--text-low);
}

.tradability-badge {
  gap: 6px;
  color: var(--text-mid);
  font-size: 12px;
}

.tradability-badge.is-tradable {
  color: var(--long);
  border-color: rgba(31, 203, 134, 0.35);
}

.tradability-badge.is-learning {
  color: var(--warn);
  border-color: rgba(255, 176, 32, 0.35);
}

.xstock-insight-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.xstock-insight-panel[hidden] {
  display: none;
}

.xstock-insight-panel .section-head {
  margin-bottom: 0;
}

.xstock-insight-panel .button {
  min-width: 92px;
}

.xstock-news-list {
  display: grid;
  gap: 10px;
}

.xstock-news-item,
.xstock-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.xstock-news-item h3 {
  margin: 8px 0 6px;
  color: var(--text-hi);
  font-size: 14px;
  line-height: 1.35;
}

.xstock-news-item p,
.xstock-empty {
  margin: 0 0 10px;
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.6;
}

.side-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.side-badge.is-long {
  color: var(--long);
  border-color: rgba(31, 203, 134, 0.4);
  background: rgba(31, 203, 134, 0.1);
}

.side-badge.is-short {
  color: var(--short);
  border-color: rgba(255, 77, 94, 0.42);
  background: rgba(255, 77, 94, 0.1);
}

.side-badge.is-neutral {
  color: var(--gold-2);
  border-color: rgba(213, 174, 96, 0.48);
  background: rgba(213, 174, 96, 0.11);
}

.engine-breakdown {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.news-panel {
  margin-top: 16px;
  padding: 18px;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.news-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-inset);
}

.news-meta,
.impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.news-meta span,
.news-meta b {
  color: var(--text-low);
  font-size: 12px;
}

.news-item h3 {
  margin: 10px 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

.news-item p {
  margin-bottom: 12px;
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.75;
}

.news-title-en {
  margin: -2px 0 8px !important;
  color: rgba(222, 228, 236, 0.62) !important;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.news-summary-zh {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .news-title-en,
html[data-theme="light"] .xstock-news-item p,
html[data-theme="light"] .xstock-earnings-news p {
  color: #252a30 !important;
}

html[data-theme="light"] .news-item p,
html[data-theme="light"] .news-summary-zh,
html[data-theme="light"] .impact-row strong {
  color: #303741;
}

html[data-theme="light"] .news-summary-zh {
  border-top-color: rgba(24, 27, 31, 0.1);
}

.impact-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 900;
}

.impact-badge.is-positive {
  color: var(--long);
  border-color: rgba(31, 203, 134, 0.34);
}

.impact-badge.is-negative {
  color: var(--short);
  border-color: rgba(255, 77, 94, 0.36);
}

.impact-badge.is-neutral {
  color: var(--warn);
  border-color: rgba(255, 176, 32, 0.36);
}

.impact-row strong {
  min-width: 0;
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.engine-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.engine-bar {
  min-width: 0;
}

.engine-bar.is-disabled {
  opacity: 1;
}

.engine-bar span {
  display: block;
  color: var(--text-hi);
  font-size: 12px;
  font-weight: 800;
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-bar span b {
  float: right;
  color: var(--gold-bright);
}

.engine-bar small {
  display: block;
  margin-top: 6px;
  color: color-mix(in srgb, var(--text-mid) 86%, var(--text-hi));
  font-size: 11px;
  line-height: 1.45;
}

.engine-bar.is-disabled span,
.engine-bar.is-disabled small {
  color: var(--text-mid);
}

.engine-bar.is-disabled .engine-bar-track i {
  opacity: 0.58;
}

.engine-score-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.engine-score-tags i {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: color-mix(in srgb, var(--text-hi) 88%, var(--text-mid));
  font-size: 11px;
  font-style: normal;
  background: rgba(255, 255, 255, 0.035);
}

.engine-score-tags i.long {
  border-color: rgba(31, 203, 134, 0.28);
  color: var(--long);
}

.engine-score-tags i.short {
  border-color: rgba(255, 77, 94, 0.28);
  color: var(--short);
}

.engine-bar-track {
  height: 7px;
  margin-top: 6px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg-inset) 86%, #fff 4%);
  overflow: hidden;
}

.engine-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-primary);
}

html[data-theme="light"] .engine-bar span {
  color: #171b20;
}

html[data-theme="light"] .engine-bar span b {
  color: #7a541f;
}

html[data-theme="light"] .engine-bar small,
html[data-theme="light"] .engine-score-tags i {
  color: #333a43;
}

html[data-theme="light"] .engine-bar.is-disabled span,
html[data-theme="light"] .engine-bar.is-disabled small {
  color: #515963;
}

html[data-theme="light"] .engine-score-tags i {
  background: rgba(255, 255, 255, 0.58);
}

.terminal-view {
  max-width: none;
}

.terminal-shell {
  max-width: 1680px;
  margin: 0 auto;
}

.chart-action-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(9, 12, 18, 0.78);
}

html[data-theme="light"] .terminal-view .chart-action-strip {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.22)),
    var(--bg-inset);
  border-color: rgba(139, 145, 153, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.chart-action-strip > * {
  flex: 0 0 auto;
}

.chart-action-strip .button {
  min-width: 72px;
}

.flow-console {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.footprint-pane .flow-console {
  margin: 10px 0 12px;
}

.flow-console article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(9, 12, 18, 0.78);
}

.heatmap-pane .compact-flow-console article {
  border-color: rgba(200, 154, 70, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 229, 159, 0.07), transparent 18%),
    linear-gradient(145deg, rgba(184, 121, 28, 0.22), rgba(39, 27, 15, 0.92)),
    var(--bg-inset);
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 155, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.heatmap-pane .compact-flow-console span {
  color: #caa66c;
  font-weight: 820;
}

.heatmap-pane .compact-flow-console strong {
  color: #f7d98f;
  font-weight: 900;
  text-shadow:
    0 1px 0 rgba(255, 241, 186, 0.16),
    0 8px 14px rgba(0, 0, 0, 0.28);
}

.heatmap-pane .compact-flow-console em {
  color: #9b7a4c;
  font-weight: 680;
}

html[data-theme="light"] .heatmap-pane .compact-flow-console article {
  border-color: rgba(156, 113, 48, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), transparent 22%),
    linear-gradient(145deg, rgba(255, 246, 223, 0.92), rgba(230, 211, 177, 0.66)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(156, 113, 48, 0.08),
    0 9px 16px rgba(90, 66, 30, 0.08);
}

html[data-theme="light"] .heatmap-pane .compact-flow-console span {
  color: #8b5e20;
}

html[data-theme="light"] .heatmap-pane .compact-flow-console strong {
  color: #5c3d13;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .heatmap-pane .compact-flow-console em {
  color: #8a6c40;
}

.flow-console span,
.flow-console em {
  display: block;
  color: var(--text-low);
  font-size: 11.5px;
  font-weight: 650;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.35;
}

.flow-console strong {
  display: block;
  min-width: 9ch;
  margin: 6px 0 5px;
  overflow: visible;
  color: var(--text-hi);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.33fr);
  gap: 12px;
}

.terminal-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.chart-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.heatmap-pane {
  order: 1;
}

.heatmap-pane:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: #020306;
  box-shadow: none;
  overflow: auto;
}

.heatmap-pane:fullscreen .chart-head,
.heatmap-pane:fullscreen .chart-action-strip,
.heatmap-pane:fullscreen .flow-console,
.heatmap-pane:fullscreen .chart-control-row {
  max-width: 100%;
}

.heatmap-pane:fullscreen #heatmapCanvas {
  height: calc(100vh - 236px);
  min-height: 660px;
  border-color: rgba(235, 182, 62, 0.22);
}

.heatmap-pane:fullscreen .chart-head {
  margin-bottom: 6px;
}

.profile-pane {
  order: 2;
}

.footprint-pane {
  order: 3;
}

.footprint-pane:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: #020306;
  box-shadow: none;
  overflow: auto;
}

.footprint-pane:fullscreen .chart-head,
.footprint-pane:fullscreen .chart-action-strip,
.footprint-pane:fullscreen .chart-control-row,
.footprint-pane:fullscreen .terminal-clock-strip {
  max-width: 100%;
}

.footprint-pane:fullscreen #footprintCanvas {
  height: calc(100vh - 204px);
  min-height: 700px;
  border-color: rgba(235, 182, 62, 0.22);
}

.price-pane {
  position: relative;
  padding: 14px;
  overflow: hidden;
}

.chart-head {
  margin-bottom: 8px;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--text-mid);
  font-size: 12px;
}

.heatmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.heatmap-range-control button {
  min-width: 44px;
}

.heatmap-action-strip {
  margin-top: -4px;
}

.compact-flow-console {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.terminal-clock-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text-mid);
  font-size: 12px;
}

.terminal-clock-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(215, 166, 66, 0.28);
  border-radius: var(--r-sm);
  background: rgba(9, 12, 18, 0.82);
  box-shadow: inset 0 0 0 1px rgba(240, 210, 125, 0.035);
}

html[data-theme="light"] .terminal-clock-strip span {
  color: #4b515a;
  border-color: rgba(156, 113, 48, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(232, 233, 230, 0.62)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 14px rgba(34, 38, 43, 0.05);
}

.terminal-clock-strip b {
  color: var(--text-hi);
  font-family: var(--font-mono);
  font-weight: 900;
}

.chart-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -2px 0 10px;
}

.chart-action-strip .button.is-active {
  color: #1a1300;
  border-color: rgba(255, 193, 7, 0.42);
  background: var(--grad-primary);
  box-shadow: var(--glow-gold);
}

.micro-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.micro-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(240, 162, 46, 0.34);
  border-radius: var(--r-sm);
  color: #ffd27f;
  background: linear-gradient(180deg, rgba(12, 13, 16, 0.98), rgba(6, 7, 10, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.65);
  font-size: 12px;
  white-space: nowrap;
}

html[data-theme="light"] .terminal-view .micro-controls label {
  color: #2c3036;
  border-color: rgba(128, 92, 35, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 234, 234, 0.76)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(104, 73, 29, 0.08),
    0 8px 14px rgba(34, 38, 43, 0.06);
}

.micro-controls select,
.micro-controls input[type="range"] {
  width: 72px;
  min-height: auto;
  accent-color: var(--terminal-yellow);
}

.micro-controls select {
  width: 86px;
  min-width: 86px;
  padding: 0 24px 0 6px;
  border: 0;
  color: var(--terminal-yellow-hi);
  background: transparent;
  font-weight: 800;
  box-sizing: border-box;
}

html[data-theme="light"] .terminal-view .micro-controls select {
  color: #68491d;
  text-shadow: none;
}

#heatmapModel {
  width: 104px;
}

#profileModeSelect {
  width: 152px;
  min-width: 152px;
}

#profileRangeModeSelect {
  width: 104px;
  min-width: 104px;
}

#footprintModeSelect {
  width: 118px;
  min-width: 118px;
}

#footprintDensitySelect {
  width: 86px;
  min-width: 86px;
}

#footprintImbalanceRatioSelect {
  width: 82px;
  min-width: 82px;
}

.terminal-view .micro-controls input[type="range"] {
  height: 18px;
  cursor: pointer;
}

.terminal-view .micro-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, rgba(255, 196, 102, 0.9), rgba(240, 162, 46, 0.58));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 158, 0.16), 0 0 12px rgba(240, 162, 46, 0.22);
}

.terminal-view .micro-controls input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 2px solid rgba(255, 230, 168, 0.92);
  border-radius: 50%;
  appearance: none;
  background:
    radial-gradient(circle at 34% 28%, #fff4c8 0 13%, #ffd58b 28%, var(--terminal-yellow-hi) 50%, #b96d13 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.42),
    inset 0 -2px 3px rgba(65, 31, 0, 0.44),
    0 0 0 3px rgba(240, 162, 46, 0.18),
    0 0 18px rgba(255, 196, 102, 0.38);
}

.terminal-view .micro-controls input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, rgba(255, 196, 102, 0.9), rgba(240, 162, 46, 0.58));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 158, 0.16), 0 0 12px rgba(240, 162, 46, 0.22);
}

.terminal-view .micro-controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 230, 168, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fff4c8 0 13%, #ffd58b 28%, var(--terminal-yellow-hi) 50%, #b96d13 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.42),
    inset 0 -2px 3px rgba(65, 31, 0, 0.44),
    0 0 0 3px rgba(240, 162, 46, 0.18),
    0 0 18px rgba(255, 196, 102, 0.38);
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-inset);
}

.zoom-controls button {
  min-width: 32px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: transparent;
  font-weight: 800;
}

.zoom-controls button:hover {
  color: #1a1300;
  border-color: rgba(255, 193, 7, 0.38);
  background: var(--grad-primary);
}

.chart-hint {
  color: var(--text-low);
  font-size: 12px;
}

.heatmap-action-strip {
  align-items: center;
}

.heatmap-action-strip .micro-controls label {
  align-items: center;
}

.heatmap-action-strip .micro-controls .num {
  color: var(--gold);
  font-size: 12px;
}

.heatmap-layer-toggle {
  gap: 7px;
  color: var(--text-hi) !important;
}

.heatmap-layer-toggle input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--gold);
}

.heatmap-palette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-inset);
}

.heatmap-palette button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: var(--heatmap-swatch, linear-gradient(180deg, #050403, #f0a22e, #ffe68a));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.32);
}

.heatmap-palette button.is-active {
  border-color: rgba(255, 230, 138, 0.92);
  box-shadow:
    0 0 0 1px rgba(240, 162, 46, 0.42),
    0 0 14px rgba(240, 162, 46, 0.34),
    inset 0 0 0 1px rgba(0, 0, 0, 0.32);
}

.heatmap-palette .is-gold {
  --heatmap-swatch: linear-gradient(180deg, #050403 0%, #24170a 28%, #b8791c 68%, #ffe68a 100%);
}

.heatmap-palette .is-viridis {
  --heatmap-swatch: linear-gradient(180deg, #21123b 0%, #2e4b8f 30%, #21918c 55%, #5ec962 75%, #f5f5d0 100%);
}

.heatmap-palette .is-rose {
  --heatmap-swatch: linear-gradient(180deg, #210018 0%, #a92c62 46%, #f0a22e 78%, #ffe68a 100%);
}

.heatmap-palette .is-ocean {
  --heatmap-swatch: linear-gradient(180deg, #03111d 0%, #0f7c91 48%, #18b6a2 72%, #f2e85c 100%);
}

.terminal-view .chart-hint {
  display: none;
}

.price-pane canvas {
  width: 100%;
  height: 456px;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #08090b;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

html[data-theme="light"] .terminal-view .price-pane canvas {
  border-color: rgba(37, 40, 46, 0.24);
  background: #050609;
}

.footprint-pane canvas {
  height: 520px;
}

.price-pane canvas.is-dragging {
  cursor: grabbing;
}

.secondary-chart canvas {
  height: 520px;
  background: #f5f6f7;
}

.heatmap-canvas-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.heatmap-pane #heatmapCanvas {
  height: 620px;
  border-color: rgba(240, 162, 46, 0.2);
  background: #050609;
}

.heatmap-side-legend {
  display: none;
  min-height: 560px;
  grid-template-rows: auto repeat(4, 1fr);
  gap: 4px;
  padding: 8px 0;
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 850;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.heatmap-side-legend b {
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0;
}

.heatmap-side-legend span {
  min-height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.heatmap-side-legend i {
  width: 9px;
  min-height: 34px;
  display: inline-block;
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
}

.heatmap-side-legend .is-extreme i {
  background: #fde725;
  color: rgba(253, 231, 37, 0.52);
}

.heatmap-side-legend .is-high i {
  background: #5ec962;
  color: rgba(94, 201, 98, 0.42);
}

.heatmap-side-legend .is-mid i {
  background: #21918c;
  color: rgba(33, 145, 140, 0.36);
}

.heatmap-side-legend .is-low i {
  background: #2e4b8f;
  color: rgba(46, 75, 143, 0.34);
}

.heatmap-cursor-readout {
  position: absolute;
  right: 24px;
  bottom: 34px;
  width: min(224px, 24vw);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 169, 72, 0.34);
  border-radius: 7px;
  background: rgba(5, 6, 8, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text-hi);
  pointer-events: none;
  z-index: 3;
}

.heatmap-cursor-readout[hidden] {
  display: none;
}

.heatmap-cursor-readout b {
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 900;
}

.heatmap-cursor-readout strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.heatmap-cursor-readout span {
  color: rgba(222, 228, 236, 0.86);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

html[data-theme="light"] .heatmap-cursor-readout {
  border-color: rgba(220, 169, 72, 0.34);
  background: rgba(5, 6, 8, 0.9);
  box-shadow:
    0 14px 26px rgba(20, 22, 26, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f5f6f7;
}

html[data-theme="light"] .heatmap-cursor-readout b {
  color: var(--gold-bright);
}

html[data-theme="light"] .heatmap-cursor-readout strong {
  color: #fff;
}

html[data-theme="light"] .heatmap-cursor-readout span {
  color: rgba(222, 228, 236, 0.86);
}

.heatmap-legend-strip {
  min-height: 26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 8px 0;
  border-top: 1px solid var(--line);
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.heatmap-legend-strip b {
  width: 1px;
  height: 13px;
  background: var(--line);
}

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

.heatmap-zone-count {
  display: inline-flex;
  align-items: center;
  min-width: 70px;
  margin-left: 6px;
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.heat-chip,
.heat-key {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.heat-chip.is-low {
  background: #2e4b8f;
}

.heat-chip.is-mid {
  background: #21918c;
}

.heat-chip.is-high {
  background: #5ec962;
}

.heat-chip.is-extreme {
  background: #fde725;
}

.heat-key.is-measured {
  height: 4px;
  border-radius: 999px;
  background: #ffd060;
}

.heat-key.is-estimated {
  height: 0;
  border-top: 2px dashed #ffd060;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.footprint-pane #footprintCanvas {
  height: 560px;
}

.profile-pane #profileCanvas {
  height: 520px;
}

.price-pane canvas.is-hidden {
  display: none;
}

.footprint-readout {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.footprint-readout span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-low);
  background: var(--bg-inset);
  font-size: 12px;
}

.footprint-readout b {
  display: block;
  min-width: 7ch;
  margin-top: 4px;
  overflow: visible;
  color: var(--text-hi);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
  white-space: normal;
}

.chart-overlay-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 193, 7, 0.22);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: rgba(255, 193, 7, 0.07);
  font-size: 13px;
  line-height: 1.7;
}

.chart-disclaimer {
  margin-top: 10px;
  color: var(--text-low);
  font-size: 12px;
  line-height: 1.6;
}

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

.is-access-locked {
  position: relative;
  min-height: 230px;
}

.is-access-locked > :not(.access-lock) {
  filter: blur(7px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.access-lock {
  position: absolute;
  inset: 14px;
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.access-lock[hidden] {
  display: none;
}

.access-lock-card {
  width: min(440px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 193, 7, 0.42);
  border-radius: var(--r-md);
  background: rgba(10, 11, 13, 0.9);
  box-shadow: var(--glow-gold), var(--shadow-card);
  text-align: center;
}

.access-lock-card strong,
.access-lock-card p,
.access-lock-card button {
  position: relative;
  z-index: 1;
}

.access-lock-card strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

.access-lock-card p {
  margin: 10px 0 14px;
  color: var(--text-mid);
  line-height: 1.7;
}

.lock-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.indicator-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid rgba(240, 162, 46, 0.42);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(240, 162, 46, 0.15), rgba(10, 12, 16, 0.88));
  box-shadow: inset 0 0 0 1px rgba(255, 196, 102, 0.08), 0 0 14px rgba(240, 162, 46, 0.08);
}

html[data-theme="light"] .terminal-view .indicator-picker {
  border-color: rgba(156, 113, 48, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(232, 233, 230, 0.62)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(104, 73, 29, 0.08),
    0 8px 14px rgba(34, 38, 43, 0.05);
}

.indicator-picker label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  color: #ffd18a;
  font-size: 13px;
  white-space: nowrap;
}

html[data-theme="light"] .terminal-view .indicator-picker label {
  color: #4b515a;
  text-shadow: none;
}

.indicator-picker label:hover {
  color: var(--terminal-yellow-hi);
  background: var(--terminal-yellow-soft);
}

.indicator-picker input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  appearance: auto;
  border-radius: 2px;
  accent-color: var(--terminal-yellow);
}

.indicator-picker input:checked + span,
.indicator-picker label:has(input:checked) {
  color: var(--terminal-yellow-hi);
  text-shadow: 0 0 12px rgba(243, 214, 109, 0.16);
}

html[data-theme="light"] .terminal-view .indicator-picker label:has(input:checked) {
  color: #68491d;
  background: rgba(156, 113, 48, 0.09);
  box-shadow: inset 0 0 0 1px rgba(156, 113, 48, 0.14);
  text-shadow: none;
}

.indicator-picker input::after {
  display: none;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.indicator-card {
  min-width: 0;
  padding: 12px;
}

.indicator-head {
  margin-bottom: 8px;
  color: var(--text-mid);
  font-size: 13px;
}

.indicator-card canvas {
  width: 100%;
  height: 116px;
  display: block;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.info-dot {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-mid);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.info-dot:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 10;
  width: 220px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  text-align: left;
  line-height: 1.55;
}

.terminal-side {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.terminal-side .panel {
  padding: 14px;
}

.resonance-card h2 {
  margin: 0 0 8px;
  color: var(--gold);
}

.resonance-card p,
.interpretation-card li {
  color: var(--text-mid);
  line-height: 1.65;
}

.resonance-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.resonance-matrix span {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-low);
  background: var(--bg-inset);
}

.interpretation-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metrics-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.metrics-grid span {
  color: var(--text-low);
  font-size: 12px;
}

.metrics-grid strong {
  font-size: 22px;
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.side-tab {
  display: none;
}

.side-tab.is-active {
  display: block;
}

.tape-row,
.book-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  font-size: 13px;
}

.tape-row.is-whale {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 193, 7, 0.35);
}

.book-row i {
  display: block;
  height: 6px;
  border-radius: var(--r-pill);
  background: currentColor;
  opacity: 0.38;
}

.academy-title-row {
  align-items: end;
}

.academy-command-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  margin-bottom: 16px;
}

.academy-command-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-color: rgba(206, 162, 82, 0.25);
  background:
    linear-gradient(135deg, rgba(255, 206, 109, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--bg-panel);
}

.academy-command-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(244, 199, 114, 0.9), transparent);
  opacity: 0.85;
}

.live-dot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(206, 162, 82, 0.28);
  border-radius: var(--r-pill);
  color: var(--text-mid);
  background: rgba(8, 10, 13, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.live-dot-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #777f8a;
  box-shadow: none;
}

.live-dot-label.is-live {
  color: #ffefef;
  border-color: rgba(255, 75, 92, 0.4);
  background: rgba(76, 10, 17, 0.5);
}

.live-dot-label.is-live i {
  background: #ff344b;
  box-shadow: 0 0 0 4px rgba(255, 52, 75, 0.18), 0 0 18px rgba(255, 52, 75, 0.48);
  animation: liveDotPulse 1.65s ease-in-out infinite;
}

.live-dot-label.is-sync i {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(206, 162, 82, 0.16), 0 0 16px rgba(206, 162, 82, 0.34);
}

.academy-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.academy-entry-card {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(206, 162, 82, 0.25);
  border-radius: var(--r-md);
  color: var(--text-hi);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    #080a0e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(206, 162, 82, 0.08);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.academy-entry-card:hover {
  border-color: rgba(244, 199, 114, 0.58);
  color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(0, 0, 0, 0.22),
    0 0 20px rgba(206, 162, 82, 0.08);
  transform: translateY(-1px);
}

.academy-entry-card span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.academy-entry-card strong {
  color: inherit;
  font-size: 17px;
  font-weight: 900;
}

.academy-entry-card small {
  color: var(--text-low);
  font-size: 12px;
}

html[data-theme="light"] .academy-command-panel {
  border-color: rgba(117, 88, 45, 0.16);
  background:
    linear-gradient(135deg, rgba(188, 142, 70, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(242, 243, 241, 0.62)),
    var(--bg-panel);
}

html[data-theme="light"] .live-dot-label {
  color: #43484f;
  background: rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] .academy-entry-card {
  color: #181b20;
  border-color: rgba(117, 88, 45, 0.17);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 237, 235, 0.7)),
    #f4f4f1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(79, 60, 34, 0.07),
    0 10px 18px rgba(35, 39, 44, 0.04);
}

html[data-theme="light"] .academy-entry-card:hover {
  border-color: rgba(151, 112, 50, 0.42);
  color: #6e4d18;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 28px rgba(35, 39, 44, 0.08);
}

html[data-theme="light"] .academy-entry-card small {
  color: #69707a;
}

.academy-track {
  display: grid;
  gap: 16px;
}

.academy-course-section {
  display: grid;
  gap: 10px;
}

.academy-course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.academy-course-head span {
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 850;
}

.academy-course-head small {
  padding: 5px 9px;
  border: 1px solid rgba(206, 162, 82, 0.28);
  border-radius: var(--r-pill);
  color: var(--gold);
  background: rgba(206, 162, 82, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.academy-grid,
.profile-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.academy-course-section .academy-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.course-card,
.achievement-panel,
.assistant-panel,
.profile-card,
.settings-panel,
.authorization-panel,
.admin-panel {
  padding: 18px;
}

.course-card {
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
  align-content: start;
  min-height: 198px;
}

.course-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.course-card h2 {
  margin: 0;
  line-height: 1.25;
}

.course-card p {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.course-step {
  width: 42px;
  flex: 0 0 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 900;
}

.course-card.is-complete .course-step,
.course-card.is-current .course-step {
  color: #1a1300;
  border-color: transparent;
  background: var(--grad-primary);
}

.course-tier {
  max-width: calc(100% - 52px);
  width: auto;
  min-width: 72px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.course-card.is-course-locked > :not(.course-lock) {
  filter: blur(5px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.course-lock {
  position: absolute;
  inset: auto 12px 12px;
  padding: 10px;
  border: 1px solid rgba(255, 193, 7, 0.36);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: rgba(10, 11, 13, 0.88);
  font-size: 12px;
  line-height: 1.6;
}

.course-lock[hidden] {
  display: none;
}

.concierge-card {
  border-color: rgba(255, 193, 7, 0.42);
  box-shadow: var(--glow-gold);
}

.concierge-card.is-concierge-locked {
  box-shadow: none;
}

.progress {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-primary);
}

.achievement-panel {
  margin-top: 16px;
}

.handout-library-panel {
  margin-top: 16px;
  padding: 18px;
}

.handout-library {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.handout-topic-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
}

.handout-topic-tabs button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  background: var(--bg-inset);
  text-align: left;
}

.handout-topic-tabs button.is-active {
  border-color: rgba(255, 193, 7, 0.42);
  color: var(--gold);
  background: var(--gold-soft);
}

.handout-topic-tabs span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 900;
}

.handout-topic-tabs strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handout-topic-tabs small {
  grid-column: 2;
  color: var(--text-low);
}

.academy-handout-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.handout-card,
.handout-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.handout-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
}

.handout-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.handout-card strong {
  line-height: 1.35;
}

.handout-card p,
.handout-empty {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.handout-pdf-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 193, 7, 0.24);
  border-radius: var(--r-sm);
  background: var(--gold-soft);
}

.handout-pdf-row.is-muted {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.handout-pdf-row b {
  color: var(--gold);
  font-size: 12px;
}

.handout-pdf-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--text-mid);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handout-pdf-row a {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.handout-mastery-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 193, 7, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 193, 7, 0.055);
}

.handout-mastery-ring {
  --handout-progress: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #111318 0 56%, transparent 57%),
    conic-gradient(var(--gold) calc(var(--handout-progress) * 1%), rgba(255, 255, 255, 0.13) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.16), 0 0 18px rgba(255, 193, 7, 0.15);
}

.handout-mastery-ring strong {
  color: var(--text-hi);
  font-size: 14px;
}

.handout-mastery-row b,
.handout-mastery-row small {
  display: block;
}

.handout-mastery-row b {
  color: var(--text-hi);
  font-size: 13px;
}

.handout-mastery-row small {
  margin-top: 4px;
  color: var(--text-mid);
  font-size: 12px;
}

.handout-quiz-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.handout-quiz-row span {
  color: var(--text-low);
  font-size: 12px;
}

.handout-quiz-row button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.handout-quiz-row button:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-low);
  background: rgba(255, 255, 255, 0.04);
}

.class-notice-panel {
  padding: 18px;
}

.class-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.class-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(206, 162, 82, 0.18);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--bg-inset);
}

.class-card.is-next {
  border-color: rgba(255, 193, 7, 0.42);
  box-shadow: var(--glow-gold);
}

.class-time {
  display: grid;
  gap: 6px;
}

.class-time span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.class-time strong {
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.class-copy {
  min-width: 0;
}

.class-copy h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.class-copy p {
  margin: 0 0 6px;
  color: var(--text-mid);
  line-height: 1.6;
}

.class-copy small {
  color: var(--text-low);
}

.class-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.assistant-panel {
  margin-top: 16px;
}

.assistant-live {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.assistant-live > strong {
  display: block;
  margin-bottom: 10px;
}

.attendance-list,
.handout-list {
  display: grid;
  gap: 8px;
}

.attendance-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.attendance-list em {
  color: var(--gold);
  font-style: normal;
}

.member-progress-panel {
  padding: 18px;
}

.member-progress-copy {
  margin: 12px 0 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.tier-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.tier-path > div {
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--bg-inset);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tier-path-card.is-tier-bronze {
  border-color: rgba(196, 115, 46, 0.58);
  background:
    linear-gradient(145deg, rgba(196, 115, 46, 0.18), rgba(10, 11, 14, 0.86)),
    var(--bg-inset);
  box-shadow: inset 0 0 0 1px rgba(196, 115, 46, 0.16);
}

.tier-path-card.is-tier-silver {
  border-color: rgba(211, 218, 228, 0.58);
  background:
    linear-gradient(145deg, rgba(211, 218, 228, 0.18), rgba(10, 11, 14, 0.86)),
    var(--bg-inset);
  box-shadow: inset 0 0 0 1px rgba(211, 218, 228, 0.14);
}

.tier-path-card.is-tier-gold {
  border-color: rgba(242, 184, 74, 0.64);
  background:
    linear-gradient(145deg, rgba(242, 184, 74, 0.2), rgba(10, 11, 14, 0.86)),
    var(--bg-inset);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 74, 0.16);
}

.tier-path-card.is-tier-black,
.tier-path-card.is-tier-executive {
  border-color: rgba(242, 184, 74, 0.72);
  background:
    linear-gradient(145deg, rgba(242, 184, 74, 0.18), rgba(17, 16, 14, 0.9) 48%, rgba(7, 7, 8, 0.9)),
    var(--bg-inset);
  box-shadow:
    inset 0 0 0 1px rgba(242, 184, 74, 0.18),
    0 0 22px rgba(242, 184, 74, 0.08);
}

.tier-path img {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.tier-path span {
  position: relative;
  z-index: 2;
  color: var(--text-low);
  font-size: 12px;
}

.tier-path strong {
  position: relative;
  z-index: 2;
  color: var(--text-hi);
  font-size: 11.5px;
  line-height: 1.2;
  text-shadow: none;
}

.tier-path-card.is-tier-bronze strong {
  background: linear-gradient(180deg, #ffd2a0 0%, #c57b36 45%, #753c16 88%);
  -webkit-background-clip: text;
  background-clip: text;
}

.tier-path-card.is-tier-silver strong {
  background: linear-gradient(180deg, #ffffff 0%, #dbe2ea 42%, #7f8995 84%);
  -webkit-background-clip: text;
  background-clip: text;
}

.tier-path-card.is-tier-gold strong {
  background: linear-gradient(180deg, #fff3bd 0%, #e5bd5a 42%, #936018 86%);
  -webkit-background-clip: text;
  background-clip: text;
}

.tier-path-card.is-tier-black strong,
.tier-path-card.is-tier-executive strong {
  background: linear-gradient(180deg, #ffe9a2 0%, #d6a243 34%, #f1cf73 58%, #7b5019 92%);
  -webkit-background-clip: text;
  background-clip: text;
}

.tier-path i {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.76), transparent);
}

html[data-theme="light"] .tier-path > div {
  border-color: rgba(156, 113, 48, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(236, 237, 235, 0.76)),
    var(--bg-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 14px rgba(34, 38, 43, 0.06);
}

html[data-theme="light"] .tier-path-card.is-tier-bronze {
  background:
    linear-gradient(145deg, rgba(255, 238, 219, 0.96), rgba(220, 164, 108, 0.2)),
    var(--bg-panel);
}

html[data-theme="light"] .tier-path-card.is-tier-silver {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(193, 202, 214, 0.22)),
    var(--bg-panel);
}

html[data-theme="light"] .tier-path-card.is-tier-gold,
html[data-theme="light"] .tier-path-card.is-tier-black,
html[data-theme="light"] .tier-path-card.is-tier-executive {
  background:
    linear-gradient(145deg, rgba(255, 250, 236, 0.98), rgba(211, 169, 84, 0.14)),
    var(--bg-panel);
}

html[data-theme="light"] .tier-path-card.is-tier-bronze strong,
html[data-theme="light"] .tier-path-card.is-tier-silver strong,
html[data-theme="light"] .tier-path-card.is-tier-gold strong,
html[data-theme="light"] .tier-path-card.is-tier-black strong,
html[data-theme="light"] .tier-path-card.is-tier-executive strong {
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

html[data-theme="light"] .tier-path-card.is-tier-bronze strong {
  color: #8b4d1c !important;
}

html[data-theme="light"] .tier-path-card.is-tier-silver strong {
  color: #4d5662 !important;
}

html[data-theme="light"] .tier-path-card.is-tier-gold strong {
  color: #7c5317 !important;
}

html[data-theme="light"] .tier-path-card.is-tier-black strong,
html[data-theme="light"] .tier-path-card.is-tier-executive strong {
  color: #6a4615 !important;
}

.upgrade-eta {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  background: linear-gradient(135deg, var(--gold-soft), color-mix(in srgb, var(--bg-inset) 82%, transparent));
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.6;
  text-shadow: none;
  -webkit-text-fill-color: currentColor;
}

.progress-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.progress-stack > div {
  display: grid;
  gap: 7px;
}

.progress-stack span {
  color: var(--text-low);
  font-size: 12px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge-row span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: var(--r-sm);
  color: var(--gold);
  background: var(--gold-soft);
}

.journal-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

.journal-form,
.journal-list-panel,
.journal-health-panel {
  padding: 18px;
}

.journal-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-mid);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  background: var(--bg-inset);
  outline: none;
}

input,
select {
  min-height: 38px;
  padding: 0 10px;
}

textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 193, 7, 0.72);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(200, 154, 70, 0.12);
}

input[type="range"] {
  padding: 0;
}

.journal-list {
  margin-top: 12px;
}

.journal-reason,
.position-preview {
  grid-column: 1 / -1;
}

.position-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.24);
  border-radius: var(--r-md);
  background: var(--gold-soft);
}

.position-preview span {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--text-low);
  font-size: 12px;
}

.position-preview b {
  color: var(--text-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-entry {
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr) auto;
}

.journal-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.journal-main small {
  color: var(--text-low);
  line-height: 1.5;
}

.journal-note {
  color: var(--text-mid);
  line-height: 1.55;
}

.journal-note-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.journal-method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journal-method-tags i {
  padding: 5px 8px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: var(--r-pill);
  color: var(--gold);
  background: var(--gold-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.journal-entry b small {
  display: block;
  margin-top: 4px;
  color: currentColor;
  font-size: 11px;
  opacity: 0.82;
  text-align: right;
}

.journal-health-panel {
  grid-column: 1 / -1;
}

.journal-health-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.journal-health-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  filter: grayscale(0.35);
}

.health-score {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.26);
  border-radius: var(--r-md);
  background: var(--gold-soft);
}

.journal-desk-card {
  border-color: rgba(255, 193, 7, 0.36) !important;
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.08), transparent 44%),
    var(--bg-inset) !important;
}

.health-score strong {
  color: var(--gold);
  font-size: 46px;
  line-height: 0.9;
}

.health-score span {
  color: var(--text-mid);
  line-height: 1.55;
}

.health-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.health-grid article {
  display: grid;
  grid-template-columns: 140px 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.health-grid article:last-child {
  border-bottom: 0;
}

.health-grid span {
  color: var(--text-low);
  font-size: 12px;
}

.health-grid strong {
  display: block;
  margin: 0;
  font-size: 18px;
}

.health-grid p {
  margin: 0;
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.55;
}

.profile-card {
  text-align: center;
}

.profile-avatar {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  perspective: 920px;
}

.profile-badge-motion::after {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 112px;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 72%);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

html[data-theme="light"] .profile-badge-motion::after {
  width: 94px;
  height: 15px;
  opacity: 0.45;
  background: radial-gradient(ellipse at center, rgba(31, 34, 38, 0.16) 0%, rgba(31, 34, 38, 0) 76%);
}

.profile-badge-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  transform-style: preserve-3d;
  transform: rotateY(-10deg) rotateX(2deg);
  animation: profileBadgeIntro 1.25s cubic-bezier(0.62, 0.02, 0.25, 1) 0.25s both;
  will-change: transform;
}

.profile-badge-motion:hover .profile-badge-rotor {
  animation: profileBadgeTurn 1.25s cubic-bezier(0.62, 0.02, 0.25, 1) both;
}

.profile-badge-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 15px 28px rgba(0, 0, 0, 0.48));
}

.profile-badge-front {
  transform: translateZ(8px);
}

.profile-badge-back {
  transform: rotateY(180deg) translateZ(8px);
}

.profile-badge-rotor::before {
  display: none;
  content: none;
}

/* v125 PDF design board adoption */
.brand {
  min-width: 282px;
}

.brand strong {
  font-family: var(--font-brand);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 0.92;
  background:
    linear-gradient(180deg, #ffffff 0%, #eef3f7 22%, #9faab6 45%, #f7fafc 58%, #6f7782 78%, #dce3ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0.18px rgba(255, 255, 255, 0.22);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.42);
  transform: scaleX(1.03);
}

.brand small {
  margin-top: 3px;
  padding-left: 2px;
  font-family: var(--font-brand);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.58em;
  line-height: 1;
  background:
    linear-gradient(180deg, #fff5c7 0%, #e4c06a 34%, #9c6f24 66%, #f0d58b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 1px 0 rgba(255, 239, 182, 0.16),
    0 5px 11px rgba(0, 0, 0, 0.34);
  transform: scaleX(1.02);
}

html[data-theme="light"] .brand strong {
  background:
    linear-gradient(180deg, #1b2026 0%, #020304 42%, #343b43 62%, #070a0e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke-color: rgba(0, 0, 0, 0.08);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.38),
    0 6px 12px rgba(24, 27, 31, 0.1);
}

html[data-theme="light"] .brand small {
  background:
    linear-gradient(180deg, #9a6b1c 0%, #362208 42%, #15100a 68%, #7d5518 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: contrast(1.16) saturate(1.08);
}

.nav-member-badge {
  width: 74px;
  height: 74px;
}

.nav-member-badge::before {
  content: none;
}

.nav-member-badge::after {
  position: absolute;
  inset: 12px 7px 8px;
  z-index: 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(237, 194, 96, 0.18) 0%, rgba(80, 52, 16, 0.1) 46%, transparent 74%);
  content: "";
  filter: blur(0.2px);
  pointer-events: none;
}

.nav-member-badge img {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  background: transparent;
  border: 0;
  filter:
    drop-shadow(0 1px 0 rgba(255, 235, 170, 0.2))
    drop-shadow(0 9px 18px rgba(0, 0, 0, 0.48));
}

html[data-theme="light"] .nav-member-badge img {
  mix-blend-mode: normal;
  background: transparent;
  filter:
    contrast(1.08)
    saturate(1.1)
    brightness(1.04)
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 8px 14px rgba(28, 31, 36, 0.18))
    drop-shadow(0 0 9px rgba(203, 149, 49, 0.18));
}

html[data-theme="light"] .nav-member-badge::after {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.92) 0%, rgba(229, 219, 195, 0.54) 42%, rgba(180, 136, 48, 0.12) 63%, transparent 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 7px 18px rgba(35, 38, 43, 0.08);
}

#memberStatusLabel {
  min-width: 50px;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 4px;
  font-family: var(--font-brand);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ead08a !important;
  border-color: rgba(230, 193, 106, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 239, 183, 0.14), rgba(255, 239, 183, 0.035) 42%, rgba(0, 0, 0, 0.3)),
    linear-gradient(180deg, #1a1814 0%, #0b0c0e 56%, #302514 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 160, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.66),
    0 1px 0 rgba(255, 235, 180, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.76);
}

body[data-member-tier="bronze"] #memberStatusLabel {
  color: #ffd3a3 !important;
  border-color: rgba(195, 111, 48, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 215, 174, 0.17), rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, #8b4f24 0%, #1a0f09 56%, #b56c2c 100%);
}

body[data-member-tier="silver"] #memberStatusLabel {
  color: #f5f9fc !important;
  border-color: rgba(221, 230, 240, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.26)),
    linear-gradient(180deg, #88939f 0%, #1d2229 56%, #c6ced7 100%);
}

body[data-member-tier="gold"] #memberStatusLabel {
  color: #ffe4a2 !important;
  border-color: rgba(226, 181, 80, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 236, 171, 0.2), rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, #c09232 0%, #2a1e0b 56%, #f1c96a 100%);
}

body[data-member-tier="black"] #memberStatusLabel,
body[data-member-tier="executive"] #memberStatusLabel {
  color: #f0d58a !important;
  border-color: rgba(226, 181, 91, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 231, 151, 0.16), rgba(255, 231, 151, 0.04) 42%, rgba(0, 0, 0, 0.24)),
    linear-gradient(180deg, #40341b 0%, #171817 54%, #7b632f 100%);
}

html[data-theme="light"] #memberStatusLabel,
html[data-theme="light"] body[data-member-tier="black"] #memberStatusLabel,
html[data-theme="light"] body[data-member-tier="executive"] #memberStatusLabel {
  color: #efe2ad !important;
  border-color: rgba(112, 83, 29, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 231, 151, 0.16), rgba(0, 0, 0, 0.16)),
    linear-gradient(180deg, #5b4a23 0%, #25241f 55%, #8d7134 100%);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.58);
}

.heatmap-pane .chart-action-strip {
  padding: 8px;
  gap: 7px;
  border-color: #2a2e36;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.004)),
    #0c0d10;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip {
  border-color: #20242b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.006)),
    #0c0d10;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(24, 27, 31, 0.08);
}

.heatmap-pane .segmented-control.compact,
.heatmap-pane .heatmap-palette,
.heatmap-pane .zoom-controls {
  border: 1px solid #20242b;
  border-radius: 6px;
  background: #11141a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
}

.heatmap-pane .segmented-control.compact button,
.heatmap-pane .chart-action-strip .button,
.heatmap-pane .micro-controls label,
.heatmap-pane .zoom-controls button {
  min-height: 30px;
  border-radius: 5px;
  color: #d8b363;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-weight: 850;
}

.heatmap-pane .segmented-control.compact button:hover,
.heatmap-pane .chart-action-strip .button:hover,
.heatmap-pane .zoom-controls button:hover {
  color: #f0d58a;
  border-color: rgba(230, 193, 106, 0.22);
  background: rgba(230, 193, 106, 0.07);
}

.heatmap-pane .segmented-control.compact button.is-active,
.heatmap-pane .chart-action-strip .button.is-active,
.heatmap-pane .chart-action-strip .button.primary {
  color: #0d0c09;
  border-color: rgba(235, 208, 148, 0.55);
  background:
    linear-gradient(180deg, #fff0b4 0%, #d5a84d 42%, #9a6c21 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(65, 41, 0, 0.32),
    0 0 0 1px rgba(230, 193, 106, 0.14);
}

.heatmap-pane .heatmap-action-strip {
  margin-top: -4px;
}

.heatmap-pane .micro-controls label {
  padding: 0 9px;
  border-color: #20242b;
  background: #11141a;
}

html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label {
  color: #d8b363;
  border-color: #20242b;
  background: #11141a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
}

.heatmap-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls select {
  color: #e4bd68;
}

.heatmap-pane .heatmap-zone-count {
  color: #9aa0a8;
  opacity: 0.92;
}

.heatmap-pane .compact-flow-console {
  gap: 8px;
}

.heatmap-pane .compact-flow-console article,
html[data-theme="light"] .heatmap-pane .compact-flow-console article {
  min-height: 74px;
  border-color: #242932;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
    #101216;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.heatmap-pane .compact-flow-console span,
html[data-theme="light"] .heatmap-pane .compact-flow-console span {
  color: #c9a766;
  font-size: 11px;
  font-weight: 850;
}

.heatmap-pane .compact-flow-console strong,
html[data-theme="light"] .heatmap-pane .compact-flow-console strong {
  color: #f2f1e8;
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 900;
  text-shadow: none;
}

.heatmap-pane .compact-flow-console em,
html[data-theme="light"] .heatmap-pane .compact-flow-console em {
  color: #7f8791;
  font-size: 11px;
  font-weight: 650;
}

.heatmap-pane .heatmap-palette {
  padding: 4px 5px;
}

.heatmap-pane .heatmap-palette button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  border-radius: 4px;
  border-color: rgba(255, 255, 255, 0.2);
}

.heatmap-pane .heatmap-palette button.is-active {
  border-color: rgba(240, 213, 138, 0.95);
  box-shadow:
    0 0 0 1px rgba(230, 193, 106, 0.32),
    0 0 10px rgba(230, 193, 106, 0.22),
    inset 0 0 0 1px rgba(0, 0, 0, 0.32);
}

.terminal-view .price-pane .chart-action-strip,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip {
  padding: 8px;
  gap: 7px;
  border: 1px solid #242932;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.006)),
    #0b0d11;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.terminal-view .price-pane .segmented-control.compact,
.terminal-view .price-pane .indicator-picker,
.terminal-view .price-pane .heatmap-palette,
.terminal-view .price-pane .zoom-controls,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker,
html[data-theme="light"] .terminal-view .price-pane .heatmap-palette,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls {
  border: 1px solid #20242b;
  border-radius: 6px;
  background: #11141a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.46);
}

.terminal-view .price-pane .segmented-control.compact button,
.terminal-view .price-pane .chart-action-strip .button,
.terminal-view .price-pane .micro-controls label,
.terminal-view .price-pane .indicator-picker label,
.terminal-view .price-pane .zoom-controls button,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button {
  min-height: 30px;
  border-radius: 5px;
  color: #d8b363;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-weight: 850;
  text-shadow: none;
}

.terminal-view .price-pane .segmented-control.compact button:hover,
.terminal-view .price-pane .chart-action-strip .button:hover,
.terminal-view .price-pane .indicator-picker label:hover,
.terminal-view .price-pane .zoom-controls button:hover,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:hover,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button:hover {
  color: #f0d58a;
  border-color: rgba(230, 193, 106, 0.24);
  background: rgba(230, 193, 106, 0.075);
}

.terminal-view .price-pane .segmented-control.compact button.is-active,
.terminal-view .price-pane .chart-action-strip .button.is-active,
.terminal-view .price-pane .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary {
  color: #0d0c09;
  border-color: rgba(235, 208, 148, 0.58);
  background:
    linear-gradient(180deg, #fff0b4 0%, #d5a84d 42%, #9a6c21 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(65, 41, 0, 0.34),
    0 0 0 1px rgba(230, 193, 106, 0.14);
}

.terminal-view .price-pane .micro-controls select,
html[data-theme="light"] .terminal-view .price-pane .micro-controls select {
  color: #e4bd68;
  background: transparent;
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls label {
  color: #20252c;
  border-color: rgba(111, 119, 130, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(236, 238, 241, 0.9) 48%, rgba(218, 223, 229, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(86, 94, 105, 0.16),
    0 7px 16px rgba(27, 32, 38, 0.07);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select {
  color: #11161d;
  border: 1px solid rgba(112, 121, 132, 0.28);
  border-radius: 4px;
  background:
    linear-gradient(180deg, #ffffff 0%, #eef1f4 48%, #dfe4e9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(96, 103, 112, 0.13);
  font-weight: 900;
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select:focus {
  border-color: rgba(173, 129, 42, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(96, 103, 112, 0.13),
    0 0 0 2px rgba(212, 160, 74, 0.16);
}

html[data-theme="light"] .terminal-view .price-pane .chart-action-strip,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip {
  border-color: rgba(160, 166, 173, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(234, 237, 240, 0.82) 52%, rgba(221, 225, 230, 0.88)),
    #eef0f2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(124, 132, 143, 0.16),
    0 10px 22px rgba(41, 48, 56, 0.08);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker,
html[data-theme="light"] .terminal-view .price-pane .heatmap-palette,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact,
html[data-theme="light"] .terminal-view .heatmap-pane .heatmap-palette,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls {
  border-color: rgba(151, 158, 168, 0.58);
  background:
    linear-gradient(180deg, #f9fafb 0%, #e7ebef 56%, #d9dfe5 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(98, 108, 120, 0.18),
    0 5px 12px rgba(37, 43, 51, 0.07);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button {
  color: #1d232b;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:hover,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button:hover {
  color: #0f141b;
  border-color: rgba(113, 122, 134, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(214, 220, 226, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(83, 92, 104, 0.12);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #070a0e;
  border-color: rgba(114, 123, 136, 0.42);
  background:
    linear-gradient(180deg, #ffffff 0%, #eef2f6 32%, #cfd7df 68%, #f8fafc 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(79, 88, 100, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.62),
    0 8px 16px rgba(31, 38, 46, 0.08);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label {
  border-color: rgba(143, 151, 162, 0.5);
  background:
    linear-gradient(180deg, #ffffff 0%, #eef1f4 42%, #dce2e8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(91, 100, 113, 0.14),
    0 6px 13px rgba(34, 41, 49, 0.065);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls select {
  color: #10151c;
  border-color: rgba(126, 135, 147, 0.36);
  background:
    linear-gradient(180deg, #ffffff 0%, #f1f4f7 44%, #d9e0e7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(90, 99, 112, 0.14);
}

html[data-theme="light"] .terminal-view .micro-controls input[type="range"]::-webkit-slider-runnable-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(193, 201, 211, 0.72)),
    #d7dde4;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    inset 0 -1px 1px rgba(71, 82, 96, 0.18);
}

html[data-theme="light"] .terminal-view .micro-controls input[type="range"]::-webkit-slider-thumb {
  border-color: rgba(101, 110, 123, 0.42);
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 13%, #f1f4f8 26%, #c9d1da 58%, #87919d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 8px rgba(43, 51, 60, 0.18);
}

html[data-theme="light"] .terminal-view .micro-controls input[type="range"]::-moz-range-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(193, 201, 211, 0.72)),
    #d7dde4;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    inset 0 -1px 1px rgba(71, 82, 96, 0.18);
}

html[data-theme="light"] .terminal-view .micro-controls input[type="range"]::-moz-range-thumb {
  border-color: rgba(101, 110, 123, 0.42);
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 13%, #f1f4f8 26%, #c9d1da 58%, #87919d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 8px rgba(43, 51, 60, 0.18);
}

html[data-theme="light"] .terminal-view {
  --terminal-silver-top: #fdfdfe;
  --terminal-silver-mid: #f1f2f5;
  --terminal-silver-low: #e4e7eb;
  --terminal-silver-edge: #c9ccd3;
  --terminal-silver-bottom: #b8bcc4;
  --terminal-silver-text: #2a2d33;
  --terminal-silver-muted: #4f5965;
  --terminal-silver-gold: #806023;
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button {
  border: 1px solid var(--terminal-silver-edge);
  color: var(--terminal-silver-text);
  background:
    linear-gradient(180deg, var(--terminal-silver-top) 0%, var(--terminal-silver-mid) 46%, var(--terminal-silver-low) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(184, 188, 196, 0.58),
    0 1px 2px rgba(20, 22, 26, 0.09);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:hover,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button:hover {
  border-color: rgba(112, 121, 134, 0.62);
  color: #070b10;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8fa 34%, #d8e0e7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(74, 84, 98, 0.2),
    0 1px 2px rgba(20, 22, 26, 0.11);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button:active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button:active,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:active,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button:active,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button:active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button:active,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button:active {
  background:
    linear-gradient(180deg, #c8d1da 0%, #edf1f4 46%, #ffffff 100%);
  box-shadow:
    inset 0 2px 4px rgba(54, 64, 76, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #070b10;
  border-color: rgba(128, 96, 35, 0.42);
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f6f8 34%, #cfd8e0 70%, #f9fafb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(78, 88, 101, 0.2),
    0 0 0 1px rgba(171, 132, 55, 0.18),
    0 1px 2px rgba(20, 22, 26, 0.1);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active::after,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active::after,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active::after,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active::after,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary::after,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(142, 103, 34, 0.62), transparent);
  pointer-events: none;
}

html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button {
  position: relative;
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label {
  color: var(--terminal-silver-muted);
  border-color: var(--terminal-silver-edge);
  background:
    linear-gradient(180deg, #ffffff 0%, #f0f3f6 42%, #d9e0e6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(73, 83, 96, 0.16),
    0 6px 13px rgba(34, 41, 49, 0.07);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls .num,
html[data-theme="light"] .terminal-view .heatmap-pane .heatmap-zone-count {
  color: var(--terminal-silver-text);
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console article {
  min-height: 78px;
  border-color: rgba(140, 149, 160, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(239, 243, 246, 0.9) 42%, rgba(216, 223, 230, 0.86) 100%),
    #edf0f3;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(83, 93, 106, 0.14),
    0 8px 16px rgba(37, 44, 52, 0.07);
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console span {
  color: #515b66;
  font-size: 11px;
  font-weight: 860;
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console strong {
  color: #10151c;
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 940;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console strong.warn {
  color: #71511b;
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console strong.long {
  color: #14533f;
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console em {
  color: #68727e;
  font-size: 11px;
  font-weight: 700;
}

.terminal-view .price-pane .indicator-picker input {
  accent-color: #d8a94d;
}

.major-flow-card .major-momentum-meter i {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

@keyframes profileBadgeIntro {
  0% {
    transform: rotateY(-28deg) rotateX(2deg);
  }

  100% {
    transform: rotateY(-10deg) rotateX(2deg);
  }
}

@keyframes profileBadgeTurn {
  0% {
    transform: rotateY(-10deg) rotateX(2deg);
  }

  50% {
    transform: rotateY(190deg) rotateX(-2deg);
  }

  100% {
    transform: rotateY(350deg) rotateX(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-badge-rotor {
    animation: none;
    transform: rotateY(-12deg) rotateX(2deg);
  }
}

.profile-card p {
  color: var(--text-mid);
}

.profile-account-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  text-align: left;
}

.profile-account-meta span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-low);
  background: var(--bg-inset);
  font-size: 12px;
}

.profile-account-meta b {
  min-width: 0;
  overflow: hidden;
  color: var(--text-hi);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions {
  display: grid;
  gap: 8px;
}

.settings-panel,
.authorization-panel,
.admin-panel {
  display: grid;
  gap: 14px;
}

.auth-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-list span {
  grid-template-columns: 1fr;
  color: var(--text-mid);
}

.handout-admin {
  grid-column: 1 / -1;
}

.handout-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 14px;
}

.handout-admin-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.handout-admin-form h3 {
  margin: 0;
  font-size: 15px;
}

.quiz-admin-form {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quiz-admin-form h3,
.quiz-admin-form label:nth-of-type(2),
.quiz-admin-form label:nth-of-type(3),
.quiz-admin-form button {
  grid-column: 1 / -1;
}

.handout-list article {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.handout-list strong {
  color: var(--gold);
}

.handout-list span {
  display: grid;
  gap: 3px;
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.45;
}

.handout-list span b {
  color: var(--text-high);
}

.handout-list span em {
  color: var(--text-low);
  font-style: normal;
}

.handout-list span i {
  color: var(--gold);
  font-style: normal;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 24px;
  border-top: 1px solid var(--line);
  color: var(--text-low);
  font-size: 12px;
}

.footer p {
  max-width: 860px;
  margin: 0;
  line-height: 1.7;
}

.footer div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer a:hover {
  color: var(--gold);
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
}

.tour-overlay.is-open {
  display: flex;
}

.tour-card {
  width: min(720px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  box-shadow: var(--shadow-card);
}

.tour-card h2 {
  margin-bottom: 10px;
}

.tour-card p:not(.eyebrow) {
  color: var(--text-mid);
  line-height: 1.8;
}

.tour-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
  margin: 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #08090b;
  background-size: 42px 42px;
}

.tour-visual::before,
.tour-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: var(--r-sm);
}

.tour-visual::before {
  background: rgba(255, 193, 7, 0.08);
}

.tour-visual::after {
  inset: auto 22px 22px;
  height: 7px;
  background: linear-gradient(90deg, var(--gold) 0 62%, rgba(255, 255, 255, 0.12) 62%);
}

.tour-visual[data-tour-visual="dashboard"]::before {
  background:
    linear-gradient(90deg, rgba(255, 193, 7, 0.9) 0 26%, transparent 26% 31%, rgba(31, 203, 134, 0.7) 31% 58%, transparent 58% 63%, rgba(77, 163, 255, 0.68) 63% 100%);
  clip-path: polygon(0 62%, 26% 38%, 31% 52%, 58% 28%, 63% 44%, 100% 18%, 100% 100%, 0 100%);
}

.tour-visual[data-tour-visual="screener"]::before {
  background:
    linear-gradient(90deg, rgba(255, 193, 7, 0.18), transparent),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, rgba(255, 193, 7, 0.75) 0 18%, rgba(31, 203, 134, 0.65) 18% 48%, rgba(255, 77, 94, 0.62) 48% 100%);
}

.tour-visual[data-tour-visual="news"]::before {
  background:
    linear-gradient(90deg, rgba(255, 77, 94, 0.72) 0 22%, transparent 22% 28%, rgba(255, 193, 7, 0.72) 28% 56%, transparent 56% 62%, rgba(31, 203, 134, 0.62) 62% 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0 8px, transparent 8px 20px);
}

.tour-visual[data-tour-visual="terminal"]::before {
  background:
    radial-gradient(circle at 24% 34%, rgba(255, 193, 7, 0.9), transparent 10%),
    radial-gradient(circle at 58% 58%, rgba(31, 203, 134, 0.78), transparent 12%),
    repeating-linear-gradient(90deg, rgba(255, 77, 94, 0.22) 0 12px, rgba(31, 203, 134, 0.2) 12px 24px),
    linear-gradient(180deg, rgba(77, 163, 255, 0.12), transparent);
}

.tour-visual[data-tour-visual="academy"]::before {
  background:
    linear-gradient(90deg, rgba(255, 193, 7, 0.8) 0 30%, transparent 30% 36%, rgba(255, 255, 255, 0.12) 36% 100%),
    repeating-linear-gradient(180deg, transparent 0 20px, rgba(255, 255, 255, 0.13) 20px 24px);
}

.tour-visual[data-tour-visual="journal"]::before {
  background:
    linear-gradient(90deg, rgba(31, 203, 134, 0.72) 0 34%, rgba(255, 77, 94, 0.72) 34% 52%, rgba(77, 163, 255, 0.56) 52% 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0 10px, transparent 10px 22px);
}

.tour-visual[data-tour-visual="profile"]::before {
  background:
    radial-gradient(circle at 20% 45%, rgba(255, 193, 7, 0.92), transparent 14%),
    linear-gradient(90deg, transparent 0 34%, rgba(255, 255, 255, 0.12) 34% 100%),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(255, 193, 7, 0.22) 18px 24px);
}

.tour-points {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tour-points li {
  position: relative;
  padding-left: 18px;
  color: var(--text-mid);
  line-height: 1.6;
}

.tour-points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.32);
  border-radius: var(--r-md);
  background: rgba(19, 21, 25, 0.96);
  box-shadow: var(--shadow-card);
  color: #f6f1e7;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.toast span {
  color: rgba(230, 224, 212, 0.82);
  font-size: 13px;
}

html[data-theme="light"] .toast {
  border-color: rgba(168, 126, 40, 0.34);
  background: rgba(250, 250, 248, 0.96);
  color: #1e232b;
  box-shadow:
    0 18px 40px rgba(34, 37, 43, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .toast span {
  color: #59616d;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.strategy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease;
}

.strategy-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.strategy-modal-card {
  width: min(920px, 100%);
  max-height: min(760px, 90vh);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: rgba(19, 21, 25, 0.98);
  box-shadow: var(--shadow-card);
}

.tv-indicator-card {
  width: min(560px, 100%);
}

.account-card {
  width: min(620px, 100%);
}

.account-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.account-intro {
  margin: 0;
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.7;
}

.account-policy {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--r-sm);
  background: var(--gold-soft);
}

.account-policy span {
  color: var(--text-mid);
  font-size: 12px;
  line-height: 1.5;
}

.tv-indicator-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tv-indicator-form p {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.quiz-modal-card {
  width: min(880px, 100%);
}

.xstock-earnings-card {
  width: min(760px, 100%);
}

.xstock-earnings-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.xstock-earnings-summary,
.xstock-earnings-note,
.xstock-earnings-news {
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.22);
  border-radius: var(--r-md);
  background: var(--gold-soft);
}

.xstock-earnings-summary {
  display: grid;
  gap: 8px;
}

.xstock-earnings-summary .grade-badge {
  justify-self: start;
}

.xstock-earnings-summary strong,
.xstock-earnings-note b,
.xstock-earnings-news > b {
  color: var(--text-hi);
}

.xstock-earnings-summary p,
.xstock-earnings-note p,
.xstock-earnings-news p {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.7;
}

.xstock-earnings-news {
  display: grid;
  gap: 10px;
}

.xstock-earnings-news article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.035);
}

.xstock-earnings-news h3 {
  margin: 0;
  color: var(--text-hi);
  font-size: 14px;
}

.xstock-earnings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.xstock-earnings-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.xstock-earnings-grid span,
.xstock-earnings-grid strong {
  display: block;
}

.xstock-earnings-grid span {
  color: var(--text-low);
  font-size: 12px;
}

.xstock-earnings-grid strong {
  margin-top: 6px;
  color: var(--text-hi);
  line-height: 1.45;
}

.quiz-progress-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.24);
  border-radius: var(--r-md);
  background: var(--gold-soft);
}

.quiz-ring {
  --quiz-progress: 0;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #15171c 0 55%, transparent 56%),
    conic-gradient(var(--gold) calc(var(--quiz-progress) * 1%), rgba(255, 255, 255, 0.13) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.12), 0 0 24px rgba(255, 193, 7, 0.12);
}

.quiz-ring strong {
  color: var(--text-hi);
  font-size: 22px;
}

.quiz-progress-wrap span {
  color: var(--gold);
  font-weight: 900;
}

.quiz-progress-wrap p {
  margin: 6px 0 0;
  color: var(--text-mid);
}

.quiz-question-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.quiz-question-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.quiz-question-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.quiz-question-head span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 900;
}

.quiz-question-card img {
  width: min(360px, 100%);
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #0b0d10;
}

.quiz-image-name {
  color: var(--gold);
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quiz-options label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
}

.quiz-options input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--gold);
}

.quiz-options label.is-correct {
  border-color: rgba(255, 193, 7, 0.5);
  color: var(--gold);
  background: rgba(255, 193, 7, 0.1);
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.strategy-report {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.strategy-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  border-radius: var(--r-md);
  background: var(--gold-soft);
}

.strategy-report h3 {
  margin: 0;
  color: var(--gold);
  font-size: 15px;
}

.strategy-report-grid,
.strategy-paths {
  display: grid;
  gap: 10px;
}

.strategy-report-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.strategy-report-grid article,
.strategy-paths article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}

.strategy-report-grid span,
.strategy-report-grid small,
.strategy-paths span,
.strategy-risk {
  color: var(--text-mid);
  line-height: 1.6;
}

.strategy-paths {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-risk {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 176, 32, 0.32);
  border-radius: var(--r-sm);
  background: rgba(255, 176, 32, 0.08);
}

.is-hidden {
  display: none !important;
}

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

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .nav-member-badge {
    grid-column: 1 / -1;
  }

  .top-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .dashboard-grid,
  .terminal-grid,
  .academy-command-grid,
  .screener-layout,
  .screener-layout.is-xstocks,
  .journal-layout {
    grid-template-columns: 1fr;
  }

  .xstock-insight-panel {
    position: static;
  }

  .major-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-console {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footprint-readout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .terminal-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-side .mini-tabs {
    grid-column: 1 / -1;
  }

  .screener-weight-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .health-grid article {
    grid-template-columns: 120px 100px minmax(0, 1fr);
  }

  .strategy-report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .class-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .class-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  main {
    padding: 14px 12px 26px;
  }

  .topbar {
    padding: 8px 12px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 17px;
    letter-spacing: 0.1em;
    transform: none;
  }

  .brand small {
    letter-spacing: 0.22em;
    transform: scaleX(1.04);
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .top-actions {
    gap: 6px;
  }

  .screener-weight-head,
  .screener-weight-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .screener-weight-actions span {
    text-align: left;
  }

  .screener-weight-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-pill,
  .uid-pill {
    display: none;
  }

  .nav-member-badge,
  .nav-member-badge img {
    width: 54px;
    height: 54px;
  }

  .dashboard-hero,
  .academy-entry-grid,
  .academy-grid,
  .profile-grid,
  .admin-grid,
  .handout-library,
  .academy-handout-list,
  .handout-admin-layout,
  .quiz-admin-form,
  .quiz-options,
  .indicator-grid,
  .terminal-side,
  .major-flow-cards,
  .xstock-earnings-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 18px;
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .section-title-row,
  .section-head,
  .chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-control-row,
  .heatmap-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    max-width: 100%;
    overflow-x: auto;
  }

  .engine-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .health-grid article {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .flow-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footprint-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-report-grid,
  .strategy-paths {
    grid-template-columns: 1fr;
  }

  .price-pane canvas {
    height: 360px;
  }

  .secondary-chart canvas {
    height: 360px;
  }

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

  .class-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .access-lock {
    inset: 10px;
  }

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

  .footer div {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
  }

  .icon-button {
    width: 34px;
  }

  .hero-actions,
  .chart-action-strip {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .chart-action-strip .button {
    width: auto;
  }

  .quick-stats,
  .metrics-grid,
  .resonance-matrix,
  .position-preview,
  .strategy-signal,
  .quiz-progress-wrap,
  .flow-console,
  .footprint-readout,
  .tier-path,
  .major-flow-grid {
    grid-template-columns: 1fr;
  }

  .tier-path i {
    height: 20px;
    width: 2px;
    justify-self: center;
    background: linear-gradient(180deg, transparent, rgba(255, 193, 7, 0.76), transparent);
  }

  .major-flow-head {
    align-items: flex-start;
  }

  .major-momentum-meter {
    min-width: 104px;
    min-height: 24px;
    gap: 4px;
  }

  .major-momentum-meter i {
    width: 7px;
    min-height: 23px;
  }

  .macro-list article,
  .journal-entry,
  .tape-row,
  .book-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

	  .journal-entry {
	    grid-template-columns: 1fr;
	  }

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

  .journal-entry b small {
    text-align: left;
  }

  .macro-list em {
    grid-column: 1 / -1;
  }

  .price-pane canvas {
    height: 310px;
  }
}

/* v172 Claude Design terminal polish */
html[data-theme="light"] .nav-member-badge::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.nav-member-badge,
.profile-avatar,
.profile-badge-rotor,
.profile-badge-face {
  background: transparent !important;
}

.nav-member-badge img,
html[data-theme="light"] .nav-member-badge img {
  border: 0 !important;
  background: transparent !important;
  mix-blend-mode: normal !important;
}

html[data-theme="light"] .nav-member-badge img {
  filter:
    contrast(1.08)
    saturate(1.04)
    brightness(1.02)
    drop-shadow(0 10px 16px rgba(24, 27, 31, 0.18)) !important;
}

html[data-theme="light"] #profileTierBadge,
html[data-theme="light"] #profileTierBadgeBack,
html[data-theme="light"] .tier-path img {
  background: transparent !important;
  mix-blend-mode: normal !important;
}

.terminal-view {
  --terminal-control-bg: linear-gradient(180deg, #24272d 0%, #181b20 48%, #111318 100%);
  --terminal-control-bg-hover: linear-gradient(180deg, #2c3037 0%, #1d2026 50%, #15171c 100%);
  --terminal-control-border: rgba(255, 255, 255, 0.1);
  --terminal-control-border-strong: rgba(216, 169, 77, 0.35);
  --terminal-control-text: #d8b363;
  --terminal-control-text-strong: #f0d58a;
  --terminal-control-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), inset 0 -1px 0 rgba(0, 0, 0, 0.56), 0 1px 2px rgba(0, 0, 0, 0.24);
  --terminal-control-active-bg: linear-gradient(180deg, #f6dea1 0%, #c99744 48%, #8b6425 100%);
  --terminal-control-active-text: #11100d;
}

html[data-theme="light"] .terminal-view {
  --terminal-control-bg: linear-gradient(180deg, #ffffff 0%, #edf1f4 48%, #d9dfe6 100%);
  --terminal-control-bg-hover: linear-gradient(180deg, #ffffff 0%, #f5f7f9 42%, #ccd5de 100%);
  --terminal-control-border: rgba(142, 151, 163, 0.64);
  --terminal-control-border-strong: rgba(115, 124, 137, 0.62);
  --terminal-control-text: #20252c;
  --terminal-control-text-strong: #070b10;
  --terminal-control-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -1px 0 rgba(77, 87, 100, 0.16), 0 1px 2px rgba(27, 33, 40, 0.09);
  --terminal-control-active-bg: linear-gradient(180deg, #ffffff 0%, #f5f7f9 35%, #ccd5de 72%, #fbfcfd 100%);
  --terminal-control-active-text: #070b10;
}

.terminal-view .price-pane .chart-action-strip,
.terminal-view .heatmap-pane .chart-action-strip {
  border-color: var(--terminal-control-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.004)),
    #0b0d11;
}

html[data-theme="light"] .terminal-view .price-pane .chart-action-strip,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip {
  border-color: rgba(157, 166, 177, 0.62);
  background:
    linear-gradient(180deg, #fbfcfd 0%, #edf0f3 46%, #dfe4e9 100%),
    #eef1f4;
}

.terminal-view .price-pane .segmented-control.compact,
.terminal-view .price-pane .indicator-picker,
.terminal-view .price-pane .zoom-controls,
.terminal-view .heatmap-pane .segmented-control.compact,
.terminal-view .heatmap-pane .zoom-controls {
  border-color: var(--terminal-control-border);
  background: #11141a;
  box-shadow: var(--terminal-control-shadow);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls {
  border-color: var(--terminal-control-border);
  background:
    linear-gradient(180deg, #f8fafb 0%, #e8edf1 56%, #d8dfe6 100%);
  box-shadow: var(--terminal-control-shadow);
}

.terminal-view .price-pane .segmented-control.compact button,
.terminal-view .price-pane .chart-action-strip .button,
.terminal-view .price-pane .indicator-picker label,
.terminal-view .price-pane .zoom-controls button,
.terminal-view .heatmap-pane .segmented-control.compact button,
.terminal-view .heatmap-pane .chart-action-strip .button,
.terminal-view .heatmap-pane .zoom-controls button {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--terminal-control-text);
  background: transparent;
  box-shadow: none;
  font-weight: 860;
  text-shadow: none;
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button {
  color: var(--terminal-control-text);
}

.terminal-view .price-pane .segmented-control.compact button:hover,
.terminal-view .price-pane .chart-action-strip .button:hover,
.terminal-view .price-pane .indicator-picker label:hover,
.terminal-view .price-pane .zoom-controls button:hover,
.terminal-view .heatmap-pane .segmented-control.compact button:hover,
.terminal-view .heatmap-pane .chart-action-strip .button:hover,
.terminal-view .heatmap-pane .zoom-controls button:hover {
  color: var(--terminal-control-text-strong);
  border-color: var(--terminal-control-border-strong);
  background: var(--terminal-control-bg-hover);
  box-shadow: var(--terminal-control-shadow);
}

.terminal-view .price-pane .segmented-control.compact button.is-active,
.terminal-view .price-pane .chart-action-strip .button.is-active,
.terminal-view .price-pane .chart-action-strip .button.primary,
.terminal-view .heatmap-pane .segmented-control.compact button.is-active,
.terminal-view .heatmap-pane .chart-action-strip .button.is-active,
.terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: var(--terminal-control-active-text);
  border-color: var(--terminal-control-border-strong);
  background: var(--terminal-control-active-bg);
  box-shadow: var(--terminal-control-shadow), 0 0 0 1px rgba(216, 169, 77, 0.12);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: var(--terminal-control-active-text);
  border-color: var(--terminal-control-border-strong);
  background: var(--terminal-control-active-bg);
}

.terminal-view .price-pane .micro-controls label,
.terminal-view .heatmap-pane .micro-controls label {
  border-color: var(--terminal-control-border);
  color: var(--terminal-control-text);
  background: var(--terminal-control-bg);
  box-shadow: var(--terminal-control-shadow);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label {
  color: #20252c;
  border-color: var(--terminal-control-border);
  background: var(--terminal-control-bg);
}

.terminal-view .price-pane .micro-controls select,
.terminal-view .heatmap-pane .micro-controls select {
  color: var(--terminal-control-text-strong);
  background: transparent;
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls .num,
html[data-theme="light"] .terminal-view .heatmap-pane .heatmap-zone-count {
  color: #11161d;
}

html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:has(input:checked) {
  color: #11161d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(205, 214, 223, 0.72));
  box-shadow: inset 0 0 0 1px rgba(122, 131, 145, 0.2);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active::after,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active::after,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active::after,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active::after,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary::after,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary::after {
  bottom: 2px;
  height: 1px;
  opacity: 0.72;
  background: linear-gradient(90deg, transparent, rgba(117, 88, 34, 0.48), transparent);
}

/* v175 Claude Code / Design continuation polish */
.live-panel {
  position: relative;
}

.live-panel .section-head {
  align-items: center;
}

.live-badge {
  min-width: 56px;
  justify-content: center;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.live-badge.is-live {
  color: #ffdce0;
  border-color: rgba(255, 77, 94, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 77, 94, 0.035)),
    rgba(62, 12, 18, 0.42);
}

.live-badge.is-live::before,
.live-dot-label.is-live i {
  animation: liveDotPulse 1.55s cubic-bezier(0.55, 0, 0.32, 1) infinite;
}

.video-frame {
  min-height: 214px;
}

.video-frame.has-thumbnail {
  border-color: rgba(244, 199, 114, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.2);
}

.video-frame.has-thumbnail::before {
  background:
    linear-gradient(180deg, rgba(3, 4, 6, 0.08), rgba(3, 4, 6, 0.72)),
    linear-gradient(90deg, rgba(3, 4, 6, 0.76), rgba(3, 4, 6, 0.18) 48%, rgba(3, 4, 6, 0.72)),
    var(--live-thumbnail) center / cover no-repeat;
  filter: saturate(1.04) contrast(1.08) brightness(0.92);
}

.video-frame.has-thumbnail::after {
  height: 78%;
  background:
    linear-gradient(180deg, rgba(3, 4, 6, 0), rgba(3, 4, 6, 0.92)),
    linear-gradient(90deg, rgba(244, 199, 114, 0.16), transparent 28%, transparent 72%, rgba(244, 199, 114, 0.1));
}

.video-frame.has-thumbnail .play-mark {
  width: 54px;
  height: 54px;
  border-color: rgba(238, 204, 132, 0.44);
  background:
    linear-gradient(180deg, rgba(18, 20, 24, 0.78), rgba(7, 8, 10, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62),
    0 16px 30px rgba(0, 0, 0, 0.34);
}

.video-frame.has-thumbnail strong {
  max-width: min(92%, 680px);
  margin: 0 auto;
  color: #fff6df;
  font-weight: 900;
  line-height: 1.45;
}

.video-frame.has-thumbnail span {
  max-width: min(92%, 560px);
  margin: 6px auto 0;
  color: rgba(245, 239, 224, 0.82);
  line-height: 1.55;
}

html[data-theme="light"] .video-frame.has-thumbnail {
  border-color: rgba(111, 119, 131, 0.34);
  background: #111318;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 30px rgba(33, 38, 44, 0.12);
}

html[data-theme="light"] .video-frame.has-thumbnail::before {
  background:
    linear-gradient(180deg, rgba(6, 7, 9, 0.04), rgba(6, 7, 9, 0.72)),
    linear-gradient(90deg, rgba(6, 7, 9, 0.72), rgba(6, 7, 9, 0.16) 48%, rgba(6, 7, 9, 0.68)),
    var(--live-thumbnail) center / cover no-repeat;
  filter: saturate(1.02) contrast(1.06) brightness(0.95);
}

html[data-theme="light"] .live-badge.is-live {
  color: #7b1d2a;
  border-color: rgba(197, 69, 82, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 226, 228, 0.72));
}

.brand {
  align-items: center;
}

.brand span {
  gap: 4px;
}

.brand strong,
.brand small,
.profile-card h1,
.nav-member-badge span {
  font-synthesis: none;
}

.brand strong {
  letter-spacing: 0.135em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 16px rgba(0, 0, 0, 0.28);
}

.brand small {
  margin-left: 1px;
  letter-spacing: 0.5em;
}

html[data-theme="light"] .brand strong {
  background: linear-gradient(180deg, #59606a 0%, #0a0d11 46%, #6b737e 70%, #151a20 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] .brand small {
  background: linear-gradient(180deg, #6d5122 0%, #19130b 50%, #8a662b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-member-badge,
.profile-avatar,
.profile-badge-motion,
.profile-badge-rotor,
.tier-path-card {
  isolation: isolate;
}

.nav-member-badge,
.profile-badge-rotor,
.profile-badge-face,
.profile-avatar,
.tier-path img,
.nav-member-badge img {
  background-color: transparent !important;
  background-image: none !important;
}

.nav-member-badge::before,
.nav-member-badge::after,
html[data-theme="light"] .nav-member-badge::before,
html[data-theme="light"] .nav-member-badge::after {
  display: none !important;
  content: none !important;
}

.nav-member-badge img,
html[data-theme="light"] .nav-member-badge img {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  mix-blend-mode: normal !important;
  filter:
    drop-shadow(0 12px 20px rgba(0, 0, 0, 0.24))
    drop-shadow(0 0 10px rgba(196, 148, 65, 0.14)) !important;
}

html[data-theme="light"] .nav-member-badge img {
  filter:
    drop-shadow(0 10px 16px rgba(28, 32, 38, 0.14))
    drop-shadow(0 0 8px rgba(156, 113, 48, 0.12)) !important;
}

html[data-theme="light"] #profileTierBadge,
html[data-theme="light"] #profileTierBadgeBack,
html[data-theme="light"] .tier-path img {
  box-shadow: none !important;
  filter:
    drop-shadow(0 12px 18px rgba(34, 38, 44, 0.13))
    drop-shadow(0 0 8px rgba(156, 113, 48, 0.08)) !important;
}

html[data-theme="light"] .profile-badge-motion::after {
  opacity: 0.28;
}

.terminal-view {
  --terminal-control-radius: 7px;
}

html[data-theme="light"] .terminal-view {
  --terminal-control-bg: linear-gradient(180deg, #ffffff 0%, #f4f6f8 30%, #dfe5eb 74%, #f9fafb 100%);
  --terminal-control-bg-hover: linear-gradient(180deg, #ffffff 0%, #f8fafb 36%, #d7dfe7 76%, #ffffff 100%);
  --terminal-control-border: rgba(126, 137, 151, 0.58);
  --terminal-control-border-strong: rgba(89, 101, 116, 0.68);
  --terminal-control-text: #20252c;
  --terminal-control-text-strong: #070a0e;
  --terminal-control-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(55, 65, 78, 0.16),
    0 1px 2px rgba(27, 33, 40, 0.08);
  --terminal-control-active-bg: linear-gradient(180deg, #fbfcfd 0%, #e6ebf0 34%, #bfc9d3 74%, #f7f8f9 100%);
  --terminal-control-active-text: #090d12;
}

.terminal-view .price-pane .chart-action-strip,
.terminal-view .heatmap-pane .chart-action-strip {
  align-items: center;
}

html[data-theme="light"] .terminal-view .price-pane .chart-action-strip,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip {
  border-color: rgba(149, 158, 171, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 239, 243, 0.76)),
    #eef1f4;
}

.terminal-view .price-pane .segmented-control.compact button,
.terminal-view .price-pane .chart-action-strip .button,
.terminal-view .price-pane .indicator-picker label,
.terminal-view .price-pane .zoom-controls button,
.terminal-view .heatmap-pane .segmented-control.compact button,
.terminal-view .heatmap-pane .chart-action-strip .button,
.terminal-view .heatmap-pane .zoom-controls button,
.terminal-view .price-pane .micro-controls label,
.terminal-view .heatmap-pane .micro-controls label {
  border-radius: var(--terminal-control-radius);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button {
  color: var(--terminal-control-text);
  border-color: transparent;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .price-pane .indicator-picker label:hover,
html[data-theme="light"] .terminal-view .price-pane .zoom-controls button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button:hover,
html[data-theme="light"] .terminal-view .heatmap-pane .zoom-controls button:hover {
  color: var(--terminal-control-text-strong);
  border-color: var(--terminal-control-border-strong);
  background: var(--terminal-control-bg-hover);
  box-shadow: var(--terminal-control-shadow);
}

html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: var(--terminal-control-active-text);
  border-color: var(--terminal-control-border-strong);
  background: var(--terminal-control-active-bg);
  box-shadow:
    var(--terminal-control-shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls label,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls label {
  color: #2d343d;
  border-color: rgba(136, 146, 160, 0.52);
  background:
    linear-gradient(180deg, #ffffff 0%, #edf1f5 58%, #dce3ea 100%);
  box-shadow: var(--terminal-control-shadow);
}

html[data-theme="light"] .terminal-view .price-pane .micro-controls select,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls select {
  min-width: 72px;
  color: #11161d;
  background: transparent;
  font-weight: 780;
}

.terminal-view .price-pane .indicator-picker input,
.terminal-view .heatmap-pane .micro-controls input[type="range"],
.terminal-view .price-pane .micro-controls input[type="range"] {
  accent-color: var(--terminal-yellow);
}

html[data-theme="light"] .terminal-view .price-pane .indicator-picker input,
html[data-theme="light"] .terminal-view .heatmap-pane .micro-controls input[type="range"],
html[data-theme="light"] .terminal-view .price-pane .micro-controls input[type="range"] {
  accent-color: #6b7280;
}

.flow-console.compact-flow-console article {
  min-height: 74px;
}

html[data-theme="light"] .heatmap-pane .compact-flow-console article,
html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console article {
  border-color: rgba(129, 103, 54, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 226, 214, 0.62)),
    #f4f3ef;
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console span,
html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console em {
  color: #5a5040;
}

html[data-theme="light"] .terminal-view .heatmap-pane .compact-flow-console strong {
  color: #6f4f19;
}

/* v176 data sync + premium contrast pass */
.engine-bar.is-waiting {
  border-style: dashed;
}

.engine-bar.is-waiting .engine-bar-track i {
  width: 0 !important;
  opacity: 0;
}

.engine-bar.is-waiting span b {
  color: #aeb6c0;
  border-color: rgba(174, 182, 192, 0.22);
  background: rgba(174, 182, 192, 0.08);
}

html[data-theme="light"] .engine-bar.is-waiting span b {
  color: #66707d;
  border-color: rgba(103, 113, 126, 0.26);
  background: rgba(92, 101, 113, 0.08);
}

html[data-theme="light"] .engine-bar span,
html[data-theme="light"] .engine-score-tags i,
html[data-theme="light"] .screener-weight-option strong,
html[data-theme="light"] .screener-weight-option b,
html[data-theme="light"] .trigger-weight-board,
html[data-theme="light"] .trigger-weight-board * {
  color: #151a20;
  opacity: 1;
  text-shadow: none;
}

html[data-theme="light"] .engine-bar small,
html[data-theme="light"] .screener-weight-option {
  color: #505a66;
  opacity: 1;
}

.nav-member-badge,
.nav-member-badge::before,
.nav-member-badge::after,
.profile-badge-motion,
.profile-badge-motion::before,
.profile-badge-motion::after,
.profile-badge-rotor,
.profile-badge-rotor::before,
.profile-badge-rotor::after,
.profile-badge-face,
.profile-badge-face::before,
.profile-badge-face::after {
  background: transparent !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.nav-member-badge img,
#profileTierBadge,
#profileTierBadgeBack,
#tierBadgeTop,
#currentTierPathBadge,
#nextTierPathBadge,
.tier-path img {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  mix-blend-mode: normal !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-theme="light"] .nav-member-badge img,
html[data-theme="light"] #profileTierBadge,
html[data-theme="light"] #profileTierBadgeBack,
html[data-theme="light"] #tierBadgeTop,
html[data-theme="light"] #currentTierPathBadge,
html[data-theme="light"] #nextTierPathBadge,
html[data-theme="light"] .tier-path img {
  filter:
    drop-shadow(0 10px 14px rgba(25, 30, 36, 0.12))
    drop-shadow(0 0 8px rgba(139, 103, 40, 0.1)) !important;
}

html[data-theme="light"] .terminal-view .button,
html[data-theme="light"] .terminal-view button,
html[data-theme="light"] .terminal-view select,
html[data-theme="light"] .terminal-view .micro-controls label,
html[data-theme="light"] .terminal-view .indicator-picker label {
  color: #111820;
}

html[data-theme="light"] .terminal-view button:disabled,
html[data-theme="light"] .terminal-view .button:disabled,
html[data-theme="light"] .live-channel-row button:disabled,
html[data-theme="light"] button:disabled {
  color: #727b87;
  opacity: 1;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button,
html[data-theme="light"] .terminal-view .segmented-control.compact button,
html[data-theme="light"] .terminal-view .zoom-controls button,
html[data-theme="light"] .terminal-view .micro-controls label,
html[data-theme="light"] .terminal-view .indicator-picker label {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 236, 241, 0.92) 52%, rgba(207, 214, 222, 0.86) 100%),
    #eef1f4;
  border-color: rgba(121, 132, 145, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(55, 63, 73, 0.14),
    0 1px 2px rgba(31, 38, 47, 0.08);
}

html[data-theme="light"] .terminal-view .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .segmented-control.compact button.is-active {
  color: #080c12;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(223, 229, 236, 0.96) 46%, rgba(180, 190, 201, 0.92) 100%),
    #dce2e9;
  border-color: rgba(83, 94, 109, 0.58);
}

/* v182 Claude Code whole-site alignment pass */
:root {
  --v182-control-h: 32px;
  --v182-control-radius: 7px;
  --v182-control-font: 11.5px;
  --v182-metal-silver-dark: linear-gradient(180deg, #ffffff 0%, #f7fafc 14%, #d4dbe3 33%, #fbfdff 48%, #aab3bd 66%, #edf2f5 100%);
  --v182-metal-graphite-light: linear-gradient(180deg, #525a64 0%, #11161c 38%, #6d7682 62%, #1d242d 100%);
  --v182-metal-gold-dark: linear-gradient(180deg, #fff2ba 0%, #e6c16a 26%, #b47a24 58%, #f7dda0 100%);
  --v182-metal-gold-light: linear-gradient(180deg, #b78934 0%, #8b661f 42%, #d0a24a 62%, #6f4d16 100%);
  --v182-silver-bg: linear-gradient(180deg, #ffffff 0%, #f2f5f7 40%, #d8dee5 100%);
  --v182-silver-bg-active: linear-gradient(180deg, #ffffff 0%, #e7ecf1 42%, #bfc8d2 100%);
  --v182-silver-border: rgba(112, 123, 138, 0.48);
  --v182-silver-border-strong: rgba(81, 93, 110, 0.66);
}

.brand {
  align-items: center;
}

.brand span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  width: max-content;
  line-height: 0.92;
  text-shadow: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  transform-origin: left center;
}

.brand strong {
  background-image: var(--v182-metal-silver-dark);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.24));
}

.brand small {
  margin-left: 0;
  background-image: var(--v182-metal-gold-dark);
  transform: scaleX(1.08);
}

html[data-theme="light"] .brand strong {
  background-image: var(--v182-metal-graphite-light);
  filter: none;
}

html[data-theme="light"] .brand small {
  background-image: var(--v182-metal-gold-light);
  filter: none;
}

.nav-member-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  background: transparent !important;
  box-shadow: none !important;
}

.nav-member-badge::before,
.nav-member-badge::after,
.profile-badge-motion::before,
.profile-badge-rotor::before,
.profile-badge-rotor::after,
.profile-badge-face::before,
.profile-badge-face::after {
  display: none !important;
  content: none !important;
}

.nav-member-badge img,
#tierBadgeTop,
#profileTierBadge,
#profileTierBadgeBack,
#currentTierPathBadge,
#nextTierPathBadge {
  display: block;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  mix-blend-mode: normal !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-theme="light"] .nav-member-badge img,
html[data-theme="light"] #tierBadgeTop,
html[data-theme="light"] #profileTierBadge,
html[data-theme="light"] #profileTierBadgeBack,
html[data-theme="light"] #currentTierPathBadge,
html[data-theme="light"] #nextTierPathBadge {
  filter:
    drop-shadow(0 8px 12px rgba(20, 24, 30, 0.12))
    drop-shadow(0 0 6px rgba(145, 102, 34, 0.08)) !important;
}

.uid-pill,
#memberTierLabel,
#memberStatusLabel {
  align-items: center;
  line-height: 1;
}

#memberTierLabel,
#memberStatusLabel,
.nav-member-badge span {
  font-family: var(--font-brand);
  font-synthesis: none;
  text-transform: uppercase;
}

#memberTierLabel {
  letter-spacing: 0.08em;
}

#memberStatusLabel {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  text-shadow: none;
}

body[data-member-tier="bronze"] #memberStatusLabel {
  color: #c5823d;
}

body[data-member-tier="silver"] #memberStatusLabel {
  color: #d9dce1;
}

body[data-member-tier="gold"] #memberStatusLabel {
  color: #f0c96a;
}

body[data-member-tier="black"] #memberStatusLabel,
body[data-member-tier="executive"] #memberStatusLabel {
  color: #f1d680;
}

html[data-theme="light"] body[data-member-tier="bronze"] #memberStatusLabel {
  color: #8b5727;
}

html[data-theme="light"] body[data-member-tier="silver"] #memberStatusLabel {
  color: #59616b;
}

html[data-theme="light"] body[data-member-tier="gold"] #memberStatusLabel {
  color: #8a661c;
}

html[data-theme="light"] body[data-member-tier="black"] #memberStatusLabel,
html[data-theme="light"] body[data-member-tier="executive"] #memberStatusLabel {
  color: #7e641e;
}

.profile-badge-motion,
.profile-badge-rotor {
  display: grid;
  place-items: center;
}

.profile-badge-rotor {
  position: relative;
}

.profile-badge-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
}

.profile-badge-front {
  transform: translateZ(0.5px);
}

.profile-badge-back {
  transform: rotateY(180deg) translateZ(0.5px);
}

#profileDisplayName,
.profile-card h1 {
  font-family: var(--font-brand);
  font-weight: 900;
  letter-spacing: 0.08em;
  background-image: var(--v182-metal-gold-dark);
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: none;
}

html[data-theme="light"] #profileDisplayName,
html[data-theme="light"] .profile-card h1 {
  background-image: var(--v182-metal-graphite-light);
}

.tier-path-card {
  display: grid;
  grid-template-rows: auto minmax(58px, auto) auto;
  align-items: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
  overflow: visible;
}

.tier-path-card span,
.tier-path-card strong {
  position: relative;
  z-index: 2;
  opacity: 1;
  text-shadow: none;
}

.tier-path-card strong {
  line-height: 1.2;
  font-size: 13px;
}

html[data-theme="light"] .tier-path-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(231, 234, 236, 0.56)),
    var(--bg-panel);
}

.terminal-view .chart-action-strip,
.terminal-view .chart-control-row,
.terminal-view .segmented-control.compact,
.terminal-view .micro-controls,
.terminal-view .indicator-picker,
.terminal-view .zoom-controls,
.terminal-clock-strip {
  align-items: center;
}

.terminal-view .chart-action-strip,
.terminal-view .chart-control-row {
  gap: 8px;
}

.terminal-view .segmented-control.compact button,
.terminal-view .chart-action-strip .button,
.terminal-view .zoom-controls button,
.terminal-view .indicator-picker label,
.terminal-view .micro-controls label {
  min-height: var(--v182-control-h);
  border-radius: var(--v182-control-radius);
  font-size: var(--v182-control-font);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.terminal-view .micro-controls label {
  gap: 7px;
  padding-inline: 10px;
  color: #d8b363;
  border-color: rgba(216, 169, 77, 0.26);
  background:
    linear-gradient(180deg, #24272d 0%, #181b20 48%, #111318 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.56),
    0 1px 2px rgba(0, 0, 0, 0.22);
}

.terminal-view .micro-controls select {
  min-width: 98px;
  height: 24px;
  padding: 0 24px 0 9px;
  border: 1px solid rgba(216, 169, 77, 0.22);
  border-radius: 5px;
  color: #f0d58a;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) right 11px center / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) right 7px center / 5px 5px no-repeat,
    rgba(0, 0, 0, 0.1);
  font-weight: 780;
  text-align: left;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button,
html[data-theme="light"] .terminal-view .segmented-control.compact button,
html[data-theme="light"] .terminal-view .zoom-controls button,
html[data-theme="light"] .terminal-view .micro-controls label,
html[data-theme="light"] .terminal-view .indicator-picker label {
  color: #111820;
  border-color: var(--v182-silver-border);
  background: var(--v182-silver-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(54, 64, 77, 0.14),
    0 1px 2px rgba(28, 34, 42, 0.08);
  text-shadow: none;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .segmented-control.compact button.is-active {
  color: #080c12;
  border-color: var(--v182-silver-border-strong);
  background: var(--v182-silver-bg-active);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(35, 44, 57, 0.2),
    0 0 0 1px rgba(148, 116, 49, 0.14);
}

.terminal-view .chart-action-strip .button.is-active,
.terminal-view .chart-action-strip .button.primary,
.terminal-view .segmented-control.compact button.is-active {
  color: #f0d58a;
  border-color: rgba(216, 169, 77, 0.48);
  background:
    linear-gradient(180deg, #24272d 0%, #181b20 52%, #111318 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(216, 169, 77, 0.1),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

html:not([data-theme="light"]) .terminal-view .price-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.primary,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #f0d58a;
  border-color: rgba(216, 169, 77, 0.5);
  background:
    linear-gradient(180deg, #24272d 0%, #181b20 52%, #111318 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(216, 169, 77, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.terminal-view .chart-action-strip .button.is-active::after,
.terminal-view .chart-action-strip .button.primary::after,
.terminal-view .segmented-control.compact button.is-active::after {
  opacity: 0.78;
  background: linear-gradient(90deg, transparent, rgba(240, 213, 138, 0.72), transparent);
}

html[data-theme="light"] .terminal-view .micro-controls select {
  color: #10151c;
  border-color: rgba(114, 124, 139, 0.42);
  background:
    linear-gradient(45deg, transparent 50%, #333b46 50%) right 11px center / 5px 5px no-repeat,
    linear-gradient(135deg, #333b46 50%, transparent 50%) right 7px center / 5px 5px no-repeat,
    rgba(255, 255, 255, 0.2);
}

.terminal-view .flow-console.compact-flow-console article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "note note";
  align-items: center;
  gap: 4px 10px;
  min-height: 70px;
  text-align: left;
}

.terminal-view .flow-console.compact-flow-console article span {
  grid-area: label;
  line-height: 1.2;
}

.terminal-view .flow-console.compact-flow-console article strong {
  grid-area: value;
  justify-self: end;
  line-height: 1.15;
  text-align: right;
}

.terminal-view .flow-console.compact-flow-console article em {
  grid-area: note;
  line-height: 1.35;
  text-align: left;
}

html[data-theme="light"] .terminal-view .flow-console.compact-flow-console article {
  border-color: rgba(131, 98, 42, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(228, 232, 236, 0.58)),
    #f5f6f8;
}

.terminal-clock-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  line-height: 1;
}

.heatmap-cursor-readout,
.profile-cursor-readout {
  line-height: 1.45;
  text-align: left;
}

.heatmap-legend-strip {
  margin-top: 4px;
}

.screener-weight-panel,
.trigger-weight-board,
.engine-bar,
.engine-score-tags,
.screener-weight-option,
.screener-weight-option strong,
.screener-weight-option b {
  opacity: 1;
  filter: none;
  text-shadow: none;
}

html[data-theme="light"] .trigger-weight-board,
html[data-theme="light"] .engine-bar span,
html[data-theme="light"] .engine-bar small,
html[data-theme="light"] .engine-score-tags i,
html[data-theme="light"] .screener-weight-option,
html[data-theme="light"] .screener-weight-option strong,
html[data-theme="light"] .screener-weight-option b {
  color: #151a20;
}

.screener-comment-cell > span {
  text-align: left;
}

.row-expand-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.row-expand-button::before {
  position: relative;
  left: 0;
  top: 0;
}

.live-panel .section-head,
.academy-command-panel .section-head {
  align-items: center;
}

.live-badge,
.live-dot-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
}

html[data-theme="light"] .live-panel,
html[data-theme="light"] .academy-command-panel,
html[data-theme="light"] .academy-entry-card {
  color: #14171b;
}

html[data-theme="light"] .video-frame strong,
html[data-theme="light"] .video-frame span,
html[data-theme="light"] .academy-entry-card strong,
html[data-theme="light"] .academy-entry-card small {
  color: #14171b;
}

html[data-theme="light"] .news-title-en,
html[data-theme="light"] .news-summary-zh,
html[data-theme="light"] .news-item p {
  color: #151a20;
  opacity: 1;
}

html[data-theme="light"] .impact-row strong,
html[data-theme="light"] .impact-row span {
  color: #151a20;
}

/* v188 UI alignment pass */
.engine-bar.is-waiting {
  border-color: rgba(148, 118, 70, 0.18) !important;
  border-style: solid !important;
  background:
    linear-gradient(180deg, rgba(184, 143, 72, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 0 1px rgba(184, 143, 72, 0.035);
}

.engine-bar.is-waiting span,
.engine-bar.is-waiting small {
  color: rgba(214, 220, 228, 0.62);
}

.engine-bar.is-waiting span b,
.engine-bar.is-waiting .engine-score-tags i {
  color: rgba(214, 220, 228, 0.64);
  border-color: rgba(184, 143, 72, 0.16);
  background: rgba(184, 143, 72, 0.055);
  box-shadow: none;
}

html[data-theme="light"] .engine-bar.is-waiting {
  border-color: rgba(132, 107, 61, 0.2) !important;
  background:
    linear-gradient(180deg, rgba(184, 143, 72, 0.07), rgba(255, 255, 255, 0.52)),
    #eef0f2;
  box-shadow: inset 0 0 0 1px rgba(132, 107, 61, 0.04);
}

html[data-theme="light"] .engine-bar.is-waiting span,
html[data-theme="light"] .engine-bar.is-waiting small,
html[data-theme="light"] .engine-bar.is-waiting span b,
html[data-theme="light"] .engine-bar.is-waiting .engine-score-tags i {
  color: rgba(55, 61, 70, 0.74);
}

html[data-theme="light"] .engine-bar.is-waiting span b,
html[data-theme="light"] .engine-bar.is-waiting .engine-score-tags i {
  border-color: rgba(132, 107, 61, 0.18);
  background: rgba(132, 107, 61, 0.065);
}

.news-item {
  display: flex;
  flex-direction: column;
}

.impact-row {
  align-items: center;
  margin-top: auto;
  min-height: 34px;
}

.impact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1.1;
  text-align: center;
}

.impact-row strong {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 28px;
  line-height: 1.35;
}

.terminal-view .chart-action-strip .button,
.terminal-view .segmented-control.compact button,
.terminal-view .micro-controls select {
  cursor: pointer;
}

.terminal-view .micro-controls select {
  min-width: 106px;
  padding-right: 32px;
  background:
    linear-gradient(45deg, transparent 50%, #f0d58a 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, #f0d58a 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .terminal-view .micro-controls select {
  color: #10151c;
  border-color: rgba(92, 102, 116, 0.46);
  background:
    linear-gradient(45deg, transparent 50%, #27303a 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, #27303a 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(211, 217, 224, 0.72));
}

.terminal-view .chart-action-strip .button.is-active,
.terminal-view .chart-action-strip .button.primary,
.terminal-view .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.primary,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #f0d58a;
  border-color: rgba(108, 119, 134, 0.55) !important;
  background:
    linear-gradient(180deg, #373d47 0%, #222832 48%, #0c0f15 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.58),
    0 10px 18px rgba(0, 0, 0, 0.24) !important;
}

.terminal-view .chart-action-strip .button.is-active::after,
.terminal-view .chart-action-strip .button.primary::after,
.terminal-view .segmented-control.compact button.is-active::after {
  opacity: 0.34;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
}

html[data-theme="light"] .terminal-view .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active {
  color: #0d1218;
  border-color: rgba(92, 102, 116, 0.56) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #e4e8ed 48%, #bfc8d1 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(49, 59, 72, 0.2),
    0 8px 16px rgba(55, 67, 82, 0.15) !important;
}

@media (max-width: 820px) {
  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 19px;
  }

  .brand small {
    font-size: 8.5px;
  }
}

/* v189 Claude Code terminal control fix */
.terminal-view .micro-controls label:has(select) {
  position: relative;
  overflow: visible;
}

.terminal-view .micro-controls select {
  min-width: 112px;
  min-height: 25px;
  padding: 0 34px 0 10px;
  color: #e8eaee;
  border-color: rgba(118, 130, 146, 0.42);
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: rgba(8, 10, 14, 0.32) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.1 5.1 7 8.9l3.9-3.8' fill='none' stroke='%23e8eaee' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.16)) !important;
  background-position:
    right 11px center,
    0 0 !important;
  background-repeat:
    no-repeat,
    repeat !important;
  background-size:
    14px 14px,
    auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48);
}

html[data-theme="light"] .terminal-view .micro-controls select {
  color: #111720;
  border-color: rgba(91, 103, 118, 0.46);
  background-color: rgba(239, 243, 247, 0.78) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.1 5.1 7 8.9l3.9-3.8' fill='none' stroke='%23111720' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(203, 211, 220, 0.76)) !important;
  background-position:
    right 11px center,
    0 0 !important;
  background-repeat:
    no-repeat,
    repeat !important;
  background-size:
    14px 14px,
    auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(48, 58, 70, 0.15);
}

.terminal-view .chart-action-strip .button.is-active,
.terminal-view .chart-action-strip .button.active,
.terminal-view .chart-action-strip .button[aria-pressed="true"],
.terminal-view .chart-action-strip .button.primary,
.terminal-view .segmented-control.compact button.is-active,
.terminal-view .segmented-control.compact button.active,
.terminal-view .segmented-control.compact button[aria-pressed="true"],
html:not([data-theme="light"]) .terminal-view .price-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.primary,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #e8eaee;
  border-color: rgba(115, 126, 141, 0.44) !important;
  background:
    linear-gradient(180deg, #313743 0%, #202632 44%, #0a0d12 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 2px 6px rgba(0, 0, 0, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.035) !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.terminal-view .chart-action-strip .button.is-active::after,
.terminal-view .chart-action-strip .button.active::after,
.terminal-view .chart-action-strip .button[aria-pressed="true"]::after,
.terminal-view .chart-action-strip .button.primary::after,
.terminal-view .segmented-control.compact button.is-active::after,
.terminal-view .segmented-control.compact button.active::after,
.terminal-view .segmented-control.compact button[aria-pressed="true"]::after {
  display: none !important;
  content: none !important;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .chart-action-strip .button.active,
html[data-theme="light"] .terminal-view .chart-action-strip .button[aria-pressed="true"],
html[data-theme="light"] .terminal-view .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .segmented-control.compact button.active,
html[data-theme="light"] .terminal-view .segmented-control.compact button[aria-pressed="true"],
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active {
  color: #0e141c;
  border-color: rgba(86, 98, 113, 0.5) !important;
  background:
    linear-gradient(180deg, #f8fafc 0%, #dce3ea 44%, #b7c1cc 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 2px 5px rgba(50, 61, 74, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.42),
    0 1px 2px rgba(42, 51, 62, 0.1) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* v190 Cloud Design terminal button system */
.terminal-view .chart-action-strip,
.terminal-view .chart-control-row {
  gap: 9px;
}

.terminal-view .segmented-control.compact {
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(36, 43, 52, 0.82);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.1)),
    rgba(8, 11, 15, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.018);
}

html:not([data-theme="light"]) .terminal-view .chart-action-strip .button,
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button,
html:not([data-theme="light"]) .terminal-view .zoom-controls button,
html:not([data-theme="light"]) .terminal-view .indicator-picker label {
  min-height: 29px;
  border-radius: 6px;
  color: rgba(232, 199, 121, 0.82);
  border-color: rgba(46, 55, 66, 0.88);
  background:
    linear-gradient(180deg, #242a33 0%, #171d25 52%, #0e1319 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52),
    0 3px 8px rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.56);
}

html:not([data-theme="light"]) .terminal-view .chart-action-strip .button:hover,
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button:hover,
html:not([data-theme="light"]) .terminal-view .zoom-controls button:hover,
html:not([data-theme="light"]) .terminal-view .indicator-picker label:hover {
  color: #f1d68a;
  border-color: rgba(72, 83, 98, 0.92);
  background:
    linear-gradient(180deg, #2a313c 0%, #1b222b 54%, #10151c 100%);
}

html:not([data-theme="light"]) .terminal-view .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .chart-action-strip .button.active,
html:not([data-theme="light"]) .terminal-view .chart-action-strip .button[aria-pressed="true"],
html:not([data-theme="light"]) .terminal-view .chart-action-strip .button.primary,
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button.active,
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button[aria-pressed="true"],
html:not([data-theme="light"]) .terminal-view .price-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.is-active,
html:not([data-theme="light"]) .terminal-view .price-pane .chart-action-strip .button.primary,
html:not([data-theme="light"]) .terminal-view .heatmap-pane .chart-action-strip .button.primary {
  color: #f4d98e;
  border-color: rgba(58, 68, 82, 0.96) !important;
  background:
    linear-gradient(180deg, #303844 0%, #222a34 48%, #121820 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 5px 12px rgba(0, 0, 0, 0.28) !important;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.6),
    0 0 9px rgba(215, 169, 77, 0.12);
}

html:not([data-theme="light"]) .terminal-view .micro-controls label:has(select) {
  min-height: 32px;
  padding: 0 10px 0 12px;
  gap: 7px;
  color: rgba(232, 199, 121, 0.82);
  border-color: rgba(46, 55, 66, 0.88);
  background:
    linear-gradient(180deg, #242a33 0%, #171d25 52%, #0e1319 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52),
    0 3px 8px rgba(0, 0, 0, 0.22);
}

html:not([data-theme="light"]) .terminal-view .micro-controls select {
  min-width: auto;
  min-height: 28px;
  height: 28px;
  padding: 0 24px 0 3px;
  color: #f4d98e;
  border: 0;
  background-color: transparent !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'%3E%3Cpath d='M3 4.8 6.5 8.1 10 4.8' fill='none' stroke='%23f4d98e' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 5px center !important;
  background-repeat: no-repeat !important;
  background-size: 13px 13px !important;
  box-shadow: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.58);
}

html[data-theme="light"] .terminal-view .segmented-control.compact {
  border-color: rgba(207, 213, 221, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 241, 245, 0.68)),
    #edf1f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 1px 2px rgba(35, 43, 52, 0.06);
}

html[data-theme="light"] .terminal-view .chart-action-strip .button,
html[data-theme="light"] .terminal-view .segmented-control.compact button,
html[data-theme="light"] .terminal-view .zoom-controls button,
html[data-theme="light"] .terminal-view .indicator-picker label,
html[data-theme="light"] .terminal-view .micro-controls label:has(select) {
  min-height: 30px;
  border-radius: 6px;
  color: #151b24;
  border-color: rgba(174, 183, 194, 0.78);
  background:
    linear-gradient(180deg, #fbfcfd 0%, #e9edf2 52%, #d4dbe4 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(72, 82, 96, 0.14),
    0 5px 10px rgba(36, 44, 54, 0.08);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .terminal-view .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .chart-action-strip .button.active,
html[data-theme="light"] .terminal-view .chart-action-strip .button[aria-pressed="true"],
html[data-theme="light"] .terminal-view .chart-action-strip .button.primary,
html[data-theme="light"] .terminal-view .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .segmented-control.compact button.active,
html[data-theme="light"] .terminal-view .segmented-control.compact button[aria-pressed="true"],
html[data-theme="light"] .terminal-view .price-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .segmented-control.compact button.is-active,
html[data-theme="light"] .terminal-view .price-pane .chart-action-strip .button.is-active,
html[data-theme="light"] .terminal-view .heatmap-pane .chart-action-strip .button.is-active {
  color: #0b1017;
  border-color: rgba(146, 156, 169, 0.96) !important;
  background:
    linear-gradient(180deg, #eef2f6 0%, #d9e0e8 50%, #bec8d3 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(55, 65, 78, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 4px 9px rgba(31, 39, 49, 0.12) !important;
}

html[data-theme="light"] .terminal-view .micro-controls select {
  min-width: auto;
  min-height: 28px;
  height: 28px;
  padding: 0 24px 0 3px;
  color: #0f1720;
  border: 0;
  background-color: transparent !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'%3E%3Cpath d='M3 4.8 6.5 8.1 10 4.8' fill='none' stroke='%230f1720' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 5px center !important;
  background-repeat: no-repeat !important;
  background-size: 13px 13px !important;
  box-shadow: none;
}

/* v191 terminal inactive options should blend into the strip */
html:not([data-theme="light"]) .terminal-view .segmented-control.compact button:not(.is-active):not(.active):not([aria-pressed="true"]) {
  color: rgba(232, 199, 121, 0.62);
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none;
}

html:not([data-theme="light"]) .terminal-view .segmented-control.compact button:not(.is-active):not(.active):not([aria-pressed="true"]):hover {
  color: rgba(244, 217, 142, 0.92);
  border-color: transparent !important;
  background: rgba(255, 255, 255, 0.035) !important;
  box-shadow: none !important;
}

html:not([data-theme="light"]) .terminal-view .chart-action-strip .button:not(.is-active):not(.active):not([aria-pressed="true"]):not(.primary) {
  color: rgba(232, 199, 121, 0.66);
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none;
}

html:not([data-theme="light"]) .terminal-view .chart-action-strip .button:not(.is-active):not(.active):not([aria-pressed="true"]):not(.primary):hover {
  color: rgba(244, 217, 142, 0.94);
  background: rgba(255, 255, 255, 0.035) !important;
}

html[data-theme="light"] .terminal-view .segmented-control.compact button:not(.is-active):not(.active):not([aria-pressed="true"]) {
  color: rgba(21, 27, 36, 0.68);
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none;
}

html[data-theme="light"] .terminal-view .segmented-control.compact button:not(.is-active):not(.active):not([aria-pressed="true"]):hover {
  color: #111820;
  border-color: transparent !important;
  background: rgba(17, 24, 32, 0.045) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button:not(.is-active):not(.active):not([aria-pressed="true"]):not(.primary) {
  color: rgba(21, 27, 36, 0.7);
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none;
}

html[data-theme="light"] .terminal-view .chart-action-strip .button:not(.is-active):not(.active):not([aria-pressed="true"]):not(.primary):hover {
  color: #111820;
  background: rgba(17, 24, 32, 0.045) !important;
}
