:root {
  color-scheme: dark;
  --bg: #071820;
  --surface: #102c36;
  --surface-alt: #153845;
  --text: #edf7f5;
  --ink: #edf7f5;
  --muted: #9bb8bd;
  --line: rgba(139, 185, 194, 0.18);
  --blue: #42a5ff;
  --green: #35d587;
  --red: #ff6a6a;
  --amber: #f1b84b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top left, rgba(44, 133, 156, 0.2), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.landing-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, #f7fbfc 0%, #ffffff 48%, #eaf8fa 100%);
}

.landing-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.landing-copy,
.landing-login-card {
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(11, 34, 69, 0.08);
}

.landing-copy {
  min-height: 560px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.landing-logo-card {
  width: min(420px, 100%);
  padding: 16px 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(139, 185, 194, 0.2);
}

.landing-logo-card img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-copy h1 {
  max-width: 760px;
  margin: 0;
  color: #0b2245;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
}

.landing-lead {
  max-width: 660px;
  margin: 0;
  color: #466174;
  font-size: 18px;
  line-height: 1.6;
}

.landing-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
}

.landing-proof-grid span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 185, 194, 0.22);
  border-radius: 6px;
  background: #f2fbfc;
  color: #0b4c8c;
  font-weight: 800;
  text-align: center;
}

.landing-signal-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
}

.landing-signal-strip article {
  min-height: 92px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(4, 169, 181, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f2fbfc);
}

.landing-signal-strip span {
  color: #5a7184;
  font-size: 12px;
  font-weight: 900;
}

.landing-signal-strip strong {
  color: #057985;
  font-size: 18px;
}

.landing-signal-strip small {
  color: #466174;
  line-height: 1.35;
}

.landing-login-card {
  padding: 30px;
  align-self: center;
  display: grid;
  gap: 16px;
}

.landing-login-card h2 {
  margin: 0;
  color: #0b2245;
  font-size: 32px;
}

.landing-login-card p,
.landing-login-card small {
  margin: 6px 0 0;
  color: #466174;
  line-height: 1.5;
}

.landing-login-card label {
  display: grid;
  gap: 7px;
  color: #0b2245;
  font-size: 13px;
  font-weight: 800;
}

.landing-login-card input {
  min-height: 44px;
  border: 1px solid rgba(139, 185, 194, 0.28);
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: #0b2245;
  font: inherit;
}

.landing-login-card button {
  min-height: 46px;
  background: #0e6f99;
  border-color: #24a6dc;
}

.landing-login-card button:hover {
  background: #1684b5;
}

.landing-login-card .secondary-auth-button {
  background: #ffffff;
  border-color: rgba(4, 169, 181, 0.35);
  color: #057985;
}

.landing-login-card .secondary-auth-button:hover {
  background: #eef8fa;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-login-card .remember-me {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #466174;
  font-weight: 800;
}

.landing-login-card .remember-me input {
  min-height: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: #04a9b5;
}

.landing-login-card .link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0e6f99;
  font-size: 13px;
  font-weight: 900;
}

.landing-login-card .link-button:hover {
  background: transparent;
  color: #04a9b5;
}

.google-login-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(11, 34, 69, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #0b2245;
  text-decoration: none;
  font-weight: 900;
}

.google-login-button span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b4c8c;
  color: #ffffff;
  font-weight: 900;
}

.google-login-button:hover {
  background: #f2fbfc;
  border-color: rgba(4, 169, 181, 0.3);
}

.landing-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7d91a1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-separator::before,
.landing-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(11, 34, 69, 0.1);
}

.landing-auth-message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.landing-auth-message.success {
  background: #e6fbf4;
  color: #057a55;
}

.landing-auth-message.error {
  background: #fff0f3;
  color: #b83444;
}

button {
  border: 1px solid var(--line);
  background: #173844;
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 34px 0 12px;
  background: #0c2530;
  color: var(--text);
  font: inherit;
  font-weight: 750;
}

button:hover {
  background: #204a59;
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.global-disclaimer {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid rgba(219, 76, 91, 0.3);
  border-radius: 999px;
  background: #db4c5b;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(219, 76, 91, 0.22);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.02em;
  cursor: help;
}

.global-disclaimer-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  gap: 9px;
  width: min(520px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid rgba(219, 76, 91, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: #0b2245;
  box-shadow: 0 24px 54px rgba(11, 34, 69, 0.24);
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-disclaimer-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 28px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(219, 76, 91, 0.18);
  border-top: 1px solid rgba(219, 76, 91, 0.18);
  background: #ffffff;
  transform: rotate(45deg);
}

.global-disclaimer:hover .global-disclaimer-popover,
.global-disclaimer:focus-visible .global-disclaimer-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.global-disclaimer-popover strong {
  color: #b83444;
  font-size: 16px;
}

.global-disclaimer-popover p {
  margin: 0;
  color: #25445e;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #0a202a;
  color: #f7fbf7;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.05;
}

.brand-lockup {
  display: grid;
  gap: 10px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(139, 185, 194, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar a {
  color: #dce8df;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.account-status {
  display: grid;
  gap: 4px;
}

.account-status span,
.account-status small {
  color: #aebfb5;
  font-size: 12px;
  font-weight: 700;
}

.account-status strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
}

.login-form {
  display: grid;
  gap: 8px;
}

.login-form input {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0 10px;
  background: #071a22;
  color: var(--text);
  font: inherit;
}

.login-form input::placeholder {
  color: #78939a;
}

.login-form button,
.ghost-button {
  width: 100%;
}

.ghost-button {
  background: transparent;
}

.payment-box {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.payment-box span,
.payment-box small {
  color: #aebfb5;
  font-size: 12px;
  font-weight: 700;
}

.payment-box small {
  line-height: 1.4;
}

.analysis-status-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.analysis-status-card span,
.analysis-status-card small {
  color: #aebfb5;
  font-size: 12px;
  font-weight: 800;
}

.analysis-status-card span {
  text-transform: uppercase;
}

.analysis-status-card strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.25;
}

.source-note {
  margin-top: auto;
  color: #c0cec5;
  font-size: 13px;
  line-height: 1.45;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.source-note span {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
}

.source-note strong,
.source-note small {
  display: block;
}

.source-note strong {
  color: #f7fbf7;
  font-size: 13px;
  font-weight: 750;
}

.source-note small {
  margin-top: 6px;
  color: #aebfb5;
}

main {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar,
.panel,
.metric,
.stance-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1.9fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: 8px;
  min-height: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.membership-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 190px;
  padding: 0 12px;
  border: 1px solid rgba(53, 213, 135, 0.32);
  border-radius: 6px;
  background: rgba(53, 213, 135, 0.08);
  color: #bdf5d8;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.topbar-actions label,
.topbar-actions select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar-actions label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
}

h2 {
  font-size: 34px;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.workspace-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: flex-start;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 31, 40, 0.72);
  width: fit-content;
  height: auto;
  min-height: 0;
}

.workspace-tab {
  min-width: 112px;
  min-height: 38px;
  background: transparent;
  color: var(--muted);
}

.workspace-tab.active {
  border-color: rgba(66, 165, 255, 0.58);
  background: #164456;
  color: #fff;
}

.view-panel {
  display: grid;
  gap: 18px;
}

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

body.research-mode #researchView {
  display: contents;
}

body.research-mode .workspace-tabs {
  order: 0;
}

body.research-mode #researchView > section {
  order: 4;
}

body.research-mode #researchView > .basic-live-monitor-panel {
  order: 1;
}

