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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

:root {
  --gold: #D4B666;
  --gold-hover: #E3C98A;
  --on-gold: #1A1612;
  --midnight: #232323;
  --surface: #2C2C2C;
  --red: #D4B666;
  --red-hover: #E3C98A;
  --red-deep: #A88B45;
  --red-soft: #3A3530;
  --ink: #F7F5F2;
  --ink-2: #D8D4CE;
  --muted: #C4BFB8;
  --line: #434343;
  --line-2: #525252;
  --paper: #2C2C2C;
  --white: #232323;
  --up: #2EBD6B;
  --down: #F04438;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  --header-h: 64px;
  --ticker-h: 34px;
  --util-h: 32px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a, button, input, select, textarea, label {
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.wrap-wide {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.serif {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
}

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

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

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 8px;
  background:#171514;
  padding: 8px 12px;
  z-index: 100;
}

/* Top utility */
.util {
  background: #111;
  color: #d8d8d8;
  font-size: 12px;
  height: var(--util-h);
  display: flex;
  align-items: center;
}

.util .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1280px, calc(100% - 32px));
}

.util a {
  color: #d8d8d8;
  margin-right: 16px;
}

.util a:hover {
  color:#E8E3E3;
  text-decoration: none;
}

.util-right {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3DDC97;
  display: inline-block;
  margin-right: 6px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid #3a3a3a;
  margin-right: 4px;
}

.lang-switch a {
  margin: 0 !important;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b8b8b8 !important;
  text-decoration: none !important;
  border-right: 1px solid #3a3a3a;
}

.lang-switch a:last-child {
  border-right: 0;
}

.lang-switch a.on,
.lang-switch a:hover {
  color:#E8E3E3 !important;
  background: #D4B666;
}

.footer .lang-switch {
  margin-top: 14px;
  border-color: #d8d4ce;
}

.footer .lang-switch a {
  color: var(--ink-2) !important;
  border-right-color: #d8d4ce;
}

.footer .lang-switch a.on,
.footer .lang-switch a:hover {
  color:#E8E3E3 !important;
  background: #D4B666;
}

.dash .lang-switch {
  border-color: #3a3a3a;
}

/* Header */
.header {
  background:#171514;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 34px;
  height: 34px;
  background: var(--red);
  color:#E8E3E3;
  display: grid;
  place-items: center;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand-text span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  flex: 1;
}

.nav > a,
.nav .has-menu > button,
.nav .has-menu > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 13px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav > a:hover,
.nav .has-menu:hover > button,
.nav .has-menu:hover > a,
.nav > a:focus,
.nav .has-menu > button:focus,
.nav .has-menu > a:focus {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}

.has-menu {
  position: relative;
  display: flex;
  align-items: stretch;
}

.menu {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  background:#171514;
  border: 1px solid var(--line);
  min-width: 280px;
  padding: 10px 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.has-menu:hover .menu,
.has-menu:focus-within .menu {
  display: block;
}

.menu a {
  display: block;
  padding: 8px 16px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
}

.menu a:hover {
  background: var(--paper);
  color: var(--red);
  text-decoration: none;
}

.menu small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:hover {
  text-decoration: none;
}

.btn-red {
  background: var(--red);
  color:#E8E3E3;
  border-color: var(--red);
}

.btn-red:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color:#E8E3E3;
}

.btn-ghost {
  background:#171514;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: #bbb;
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color:#E8E3E3;
  border-color: var(--ink);
}

.btn-dark:hover {
  background: #000;
  color:#E8E3E3;
}

.btn-lg {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 38px;
  height: 34px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 8px;
}

/* Ticker */
.ticker {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  height: var(--ticker-h);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  animation: tick 42s linear infinite;
  padding-left: 16px;
}

.ticker-item {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-decoration: none;
}

a.ticker-item:hover {
  color: var(--ink);
  text-decoration: none;
}

.ticker-item b {
  margin-right: 6px;
  color: var(--ink);
}

@keyframes tick {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Flash */
.flash-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 12px auto 0;
}

.flash {
  padding: 10px 12px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 14px;
}

.flash-error {
  background: #2A2418;
  border-color: #e8c4c4;
  color: #7a1212;
}

.flash-success {
  background: #163028;
  border-color: #c9e4d3;
  color: #3DDC97;
}

/* Hero */
.hero {
  background:linear-gradient(180deg, #171514 0%, #211E1C 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  padding: 48px 0 56px;
  align-items: start;
}

.kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 46px;
  line-height: 1.12;
  font-weight: 650;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 540px;
  margin: 0 0 22px;
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.fine {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 520px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.stats div {
  padding: 16px 18px 0 0;
}

.stats strong {
  display: block;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stats span {
  color: var(--muted);
  font-size: 12.5px;
}

.snapshot {
  background:#171514;
  border: 1px solid var(--line);
}

.snapshot-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #211E1C;
}

.snapshot-h h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.snapshot-h span {
  font-size: 12px;
  color: var(--muted);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.data th,
table.data td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
}

table.data th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

table.data td.r,
table.data th.r {
  text-align: right;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: #211E1C;
}

/* Quote strip */
.tools {
  background:#171514;
  border-bottom: 1px solid var(--line);
}

.tools-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 0;
}

.tool {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.tool:last-child {
  border-right: 0;
}

.tool label,
.tool .tl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.quote-form {
  display: flex;
  gap: 0;
}

.quote-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-right: 0;
  padding: 8px 10px;
  outline: none;
}

.quote-form input:focus {
  border-color: #bbb;
}

.quote-form button {
  border: 1px solid var(--red);
  background: var(--red);
  color:#E8E3E3;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

.tool p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.tool a.inline {
  font-weight: 700;
  color: var(--red);
}

/* Sections */
.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-h {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-h h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-h p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 560px;
}

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

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card {
  background:#171514;
  border: 1px solid var(--line);
  padding: 18px 18px 16px;
}

.card h3 {
  margin: 8px 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.icon-line {
  width: 28px;
  height: 3px;
  background: var(--red);
}

.card a.more,
a.card .more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
}

a.card {
  color: inherit;
  text-decoration: none;
  display: block;
}

a.card.story {
  display: grid;
}

a.card:hover {
  text-decoration: none;
  border-color: #bdb7b0;
}

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

a.kpi:hover {
  text-decoration: none;
  border-color: #bdb7b0;
}

.crumb {
  font-size: 12.5px;
  color: #cfcfcf;
  margin: 0 0 10px;
}

.crumb a {
  color: #cfcfcf;
}

.crumb a:hover {
  color:#E8E3E3;
}

.related {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.related h3 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.related-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prod-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
}

/* Platform */
.platform {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.checklist {
  list-style: none;
  margin: 16px 0 22px;
  padding: 0;
}

.checklist li {
  padding: 8px 0 8px 22px;
  position: relative;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
}

.checklist li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
  position: absolute;
  left: 0;
  top: 14px;
}

.terminal {
  background: #161616;
  color: #ececec;
  border: 1px solid #2a2a2a;
  min-height: 340px;
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #1e1e1e;
  border-bottom: 1px solid #2d2d2d;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b7b7b7;
}

.term-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
}

.chart-box {
  padding: 10px 8px 6px;
  border-right: 1px solid #2d2d2d;
}

.mini-list {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a2a;
}

/* Insights */
.story {
  display: grid;
  grid-template-rows: 118px 1fr;
  min-height: 250px;
}

.story-art {
  background: #C4A45A;
  color:#E8E3E3;
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.story-art.s2 {
  background: #2A2418;
}

.story-art.s3 {
  background: #E8E3E3;
}

.story .body {
  padding: 14px 16px 16px;
}

.story h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 650;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

/* Pricing table */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background:#171514;
  border: 1px solid var(--line);
}

.price-table th,
.price-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  font-size: 14px;
}

