/* Institutional terminal design tokens — Track Record, Learn, Contact */
:root {
  --color-terminal-bg: #0A192F;
  --color-terminal-surface: #112240;
  --color-terminal-border: #2a3344;
  --color-electric-blue: #5c9ce5;
  --color-alert-gold: #C5A059;
  --color-text-primary: #F8FAFC;
  --color-text-muted: #8892B0;
}

/* Terminal screens — crisp monospace across all UI chrome */
body.terminal-screen,
body.terminal-screen * {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
}

body.terminal-screen {
  background-color: var(--color-terminal-bg) !important;
  color: var(--color-text-primary) !important;

  /* Bridge legacy inline tokens to institutional palette */
  --black: var(--color-terminal-bg);
  --dark: var(--color-terminal-bg);
  --card: var(--color-terminal-surface);
  --card-hover: #152a4a;
  --border: var(--color-terminal-border);
  --muted: var(--color-text-muted);
  --text: var(--color-text-primary);
  --light: var(--color-text-primary);
  --white: var(--color-text-primary);
  --green: #2DD4BF;
  --accent: var(--color-electric-blue);
}

body.terminal-screen h1,
body.terminal-screen h2,
body.terminal-screen h3,
body.terminal-screen h4 {
  color: var(--color-text-primary) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.terminal-screen nav {
  background: var(--color-terminal-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--color-terminal-border) !important;
  border-radius: 0 !important;
}

body.terminal-screen a {
  color: var(--color-electric-blue);
}

body.terminal-screen ::selection {
  background: rgba(92, 156, 229, 0.25);
  color: var(--color-text-primary);
}

/* ── Track Record: settlement ledger ─────────────────────────────────────── */

body.terminal-screen .trust-callout,
body.terminal-screen .asset-grid,
body.terminal-screen .asset-chip-strip,
body.terminal-screen .cta-conversion-card {
  display: none !important;
}

body.terminal-screen .trend-card,
body.terminal-screen .breakdown-card {
  background: var(--color-terminal-surface) !important;
  border: 1px solid var(--color-terminal-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.terminal-screen .page-badge,
body.terminal-screen .page-header {
  border-radius: 0 !important;
}

body.terminal-screen .terminal-ledger-grid,
body.terminal-screen .bberg-table-wrap {
  background-color: var(--color-terminal-bg);
  padding: 16px;
  border: 1px solid var(--color-terminal-border);
  border-radius: 0;
  overflow-x: auto;
}

body.terminal-screen .settlement-table,
body.terminal-screen .bberg-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0;
  font-size: 12px;
}

body.terminal-screen .settlement-table thead th,
body.terminal-screen .bberg-table thead th {
  background: var(--color-terminal-surface);
  border-bottom: 1px solid var(--color-terminal-border);
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 10px 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

body.terminal-screen .settlement-table tbody tr,
body.terminal-screen .bberg-table tbody tr {
  border-bottom: 1px solid var(--color-terminal-border);
}

body.terminal-screen .settlement-table tbody tr:hover,
body.terminal-screen .bberg-table tbody tr:hover {
  background: rgba(17, 34, 64, 0.6);
}

body.terminal-screen .settlement-table tbody td,
body.terminal-screen .bberg-table tbody td {
  padding: 10px 12px;
  color: var(--color-text-primary);
  vertical-align: middle;
  font-size: 12px;
}

body.terminal-screen .status-win {
  color: #2DD4BF;
  font-weight: bold;
  background: rgba(45, 212, 191, 0.08);
  padding: 2px 6px;
  display: inline-block;
  text-transform: uppercase;
  border-radius: 0;
}

body.terminal-screen .status-loss {
  color: var(--color-text-muted);
  text-transform: uppercase;
  background: transparent;
  font-weight: 600;
  padding: 2px 6px;
  display: inline-block;
  border-radius: 0;
}

body.terminal-screen .ledger-ticker {
  color: var(--color-text-primary);
  font-weight: 700;
}

body.terminal-screen .ledger-ts {
  color: var(--color-text-muted);
  font-size: 11px;
}

body.terminal-screen .ledger-freq {
  color: var(--color-electric-blue);
  font-size: 11px;
}

body.terminal-screen .ledger-conf {
  color: var(--color-text-primary);
}

body.terminal-screen .ledger-value-score.ledger-edge-positive,
body.terminal-screen .ledger-edge-positive {
  color: var(--color-alert-gold);
  font-weight: 600;
}

body.terminal-screen .ledger-value-score.ledger-edge-neutral,
body.terminal-screen .ledger-edge-neutral {
  color: var(--color-text-muted);
}

body.terminal-screen .filter-btn,
body.terminal-screen .action-btn,
body.terminal-screen .acc-window-tab,
body.terminal-screen .freq-timeline-chip {
  border-radius: 0 !important;
  background: var(--color-terminal-surface) !important;
  border: 1px solid var(--color-terminal-border) !important;
  color: var(--color-text-muted) !important;
  box-shadow: none !important;
}

body.terminal-screen .filter-btn.active,
body.terminal-screen .acc-window-tab.active,
body.terminal-screen .freq-timeline-chip.active {
  border-color: var(--color-electric-blue) !important;
  color: var(--color-electric-blue) !important;
  background: rgba(92, 156, 229, 0.08) !important;
}

/* ── Learn: rigid terminal workspace skeleton ─────────────────────────────── */

body.terminal-screen.learn-terminal {
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.terminal-screen.learn-terminal nav {
  height: 60px !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

body.terminal-screen.learn-terminal nav .logo img {
  height: 28px !important;
}

body.terminal-screen.learn-terminal footer,
body.terminal-screen.learn-terminal .bottom-nav {
  display: none !important;
}

body.terminal-screen .page-hero,
body.terminal-screen .jump-nav,
body.terminal-screen .cta-section {
  display: none !important;
}

.terminal-workspace-container {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  width: 100vw !important;
  max-width: 100% !important;
  height: calc(100vh - 60px) !important;
  background-color: #0A192F !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 60px !important;
  left: 0 !important;
  right: 0 !important;
}

/* Sidebar pane — 01/02 visibility guarantee */
.terminal-sidebar-pane {
  background-color: #112240 !important;
  border-right: 1px solid #2a3344 !important;
  padding: 20px 16px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-width: 0 !important;
}

.sidebar-row-item {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  white-space: nowrap !important;
  font-family: monospace !important;
  font-size: 13px !important;
  color: #8892B0 !important;
  padding: 10px 12px !important;
  border-left: 2px solid transparent !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  user-select: none !important;
}

.sidebar-row-item.active {
  color: #F8FAFC !important;
  background: rgba(92, 156, 229, 0.08) !important;
  border-left-color: #5c9ce5 !important;
}

.sidebar-row-item:hover:not(.active) {
  color: #F8FAFC !important;
  background: rgba(17, 34, 64, 0.5) !important;
}

/* Middle scroll alignment fix */
.terminal-scroll-body {
  padding: 24px !important;
  box-sizing: border-box !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  height: 100% !important;
  display: block !important;
  text-align: left !important;
  min-width: 0 !important;
}

.terminal-text-block {
  max-width: 800px !important;
  margin: 0 auto 0 0 !important;
  font-family: monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: #F8FAFC !important;
}

body.terminal-screen .docs-panel-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-terminal-border);
}

body.terminal-screen .docs-panel-header .docs-tag {
  font-size: 11px;
  color: var(--color-electric-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

body.terminal-screen .docs-panel-header h1 {
  font-size: 18px;
  margin-bottom: 8px;
}

body.terminal-screen .docs-panel-header p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

body.terminal-screen .content-section {
  line-height: 1.5;
  font-size: 13px;
  color: var(--color-text-primary);
  padding: 0 0 32px;
  margin: 0 0 32px;
  border-bottom: 1px solid var(--color-terminal-border);
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.terminal-screen .content-section p,
body.terminal-screen .content-section li {
  line-height: 1.5;
  font-size: 13px;
  color: var(--color-text-primary);
}

body.terminal-screen .content-section .section-label {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

body.terminal-screen .content-section h2 {
  font-size: 15px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.terminal-screen .content-section h3 {
  font-size: 13px;
  margin: 20px 0 8px;
  color: var(--color-electric-blue);
}

body.terminal-screen .terminal-code-block,
body.terminal-screen .contract-demo,
body.terminal-screen .callout {
  background: var(--color-terminal-surface);
  border: 1px solid var(--color-terminal-border);
  border-radius: 2px;
  padding: 12px;
  margin: 16px 0;
  box-shadow: none !important;
}

body.terminal-screen .contract-choice,
body.terminal-screen .contract-detail-item,
body.terminal-screen .feature-list li,
body.terminal-screen .faq-item,
body.terminal-screen .step-card,
body.terminal-screen .signal-demo-card {
  background: var(--color-terminal-surface) !important;
  border: 1px solid var(--color-terminal-border) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

body.terminal-screen .feature-list .icon,
body.terminal-screen .page-meta span {
  display: none;
}

body.terminal-screen .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 16px 0;
}

body.terminal-screen .compare-table th,
body.terminal-screen .compare-table td {
  border: 1px solid var(--color-terminal-border);
  padding: 8px 10px;
  text-align: left;
}

body.terminal-screen .compare-table thead th {
  background: var(--color-terminal-surface);
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

body.terminal-screen .yes-tag,
body.terminal-screen .no-tag {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

@media (max-width: 768px) {
  .terminal-workspace-container {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important;
  }

  .terminal-sidebar-pane {
    max-height: 180px;
    flex-shrink: 0;
  }
}

/* ── Contact: desk console ────────────────────────────────────────────────── */

body.terminal-screen .page-wrap {
  padding-top: 80px;
}

body.terminal-screen .page-header .page-badge {
  font-size: 11px;
  color: var(--color-electric-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 8px;
}

body.terminal-screen .page-header h1 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.terminal-screen .page-header p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

body.terminal-screen .email-card {
  display: none !important;
}

body.terminal-screen .desk-console,
body.terminal-screen .form-card {
  max-width: 600px;
  padding: 20px;
  border: 1px solid var(--color-terminal-border);
  background-color: var(--color-terminal-surface);
  border-radius: 4px;
  box-shadow: none !important;
}

body.terminal-screen .desk-console h2,
body.terminal-screen .form-card h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

body.terminal-screen .desk-console .form-sub,
body.terminal-screen .form-card .form-sub {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

body.terminal-screen .desk-console label,
body.terminal-screen .form-card label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

body.terminal-screen .desk-console input,
body.terminal-screen .desk-console textarea,
body.terminal-screen .desk-console select,
body.terminal-screen .form-card input,
body.terminal-screen .form-card textarea,
body.terminal-screen .form-card select {
  border-radius: 2px !important;
  background: var(--color-terminal-bg) !important;
  border: 1px solid var(--color-terminal-border) !important;
  color: var(--color-text-primary) !important;
  padding: 10px;
  font-size: 13px;
}

body.terminal-screen .transmit-btn,
body.terminal-screen .submit-btn {
  background-color: var(--color-electric-blue) !important;
  color: #ffffff !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  border: none !important;
  letter-spacing: 0.05em !important;
  border-radius: 2px !important;
  min-height: 44px;
  width: 100%;
  cursor: pointer;
  margin-top: 8px;
}

body.terminal-screen .transmit-btn:hover,
body.terminal-screen .submit-btn:hover {
  filter: brightness(1.08);
}

body.terminal-screen .transmit-btn:disabled,
body.terminal-screen .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

body.terminal-screen .faq-section {
  max-width: 600px;
  margin-top: 32px;
  border-top: 1px solid var(--color-terminal-border);
  padding-top: 24px;
}

body.terminal-screen .faq-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

body.terminal-screen .faq-item {
  border: 1px solid var(--color-terminal-border);
  border-radius: 0;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--color-terminal-surface);
}

body.terminal-screen .faq-q {
  font-size: 12px;
  color: var(--color-text-primary);
  font-weight: 600;
}

body.terminal-screen .faq-a {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-top: 6px;
}

body.terminal-screen footer {
  border-top: 1px solid var(--color-terminal-border);
  margin-top: 48px;
}

body.terminal-screen footer p {
  font-size: 11px;
  color: var(--color-text-muted);
}