body.research-mode #overview {
  order: 2;
}

body.research-mode #researchView > .research-header-panel {
  order: 3;
}

.basic-dashboard {
  align-content: start;
}

.basic-selected-detail {
  display: grid;
  gap: 14px;
}

.selected-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}

.selected-detail-header h3 {
  font-size: 18px;
}

.basic-action-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
  border-left: 4px solid var(--blue);
}

.basic-action-main {
  display: grid;
  align-content: center;
  gap: 8px;
}

.basic-action-main h3 {
  font-size: 30px;
  line-height: 1.1;
}

.basic-action-main p {
  margin: 0;
  color: #cfe0dd;
  line-height: 1.5;
}

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

.basic-action-grid article {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.basic-action-grid span,
.basic-action-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.basic-action-grid strong {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.15;
}

body.basic-mode .topbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

body.basic-mode .stock-tabs {
  display: none;
}

body.basic-mode .topbar-actions {
  justify-content: flex-end;
}

.basic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
}

.basic-hero h3 {
  font-size: 30px;
  line-height: 1.12;
}

.basic-hero p {
  max-width: 820px;
  margin: 10px 0 0;
  color: #cfe0dd;
  line-height: 1.55;
}

.basic-score-card {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #0b2530;
}

.basic-score-card span,
.basic-score-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.basic-score-card strong {
  color: #fff;
  font-size: 34px;
  line-height: 1.05;
}

.basic-confidence {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.basic-confidence span {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--green));
}

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

.basic-alert-card {
  display: grid;
  gap: 14px;
  min-height: 250px;
  border-left: 4px solid var(--green);
}

.basic-alert-card.sell {
  border-left-color: var(--red);
}

.basic-alert-card h3 {
  font-size: 24px;
  line-height: 1.2;
}

.basic-alert-card p {
  margin: 0;
  color: #cfe0dd;
  line-height: 1.5;
}

.basic-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.basic-stat-row span {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.basic-stat-row strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 20px;
}

.basic-reason-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.basic-reason-list li {
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b2530;
  color: #dce8df;
  line-height: 1.4;
}

.basic-alert-queue {
  display: grid;
  gap: 12px;
}