.price-table th {
  background: #211E1C;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price-table td:nth-child(2),
.price-table th:nth-child(2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Accounts */
.acct {
  border-top: 3px solid var(--red);
}

.acct ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 14px;
}

/* CTA band */
.cta {
  background: var(--red);
  color:#E8E3E3;
}

.cta .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 36px 0;
}

.cta h2 {
  margin: 0 0 6px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  font-weight: 650;
}

.cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.cta .btn-ghost {
  background:#171514;
  color: var(--red);
  border-color:#3A3532;
}

.cta .btn-dark {
  background: transparent;
  color:#E8E3E3;
  border-color: rgba(255, 255, 255, 0.45);
}

/* Auth pages */
.auth-page {
  background: var(--paper);
  min-height: calc(100vh - 180px);
  padding: 36px 0 60px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: start;
}

.auth-card {
  background:#171514;
  border: 1px solid var(--line);
  padding: 28px 28px 24px;
}

.auth-card h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  margin: 0 0 6px;
}

.auth-card .sub {
  margin: 0 0 22px;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  border: 1px solid #cfcac3;
  padding: 0 10px;
  background:#171514;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: #8a8a8a;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 8px 0 16px;
}

.check input {
  margin-top: 3px;
}

.auth-side {
  padding: 8px 8px 0 8px;
}

.auth-side h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  margin: 0 0 10px;
}

.note-box {
  background:#171514;
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.switch {
  margin-top: 16px;
  font-size: 14px;
}

/* Inner pages */
.page-hero {
  background: #111;
  color:#E8E3E3;
  padding: 36px 0 32px;
}

.page-hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 36px;
  margin: 0 0 8px;
}

.page-hero p {
  margin: 0;
  color: #cfcfcf;
  max-width: 640px;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 24px;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

/* Footer */
.footer {
  background: #111;
  color: #cfcfcf;
  padding: 42px 0 18px;
  font-size: 13.5px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid #2a2a2a;
}

.footer .brand-text strong,
.footer .brand {
  color:#E8E3E3;
}

.footer a {
  color: #cfcfcf;
  display: block;
  margin: 6px 0;
}

.footer a:hover {
  color:#E8E3E3;
}

.footer h4 {
  color:#E8E3E3;
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal {
  padding-top: 16px;
  font-size: 12px;
  color: #9a9a9a;
  line-height: 1.55;
}

.legal p {
  margin: 0 0 10px;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #8d8d8d;
  font-size: 12px;
}

/* Dashboard */
.dash {
  background:
    radial-gradient(980px 420px at 100% -120px, rgba(212, 182, 102, 0.08), transparent 58%),
    linear-gradient(180deg, #211E1C 0%, #efece6 100%);
  min-height: 100vh;
}

.dash .util {
  position: sticky;
  top: 0;
  z-index: 60;
}

.dash-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--util-h));
}