.queue-decision-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-left: 7px;
  border: 1px solid rgba(139, 185, 194, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: currentColor;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.queue-decision-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  z-index: 30;
  display: grid;
  gap: 7px;
  width: 280px;
  padding: 12px 14px;
  border: 1px solid rgba(139, 185, 194, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(11, 34, 69, 0.2);
  color: #0b2245;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.queue-decision-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(139, 185, 194, 0.18);
  border-top: 1px solid rgba(139, 185, 194, 0.18);
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}

.basic-queue-decision:hover .queue-decision-tooltip,
.basic-queue-row:focus-visible .queue-decision-tooltip,
.queue-decision-help:hover .queue-decision-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.queue-decision-tooltip strong {
  color: #0b2245;
  font-size: 13px;
}

.queue-decision-tooltip small {
  color: #25445e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.basic-queue-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1fr) minmax(420px, 1.35fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #0b2530;
  text-align: left;
}

.basic-queue-row.active {
  border-color: rgba(66, 165, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(66, 165, 255, 0.16), var(--shadow-soft);
}

.basic-queue-row.buy-action,
.basic-queue-row.buy-watch {
  border-left-color: var(--green);
}

.basic-queue-row.sell-warning,
.basic-queue-row.sell-watch {
  border-left-color: var(--red);
}

.basic-queue-row strong {
  color: #fff;
}

.basic-queue-row span,
.basic-queue-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.basic-queue-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.basic-queue-symbol {
  display: grid;
  gap: 4px;
}

.basic-queue-symbol strong {
  font-size: 18px;
}

.basic-queue-decision {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  border-radius: 6px;
  background: rgba(241, 184, 75, 0.12);
  color: #ffd891;
  font-weight: 850;
  text-align: center;
}

.basic-queue-row.buy-action .basic-queue-decision,
.basic-queue-row.buy-watch .basic-queue-decision {
  background: rgba(53, 213, 135, 0.1);
  color: #8df0bd;
}

.basic-queue-row.sell-warning .basic-queue-decision,
.basic-queue-row.sell-watch .basic-queue-decision {
  background: rgba(255, 106, 106, 0.1);
  color: #ffb3b3;
}

.basic-queue-row.buy-action .basic-queue-decision,
.basic-queue-row.sell-warning .basic-queue-decision {
  min-height: 40px;
  font-size: 13px;
}

.basic-queue-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.basic-queue-metrics span {
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid rgba(139, 185, 194, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.basic-queue-metrics strong,
.basic-queue-copy strong {
  display: block;
  margin-top: 5px;
}

.basic-queue-copy {
  display: grid;
  gap: 5px;
  overflow-wrap: anywhere;
}

.basic-queue-copy strong {
  color: #ffffff;
  font-size: 13px;
}

.basic-queue-expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.8fr 0.52fr 0.62fr 1.05fr 0.64fr minmax(320px, 1.55fr);
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease, margin-top 0.18s ease;
}

.basic-queue-row:hover .basic-queue-expanded,
.basic-queue-row:focus-visible .basic-queue-expanded,
.basic-queue-row.expanded .basic-queue-expanded {
  max-height: 72px;
  margin-top: 2px;
  opacity: 1;
  transform: translateY(0);
}

.queue-flow-item,
.queue-flow-note {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid rgba(139, 185, 194, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.queue-flow-item.primary {
  border-color: rgba(66, 165, 255, 0.28);
}

.queue-flow-item small,
.queue-flow-note small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.queue-flow-item strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.12;
}

.queue-flow-note {
  align-content: center;
  min-height: 44px;
}

.queue-flow-note small {
  line-height: 1.25;
}

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

.basic-trust-card {
  min-height: 124px;
  padding: 14px;
  border: 1px solid rgba(139, 185, 194, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.basic-trust-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.basic-trust-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 16px;
}

.basic-trust-card p {
  margin: 8px 0 0;
  color: #cfe0dd;
  font-size: 13px;
  line-height: 1.45;
}

.research-dashboard,
.rnd-dashboard {
  gap: 16px;
}

.research-header-panel,
.rnd-header-panel {
  display: grid;
  gap: 8px;
  border-color: rgba(66, 165, 255, 0.26);
  background: linear-gradient(180deg, #123541 0%, #0d2933 100%);
}

.research-header-panel h3,
.rnd-header-panel h3 {
  font-size: 24px;
}

.research-header-panel p,
.rnd-header-panel p {
  max-width: 980px;
  margin: 0;
  color: #cfe0dd;
  line-height: 1.5;
}

.rnd-header-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.rnd-section-mount {
  display: grid;
  gap: 16px;
}

body.research-mode #best-alerts,
body.research-mode #live-rules,
body.research-mode #alerts,
body.research-mode #cross-validation,
body.research-mode #price,
body.research-mode #anomaly {
  display: none;
}

body.research-mode .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.research-mode .decision-board {
  grid-template-columns: minmax(280px, 1.2fr) repeat(2, minmax(240px, 1fr));
}

body.research-mode .panel,
body.research-mode .metric,
body.research-mode .stance-panel {
  box-shadow: var(--shadow-soft);
}

body.research-mode .table-wrap {
  max-height: 420px;
  overflow: auto;
}

body.research-mode table {
  table-layout: auto;
  font-size: 12px;
}

body.research-mode th,
body.research-mode td {
  padding: 7px 8px;
  line-height: 1.25;
  vertical-align: middle;
}

body.research-mode tbody tr {
  height: auto;
}

body.research-mode .case-occurrence-table {
  max-height: 280px;
}

body.research-mode .case-occurrence-table th,
body.research-mode .case-occurrence-table td {
  padding: 6px 7px;
}

body.research-mode .case-occurrence-table .reason-cell,
body.research-mode .case-occurrence-table td {
  max-width: 260px;
}

body.research-mode .checklist li,
body.research-mode .player-card,
body.research-mode .case-audit-card,
body.research-mode .case-audit-stats span,
body.research-mode .case-occurrence-summary span,
body.research-mode .case-detail-toggle,
body.research-mode .orderbook-read div,
body.research-mode .timing-card,
body.research-mode .indicator-box,
body.research-mode .case-filter-list {
  border-color: rgba(139, 185, 194, 0.18);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

body.research-mode .player-card dd,
body.research-mode .case-audit-card h4,
body.research-mode .case-audit-stats strong,
body.research-mode .case-occurrence-summary strong,
body.research-mode .orderbook-read strong,
body.research-mode .timing-card h4,
body.research-mode .timing-card strong,
body.research-mode .indicator-box h5,
body.research-mode .case-filter-list dd {
  color: #ffffff;
}

body.research-mode .player-card dt,
body.research-mode .case-audit-card p,
body.research-mode .case-audit-score span,
body.research-mode .orderbook-read span,
body.research-mode .timing-card p,
body.research-mode .indicator-box li,
body.research-mode .case-filter-list dt {
  color: #a9c2c8;
}

body.research-mode .tag.accumulator,
body.research-mode .tag.event-buyer {
  background: rgba(53, 213, 135, 0.14);
  color: #8df0bd;
}

body.research-mode .tag.distributor,
body.research-mode .tag.event-seller {
  background: rgba(255, 106, 106, 0.14);
  color: #ffb3b3;
}

body.research-mode .tag.two-way-flow {
  background: rgba(66, 165, 255, 0.14);
  color: #9bd0ff;
}

body.research-mode .tag.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #d6e6e9;
}

body.research-mode .timing-card.buy {
  border-left-color: var(--green);
}

body.research-mode .timing-card.sell {
  border-left-color: var(--red);
}

.stock-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(136px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.stock-tab {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 5px;
  min-height: 76px;
  padding: 10px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(101, 177, 198, 0.22);
  background: linear-gradient(180deg, #143847 0%, #102c38 100%);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stock-tab:hover,
.stock-tab.active {
  border-color: rgba(59, 165, 255, 0.7);
  background: linear-gradient(180deg, #17495d 0%, #103849 100%);
  transform: translateY(-1px);
}

.tab-head,
.tab-winrate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tab-head {
  align-items: flex-start;
}

.tab-symbol {
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
}

.tab-price {
  color: #d9f2f0;
  font-size: 12px;
  font-weight: 760;
}

.tab-winrate {
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 850;
}

.tab-winrate span {
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.06);
}

.tab-reason {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  display: -webkit-box;
  min-height: 28px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar .eyebrow {
  color: #9eb4a6;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  min-height: 116px;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow-soft);
}

.metric span,
.metric small {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.decision-board {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.stance-panel {
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, #14251c 0%, #1f3329 100%);
  color: #f8fbf8;
}

.stance-panel .eyebrow,
.stance-panel small {
  color: #adc1b5;
}

.stance-panel h3 {
  margin: 8px 0 10px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.stance-panel p {
  margin: 0;
  color: #dce8df;
  line-height: 1.45;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 12px;
}

.score-row span {
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #adc1b5;
  font-size: 12px;
  min-width: 0;
}

.score-row strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 22px;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding: 10px 10px 10px 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  line-height: 1.35;
  background: #fbfcfb;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.buy-list li::before {
  background: var(--green);
}

.sell-list li::before {
  background: var(--red);
}

.panel {
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.section-marker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 0;
}

.section-marker h3 {
  font-size: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-header > * {
  min-width: 0;
}

.legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.muted-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orderbook-read {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.orderbook-read div,
.alert-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  min-width: 0;
}

.orderbook-read span,
.alert-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.orderbook-read strong,
.alert-summary strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(16px, 1.8vw, 20px);
  overflow-wrap: anywhere;
}

.legend i {
  display: inline-block;
  width: 20px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.line-blue {
  background: var(--blue);
}

.line-green {
  background: var(--green);
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
}

canvas {
  display: block;
  width: 100%;
  height: 380px;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  vertical-align: top;
}

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

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  background: #f7faf7;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #fbfcfb;
}

.reason-cell,
.signal-cell {
  max-width: 420px;
  min-width: 260px;
  text-align: left;
  white-space: normal;
  line-height: 1.42;
}

.positive {
  color: var(--green);
  font-weight: 700;
}

.negative {
  color: var(--red);
  font-weight: 700;
}

.player-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.player-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.player-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.player-card h4 {
  margin: 0;
  font-size: 22px;
}

.tag {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag.accumulator,
.tag.event-buyer {
  background: #e3f4e8;
  color: #0d6d3d;
}

.tag.distributor,
.tag.event-seller {
  background: #f8e5e5;
  color: #a72222;
}

.tag.two-way-flow {
  background: #e6ecfb;
  color: #244baa;
}

.tag.neutral {
  background: #eef1ee;
  color: #4d5b52;
}

.player-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.player-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.timing-panel {
  border-color: #c9d8d0;
}

.best-alert-panel {
  border-color: #b9d4c5;
}

.alert-panel {
  border-color: #cad7df;
}

.live-rules-panel {
  border-color: #c7d6cf;
}

.simulation-panel {
  border-color: #d8d0c4;
}

.winrate-panel {
  border-color: #ccd7c8;
}

.case-audit-panel {
  border-color: #c4d6d2;
}

.section-subhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 10px;
}

.section-subhead h4 {
  margin: 0;
  font-size: 17px;
}

code {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf7;
  color: #25362d;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 750;
}

.alert-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.alert-cards,
.timing-cards,
.best-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.best-alert-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
  min-width: 0;
}

.best-alert-card.buy {
  border-left: 5px solid var(--green);
}

.best-alert-card.sell {
  border-left: 5px solid var(--red);
}

.best-alert-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.best-alert-card h4 {
  margin: 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.best-alert-card header strong {
  font-size: 22px;
  color: var(--green);
}

.best-alert-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 13px;
}

.live-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.case-audit-grid {
  display: grid;
  gap: 14px;
}

.case-audit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
  min-width: 0;
}

.case-audit-card.buy {
  border-left: 5px solid var(--green);
}

.case-audit-card.sell {
  border-left: 5px solid var(--red);
}

.case-audit-card header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.case-audit-card h4 {
  margin: 4px 0 8px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.case-audit-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.case-audit-score {
  min-width: 116px;
  text-align: right;
}

.case-audit-score strong {
  display: block;
  font-size: 28px;
  color: var(--green);
}

.case-audit-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.case-audit-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.case-audit-stats span {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.case-audit-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 16px;
}

.case-audit-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  margin-bottom: 14px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.profile-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-card h4 {
  margin: 4px 0 0;
}

.profile-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.profile-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-card dd {
  margin: 0;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 220px;
}

.feedback-actions small {
  flex-basis: 100%;
  color: var(--muted);
  font-weight: 700;
}

.feedback-chip {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.feedback-chip:hover,
.feedback-chip.selected {
  border-color: var(--green);
  background: #e2f3e8;
  color: #106b42;
  transform: none;
}

.indicator-box,
.case-filter-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.indicator-box h5 {
  margin: 0 0 10px;
  font-size: 14px;
}

.indicator-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.indicator-box li + li {
  margin-top: 6px;
}

.case-filter-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.case-filter-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-filter-list dd {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.case-occurrence-table {
  max-height: 420px;
  overflow: auto;
}

.case-occurrence-summary {
  display: grid;
  grid-template-columns: 120px repeat(2, minmax(0, 1fr)) 180px;
  gap: 8px;
  margin-top: 12px;
}

.case-occurrence-summary span,
.case-detail-toggle {
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.case-detail-toggle {
  background: rgba(66, 165, 255, 0.1);
  color: #bde2ff;
  text-align: center;
}

.case-detail-toggle:hover {
  background: rgba(66, 165, 255, 0.18);
}

.case-occurrence-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.live-rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  min-width: 0;
}

.live-rule-card.live-action {
  border-left: 4px solid var(--green);
}

.live-rule-card.watch-only {
  border-left: 4px solid #d1961e;
}

.live-rule-card.reject {
  border-left: 4px solid var(--red);
}

.live-rule-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.live-rule-card h4 {
  margin: 4px 0 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.live-rule-card header strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.rule-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-rule-card dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  font-size: 13px;
}

.live-rule-card dt {
  color: var(--muted);
  font-weight: 750;
}

.live-rule-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.action-playbook {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.playbook-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(160px, 0.85fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
  min-width: 0;
}

.playbook-card.buy {
  border-left: 4px solid var(--green);
}

.playbook-card.sell {
  border-left: 4px solid var(--red);
}

.playbook-card h4 {
  margin: 0;
  font-size: 18px;
}

.playbook-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.playbook-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.playbook-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 750;
  text-align: right;
}

.alert-card,
.timing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  min-width: 0;
}

.alert-card.buy,
.timing-card.buy {
  border-left: 4px solid var(--green);
}

.alert-card.sell,
.timing-card.sell {
  border-left: 4px solid var(--red);
}

.alert-card header,
.timing-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.alert-card h4,
.timing-card h4 {
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.alert-card strong,
.timing-card strong {
  display: block;
  font-size: clamp(20px, 2.2vw, 24px);
}

.alert-card p,
.timing-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 13px;
}

.alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alert-meta span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.priority-pill,
.broker-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-pill.action {
  background: #e2f3e8;
  color: #106b42;
}

.priority-pill.high-watch {
  background: #e6ecfb;
  color: #244baa;
}

.priority-pill.watch {
  background: #fff4df;
  color: #8a5b18;
}

.priority-pill.risky {
  background: #f8e5e5;
  color: #a72222;
}

.priority-pill.low {
  background: #eef1ee;
  color: #4d5b52;
}

.broker-pill.confirmed {
  background: #e2f3e8;
  color: #106b42;
}

.broker-pill.conflict {
  background: #f8e5e5;
  color: #a72222;
}

.broker-pill.neutral,
.broker-pill.unknown {
  background: #eef1ee;
  color: #4d5b52;
}

.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.leader-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-alt);
  min-width: 0;
}

.leader-card h4 {
  margin: 0 0 10px;
}

.leader-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.empty-state {
  color: var(--muted);
  text-align: left;
  white-space: normal;
}

.error-banner {
  margin: 12px;
  padding: 12px 14px;
  border: 1px solid #edc7c7;
  border-radius: 8px;
  background: #fff2f2;
  color: var(--red);
  font-weight: 700;
}

.best-alert-panel {
  border-color: rgba(110, 188, 205, 0.2);
  background: linear-gradient(180deg, #102f3b 0%, #0d2630 100%);
}

.best-alert-panel .table-wrap {
  margin-top: 16px;
}

#bestAlertCards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.commercial-alert-card,
.policy-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 56, 69, 0.88);
  padding: 16px;
  min-width: 0;
}

.commercial-alert-card.buy,
.policy-detail-card.buy {
  border-left: 5px solid #14724a;
}

.commercial-alert-card.sell,
.policy-detail-card.sell {
  border-left: 5px solid #b42323;
}

.commercial-alert-card.muted {
  border-left: 5px solid #8a947f;
  background: rgba(255, 255, 255, 0.05);
}

.commercial-alert-card.watch,
.policy-detail-card.watch {
  border-left-style: double;
}

.commercial-alert-card.research,
.policy-detail-card.research {
  opacity: 0.72;
  border-left-color: #7f9298;
}

.commercial-alert-card.ready_buy,
.policy-detail-card.ready_buy {
  box-shadow: inset 0 0 0 1px rgba(53, 213, 135, 0.22), var(--shadow-soft);
}

.commercial-alert-card.no_entry,
.policy-detail-card.no_entry {
  border-left-color: #7f9298;
}

.commercial-alert-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.commercial-alert-card h4,
.policy-detail-card h4 {
  margin: 3px 0 0;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.policy-detail-card h4 {
  font-size: 17px;
}

.commercial-alert-card strong {
  font-size: clamp(24px, 3vw, 34px);
  white-space: nowrap;
}

.strength-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0 12px;
}

.strength-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d69b1d 0%, #14724a 100%);
}

.sell .strength-bar span {
  background: linear-gradient(90deg, #d69b1d 0%, #b42323 100%);
}

.commercial-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.commercial-metrics span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border: 1px solid rgba(139, 185, 194, 0.2);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.commercial-metrics strong {
  color: var(--text);
  font-size: inherit;
}

.commercial-metrics.compact span {
  border-radius: 6px;
}

.policy-action {
  margin: 12px 0 8px;
  color: var(--text);
  font-weight: 750;
  line-height: 1.45;
}

.quality-reason {
  margin: 8px 0 0;
  color: #d9c07a;
  font-size: 13px;
  line-height: 1.4;
}

.profit-reason {
  margin: 6px 0 0;
  color: #87d7ff;
  font-size: 13px;
  line-height: 1.4;
}

.false-reason {
  margin: 6px 0 0;
  color: #ffb4a8;
  font-size: 13px;
  line-height: 1.4;
}

.entry-reason {
  margin: 8px 0 0;
  color: #b6f7d7;
  font-size: 13px;
  line-height: 1.4;
}

.reason-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.policy-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.symbol-ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.live-engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.live-engine-card {
  border: 1px solid var(--line);
  border-left: 5px solid #7f9298;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
  min-width: 0;
}

.live-engine-card.ready-buy,
.live-engine-card.buy-watch {
  border-left-color: var(--green);
}

.live-engine-card.sell-warning,
.live-engine-card.sell-watch {
  border-left-color: var(--red);
}

.live-engine-card.no-alert {
  opacity: 0.76;
}

.live-engine-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.live-engine-card h4 {
  margin: 2px 0 0;
  font-size: 17px;
}

.live-engine-card strong {
  color: #ffffff;
}

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
  min-width: 0;
}

.ranking-panel h4 {
  margin: 2px 0 0;
  font-size: 16px;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  border: 1px solid rgba(139, 185, 194, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 31, 40, 0.48);
}

.ranking-list strong,
.ranking-list b {
  color: #ffffff;
}

.ranking-list span,
.ranking-list p,
.ranking-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ranking-list span {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.ranking-list aside {
  text-align: right;
}

.ranking-list aside small {
  display: block;
  white-space: nowrap;
}

.ranking-list p {
  grid-column: 1 / -1;
  margin: 0;
}

.policy-detail-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.alert-summary article,
.metric,
.table-wrap {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(139, 185, 194, 0.16);
}

table th {
  color: #d8f0ee;
  background: #12313d;
}

table td {
  color: #c9dcdf;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 960px) {
  .landing-view {
    padding: 22px;
  }

  .landing-shell {
    grid-template-columns: 1fr;
  }

  .landing-copy {
    min-height: auto;
    padding: 30px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .stock-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .split,
  .decision-board,
  .orderbook-read,
  .alert-summary,
  .basic-hero,
  .basic-grid,
  .basic-action-card,
  .basic-action-grid,
  .basic-reason-list,
  .basic-queue-row,
  .basic-queue-expanded,
  .basic-trust-grid,
  .playbook-card,
  .case-audit-stats,
  .case-audit-body {
    grid-template-columns: 1fr;
  }

  #bestAlertCards {
    grid-template-columns: 1fr;
  }

  .symbol-ranking-grid {
    grid-template-columns: 1fr;
  }

  .case-audit-card header {
    flex-direction: column;
  }

  .case-audit-score {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .landing-view {
    padding: 14px;
    place-items: stretch;
  }

  .landing-copy,
  .landing-login-card {
    padding: 20px;
  }

  .landing-copy h1 {
    font-size: 34px;
  }

  .landing-proof-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .stock-tabs {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .workspace-tabs {
    width: 100%;
  }

  .workspace-tab {
    flex: 1;
    min-width: 0;
  }

  .basic-stat-row {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h2 {
    font-size: 28px;
  }
}

/* AIT Labs light commercial theme */
:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-alt: #eef8fa;
  --text: #0b2245;
  --ink: #0b2245;
  --muted: #5f7485;
  --line: rgba(11, 34, 69, 0.12);
  --blue: #0b4c8c;
  --green: #04a9b5;
  --red: #db4c5b;
  --amber: #c98b12;
  --shadow: 0 18px 38px rgba(11, 34, 69, 0.09);
  --shadow-soft: 0 10px 24px rgba(11, 34, 69, 0.07);
}

body {
  background: #f5f8fb;
  color: var(--text);
}

button,
select {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.16);
}

button:hover {
  background: #eef8fa;
}

input,
.login-form input,
.landing-login-card input {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.16);
}

.landing-view {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 250, 252, 0.94)),
    radial-gradient(circle at 78% 20%, rgba(4, 169, 181, 0.16), transparent 30%),
    #f5f8fb;
}

.landing-copy,
.landing-login-card,
.panel,
.metric,
.stance-panel,
.table-wrap,
.ranking-panel,
.account-card,
.analysis-status-card,
.source-note,
.basic-trust-card,
.basic-alert-card,
.basic-score-card,
.case-audit-card,
.player-card,
.checklist li,
.indicator-box,
.case-filter-list,
.orderbook-read div,
.timing-card {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.12);
  box-shadow: var(--shadow-soft);
}

.landing-logo-card,
.brand-mark {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.landing-logo-card {
  padding: 0;
}

.landing-login-card button,
.login-form button,
#refreshButton,
#checkoutButton,
.workspace-tab.active {
  background: #0b4c8c;
  color: #ffffff;
  border-color: #0b4c8c;
}

.landing-login-card button:hover,
.login-form button:hover,
#refreshButton:hover,
#checkoutButton:hover,
.workspace-tab.active:hover {
  background: #083a6d;
}

.landing-lead,
.landing-login-card p,
.landing-login-card small,
.topbar-subtitle,
.research-header-panel p,
.rnd-header-panel p,
.metric span,
.metric small,
.account-status span,
.account-status small,
.payment-box span,
.payment-box small,
.analysis-status-card span,
.analysis-status-card small,
.source-note,
.basic-queue-row span,
.basic-queue-row small,
.basic-reason-list p,
.basic-trust-card p,
.case-audit-card p,
.case-audit-score span,
.case-filter-list dt,
.player-card dt,
.timing-card p,
.orderbook-read span,
.indicator-box li,
.policy-detail-card p {
  color: #5f7485;
}

.sidebar {
  background: #ffffff;
  color: #0b2245;
  border-right: 1px solid rgba(11, 34, 69, 0.08);
  box-shadow: 12px 0 28px rgba(11, 34, 69, 0.04);
}

.sidebar h1,
.sidebar a,
.account-status strong,
.analysis-status-card strong,
.source-note span,
.source-note strong,
.topbar h2,
.panel h3,
.metric strong,
.basic-queue-row strong,
.basic-alert-card h3,
.basic-score-card strong,
.case-audit-card h4,
.case-audit-stats strong,
.case-occurrence-summary strong,
.player-card dd,
.timing-card h4,
.timing-card strong,
.orderbook-read strong,
.indicator-box h5,
.case-filter-list dd {
  color: #0b2245;
}

.sidebar a:hover {
  background: #eef8fa;
  border-color: rgba(4, 169, 181, 0.18);
}

.eyebrow {
  color: #048d99;
}

.workspace-tabs {
  background: #ffffff;
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-radius: 8px;
  padding: 4px;
  box-shadow: var(--shadow-soft);
}

.workspace-tab {
  background: transparent;
  color: #0b2245;
}

.topbar,
.best-alert-panel,
.research-header-panel,
.rnd-header-panel,
.basic-hero,
.basic-queue-panel,
.basic-reasons-panel,
.alert-panel,
.live-rules-panel,
.simulation-panel,
.winrate-panel,
.case-audit-panel {
  background: #ffffff;
  border-color: rgba(11, 34, 69, 0.12);
}

.stock-tab,
.basic-queue-row {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.12);
  box-shadow: var(--shadow-soft);
}

.stock-tab:hover,
.stock-tab.active {
  background: #eef8fa;
  border-color: rgba(4, 169, 181, 0.52);
}

.basic-queue-row.buy-action,
.basic-queue-row.buy-watch,
.basic-alert-card.buy,
.timing-card.buy,
.case-audit-card.buy {
  border-left-color: #04a9b5;
}

.basic-queue-row.sell-warning,
.basic-queue-row.sell-watch,
.basic-alert-card.sell,
.timing-card.sell,
.case-audit-card.sell {
  border-left-color: #db4c5b;
}

.basic-queue-row.buy-action .basic-queue-decision,
.basic-queue-row.buy-watch .basic-queue-decision,
.tag.accumulator,
.tag.event-buyer,
body.research-mode .tag.accumulator,
body.research-mode .tag.event-buyer {
  background: rgba(4, 169, 181, 0.12);
  color: #057985;
}

.basic-queue-row.sell-warning .basic-queue-decision,
.basic-queue-row.sell-watch .basic-queue-decision,
.tag.distributor,
.tag.event-seller,
body.research-mode .tag.distributor,
body.research-mode .tag.event-seller {
  background: rgba(219, 76, 91, 0.12);
  color: #b83444;
}

.muted-pill,
.membership-pill,
.tag.neutral,
body.research-mode .tag.neutral {
  background: #eef8fa;
  color: #0b4c8c;
  border-color: rgba(11, 76, 140, 0.16);
}

.tag.two-way-flow,
body.research-mode .tag.two-way-flow {
  background: rgba(11, 76, 140, 0.1);
  color: #0b4c8c;
}

.positive {
  color: #058b94;
}

.negative {
  color: #db4c5b;
}

table {
  background: #ffffff;
  color: #0b2245;
}

table th,
body.research-mode table th {
  color: #0b2245;
  background: #eef8fa;
  border-bottom-color: rgba(11, 34, 69, 0.14);
}

table td,
body.research-mode table td {
  color: #25445e;
  border-bottom-color: rgba(11, 34, 69, 0.08);
}

tbody tr:hover {
  background: rgba(4, 169, 181, 0.06);
}

.alert-summary article,
.case-audit-stats span,
.case-occurrence-summary span,
.case-detail-toggle,
body.research-mode .checklist li,
body.research-mode .player-card,
body.research-mode .case-audit-card,
body.research-mode .case-audit-stats span,
body.research-mode .case-occurrence-summary span,
body.research-mode .case-detail-toggle,
body.research-mode .orderbook-read div,
body.research-mode .timing-card,
body.research-mode .indicator-box,
body.research-mode .case-filter-list {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.12);
}

body.research-mode .player-card dd,
body.research-mode .case-audit-card h4,
body.research-mode .case-audit-stats strong,
body.research-mode .case-occurrence-summary strong,
body.research-mode .orderbook-read strong,
body.research-mode .timing-card h4,
body.research-mode .timing-card strong,
body.research-mode .indicator-box h5,
body.research-mode .case-filter-list dd {
  color: #0b2245;
}

body.research-mode .player-card dt,
body.research-mode .case-audit-card p,
body.research-mode .case-audit-score span,
body.research-mode .orderbook-read span,
body.research-mode .timing-card p,
body.research-mode .indicator-box li,
body.research-mode .case-filter-list dt {
  color: #5f7485;
}

.error-banner {
  background: #fff3f4;
  color: #8b1e2b;
  border-color: rgba(219, 76, 91, 0.28);
}

/* Light theme contrast fixes for Basic and Research */
.landing-proof-grid span {
  background: #eef8fa;
  color: #0b2245;
  border-color: rgba(4, 169, 181, 0.22);
}

.topbar-subtitle,
.research-header-panel p,
.basic-summary,
#basicSummary,
#basicActionReason,
#basicBuyReason,
#basicSellReason,
.basic-alert-card p,
.basic-trust-card p,
.stance-panel p,
.stance-panel small,
.metric small,
.source-note small {
  color: #466174;
}

.tab-symbol,
.stock-tab.active .tab-symbol,
.stock-tab:hover .tab-symbol,
.live-engine-card strong,
.ranking-list b {
  color: #0b2245;
}

.tab-price,
.stock-tab.active .tab-price,
.stock-tab:hover .tab-price {
  color: #466174;
}

.tab-reason,
.stock-tab.active .tab-reason,
.stock-tab:hover .tab-reason {
  color: #36556c;
}

.tab-winrate,
.stock-tab.active .tab-winrate,
.stock-tab:hover .tab-winrate {
  background: #f2fbfc;
  border-color: rgba(4, 169, 181, 0.18);
}

.stock-tab.active {
  background: #e9f8fb;
  box-shadow: 0 0 0 1px rgba(4, 169, 181, 0.25), var(--shadow-soft);
}

.basic-score-card span,
.basic-score-card small,
.basic-stat-row span,
.basic-trust-card span,
.queue-flow-item small,
.queue-flow-note small,
.stance-panel .eyebrow,
.stance-panel .stance-stats span,
.alert-summary span,
.rule-status,
.live-rule-card header strong,
.live-rule-card dt,
.commercial-alert-card p,
.signal-explain-card p,
.ranking-list small {
  color: #5a7184;
}

.basic-score-card,
.basic-action-grid article,
.queue-flow-item,
.queue-flow-note,
.basic-stat-row span,
.stance-stats span,
.commercial-alert-card,
.live-engine-card,
.ranking-panel {
  background: #ffffff;
  border-color: rgba(11, 34, 69, 0.12);
  color: #0b2245;
}

.basic-reason-list li {
  background: #f7fbfc;
  color: #0b2245;
  border: 1px solid rgba(11, 34, 69, 0.1);
}

.basic-reason-list li:nth-child(odd) {
  border-left: 4px solid #04a9b5;
}

.basic-reason-list li:nth-child(even) {
  border-left: 4px solid #0b4c8c;
}

.stance-panel {
  background: #ffffff;
  border-color: rgba(11, 34, 69, 0.12);
}

.stance-panel h3,
.stance-stats strong {
  color: #0b2245;
}

.checklist li {
  background: #ffffff;
  color: #0b2245;
  border-color: rgba(11, 34, 69, 0.12);
}

.checklist li::before {
  background: #04a9b5;
}

.risk-list li::before,
.sell-list li::before {
  background: #db4c5b;
}

.table-wrap,
body.research-mode .table-wrap {
  background: #ffffff;
  border-color: rgba(11, 34, 69, 0.12);
}

.case-occurrence-table {
  background: #ffffff;
}

.case-occurrence-table td,
.case-occurrence-table th {
  color: #25445e;
}

.case-detail-toggle {
  background: #eef8fa;
  color: #0b4c8c;
}

.basic-alert-card .basic-stat-row span {
  min-height: 64px;
  background: #ffffff;
  color: #36556c;
  border-color: rgba(11, 34, 69, 0.14);
}

.basic-alert-card .basic-stat-row strong,
.basic-alert-card.buy .basic-stat-row strong,
.basic-alert-card.sell .basic-stat-row strong,
.basic-action-grid strong,
.queue-flow-item strong {
  display: block;
  margin-top: 8px;
  color: #0b2245;
  font-size: 22px;
  line-height: 1.05;
}

.queue-flow-item strong {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.12;
}

.basic-alert-card.buy .basic-stat-row strong {
  color: #057985;
}

.basic-alert-card.sell .basic-stat-row strong {
  color: #b83444;
}

.sidebar nav,
.hidden-payment,
.source-note {
  display: none !important;
}

.brand-lockup {
  gap: 8px;
}

.brand-mark {
  width: 64px;
  height: 64px;
}

.account-card {
  gap: 14px;
  padding: 16px;
}

.membership-profile {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(4, 169, 181, 0.18);
  border-radius: 8px;
  background: #f2fbfc;
}

.analysis-status-card {
  border-color: rgba(4, 169, 181, 0.18);
  background: #f2fbfc;
}

.membership-profile span,
.membership-profile small,
.plan-list span,
.analysis-status-card span,
.analysis-status-card small {
  color: #5a7184;
  font-size: 12px;
  font-weight: 800;
}

.membership-profile strong {
  color: #0b2245;
  font-size: 18px;
}

.analysis-status-card strong {
  color: #0b4c8c;
  font-size: 15px;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.plan-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.plan-list strong {
  color: #0b4c8c;
  font-size: 13px;
}

.account-card .ghost-button {
  margin-top: 2px;
  border-color: rgba(11, 34, 69, 0.14);
  color: #0b2245;
}

.stance-panel .score-row {
  gap: 10px;
}

.stance-panel .score-row span {
  min-height: 62px;
  background: #f7fbfc;
  color: #5a7184;
  border-color: rgba(11, 34, 69, 0.12);
}

.stance-panel .score-row strong,
.stance-panel #buyScore,
.stance-panel #sellScore,
.stance-panel #confidence {
  display: block;
  margin-top: 8px;
  color: #0b2245;
  font-size: 22px;
  line-height: 1.05;
}

.stance-panel #buyScore {
  color: #057985;
}

.stance-panel #sellScore {
  color: #b83444;
}

#confidenceNote {
  display: block;
  margin-top: 14px;
  color: #466174;
  font-size: 13px;
  font-weight: 700;
}

.admin-tab-button {
  border-color: rgba(4, 169, 181, 0.24);
}

.admin-header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header-panel p {
  margin: 6px 0 0;
  color: #466174;
}

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

.admin-dashboard .metric strong {
  color: #0b4c8c;
}

.admin-split {
  align-items: start;
}

.admin-dashboard .table-wrap {
  max-height: 420px;
}

.admin-plan-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-plan-actions button {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #f2fbfc;
  color: #0b4c8c;
  font-size: 12px;
  font-weight: 800;
}

.admin-plan-actions button:hover {
  background: #0b4c8c;
  color: #ffffff;
}

body.basic-mode #overview,
body.rnd-mode #overview,
body.admin-mode #overview {
  display: none;
}

body.research-locked-mode #overview {
  display: none;
}

.basic-live-monitor-panel {
  display: grid;
  gap: 16px;
}

.basic-live-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basic-live-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(11, 34, 69, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #0b4c8c;
  font-size: 13px;
  font-weight: 900;
}

.basic-live-actions button:hover {
  background: #eefbfd;
  border-color: rgba(4, 169, 181, 0.35);
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.live-status-pill.running {
  background: #e6fbf4;
  color: #057a55;
  border: 1px solid rgba(5, 122, 85, 0.18);
}

.live-status-pill.stale {
  background: #fff8e6;
  color: #9a6500;
  border: 1px solid rgba(154, 101, 0, 0.18);
}

.live-status-pill.paused {
  background: #eef8fa;
  color: #0b4c8c;
  border: 1px solid rgba(11, 76, 140, 0.16);
}

.live-status-pill.error {
  background: #fff0f3;
  color: #b83444;
  border: 1px solid rgba(184, 52, 68, 0.18);
}

.basic-live-stats {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.basic-live-stats article {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-radius: 8px;
  background: #f7fbfc;
}

.basic-live-stats span {
  color: #5a7184;
  font-size: 12px;
  font-weight: 800;
}

.basic-live-stats strong {
  color: #0b2245;
  font-size: 18px;
  line-height: 1.15;
}

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

.live-best-card {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-left: 4px solid #7d91a1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 34, 69, 0.05);
}

.live-best-card.buy {
  border-left-color: #04a9b5;
}

.live-best-card.sell {
  border-left-color: #db4c5b;
}

.live-best-card span {
  color: #5a7184;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-best-card strong {
  color: #0b2245;
  font-size: 18px;
  line-height: 1.15;
}

.live-best-card.buy strong {
  color: #057985;
}

.live-best-card.sell strong {
  color: #b83444;
}

.live-best-card small {
  color: #466174;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.basic-live-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(11, 34, 69, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.basic-live-table-wrap .data-table {
  min-width: 980px;
}

.basic-live-table-wrap .data-table td,
.basic-live-table-wrap .data-table th {
  padding: 10px 12px;
}

.basic-live-table-wrap .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

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

.live-outcome-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.live-outcome-table-wrap .data-table {
  min-width: 1120px;
}

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

.sell-exit-quality-panel {
  display: grid;
  gap: 14px;
}

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

.position-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(120px, 1fr) minmax(100px, 0.8fr) minmax(140px, 1fr) auto;
  gap: 10px;
}

.position-form input,
.position-form select {
  min-height: 40px;
  border: 1px solid rgba(11, 34, 69, 0.14);
  border-radius: 6px;
  padding: 0 12px;
  color: #0b2245;
  background: #ffffff;
  font-weight: 700;
}

.position-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.position-table-wrap .data-table {
  min-width: 1060px;
}

.ghost-button {
  border: 1px solid rgba(11, 34, 69, 0.16);
  border-radius: 6px;
  padding: 7px 10px;
  color: #0b2245;
  background: #ffffff;
  font-weight: 800;
}

.historical-multiday-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.sell-exit-quality-table-wrap {
  max-height: 320px;
  overflow: auto;
}

.historical-multiday-table-wrap .data-table {
  min-width: 1040px;
}

.sell-exit-quality-table-wrap .data-table {
  min-width: 1080px;
}

.historical-multiday-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbfc;
}