.side {
  background: linear-gradient(180deg, #121212 0%, #171717 48%, #121212 100%);
  color: #d4d4d4;
  padding: 16px 0 24px;
  overflow-y: auto;
  position: sticky;
  top: var(--util-h);
  align-self: start;
  height: calc(100vh - var(--util-h));
  z-index: 40;
  border-right: 1px solid #262626;
}

.side .brand {
  padding: 2px 16px 16px;
  border-bottom: 1px solid #2a2a2a;
  margin: 0 10px 12px;
  color:#E8E3E3;
}

.side .brand-text span {
  color: #9a9a9a;
}

.side a.item {
  display: block;
  color: #c8c8c8;
  margin: 1px 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border-left: 0;
}

.side a.item:hover {
  background: rgba(255, 255, 255, 0.06);
  color:#E8E3E3;
}

.side a.item.active {
  background: linear-gradient(90deg, rgba(212, 182, 102, 0.72), rgba(212, 182, 102, 0.28));
  color:#E8E3E3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.side .grp {
  margin: 12px 16px 4px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.pref-chip {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: #211E1C;
}

.pref-chip:hover {
  text-decoration: none;
  background:#171514;
  border-color: #ddd6cc;
}

.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.dash-tabs a {
  padding: 9px 14px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.dash-tabs a:hover,
.dash-tabs a.active {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}

.set-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pref-block {
  margin-bottom: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}

.pref-block h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.main {
  min-width: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 27, 27, 0.06);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: var(--util-h);
  z-index: 35;
  box-shadow: 0 8px 24px rgba(27, 27, 27, 0.03);
}

.search {
  flex: 1;
  max-width: 420px;
}

.search input {
  width: 100%;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  background: #211E1C;
  outline: none;
}

.search input:focus {
  background:#171514;
  border-color: #ddd6cc;
  box-shadow: 0 0 0 3px rgba(212, 182, 102, 0.08);
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.dash .btn {
  border-radius: 0;
}

.who b {
  display: block;
}

.acct-no {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.work {
  padding: 22px 22px 40px;
}

.kpi-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.kpi {
  background:#171514;
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.dash .kpi {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 16px 15px;
}

.kpi .lbl {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.kpi .val {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.kpi.hero .val {
  font-size: 30px;
  font-family: "Source Serif 4", Georgia, serif;
}

.dash .kpi.hero {
  background:#171514;
  color: var(--ink);
  border: 1px solid var(--line);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 14px;
}

.panel {
  background:#171514;
  border: 1px solid var(--line);
}

.dash .panel {
  border: 1px solid var(--line);
  border-radius: 0;
}

.panel h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #3f3f3f;
}

.panel .pad {
  padding: 8px 0;
}

canvas#equityChart {
  width: 100%;
  height: 220px;
  display: block;
}

.price-chart-wrap {
  position: relative;
  background:#171514;
  width: 100%;
  min-height: 160px;
}

.pc-tools {
  position: absolute;
  top: 8px;
  right: 78px;
  z-index: 3;
  display: flex;
  gap: 4px;
}

.pc-tools[hidden] {
  display: none !important;
}

.pc-tool {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8d2cb;
  background:#171514;
  color: #1c1c1c;
  font-size: 16px;
  line-height: 26px;
  cursor: pointer;
}

.pc-tool:hover {
  border-color: #D4B666;
  color: #D4B666;
}

.price-chart-wrap.embed {
  background: transparent;
  min-height: 0;
}

.price-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 160px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.price-chart.is-drag {
  cursor: grabbing;
}

.price-chart .pc-cross {
  display: none;
  pointer-events: none;
}

.price-chart.is-hover .pc-cross:not([hidden]) {
  display: inline;
}

.price-chart .pc-cross[hidden],
.price-chart .pc-cross [hidden] {
  display: none !important;
}

.price-chart.is-hover .pc-last {
  display: none;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line-2);
}

.chart-head .sym-pick-wrap {
  flex: 1 1 220px;
}

.chart-spans {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #d8d2cb;
  background:#171514;
}

.chart-span {
  appearance: none;
  margin: 0;
  border: 0;
  border-right: 1px solid #d8d2cb;
  background:#171514;
  color: #1c1c1c;
  padding: 8px 12px;
  font: 600 12px/1 inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.chart-span:last-child {
  border-right: 0;
}

.chart-span.is-on {
  background: #D4B666;
  color:#E8E3E3;
}

.chart-head-k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  background:#171514;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
}

.sym-pick-wrap {
  display: grid;
  gap: 6px;
  position: relative;
}

.sym-pick-wrap .sym-pick-lbl + .sym-pick-lbl,
.sym-pick-wrap .sym-cat-sel + .sym-pick-lbl {
  margin-top: 4px;
}

.sym-pick-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sym-cat-sel {
  width: 100%;
  min-height: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  padding: 0 32px 0 10px;
  border: 1px solid #E8E3E3;
  border-radius: 0;
  background-color:#171514;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #E8E3E3 50%),
    linear-gradient(135deg, #E8E3E3 50%, transparent 50%);
  background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.ticket .sym-cat-sel,
.it-form .sym-cat-sel {
  height: 44px;
  min-height: 44px;
}

.sym-combo {
  position: relative;
}

.sym-pick-q {
  width: 100%;
  min-height: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 10px;
  border: 1px solid #E8E3E3;
  border-radius: 0;
  background:#171514;
  color: var(--ink);
}

.ticket .sym-pick-q,
.it-form .sym-pick-q {
  height: 44px;
  min-height: 44px;
}

.sym-pick {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.sym-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  min-width: 280px;
  background:#171514;
  border: 1px solid #E8E3E3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  flex-direction: column;
}

.sym-menu[hidden] {
  display: none !important;
}

.sym-menu:not([hidden]) {
  display: flex;
}

.sym-list {
  overflow: auto;
  max-height: 300px;
  scrollbar-width: thin;
}

.sym-group-h {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background:#171514;
}

.sym-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line-2);
  background:#171514;
  padding: 8px 10px;
  cursor: pointer;
  color: #E8E3E3;
}

.sym-row:hover,
.sym-row.is-on {
  background: #2A2418;
}

.sym-row b {
  font-size: 13px;
}

.sym-row span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sym-row em {
  font-style: normal;
  font-size: 10px;
  color: #8a847c;
}

.sym-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

.quote-pick {
  max-width: 440px;
  margin: 14px 0 18px;
}

.page-hero .sym-pick-lbl {
  color: #cfcfcf;
}

.page-hero .sym-pick-q,
.page-hero .sym-cat-sel {
  background: #1c1c1c;
  color:#E8E3E3;
  border-color: #3a3a3a;
}

.page-hero .sym-cat-sel {
  background-image:linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
}

.quote-chart-wrap {
  background:#171514;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.quote-chart-wrap .price-chart {
  min-height: 220px;
}

.chart-caption {
  margin: 0;
  padding: 8px 12px 10px;
  color: var(--muted);
}

.chart-term-lbl {
  margin: 0;
  padding: 4px 8px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #b7b7b7;
}

.ticket {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sides button {
  height: 36px;
  border: 1px solid #E8E3E3;
  border-radius: 0;
  background:#171514;
  cursor: pointer;
  font-weight: 700;
}

.sides button.buy.on,
.sides button.buy:hover {
  background: var(--up);
  color:#E8E3E3;
  border-color: var(--up);
}

.sides button.sell.on,
.sides button.sell:hover {
  background: var(--red);
  color:#E8E3E3;
  border-color: var(--red);
}

.ticket label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ticket input,
.ticket select {
  width: 100%;
  height: 36px;
  border: 1px solid #E8E3E3;
  border-radius: 0;
  padding: 0 10px;
  background:#171514;
}

.ticket select,
.dash-shell select {
  padding-right: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  background-color:#171514;
  background-image:
    linear-gradient(45deg, transparent 50%, #E8E3E3 50%),
    linear-gradient(135deg, #E8E3E3 50%, transparent 50%);
  background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.dash-shell select option,
.sym-pick option {
  font-size: 13px;
  font-weight: 500;
  background:#171514;
  color: #E8E3E3;
}

.news a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
}

.news a:hover {
  background: #211E1C;
  text-decoration: none;
}

.news span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status.filled {
  color: var(--up);
}

.status.working {
  color: #9a6b12;
}

.status.cancelled {
  color: var(--muted);
}

.status.rejected {
  color: var(--down);
}

.status.open {
  color: var(--up);
}

.status.closed {
  color: var(--muted);
}

.data td.pnl {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.data td form {
  margin: 0;
}

.mobile-only {
  display: none;
}

.show-xs {
  display: none;
}

.nav-backdrop {
  display: none;
}

.icon-btn {
  display: none;
  background:#171514;
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 6px 10px;
}

.side-overlay {
  display: none;
}

.dash-bottom {
  display: none;
}

.panel {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1280px) {
  .kpi-row {
    grid-template-columns: 1.35fr 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background:#171514;
    border-bottom: 1px solid var(--line);
    height: auto;
    max-height: min(75vh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 60;
    padding: 8px 0 18px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .nav.open > a,
  .nav.open .has-menu > a {
    height: 44px;
    padding: 0 20px;
  }

  .nav.open .has-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open .menu {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
    min-width: 0;
    width: 100%;
    padding: 0 8px 8px 12px;
  }

  .nav.open .menu a {
    padding: 10px 16px;
    min-height: 44px;
  }

  .nav-toggle {
    display: inline-block;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.4);
    z-index: 35;
  }

  .nav-backdrop[hidden] {
    display: none;
  }

  body.nav-lock {
    overflow: hidden;
  }

  .header-row {
    gap: 12px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-grid,
  .platform,
  .auth-grid,
  .tools-row,
  .grid-4,
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-row,
  .dash-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .side-toggle {
    display: inline-block;
  }

  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: 100%;
    max-height: none;
    z-index: 90;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .dash-shell.menu-open .side {
    transform: translateX(0);
  }

  .side-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    z-index: 80;
  }

  .side-overlay[hidden] {
    display: none;
  }

.dash-bottom {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(27, 27, 27, 0.06);
  box-shadow: 0 -10px 28px rgba(27, 27, 27, 0.06);
  z-index: 50;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

  .dash-bottom a,
  .dash-bottom button {
    appearance: none;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    min-height: 44px;
    padding: 8px 4px;
    cursor: pointer;
    font-family: inherit;
  }

  .dash-bottom a.active,
  .dash-bottom a:hover,
  .dash-bottom button:hover {
    color: var(--red);
    text-decoration: none;
  }

  .hide-phone {
    display: none !important;
  }

  .who-name {
    display: none;
  }

  .topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
    position: sticky;
    top: var(--util-h);
    z-index: 35;
  }

  .search {
    max-width: none;
  }

  .work {
    padding: 12px 12px 96px;
  }

  .dash .util a {
    margin-right: 10px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 56px;
    --util-h: 36px;
  }

  .wrap,
  .wrap-wide,
  .util .wrap,
  .header-row {
    width: calc(100% - 24px);
  }

  .util {
    font-size: 11px;
    min-height: var(--util-h);
    height: auto;
    padding: 6px 0;
    padding-top: max(6px, env(safe-area-inset-top));
  }

  .util a {
    margin-right: 10px;
  }

  .util-right {
    gap: 8px;
  }

  .util-right span {
    display: none;
  }

  .lang-switch {
    flex-shrink: 0;
  }

  .header-actions .btn {
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .show-xs {
    display: inline;
  }

  .hide-xs {
    display: none;
  }

  .hide-sm {
    display: none !important;
  }

  .hero {
    padding-bottom: 8px;
  }

  .hero-grid,
  .platform,
  .auth-grid,
  .dash-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .tools-row,
  .foot-grid,
  .cta .wrap,
  .row-2,
  .kpi-row,
  .term-grid,
  .stats,
  .set-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding: 28px 0 32px;
    gap: 24px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  .page-hero {
    padding: 24px 0 20px;
  }

  .section {
    padding: 36px 0;
  }

  .section-h {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .stats div {
    padding: 12px 0 0;
  }

  .tool {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cta .wrap {
    padding: 28px 0;
  }

  .cta h2 {
    font-size: 22px;
  }

  .auth-page {
    padding: 20px 0 40px;
  }

  .auth-card {
    padding: 20px 16px 18px;
  }

  .auth-card h1 {
    font-size: 24px;
  }

  .flash-wrap {
    width: calc(100% - 24px);
  }

  table.data,
  .price-table {
    min-width: 520px;
  }

  .kpi.hero .val {
    font-size: 26px;
  }

  .foot-bottom {
    flex-direction: column;
  }

  .btn,
  .btn-lg {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .quote-form input,
  .quote-form button,
  .field input,
  .field select,
  .ticket input,
  .ticket select,
  .search input {
    height: 44px;
    font-size: 16px;
  }

  .sides button {
    height: 44px;
  }
}

@media (max-width: 420px) {
  .hero-cta {
    grid-template-columns: 1fr;
  }

  .mark {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .brand-text strong {
    font-size: 15px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-badge {
  display: inline-block;
  min-width: 16px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--red);
  color:#E8E3E3;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}

.live-chat-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.live-chat,
.chat-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  max-height: none;
  border-top: 2px solid var(--red);
}

.live-chat {
  min-height: min(480px, 52vh);
  overflow: hidden;
  background:#171514;
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
}

.panel.chat-info {
  overflow: visible;
}

.live-chat-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background:#171514;
  flex-shrink: 0;
}

.live-chat-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-chat-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--red);
  color:#E8E3E3;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.live-chat-h strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

.live-chat-k {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid #1E3A2C;
  background: #163028;
  color: var(--up);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  white-space: nowrap;
}

.live-pill:has(#chat-status.down) {
  border-color: #3A2424;
  background: var(--red-soft);
  color: var(--red);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3DDC97;
  flex-shrink: 0;
}

.live-pill:has(#chat-status.down) .live-dot {
  background: var(--red);
}

#chat-status.down {
  color: var(--red);
}

.live-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  background:
    linear-gradient(#211E1C, #211E1C) padding-box,
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(0, 0, 0, 0.015) 28px
    );
  min-height: 0;
}

.chat-empty {
  margin: 28px 12px;
  color: var(--ink-2);
  text-align: center;
  font-size: 13.5px;
}

.chat-welcome {
  max-width: 100%;
  margin: 0;
  padding: 16px 16px 14px;
  background:#171514;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.chat-welcome[hidden] {
  display: none !important;
}

.chat-welcome-k {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.chat-welcome h4 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--ink);
}

.chat-welcome p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.chat-info h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 12px 28px 12px 28px;
}

.chat-info h3 span {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.panel.chat-info .chat-info-body {
  display: flex;
  flex-direction: column;
  padding: 4px 28px 20px 28px;
  overflow: visible;
  flex: 1;
}

.chat-facts {
  margin: 0;
}

.chat-facts > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  padding: 10px 0 10px 4px;
  border-bottom: 1px solid var(--line-2);
}

.chat-facts dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.chat-facts dd {
  margin: 0;
  padding-left: 4px;
}

.chat-facts dd b {
  display: block;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.chat-facts dd span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 400;
  line-height: 1.4;
}

.chat-mail {
  color: var(--ink);
  font-weight: 650;
  font-size: 13.5px;
  word-break: break-all;
}

.chat-mail:hover {
  color: var(--red);
  text-decoration: none;
}

.chat-callout {
  margin: 14px 0 8px;
  padding: 10px 14px;
  background: var(--paper);
  border-left: 2px solid var(--red);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.chat-mail-note {
  margin: 0 0 16px;
}

.chat-info h4 {
  margin: 4px 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.chat-chips span {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.chat-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.chat-bubble {
  max-width: min(82%, 420px);
  margin-bottom: 10px;
  padding: 8px 12px 9px;
  background:#171514;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.chat-bubble.theirs {
  border-left: 2px solid var(--red);
}

.chat-bubble.mine {
  margin-left: auto;
  background: #f7eef0;
  border-color: #3A2424;
}

.chat-bubble .who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.chat-bubble .who b {
  font-weight: 700;
}

.chat-bubble .who time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
}

.chat-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.live-chat-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: #fafaf8;
  flex-shrink: 0;
}

.live-chat-form textarea {
  width: 100%;
  flex: 1 1 100%;
  min-height: 52px;
  max-height: 120px;
  border: 1px solid #cfcac3;
  background:#171514;
  padding: 9px 11px;
  font: inherit;
  line-height: 1.4;
  resize: vertical;
}

.live-chat-form textarea:focus {
  outline: 2px solid rgba(212, 182, 102, 0.18);
  outline-offset: 0;
  border-color: #c4a3a6;
}

.live-chat-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.live-chat-form .btn {
  margin-left: auto;
  min-width: 92px;
}

.desk-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--util-h));
  background: #211E1C;
}

.desk-side {
  background: #161616;
  color: #d4d4d4;
  overflow-y: auto;
  padding: 14px 0 24px;
}

.desk-side .brand {
  padding: 0 16px 16px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 8px;
}

.desk-search {
  display: block;
  width: calc(100% - 32px);
  margin: 6px 16px 8px;
  height: 34px;
  border: 1px solid #3a3a3a;
  background: #1f1f1f;
  color:#E8E3E3;
  padding: 0 8px;
  font: inherit;
}

.desk-list {
  display: flex;
  flex-direction: column;
}

.desk-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: #d4d4d4;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
}

.desk-item strong {
  display: inline;
}

.desk-item small {
  display: block;
  color: #8a8a8a;
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-item:hover,
.desk-item.on {
  background: #1f1f1f;
  color:#E8E3E3;
  border-left-color: var(--red);
}

.desk-main {
  display: flex;
  flex-direction: column;
  background:#171514;
  min-height: calc(100vh - var(--util-h));
}

.desk .live-chat-h {
  background:#171514;
}

@media (max-width: 1024px) {
  .live-chat-layout {
    grid-template-columns: 1fr;
  }

  .live-chat,
  .chat-info {
    height: auto;
    max-height: none;
  }

  .live-chat {
    min-height: 440px;
  }

  .panel.chat-info {
    overflow: visible;
  }

  .chat-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .chat-info h3 span {
    display: none;
  }
}

@media (max-width: 560px) {
  .live-chat-h {
    flex-wrap: wrap;
  }

  .live-pill {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .desk-shell {
    grid-template-columns: 1fr;
  }

  .desk-side {
    max-height: 38vh;
  }

  .desk-main {
    min-height: 52vh;
  }
}

.it-ops {
  background: #211E1C;
  min-height: calc(100vh - var(--util-h));
}

.it-page {
  padding: 22px 0 40px;
}

.it-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.it-head h1 {
  margin: 4px 0 6px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  font-weight: 650;
}

.it-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.it-pill {
  border: 1px solid var(--line);
  background:#171514;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.it-pill.on {
  border-color: #1E3A2C;
  background: #163028;
  color: var(--up);
}

.it-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.it-form {
  padding: 16px 18px 18px;
}

.it-form .check {
  grid-column: 1 / -1;
}

.it-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.it-mail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 10px;
}

.quote-live {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cdebd8;
}

@media (max-width: 900px) {
  .it-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .it-grid,
  .it-mail-grid {
    grid-template-columns: 1fr;
  }
}

.control-search {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
}

.control-search input {
  flex: 1;
}

.control-pw {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  background: #f7f7f7;
  border: 1px solid var(--line);
  padding: 8px 10px;
  margin: 0;
}

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

.control-actions form {
  margin: 0;
}

.scg-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.scg-modal[hidden] {
  display: none;
}

.scg-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.48);
}

.scg-modal-box {
  position: relative;
  background:#171514;
  border: 1px solid var(--line);
  width: min(440px, 100%);
  padding: 22px 22px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.scg-modal-box .kicker {
  margin: 0 0 6px;
}

.scg-modal-box h3 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.scg-modal-box p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.scg-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

body.modal-lock {
  overflow: hidden;
}

/* Client center: white field, red accents */
body.dash:not(.it-ops):not(.desk) {
  background: #ececec;
}

body.dash:not(.it-ops):not(.desk) .util {
  background: #111;
  color: #d8d8d8;
  border-bottom: none;
}

body.dash:not(.it-ops):not(.desk) .util a {
  color: #d8d8d8;
}

body.dash:not(.it-ops):not(.desk) .util a:hover {
  color:#E8E3E3;
}

.dash-shell {
  grid-template-columns: 236px 1fr;
  --dash-head-h: 60px;
  --dash-accent: 3px;
}

.dash-shell .side {
  background:#171514;
  color: var(--ink);
  border-right: 1px solid #211E1C;
  padding-top: 0;
  min-height: 0;
  height: calc(100vh - var(--util-h));
  max-height: calc(100vh - var(--util-h));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.dash-shell .side::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.dash-shell .side .brand {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--red);
  color:#E8E3E3;
  box-sizing: border-box;
  height: var(--dash-head-h);
  margin: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: var(--dash-accent) solid var(--red-deep);
}

.dash-shell .side .brand .mark {
  background:#171514;
  color: var(--red);
}

.dash-shell .side .brand-text strong {
  color:#E8E3E3;
}

.dash-shell .side .brand-text span {
  color: rgba(255, 255, 255, 0.88);
}

.dash-shell .side .grp {
  color: #b3a8a2;
  margin-top: 16px;
}

.dash-shell .side a.item {
  color: #3d3d3d;
  border-radius: 0;
  padding: 8px 12px;
}

.dash-shell .side a.item:hover {
  background: #fff5f5;
  color: var(--red);
}

.dash-shell .side a.item.active {
  background: var(--red);
  color:#E8E3E3;
  box-shadow: none;
}

.dash-shell .side a.item.active .nav-badge {
  background:#171514;
  color: var(--red);
}

.dash-shell .topbar {
  box-sizing: border-box;
  height: var(--dash-head-h);
  background: var(--red);
  color:#E8E3E3;
  border-bottom: var(--dash-accent) solid var(--red-deep);
  box-shadow: none;
  padding: 0 20px;
}

.dash-shell .who-name,
.dash-shell .who-name b {
  color:#E8E3E3;
}

.dash-shell .search input {
  background:#171514;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 0;
}

.dash-shell .search input:focus {
  border-color: #e3b4b8;
  box-shadow: 0 0 0 3px rgba(212, 182, 102, 0.12);
}

.dash-shell .who-name b {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 650;
}

.dash-shell .acct-no {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
}

.dash-shell .pref-chip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color:#E8E3E3;
  border-radius: 0;
}

.dash-shell .pref-chip:hover {
  border-color:#3A3532;
  background: transparent;
  color:#E8E3E3;
}

.dash-shell .topbar .btn-ghost {
  background: transparent;
  color:#E8E3E3;
  border-color: rgba(255, 255, 255, 0.45);
}

.dash-shell .topbar .btn-ghost:hover {
  border-color:#3A3532;
  color:#E8E3E3;
  background: transparent;
}

.dash-shell .topbar .icon-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}

.dash-shell .topbar .icon-btn span {
  background:#171514;
}

.dash-shell .btn-red {
  box-shadow: none;
  border-radius: 0;
}

.dash-shell .work {
  padding: 22px 24px 48px;
}

.dash-hello {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 2px 0 18px;
}

.dash-hello .kicker {
  margin: 0 0 4px;
}

.dash-hello h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.dash-shell .work {
  padding: 16px 18px 40px;
}

.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.dash-shell .desk-head h1 {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--ink);
}

.acct-strip {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, 1fr);
  background:#171514;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.acct-strip .cell {
  display: block;
  min-width: 0;
  padding: 11px 14px 12px;
  border-right: 1px solid #eee;
  color: inherit;
  text-decoration: none;
}

.acct-strip a.cell:hover {
  background: #fafafa;
}

.acct-strip .cell:last-child {
  border-right: 0;
}

.acct-strip .lbl {
  font-size: 12px;
  font-weight: 600;
  color: #6d675f;
}

.acct-strip .val {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.qbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 12px 16px 2px;
}

.qbar-sym strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qbar-sym span {
  color: #6d675f;
  font-size: 12px;
}

.qbar-px {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.qbar-chg {
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.qbar-flag {
  margin-left: auto;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3DDC97;
}

.qbar-flag.paper {
  color: #6d675f;
}

.trade-desk {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 12px;
  align-items: stretch;
}

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

.chart-compact .qbar {
  padding: 10px 14px 0;
}

.chart-compact .qbar-px {
  font-size: 18px;
}

.chart-compact .chart-head {
  padding: 10px 14px 8px;
}

.price-chart-wrap.candles .price-chart {
  min-height: 220px;
}

.chart-compact .price-chart,
.chart-compact .price-chart-wrap {
  min-height: 220px;
}

.dash-shell .panel h3 a {
  color: inherit;
  text-decoration: none;
}

.dash-shell .panel h3 a:hover {
  color: var(--red);
}

.dash-shell table.data td.quiet {
  color: #6d675f;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.desk-links a:last-child {
  border-bottom: 0;
}

.desk-links a:hover {
  background: #fafafa;
}

.desk-links a span {
  color: #5c564f;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.acct-mini {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
}

.acct-mini div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.acct-mini span {
  color: #6d675f;
}

.acct-mini b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ticket-est {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}

.ticket-est div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.ticket-est dt {
  color: #6d675f;
  font-weight: 500;
}

.ticket-est dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dash-shell .kpi,
.dash-shell .panel {
  background:#171514;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.dash-shell p.kpi {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.dash-shell .kpi.hero {
  background:#171514;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.dash-shell .kpi.hero .lbl,
.dash-shell .kpi.hero .muted {
  color: var(--muted);
}

.dash-shell .kpi.hero .up {
  color: var(--up);
}

.dash-shell .kpi.hero .down {
  color: var(--down);
}

.dash-shell a.kpi:hover {
  transform: none;
  box-shadow: none;
  border-color: #E8E3E3;
}

.dash-shell .panel h3 {
  color: var(--ink);
  background:#171514;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.dash-shell .panel h3::before {
  content: none;
}

.dash-shell table.data th {
  background: #fbf8f7;
  color: #5c564f;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.dash-shell .ticket label,
.dash-shell .field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #3a3a3a;
  margin-bottom: 6px;
}

.dash-shell .fine {
  font-size: 13px;
  line-height: 1.5;
  color: #6b6560;
  max-width: 42em;
}

.dash-shell table.data tbody tr:hover {
  background: #fff6f6;
}

.dash-shell .chart-head {
  border-bottom-color: #f3ece8;
}

.dash-shell .chart-head-k {
  background:#171514;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 0;
}

.dash-shell .news a:hover {
  background: #fff6f6;
}

.dash-shell .dash-bottom {
  background:#171514;
  border-top: 1px solid #211E1C;
}

.dash-shell .dash-bottom a.active {
  color: var(--red);
}

@media (max-width: 860px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .dash-shell .main {
    min-width: 0;
  }

  .dash-shell .work {
    padding: 14px 12px 108px;
  }

  .dash-shell .side {
    padding-top: 0;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .dash-shell .side .brand {
    margin: 0;
    height: var(--dash-head-h);
    padding: 0 16px;
    padding-top: 0;
    border-bottom: var(--dash-accent) solid var(--red-deep);
  }

  .dash-shell .topbar {
    height: var(--dash-head-h);
    min-height: var(--dash-head-h);
    padding: 0 10px;
    gap: 8px;
    background: var(--red);
    border-bottom: var(--dash-accent) solid var(--red-deep);
  }

  .dash-shell .search {
    max-width: none;
    min-width: 0;
  }

  .dash-shell .pref-chip {
    display: none;
  }

  .dash-hello {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 14px;
  }

  .dash-hello h1,
  .dash-shell .desk-head h1 {
    font-size: 18px;
  }

  .acct-strip {
    grid-template-columns: 1fr 1fr;
  }

  .acct-strip .cell:first-child {
    grid-column: 1 / -1;
  }

  .acct-strip .cell {
    border-bottom: 1px solid #eee;
  }

  .acct-strip .cell:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .desk-head {
    flex-wrap: wrap;
  }

  .dash-hello .btn {
    min-height: 40px;
    margin-left: auto;
  }

  .dash-shell .kpi-row,
  .dash-shell .dash-grid,
  .trade-desk {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trade-desk {
    display: flex;
    flex-direction: column;
  }

  .trade-main,
  .trade-side {
    display: contents;
  }

  .chart-compact { order: 1; }
  .trade-ticket-box { order: 2; }
  .trade-orders { order: 3; }
  .trade-acct { order: 4; }
  .trade-pos { order: 5; }
  .trade-watch { order: 6; }

  .dash-shell .kpi .val,
  .dash-shell .kpi.hero .val {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .dash-shell .chart-head {
    padding: 12px;
  }

  .dash-shell .chart-head-k {
    margin-bottom: 0;
  }

  .dash-shell .price-chart,
  .dash-shell .price-chart-wrap {
    min-height: 0;
  }

  .dash-shell .panel h3 {
    letter-spacing: 0;
  }

  .dash-shell .dash-bottom {
    background: #111;
    border-top: 2px solid var(--red);
    box-shadow: none;
  }

  .dash-shell .dash-bottom a,
  .dash-shell .dash-bottom button {
    color: #c8c8c8;
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: 0;
    padding: 8px 2px;
    white-space: normal;
  }

  .dash-shell .dash-bottom a.active,
  .dash-shell .dash-bottom a:hover,
  .dash-shell .dash-bottom button:hover {
    color:#E8E3E3;
  }

  body.dash:not(.it-ops):not(.desk) .util {
    height: auto;
    min-height: var(--util-h);
  }

  body.dash:not(.it-ops):not(.desk) .util .wrap {
    width: calc(100% - 20px);
    gap: 8px;
  }

  body.dash:not(.it-ops):not(.desk) .util .wrap > div:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Phone: every page stays inside the screen and wide tables scroll in place */
@media (max-width: 860px) {
  .hero-grid > *,
  .platform > *,
  .auth-grid > *,
  .tools-row > *,
  .grid-4 > *,
  .grid-3 > *,
  .grid-2 > *,
  .foot-grid > *,
  .kpi-row > *,
  .dash-grid > *,
  .dash-shell > *,
  .desk-shell > *,
  .term-grid > *,
  .stats > *,
  .set-grid > *,
  .row-2 > *,
  .live-chat-layout > *,
  .it-grid > *,
  .it-mail-grid > *,
  .cta .wrap > * {
    min-width: 0;
  }

  .snapshot,
  .panel,
  .quote-chart-wrap,
  .terminal,
  .card,
  .auth-card,
  .auth-side {
    max-width: 100%;
    min-width: 0;
  }

  .snapshot,
  .quote-chart-wrap,
  .terminal,
  .section > .wrap,
  .it-page > .wrap,
  .auth-side {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero-grid,
  .platform,
  .auth-grid,
  .tools-row,
  .term-grid {
    width: min(1180px, calc(100% - 24px));
  }

  .quote-form {
    width: 100%;
    min-width: 0;
  }

  .quote-form input {
    min-width: 0;
    width: auto;
    flex: 1 1 auto;
  }

  .quote-form button {
    flex: none;
  }

  .header-row {
    height: auto;
    min-height: 56px;
    padding: 8px 0;
    gap: 8px;
    width: calc(100% - 20px);
  }

  .brand {
    min-width: 0;
  }

  .brand-text span {
    letter-spacing: 0.06em;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-actions .btn {
    padding: 0 8px;
  }

  .util {
    height: auto;
  }

  .util .wrap {
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    width: calc(100% - 20px);
    padding: 6px 0;
  }

  .util a {
    margin-right: 8px;
  }

  .util-right {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    white-space: normal;
    gap: 6px 8px;
  }

  .platform .btn {
    margin: 8px 8px 0 0;
  }

  .cta .wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cta .wrap > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cta .btn {
    width: 100%;
  }

  .page-hero h1,
  .hero h1,
  .it-head h1 {
    overflow-wrap: anywhere;
  }

  .crumb {
    overflow-wrap: anywhere;
  }

  .dash-shell .topbar .who {
    min-width: 0;
  }

  .dash-shell .search,
  .dash-shell .search input {
    min-width: 0;
    width: 100%;
  }

  .mini-list span,
  .acct-no,
  .fine,
  .lede,
  p,
  li,
  td,
  th {
    overflow-wrap: anywhere;
  }

  th,
  td {
    overflow-wrap: normal;
  }

  body:not(.dash) .site-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: #111;
  }

  body:not(.dash) .header {
    position: relative;
    top: auto;
  }

  body:not(.dash) {
    padding-top: var(--site-top-h, 104px);
  }

  body:not(.dash) .util {
    height: 36px;
    min-height: 36px;
    overflow: hidden;
    padding: 0;
  }

  body:not(.dash) .util .wrap {
    flex-wrap: nowrap;
    height: 36px;
    padding: 0;
  }

  body:not(.dash) .hero-grid {
    padding-top: 22px;
    padding-bottom: 28px;
    gap: 18px;
  }

  body:not(.dash) .hero .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
  }

  body:not(.dash) .hero .stats div {
    padding: 12px 8px 0 0;
  }

  body:not(.dash) .hero .stats span {
    display: block;
    font-size: 11px;
  }
}

body.dash.it-ops {
  background: #ececec;
}

body.dash.it-ops .control-shell,
body.dash.it-ops .control-client {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  width: 100%;
  min-height: calc(100vh - var(--util-h));
  --dash-head-h: 60px;
  --dash-accent: 3px;
}

body.dash.it-ops .control-shell .side,
body.dash.it-ops .control-client .side {
  background: #111;
  color: #d4d4d4;
  border-right: 1px solid #1c1c1c;
  padding-top: 0;
}

body.dash.it-ops .control-shell .side .brand,
body.dash.it-ops .control-client .side .brand {
  background: var(--red);
  color:#E8E3E3;
  border-bottom: var(--dash-accent) solid var(--red-deep);
  margin: 0;
}

body.dash.it-ops .control-shell .side .brand-text span,
body.dash.it-ops .control-client .side .brand-text span {
  color: rgba(255, 255, 255, 0.82);
}

body.dash.it-ops .control-shell .side .grp,
body.dash.it-ops .control-client .side .grp {
  color: #8a8a8a;
  margin: 16px 14px 6px;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
  letter-spacing: 0.1em;
}

body.dash.it-ops .control-shell .side .brand + .grp,
body.dash.it-ops .control-client .side .brand + .grp {
  border-top: none;
  padding-top: 4px;
  margin-top: 12px;
}

body.dash.it-ops .control-shell .side a.item,
body.dash.it-ops .control-client .side a.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d0d0d0;
  margin: 1px 8px;
  border-radius: 0;
}

body.dash.it-ops .control-shell .side a.item:hover,
body.dash.it-ops .control-client .side a.item:hover {
  background: #1c1c1c;
  color:#E8E3E3;
}

body.dash.it-ops .control-shell .side a.item.active,
body.dash.it-ops .control-client .side a.item.active {
  background: var(--red);
  color:#E8E3E3;
}

body.dash.it-ops .control-client .who,
body.dash.it-ops .control-shell .who {
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

body.dash.it-ops .control-client .who-name,
body.dash.it-ops .control-shell .who-name {
  margin-right: auto;
}

body.dash.it-ops .control-client .work {
  max-width: 880px;
}

.control-close-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.control-close-row input {
  width: 110px;
  min-width: 0;
  height: 36px;
}

.control-id-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 860px) {
  body.dash.it-ops .control-shell,
  body.dash.it-ops .control-client {
    grid-template-columns: 1fr;
  }

  body.dash.it-ops .control-client .work,
  body.dash.it-ops .control-shell .work {
    max-width: none;
    padding-bottom: 36px;
  }
}

.dash .id-box { margin-top: 12px; }
.dash .id-status {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background:#171514;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}
.dash .id-status.wait { border-left: 3px solid #161616; }
.dash .id-status.ok { border-left: 3px solid #3DDC97; color: #3DDC97; }
.dash .id-status.bad { border-left: 3px solid #D4B666; color: #D4B666; }
.dash input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background:#171514;
  padding: 10px;
  border-radius: 0;
  font: inherit;
}



/* OrizonInvest — platform color system */

html {
  color-scheme: dark;
}

.btn {
  border-radius: 48px;
}

.btn-red,
.quote-form button,
button[type="submit"],
input[type="submit"],
.dash-shell .topbar .btn-red,
.cta .btn-red,
.cta .btn-dark {
  background: #D4B666;
  border-color: #D4B666;
  color: #1A1612;
}

.btn-red:hover,
.quote-form button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.cta .btn-red:hover,
.cta .btn-dark:hover {
  background: #E3C98A;
  border-color: #E3C98A;
  color: #1A1612;
}

.btn-ghost,
.btn-dark,
.cta .btn-ghost {
  background: transparent;
  color: #F7F5F2;
  border-color: #5A5348;
}

.btn-ghost:hover,
.btn-dark:hover,
.cta .btn-ghost:hover {
  border-color: #D4B666;
  color: #E3C98A;
  background: rgba(212, 182, 102, 0.08);
}

.mark {
  background: #D4B666;
  color: #1A1612;
  border-radius: 8px;
}

.brand-text strong,
.brand,
.nav > a,
.nav .has-menu > a,
.nav .has-menu > button {
  color: #F7F5F2;
}

.nav > a:hover,
.nav .has-menu:hover > a,
.nav .has-menu:hover > button {
  color: #E3C98A;
  border-bottom-color: #D4B666;
}

body,
#main,
.section,
.section.alt,
.page-hero,
.auth-page,
.hero,
.tools,
.prose,
.related,
body.dash,
body.dash:not(.it-ops):not(.desk),
body.dash.it-ops,
body.dash.desk,
.dash,
.dash-shell,
.dash-shell .main,
.dash-shell .work,
.control-shell,
.control-client,
.control-shell .work,
.control-client .work,
.it-ops,
.desk-shell,
.desk-main {
  background: #232323;
  color: #F7F5F2;
}

.hero {
  background: linear-gradient(180deg, #2A2A2A 0%, #232323 100%);
}

.card,
.snapshot,
.panel,
.auth-card,
.note-box,
.kpi,
.tool,
.story,
.price-table,
.terminal,
.acct-strip,
.dash-shell .kpi,
.dash-shell .panel,
.dash-shell .kpi.hero,
.scg-modal-box,
.menu,
.chat-welcome,
.chat-bubble,
.live-chat,
.it-pill,
.pref-chip {
  background: #2C2C2C;
  color: #F7F5F2;
  border-color: #434343;
}

.header,
.util,
.ticker,
.footer,
.topbar,
.dash-shell .topbar,
.dash-shell .side .brand,
.dash-shell .side,
.dash-bottom,
.dash-shell .dash-bottom,
.snapshot-h,
.terminal-bar,
.live-chat-form,
.control-pw,
.live-chat-h,
.price-table th,
.dash-shell table.data th,
.dash-shell .panel h3 {
  background: #323232;
  color: #F7F5F2;
  border-color: #434343;
}

.header {
  border-bottom: 1px solid #3D3A34;
  box-shadow: 0 1px 0 rgba(212, 182, 102, 0.12);
}

.ticker {
  border-bottom: 1px solid #3D3A34;
}

.cta {
  background: #D4B666;
  color: #1A1612;
}

.cta h1,
.cta h2,
.cta h3,
.cta p,
.cta a,
.cta .fine,
.cta .lede {
  color: #1A1612;
}

.story-art {
  background: #D4B666;
  color: #1A1612;
}

.story-art.s2 {
  background: #C4A45A;
  color: #1A1612;
}

.story-art.s3 {
  background: #B8954A;
  color: #1A1612;
}

.lang-switch {
  border-color: #5A5348;
}

.lang-switch a {
  color: #D8D4CE !important;
  border-right-color: #5A5348;
}

.lang-switch a.on,
.lang-switch a:hover,
.footer .lang-switch a.on,
.footer .lang-switch a:hover {
  background: #D4B666;
  color: #1A1612 !important;
}

.dash-shell table.data tbody tr:hover,
.dash-shell .news a:hover,
.dash-shell .side a.item:hover,
.acct-strip a.cell:hover,
.desk-links a:hover,
.chat-bubble.mine,
.menu a:hover,
table.data tbody tr:hover,
.news a:hover,
a.card:hover,
body.dash.it-ops .control-shell .side a.item:hover,
body.dash.it-ops .control-client .side a.item:hover {
  background: #3A3A3A;
  color: #F7F5F2;
  border-color: #D4B666;
}

input,
select,
textarea,
.field input,
.field select,
.search input,
.dash-shell .search input,
.quote-form input,
.live-chat-form textarea,
.ticket input,
.ticket select,
.sym-pick-q,
.sym-cat-sel {
  background: #2A2A2A !important;
  color: #F7F5F2 !important;
  border-color: #525252;
}

input:focus,
select:focus,
textarea:focus,
.field input:focus,
.quote-form input:focus,
.search input:focus {
  border-color: #D4B666 !important;
  box-shadow: 0 0 0 3px rgba(212, 182, 102, 0.18);
  outline: none;
}

::placeholder {
  color: #A8A39C !important;
  opacity: 1;
}

h1, h2, h3, h4,
.card h3,
.story h3,
.kpi strong,
.snapshot h2,
.brand-text strong {
  color: #F7F5F2;
}

p, li, td, label, .lede, .fine, .tool p, .card p, .story p,
.page-hero p, .auth-card .sub, .note-box, .prose p, .prose li {
  color: #E8E3DC;
}

.kicker,
.prod-icon,
.tool a.inline,
.more,
.icon-line,
.status.working {
  color: #D4B666;
}

.muted, .meta, .crumb, small, th, .tool label, .tool .tl,
.stats span, .snapshot-h span, .legal, .legal p, .foot-bottom,
.acct-strip .lbl, .qbar-sym span, .qbar-flag.paper, .chart-term-lbl {
  color: #C4BFB8;
}

.panel h3,
.dash-shell .ticket label,
.dash-shell .field label,
.dash-shell .fine,
.dash-shell .side a.item,
.dash-shell .side .grp,
.desk-links a,
.desk-links a span,
.acct-mini span,
.ticket-est dt,
.who-name,
.who-name b {
  color: #F7F5F2;
}

a {
  color: #E3C98A;
}

a:hover {
  color: #F0D99A;
}

.nav > a,
.nav .has-menu > a,
.nav .has-menu > button,
.header-actions .btn-ghost,
.util a,
.footer a,
.ticker-item,
.ticker-item b,
.menu a {
  color: #F7F5F2;
}

.util a:hover,
.footer a:hover,
.menu a:hover,
.ticker-item:hover {
  color: #E3C98A;
}

.pc-tool,
.chart-span {
  background: #2A2A2A;
  color: #F7F5F2;
  border-color: #525252;
}

.pc-tool:hover,
.chart-span:hover {
  color: #E3C98A;
  border-color: #D4B666;
}

.chart-span.is-on {
  background: #D4B666;
  color: #1A1612;
}

.dash-shell .side a.item.active,
body.dash.it-ops .control-shell .side a.item.active,
body.dash.it-ops .control-client .side a.item.active {
  background: #D4B666;
  color: #1A1612;
}

.sides button.buy,
.sides button.buy.on,
.sides button.buy:hover {
  background: #1F8A55;
  border-color: #1F8A55;
  color: #FFFFFF;
}

.sides button.sell,
.sides button.sell.on,
.sides button.sell:hover {
  background: #D32F2F;
  border-color: #D32F2F;
  color: #FFFFFF;
}

.up,
.up *,
.pnl.up,
.val.up,
.qbar-chg.up,
table.data td.up,
.ticker-item .up,
.mini-list .up,
.chart-term-lbl .up,
[data-k="move"].up,
[data-k="pct"].up,
[data-k="chg"].up,
[data-mark="day_pnl"].up,
[data-mark="total_pnl"].up,
.dash-shell .up,
.acct-strip .val.up {
  color: #2EBD6B !important;
}

.down,
.down *,
.pnl.down,
.val.down,
.qbar-chg.down,
table.data td.down,
.ticker-item .down,
.mini-list .down,
.chart-term-lbl .down,
[data-k="move"].down,
[data-k="pct"].down,
[data-k="chg"].down,
[data-mark="day_pnl"].down,
[data-mark="total_pnl"].down,
.dash-shell .down,
.acct-strip .val.down {
  color: #F04438 !important;
}

.flash-error,
.flash.flash-error {
  color: #F5C4C4;
  background: #3A2222;
  border-color: #8A3A3A;
}

.flash-ok,
.flash.flash-success,
.flash.flash-ok {
  color: #C8F0D8;
  background: #1C3328;
  border-color: #2E6A4A;
}

.nav-toggle span,
.icon-btn span {
  background: #F7F5F2;
}

.acct {
  border-top-color: #D4B666;
}

a.card:hover,
a.kpi:hover {
  border-color: #D4B666;
}

.checklist li::before {
  background: #D4B666;
}

/* Watchlist fits its frame — no inner scroll */
.terminal {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.term-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.chart-box {
  min-width: 0;
}

.mini-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden !important;
}

.mini-list div {
  flex: 1 1 0;
  min-height: 0;
  align-items: center;
  padding: 4px 12px;
}

.panel:has(> .watch-table),
.panel.trade-watch {
  overflow: hidden !important;
}

table.watch-table,
table.data.watch-table {
  table-layout: fixed;
  width: 100% !important;
  min-width: 0 !important;
}

table.watch-table th,
table.watch-table td {
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.watch-table th:nth-child(1),
table.watch-table td:nth-child(1) { width: 16%; }
table.watch-table th:nth-child(2),
table.watch-table td:nth-child(2) { width: 34%; }
table.watch-table th:nth-child(3),
table.watch-table td:nth-child(3) { width: 16%; }
table.watch-table th:nth-child(4),
table.watch-table td:nth-child(4) { width: 16%; }
table.watch-table th:nth-child(5),
table.watch-table td:nth-child(5) { width: 18%; }

@media (max-width: 860px) {
  table.watch-table,
  table.data.watch-table {
    min-width: 0 !important;
  }

  .terminal,
  .panel:has(> .watch-table),
  .panel.trade-watch {
    overflow: hidden !important;
  }
}

/* Chart desk palette — ink well, luminous tape, champagne last-price */
.price-chart-wrap,
.chart-compact .price-chart-wrap,
.quote-chart-wrap {
  background:
    radial-gradient(120% 80% at 50% -12%, rgba(232, 201, 106, 0.1), transparent 54%),
    linear-gradient(180deg, #1C2030 0%, #14171F 55%, #0E1016 100%);
  box-shadow: inset 0 0 0 1px #2A3140;
}

.price-chart-wrap.embed {
  background: transparent;
  box-shadow: none;
}

.price-chart .pc-bg {
  fill: #14171D;
}

.price-chart-wrap .pc-tool {
  background: #242833;
  color: #F0EBD8;
  border: 1px solid #3A4254;
}

.price-chart-wrap .pc-tool:hover {
  color: #F0D78A;
  border-color: #E8C96A;
  background: #2C3240;
}