.sell-exit-quality-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbfc;
}

.live-outcome-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbfc;
}

.neutral {
  color: #5a7184;
  font-weight: 800;
}

.muted {
  color: #7f94a5;
  font-weight: 700;
}

.live-monitor-note {
  margin: 0;
  color: #466174;
  font-size: 13px;
  font-weight: 700;
}

.research-lock-panel {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: center;
}

.research-lock-panel h3 {
  margin: 6px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

.research-lock-panel p {
  max-width: 740px;
  color: #466174;
  font-size: 16px;
  line-height: 1.6;
}

.research-lock-plans {
  display: grid;
  gap: 10px;
}

.research-lock-plans article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(11, 34, 69, 0.12);
  border-radius: 8px;
  background: #f7fbfc;
}

.research-lock-plans span,
.research-lock-plans small {
  color: #5a7184;
  font-size: 12px;
  font-weight: 800;
}

.research-lock-plans strong {
  color: #0b2245;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .admin-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .basic-live-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-best-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-header-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .research-lock-panel {
    grid-template-columns: 1fr;
  }

  .basic-live-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .basic-live-stats {
    grid-template-columns: 1fr;
  }

  .live-best-grid {
    grid-template-columns: 1fr;
  }

  .position-form {
    grid-template-columns: 1fr;
  }
}
