@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }

/* ============================================================================
   Meridian Markets — H5 trading client theme
   Palette derived from the reference brokerage UI: near-black surfaces, a
   warm gold accent, blue-gray secondary text, and green/red trade semantics.
   ========================================================================== */
:root {
  --bg:            #0b0b0e;
  --bg-elev:       #141419;
  --bg-elev-2:     #1a1b24;
  --surface:       #16171d;
  --surface-2:     #1e2029;
  --line:          #262833;
  --line-soft:     #1f212a;
  --text:          #f0f1f4;
  --text-2:        #9ca4ab;
  --text-3:        #6b7280;
  --accent:        #f0b90b;
  --accent-2:      #378dff;
  --up:            #19a27a;
  --down:          #e5484d;
  --up-soft:       rgba(25,162,122,.14);
  --down-soft:     rgba(229,72,77,.14);
  --accent-soft:   rgba(240,185,11,.14);
  --warn:          #f5a524;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 8px 28px rgba(0,0,0,.45);
  --nav-h:         58px;
  --header-h:      52px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
body.scroll { overflow: auto; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--accent-2); text-decoration: none; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ── boot / loading ─────────────────────────────────────────────────────── */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); z-index: 99; }
.boot__mark { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #b07f04); animation: pulse 1.4s ease-in-out infinite; }
.boot__text { color: var(--text-2); font-size: 13px; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.94); } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── layout ─────────────────────────────────────────────────────────────── */
.app { min-height: 100%; display: flex; flex-direction: column; }
.page { flex: 1; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px); }
.header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(11,11,14,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header__title { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.header__title small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); }
.header__spacer { flex: 1; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); background: var(--surface); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.section { padding: 12px 14px; }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section__title { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .3px; text-transform: uppercase; }
.section__more { font-size: 12px; color: var(--text-3); }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 10px; }

/* ── bottom navigation ──────────────────────────────────────────────────── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  width: 100%; max-width: 100%;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: rgba(14,15,20,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
.nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 500; min-width: 0; overflow: hidden; }
.nav__item svg { width: 21px; height: 21px; }
.nav__item--active { color: var(--accent); }
.nav__item:active { opacity: .7; }

/* ── price / ticker semantics ───────────────────────────────────────────── */
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-2); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tick-up { animation: flashUp .5s ease-out; }
.tick-down { animation: flashDown .5s ease-out; }
@keyframes flashUp { 0% { background: var(--up-soft); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: var(--down-soft); } 100% { background: transparent; } }

/* ── watchlist ──────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 6px; }
.tab { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; border: 1px solid transparent; }
.tab--active { background: var(--accent-soft); color: var(--accent); border-color: rgba(240,185,11,.35); }

.list { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: none; }
.row:active { background: var(--surface-2); }
.row__sym { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.row__name { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.row__price { font-size: 14px; font-weight: 600; text-align: right; }
.row__chg { min-width: 68px; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.chg-up { background: var(--up-soft); color: var(--up); }
.chg-down { background: var(--down-soft); color: var(--down); }

/* ── chart ──────────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; background: var(--bg-elev); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.chart-canvas { display: block; width: 100%; touch-action: pan-y; }
.chart-tf { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.chart-tf__item { flex: 0 0 auto; padding: 4px 11px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.chart-tf__item--active { background: var(--accent-soft); color: var(--accent); }
.chart-legend { position: absolute; top: 8px; left: 10px; font-size: 10.5px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.chart-legend b { font-weight: 600; font-family: var(--mono); }
.chart-readout { position: absolute; top: 8px; right: 10px; text-align: right; font-size: 11px; font-family: var(--mono); pointer-events: none; }
.chart-ind { display: flex; gap: 4px; padding: 6px 12px; border-top: 1px solid var(--line-soft); }
.chart-ind__item { padding: 3px 9px; border-radius: 5px; font-size: 11px; color: var(--text-3); background: var(--surface); }

/* ── quote header ───────────────────────────────────────────────────────── */
.quote-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px 10px; }
.quote-head__sym { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.quote-head__meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.quote-head__price { font-size: 26px; font-weight: 700; font-family: var(--mono); text-align: right; line-height: 1.1; }
.quote-head__chg { font-size: 12px; font-weight: 600; text-align: right; margin-top: 2px; }
.bidask { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 12px; }
.bidask__cell { background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; }
.bidask__label { font-size: 11px; color: var(--text-3); }
.bidask__val { font-size: 14px; font-weight: 600; font-family: var(--mono); }

/* ── order panel ────────────────────────────────────────────────────────── */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface); padding: 4px; border-radius: 10px; margin: 0 14px 12px; }
.seg__btn { padding: 9px; border-radius: 7px; font-weight: 700; font-size: 14px; color: var(--text-2); text-align: center; }
.seg__btn--buy { background: var(--up); color: #fff; }
.seg__btn--sell { background: var(--down); color: #fff; }
.seg--type { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.seg__btn--sm { font-size: 12.5px; padding: 7px; }
.seg__btn--on { background: var(--surface-2); color: var(--text); }

.field { margin-bottom: 10px; }
.field__label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 5px; }
.field__input { width: 100%; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; font-family: var(--mono); }
.field__input:focus { outline: none; border-color: var(--accent); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stepper { display: flex; gap: 6px; margin-top: 7px; }
.stepper__btn { flex: 1; padding: 6px; background: var(--surface); border-radius: 6px; font-size: 12px; color: var(--text-2); font-family: var(--mono); }
.stepper__btn:active { background: var(--surface-2); }
.lot-slider { width: 100%; margin-top: 10px; accent-color: var(--accent); }

.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 0 4px; }
.meta-grid div { display: flex; justify-content: space-between; font-size: 11.5px; }
.meta-grid span:first-child { color: var(--text-3); }
.meta-grid span:last-child { font-family: var(--mono); font-weight: 600; }

.btn { width: 100%; padding: 14px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; text-align: center; }
.btn--buy { background: var(--up); color: #fff; }
.btn--sell { background: var(--down); color: #fff; }
.btn--primary { background: var(--accent); color: #14140a; }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn--danger { background: rgba(229,72,77,.16); color: var(--down); border: 1px solid rgba(229,72,77,.35); }
.btn:disabled { opacity: .45; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* ── positions / orders ─────────────────────────────────────────────────── */
.pos { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; margin-bottom: 9px; }
.pos__top { display: flex; justify-content: space-between; align-items: center; }
.pos__sym { font-size: 14.5px; font-weight: 700; }
.pos__side { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-left: 6px; letter-spacing: .4px; }
.pos__side--buy { background: var(--up-soft); color: var(--up); }
.pos__side--sell { background: var(--down-soft); color: var(--down); }
.pos__pnl { font-size: 16px; font-weight: 700; font-family: var(--mono); }
.pos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.pos__cell { font-size: 10.5px; color: var(--text-3); }
.pos__cell b { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; font-family: var(--mono); margin-top: 1px; }
.pos__actions { display: flex; gap: 8px; margin-top: 11px; }
.pos__actions .btn { padding: 9px; font-size: 13px; }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; opacity: .4; margin-bottom: 12px; }
.empty__title { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.empty__hint { font-size: 12px; }

/* ── account / assets ───────────────────────────────────────────────────── */
.equity-card { margin: 12px 14px; padding: 18px; border-radius: 16px; background: linear-gradient(150deg, #1d1f2a 0%, #14151b 60%); border: 1px solid var(--line); position: relative; overflow: hidden; }
.equity-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(240,185,11,.16), transparent 70%); }
.equity-card__label { font-size: 12px; color: var(--text-2); }
.equity-card__value { font-size: 31px; font-weight: 700; font-family: var(--mono); margin: 4px 0 2px; }
.equity-card__sub { font-size: 12px; color: var(--text-3); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; margin: 0 14px; }
.metric { background: var(--surface); padding: 11px 12px; }
.metric__k { font-size: 10.5px; color: var(--text-3); }
.metric__v { font-size: 15px; font-weight: 600; font-family: var(--mono); margin-top: 3px; }

.actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px; }
.action-tile { background: var(--surface); border-radius: var(--radius); padding: 13px 4px; text-align: center; font-size: 11px; color: var(--text-2); }
.action-tile svg { width: 22px; height: 22px; margin-bottom: 6px; color: var(--accent); }
.action-tile:active { background: var(--surface-2); }

.ledger-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); }
.ledger-row:last-child { border-bottom: none; }
.ledger-row__type { font-size: 13px; font-weight: 600; }
.ledger-row__meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ledger-row__amt { font-size: 14px; font-weight: 700; font-family: var(--mono); text-align: right; }
.ledger-row__bal { font-size: 10.5px; color: var(--text-3); text-align: right; font-family: var(--mono); }

/* ── forms / modal ──────────────────────────────────────────────────────── */
.sheet-host { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .22s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg-elev); border-radius: 18px 18px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateY(102%); transition: transform .26s cubic-bezier(.3,.8,.3,1); max-height: 88vh; overflow-y: auto; border-top: 1px solid var(--line); }
.sheet-host--open { pointer-events: auto; }
.sheet-host--open .sheet-backdrop { opacity: 1; }
.sheet-host--open .sheet { transform: translateY(0); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet__title { font-size: 16px; font-weight: 700; }
.sheet__grab { width: 38px; height: 4px; background: var(--line); border-radius: 2px; margin: -8px auto 14px; }
.auth-hero { padding: 40px 20px 18px; text-align: center; }
.auth-hero__logo { width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 16px; background: linear-gradient(135deg, var(--accent), #a9780a); display: grid; place-items: center; font-weight: 800; color: #14140a; font-size: 24px; }
.auth-hero__title { font-size: 22px; font-weight: 700; }
.auth-hero__sub { color: var(--text-3); font-size: 13px; margin-top: 5px; }
.form { padding: 8px 18px 20px; }
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-row .field__input { flex: 1; font-family: var(--mono); }
.captcha-box { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-weight: 700; letter-spacing: 1px; color: var(--accent); font-size: 15px; white-space: nowrap; }
.status-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill--pending { background: rgba(245,165,36,.15); color: var(--warn); }
.pill--approved, .pill--verified { background: var(--up-soft); color: var(--up); }
.pill--rejected { background: var(--down-soft); color: var(--down); }
.pill--normal { background: var(--surface-2); color: var(--text-2); }
.pill--targeted { background: rgba(240,185,11,.15); color: var(--accent); }
.pill--immediate { background: var(--down-soft); color: var(--down); }

.notice { display: flex; gap: 9px; padding: 11px 12px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.notice--info { background: rgba(55,141,255,.1); color: #a9c9ff; border: 1px solid rgba(55,141,255,.25); }
.notice--warn { background: rgba(245,165,36,.1); color: #f3cf90; border: 1px solid rgba(245,165,36,.28); }
.notice--risk { background: rgba(229,72,77,.1); color: #ffb3b5; border: 1px solid rgba(229,72,77,.3); }

/* ── toast ──────────────────────────────────────────────────────────────── */
.toast-host { position: fixed; top: 14px; left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 88%; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); animation: toastIn .22s ease-out; border: 1px solid var(--line); }
.toast--ok { border-color: rgba(25,162,122,.5); color: #7ee0c0; }
.toast--err { border-color: rgba(229,72,77,.5); color: #ffb3b5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── misc ───────────────────────────────────────────────────────────────── */
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; margin-right: 5px; }
.feed-dot--stale { background: var(--warn); }
.feed-dot--err { background: var(--down); }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--text-3); }
.kv span:last-child { font-family: var(--mono); font-weight: 600; }
.risk-banner { margin: 0 14px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(240,185,11,.1); border: 1px solid rgba(240,185,11,.3); color: #f3d68a; font-size: 12px; line-height: 1.5; }
.muted { color: var(--text-3); }
.center { text-align: center; }
.mt10 { margin-top: 10px; }
.mb10 { margin-bottom: 10px; }
.hidden { display: none !important; }

/* ── Meridian 2026 institutional design system ─────────────────────────── */
:root {
  --bg: #05080f;
  --bg-elev: #0a101b;
  --bg-elev-2: #0e1725;
  --surface: rgba(12, 21, 35, .92);
  --surface-2: #111d2d;
  --line: rgba(139, 172, 213, .16);
  --line-soft: rgba(139, 172, 213, .09);
  --text: #f4f8ff;
  --text-2: #a3b2c7;
  --text-3: #6f8098;
  --accent: #3b82f6;
  --accent-2: #65a9ff;
  --up: #21d6a2;
  --down: #ff6174;
  --up-soft: rgba(33,214,162,.12);
  --down-soft: rgba(255,97,116,.12);
  --accent-soft: rgba(59,130,246,.14);
  --radius: 9px;
  --radius-sm: 6px;
  --shadow: 0 24px 70px rgba(0,0,0,.48);
  --font: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

body {
  background:
    radial-gradient(circle at 15% -10%, rgba(35,94,177,.16), transparent 32rem),
    radial-gradient(circle at 100% 20%, rgba(33,214,162,.055), transparent 28rem),
    var(--bg);
  letter-spacing: -.01em;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
button, .row, .card, .action-tile, .tab { transition: border-color .2s, background .2s, color .2s, transform .2s, box-shadow .2s; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.app { position: relative; z-index: 1; }
.page { width: 100%; }
.header {
  height: 68px; padding: 0 20px; gap: 14px;
  background: rgba(5,8,15,.78); border-color: var(--line); backdrop-filter: blur(22px) saturate(150%);
}
.header__brand { display: flex; align-items: center; gap: 8px; color: #dce9ff; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.header__brand img { width: 25px; height: 25px; }
.header__rule { width: 1px; height: 24px; background: var(--line); }
.header__title { font-size: 16px; font-weight: 650; }
.header__title small { margin-top: 1px; color: var(--text-3); letter-spacing: 0; }
.icon-btn { background: rgba(122,156,199,.08); border: 1px solid var(--line); }
.icon-btn:hover { color: #fff; background: rgba(59,130,246,.14); border-color: rgba(101,169,255,.35); }

.language-btn { height: 36px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-2); background: rgba(122,156,199,.06); font-size: 11.5px; white-space: nowrap; }
.language-btn:hover { color: #fff; border-color: rgba(101,169,255,.4); background: rgba(59,130,246,.11); }
.language-btn__globe { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; }
.language-btn__chev { color: var(--text-3); }
.sheet__subtitle { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.language-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.language-option { min-height: 62px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; text-align: left; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(122,156,199,.05); }
.language-option:hover { border-color: rgba(101,169,255,.3); background: rgba(59,130,246,.08); }
.language-option--active { border-color: rgba(101,169,255,.6); background: rgba(59,130,246,.13); box-shadow: inset 0 0 0 1px rgba(101,169,255,.08); }
.language-option__native { font-size: 13px; font-weight: 650; color: var(--text); }
.language-option__name { grid-column: 1; font-size: 10.5px; color: var(--text-3); }
.language-option__check { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--accent-2); }

.section { padding: 14px 18px; }
.section__title { font-size: 11px; letter-spacing: .1em; color: #c8d5e7; }
.card, .list, .pos, .chart-wrap { background: linear-gradient(145deg, rgba(15,26,43,.96), rgba(8,15,26,.96)); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.card:hover { border-color: rgba(139,172,213,.25); }
.tabs { padding: 14px 18px 10px; gap: 8px; }
.tab { padding: 7px 14px; background: rgba(122,156,199,.055); border: 1px solid var(--line-soft); }
.tab:hover { color: var(--text); border-color: var(--line); }
.tab--active { color: #d9e9ff; background: rgba(59,130,246,.15); border-color: rgba(101,169,255,.36); box-shadow: 0 5px 20px rgba(13,74,164,.14); }
.row { min-height: 64px; padding: 12px 15px; }
.row:hover { background: rgba(80,126,187,.08); transform: translateX(2px); }
.row__sym { color: #f5f8fd; font-weight: 680; }
.row__price { font-size: 14px; letter-spacing: .01em; }
.row__chg { min-width: 72px; padding: 5px 9px; border-radius: 7px; }

.nav { height: calc(68px + env(safe-area-inset-bottom, 0px)); background: rgba(6,10,17,.9); border-color: var(--line); backdrop-filter: blur(22px) saturate(150%); }
.nav__item { gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.nav__item svg { width: 20px; height: 20px; }
.nav__item--active { color: #78b2ff; }
.nav__item--active::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 0 0 3px 3px; background: #5c9eff; box-shadow: 0 0 15px #3b82f6; }
.nav__item { position: relative; }

.quote-head { padding: 19px 18px 12px; align-items: center; }
.quote-head__sym { font-size: 22px; letter-spacing: -.02em; }
.quote-head__price { font-size: 29px; letter-spacing: -.04em; }
.bidask { padding: 0 18px 14px; }
.bidask__cell { background: rgba(122,156,199,.055); border: 1px solid var(--line-soft); }
.chart-wrap { border-radius: 16px; }
.chart-tf { padding: 9px 10px; }
.chart-tf__item--active { background: rgba(59,130,246,.15); color: #79b2ff; }
.chart-ind__item { background: rgba(122,156,199,.06); }
.seg { background: rgba(122,156,199,.055); border: 1px solid var(--line-soft); }
.seg__btn--on { background: #19273a; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.seg__btn--buy, .btn--buy { background: linear-gradient(135deg, #15b987, #159b78); box-shadow: 0 9px 24px rgba(21,185,135,.13); }
.seg__btn--sell, .btn--sell { background: linear-gradient(135deg, #f04f66, #cd3f55); box-shadow: 0 9px 24px rgba(240,79,102,.13); }
.field__input { background: rgba(3,8,15,.6); border-color: var(--line); border-radius: 10px; }
.field__input:hover { border-color: rgba(139,172,213,.3); }
.field__input:focus { border-color: #5599f3; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.btn--primary { color: #fff; background: linear-gradient(135deg, #438df4, #2468d7); box-shadow: 0 10px 28px rgba(36,104,215,.23); }
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.equity-card { padding: 22px; background: linear-gradient(135deg, #152942, #0b1523 68%); border-color: rgba(101,169,255,.22); box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.equity-card::before { content: "MERIDIAN / PRIME"; position: absolute; right: 18px; top: 16px; color: rgba(208,226,250,.35); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.equity-card__value { letter-spacing: -.045em; }
.metrics { background: var(--line); }
.metric { background: #0d1725; }
.action-tile { border: 1px solid var(--line-soft); }
.action-tile:hover { transform: translateY(-2px); color: #dce9fb; border-color: rgba(101,169,255,.26); }
.action-tile svg { color: #65a9ff; }
.sheet { background: #0a111d; border: 1px solid var(--line); border-bottom: none; box-shadow: 0 -30px 90px rgba(0,0,0,.58); }
.sheet-backdrop { background: rgba(1,4,9,.74); backdrop-filter: blur(5px); }

/* Premium sign-in experience */
.auth-page { min-height: 100vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.auth-top { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line-soft); position: relative; z-index: 2; }
.auth-top__brand { display: flex; align-items: center; gap: 11px; color: #e7f0ff; font-size: 12px; letter-spacing: .18em; font-weight: 700; }
.auth-top__brand img { width: 30px; height: 30px; }
.auth-top__brand b { color: #7eaded; }
.auth-shell { width: min(1120px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(44px, 8vw, 120px); padding: 48px 0; }
.auth-hero { text-align: left; padding: 0; }
.auth-hero__eyebrow { display: flex; align-items: center; gap: 9px; color: #75a7e9; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.auth-hero__eyebrow span { width: 23px; height: 1px; background: #5d9df1; box-shadow: 0 0 10px #3b82f6; }
.auth-hero__logo { display: none; }
.auth-hero__title { margin-top: 23px; font-size: clamp(42px, 5.2vw, 72px); line-height: .99; letter-spacing: -.058em; font-weight: 680; color: #f4f8ff; }
.auth-hero__title em { font-style: normal; color: transparent; background: linear-gradient(100deg, #75b4ff, #c2dcff 68%); -webkit-background-clip: text; background-clip: text; }
.auth-hero__sub { max-width: 520px; margin-top: 22px; color: #8ea0b7; font-size: 15px; line-height: 1.7; }
.auth-proof { display: flex; gap: clamp(24px, 4vw, 52px); margin-top: 43px; }
.auth-proof div { display: flex; flex-direction: column; }
.auth-proof b { color: #f3f7fd; font: 650 20px var(--mono); }
.auth-proof span { margin-top: 4px; color: #667990; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.auth-card { width: 100%; max-width: 410px; justify-self: end; padding: 29px; border: 1px solid rgba(139,172,213,.18); border-radius: 18px; background: linear-gradient(150deg, rgba(18,31,50,.92), rgba(8,15,26,.94)); box-shadow: 0 34px 90px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(20px); }
.auth-card__head { margin-bottom: 23px; }
.auth-card__head > span { color: #659ee9; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.auth-card__head h2 { margin: 7px 0 5px; font-size: 24px; letter-spacing: -.03em; }
.auth-card__head p { margin: 0; color: var(--text-3); font-size: 12px; }
.auth-card .field__label { color: #94a6bd; font-size: 11px; }
.auth-card .field__input { padding: 12px 13px; }
.auth-card .btn { margin-top: 5px; }
.auth-legal { padding: 0 20px 20px; text-align: center; color: #425166; font-size: 9.5px; letter-spacing: .04em; }

[dir="rtl"] .auth-hero, [dir="rtl"] .language-option { text-align: right; }
[dir="rtl"] .row:hover { transform: translateX(-2px); }

@media (min-width: 980px) {
  body:not(:has(.auth-page)) .app { max-width: 1360px; margin: 0 auto; padding-left: 96px; }
  body:not(:has(.auth-page)) .page { padding-bottom: 24px; }
  .nav { left: calc(50% - 680px); right: auto; top: 0; width: 96px; height: 100vh; padding: 86px 10px 18px; grid-template-columns: 1fr; grid-template-rows: repeat(5, 72px); border-top: 0; border-right: 1px solid var(--line); }
  .nav::before { content: "M"; position: absolute; top: 20px; left: 28px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(101,169,255,.4); border-radius: 12px; color: #9bc5ff; font-weight: 800; background: linear-gradient(145deg, rgba(59,130,246,.2), rgba(59,130,246,.04)); }
  .nav__item { border-radius: 12px; }
  .nav__item:hover { background: rgba(59,130,246,.08); color: #d8e7fa; }
  .nav__item--active { background: rgba(59,130,246,.12); }
  .nav__item--active::before { top: 20px; left: -10px; width: 2px; height: 32px; border-radius: 0 3px 3px 0; }
  .header { padding: 0 28px; }
  .section, .tabs, .quote-head, .bidask { max-width: 1160px; margin-left: auto; margin-right: auto; }
  .section { padding-left: 28px; padding-right: 28px; }
  .tabs { padding-left: 28px; padding-right: 28px; }
  .quote-head, .bidask { padding-left: 28px; padding-right: 28px; }
  .sheet { left: 50%; right: auto; width: min(560px, 100%); transform: translate(-50%, 102%); border-radius: 20px 20px 0 0; }
  .sheet-host--open .sheet { transform: translate(-50%, 0); }
  .list .row { grid-template-columns: minmax(220px, 1fr) 160px 90px; }
}

@media (max-width: 979px) {
  .header__brand, .header__rule { display: none; }
  .header { height: 58px; padding: 0 14px; }
  .header .language-btn span:not(.language-btn__globe) { display: none; }
  .header .language-btn { width: 36px; padding: 0; justify-content: center; }
  .auth-shell { grid-template-columns: 1fr; width: min(430px, calc(100% - 32px)); gap: 28px; padding: 38px 0; }
  .auth-hero { text-align: center; }
  .auth-hero__eyebrow { justify-content: center; }
  .auth-hero__title { font-size: clamp(36px, 10vw, 52px); }
  .auth-hero__sub, .auth-proof { display: none; }
  .auth-card { justify-self: center; }
}

@media (max-width: 520px) {
  .language-grid { grid-template-columns: 1fr; }
  .auth-top { height: 64px; padding: 0 16px; }
  .auth-top .language-btn span:not(.language-btn__globe) { display: none; }
  .auth-top .language-btn { width: 36px; padding: 0; justify-content: center; }
  .auth-shell { padding: 26px 0 38px; margin: 0 auto; }
  .auth-hero__title { margin-top: 16px; }
  .auth-card { padding: 22px 18px; }
  .auth-legal { display: none; }
}

/* ── Commercial H5 home, informed by the supplied reference ───────────── */
.home-hero { position: relative; width: min(1104px, calc(100% - 36px)); height: clamp(250px, 32vw, 390px); margin: 20px auto 6px; overflow: hidden; border: 1px solid rgba(139,172,213,.18); border-radius: 9px; background: #07111a; box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.home-hero > img { width: calc(100% + 28px); height: calc(100% + 20px); margin: -10px -14px; object-fit: cover; object-position: center 45%; filter: saturate(.8) contrast(1.08); transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0) scale(1.025); transition: transform .12s linear; }
.home-hero::after, .auth-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle 280px at var(--scene-x, 68%) var(--scene-y, 38%), rgba(122,204,255,.14), transparent 72%); mix-blend-mode: screen; }
.scene-canvas { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; opacity: .7; }
.home-hero__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,7,13,.96) 0%, rgba(3,9,16,.83) 38%, rgba(3,9,16,.12) 76%), linear-gradient(0deg, rgba(3,8,14,.48), transparent 60%); }
.home-hero__content { position: absolute; z-index: 4; left: clamp(24px, 5vw, 62px); top: 50%; width: min(540px, 60%); transform: translateY(-50%); }
.home-hero__eyebrow { color: #77b2ff; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.home-hero h1 { margin: 14px 0 11px; font-size: clamp(32px, 4vw, 54px); line-height: .98; letter-spacing: -.055em; font-weight: 720; }
.home-hero h1 em { color: #7db7ff; font-style: normal; }
.home-hero p { max-width: 420px; color: #a7b6c8; font-size: 13px; line-height: 1.55; }
.home-hero__cta { margin-top: 13px; padding: 11px 16px; border-radius: 9px; color: #fff; background: #2878e3; font-weight: 700; font-size: 12px; box-shadow: 0 10px 28px rgba(29,107,217,.28); }
.home-hero__cta span { margin-left: 18px; }
.home-hero__status { position: absolute; z-index: 4; right: 18px; top: 17px; min-width: 98px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; color: rgba(255,255,255,.68); background: rgba(2,8,14,.55); backdrop-filter: blur(10px); font-size: 8px; letter-spacing: .09em; }
.home-hero__status b { color: #fff; font: 600 10px var(--mono); }
.home-actions { width: min(1104px, calc(100% - 36px)); margin: 14px auto 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.home-actions button { min-width: 0; padding: 13px; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, rgba(15,26,43,.95), rgba(8,15,26,.95)); }
.home-actions button:hover { transform: translateY(-2px); border-color: rgba(101,169,255,.36); }
.home-actions__icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: #77b2ff; background: rgba(59,130,246,.12); font-size: 18px; }
.home-actions b, .home-actions small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-actions b { font-size: 12px; }
.home-actions small { margin-top: 2px; color: var(--text-3); font-size: 9.5px; }
.market-heading { width: min(1104px, calc(100% - 36px)); margin: 27px auto 0; display: flex; align-items: end; justify-content: space-between; }
.market-heading span { color: #5f93da; font-size: 8.5px; font-weight: 750; letter-spacing: .14em; }
.market-heading h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.025em; }
.market-heading__live { color: var(--text-3); font-size: 10px; }

/* The public entry now follows the compact black-header / light-content H5
   language of the reference while remaining unmistakably Meridian. */
body:has(.auth-page) { background: #f4f4f1; color: #101317; }
body:has(.auth-page)::before { display: none; }
.auth-page { background: #f4f4f1; color: #101317; }
.auth-top { height: 72px; background: #11141a; border: 0; }
.auth-top__brand { color: #fff; }
.auth-top__brand b { display: inline-block; padding: 3px 5px; color: #fff; background: #2f7ee8; }
.auth-top .language-btn { color: #fff; border-color: rgba(255,255,255,.28); background: transparent; }
.auth-shell { width: min(1120px, calc(100% - 40px)); gap: 28px; }
.auth-hero { position: relative; min-height: 560px; padding: 42px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: 7px; background: #07111a url('/assets/images/financial-network-3d.png') calc(50% + var(--parallax-x, 0px)) calc(42% + var(--parallax-y, 0px)) / 106% auto no-repeat; box-shadow: 0 24px 60px rgba(17,20,26,.18); transition: background-position .12s linear; }
.auth-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,8,13,.93), rgba(4,8,13,.08) 72%); }
.auth-hero > *:not(.scene-canvas) { position: relative; z-index: 4; }
.auth-hero__eyebrow { color: #8ebeff; }
.auth-hero__title { margin-top: 18px; color: #fff; font-size: clamp(36px, 4vw, 52px); }
.auth-hero__title em { color: #83baff; background: none; -webkit-text-fill-color: initial; }
.auth-hero__sub { color: #c5cfda; }
.auth-proof b { color: #fff; }
.auth-proof span { color: #9aa8b8; }
.auth-card { max-width: 430px; padding: 34px 30px; color: #101317; border: 1px solid #dedfdf; border-radius: 7px; background: #fff; box-shadow: 0 24px 65px rgba(18,24,30,.12); }
.auth-card__head > span { color: #2f76d5; }
.auth-card__head h2 { color: #101317; font-size: 29px; }
.auth-card__head p { color: #72777e; }
.auth-card .field__label { color: #53585f; font-weight: 600; }
.auth-card .field__input { color: #171a1f; background: #f0f0f0; border-color: transparent; }
.auth-card .field__input:focus { background: #fff; border-color: #2f7ee8; }
.auth-card .captcha-box { color: #246dcc; background: #eef4fc; border-color: #b9d0ef; }
.auth-card .center { color: #555b63; }
.auth-card a { color: #256bc7; font-weight: 650; }
.auth-card .notice--info { color: #294461; background: #eef5fd; border-color: #c8daef; }
.auth-legal { color: #8a8d90; }

@media (max-width: 979px) {
  .home-hero { height: 310px; }
  .auth-hero { min-height: 230px; padding: 24px; text-align: left; border-radius: 15px; }
  .auth-hero__eyebrow { justify-content: flex-start; }
  .auth-hero__title { font-size: clamp(32px, 9vw, 46px); }
  .auth-card { max-width: none; }
}

@media (max-width: 600px) {
  .home-hero { width: calc(100% - 28px); height: 250px; margin-top: 14px; border-radius: 15px; }
  .home-hero__veil { background: linear-gradient(90deg, rgba(2,7,13,.94), rgba(3,9,16,.56) 72%, rgba(3,9,16,.15)); }
  .home-hero__content { left: 22px; width: 76%; }
  .home-hero h1 { font-size: 34px; }
  .home-hero p { display: none; }
  .home-hero__cta { margin-top: 15px; }
  .home-hero__status { right: 12px; top: 12px; }
  .home-actions { width: calc(100% - 28px); grid-template-columns: repeat(2, 1fr); }
  .market-heading { width: calc(100% - 28px); }
  .market-heading__live { display: none; }
  .auth-shell { display: block; width: calc(100% - 28px); padding: 18px 0 34px; }
  .auth-hero { min-height: 184px; margin-bottom: 12px; padding: 20px; }
  .auth-hero__title { margin-top: 10px; font-size: 31px; }
  .auth-card { padding: 24px 20px; border-radius: 15px; }
}

/* ── Trading workspace + motion language ───────────────────────────────── */
.page > *:not(.nav) { animation: surfaceIn .38s cubic-bezier(.2,.7,.2,1) both; }
.page > *:nth-child(2) { animation-delay: .025s; }
.page > *:nth-child(3) { animation-delay: .05s; }
@keyframes surfaceIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.trade-workspace { width: min(1180px, calc(100% - 40px)); margin: 18px auto 32px; display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 12px; align-items: start; }
.trade-market, .trade-ticket { min-width: 0; border: 1px solid var(--line); background: rgba(7,13,22,.86); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.trade-market { border-radius: 15px; overflow: hidden; }
.trade-ticket { position: sticky; top: 84px; border-radius: 15px; }
.trade-workspace .quote-head, .trade-workspace .bidask, .trade-workspace .section { max-width: none; margin: 0; }
.trade-workspace .quote-head { padding: 20px 20px 13px; }
.trade-workspace .quote-head__sym::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 0; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px rgba(33,214,162,.08); }
.trade-workspace .bidask { padding: 0 20px 14px; }
.trade-workspace .chart-wrap { border-radius: 9px; box-shadow: none; }
.trade-ticket > .section { padding: 13px; }
.trade-ticket .seg { margin-left: 0; margin-right: 0; }
.trade-ticket .seg--type { border-radius: 8px; }
.trade-ticket .seg__btn { min-width: 0; }
.trade-ticket .seg__btn--buy, .trade-ticket .seg__btn--sell { min-height: 48px; border-radius: 8px; }
.trade-ticket .field { margin-bottom: 12px; }
.trade-ticket .field__input { padding: 10px 11px; }
.trade-ticket .card { border-radius: 9px; }
.trade-ticket .btn-row { position: sticky; bottom: 10px; z-index: 4; padding: 4px; margin-left: -4px; margin-right: -4px; background: rgba(7,13,22,.82); backdrop-filter: blur(10px); }

.nav__item svg { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.nav__item:active svg { transform: scale(.84); }
.nav__item--active svg { transform: translateY(-1px); }
.row { position: relative; }
.row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; opacity: 0; background: var(--accent); transition: opacity .2s; }
.row:hover::before { opacity: 1; }
.btn:active, .action-tile:active, .home-actions button:active { transform: scale(.985); }
.row__price, .quote-head__price, .pos__pnl, .equity-card__value, .metric__v { text-shadow: 0 0 22px currentColor; }
.row__price { text-shadow: none; }

@media (max-width: 979px) {
  .trade-workspace { width: 100%; margin: 0; display: block; }
  .trade-market, .trade-ticket { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .trade-ticket { position: static; }
  .trade-workspace .quote-head { padding: 16px 14px 10px; }
  .trade-workspace .bidask { padding: 0 14px 12px; }
  .trade-ticket > .section { padding: 8px 14px 18px; }
  .trade-ticket .btn-row { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 4px); border-radius: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .scene-canvas { display: none; }
}

/* ── Portfolio, funding and account surfaces ───────────────────────────── */
.page--positions > .metrics, .page--account > .metrics, .page--account > .equity-card,
.page--account > .actions-grid, .page--positions > .section, .page--account > .section,
.page--more > .section { width: min(1104px, calc(100% - 36px)); margin-left: auto; margin-right: auto; }
.page--positions > .metrics, .page--account > .metrics { margin-top: 18px; border: 1px solid var(--line); background: transparent; }
.page--positions .metric, .page--account .metric { position: relative; padding: 16px 18px; background: #0a121e; }
.page--positions .metric + .metric::before, .page--account .metric + .metric::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 1px; background: var(--line); }
.metric__k { letter-spacing: .08em; text-transform: uppercase; }
.metric__v { font-size: 18px; letter-spacing: -.04em; }
.page--positions > .section { padding-left: 0; padding-right: 0; }
.pos { padding: 15px 16px; border-left: 2px solid rgba(101,169,255,.35); border-radius: 4px; }
.pos:hover { border-color: rgba(101,169,255,.62); background: #0d1827; }
.pos__sym { letter-spacing: .01em; }
.pos__grid { padding-top: 11px; border-top: 1px solid var(--line-soft); }
.pos__cell { letter-spacing: .03em; text-transform: uppercase; }
.pos__cell b { letter-spacing: 0; text-transform: none; }
.page--account > .equity-card { margin-top: 18px; border-radius: 5px; background: #0a1422; border-color: rgba(101,169,255,.26); }
.page--account > .equity-card::after { border-radius: 0; opacity: .65; background: linear-gradient(90deg, transparent, rgba(59,130,246,.18)); transform: skewX(-20deg); }
.equity-card__label { letter-spacing: .09em; text-transform: uppercase; }
.page--account > .actions-grid { padding-left: 0; padding-right: 0; }
.action-tile { min-height: 84px; border-radius: 5px; }
.action-tile svg { display: block; margin-left: auto; margin-right: auto; }
.ledger-row { min-height: 58px; }
.ledger-row:hover { background: rgba(59,130,246,.045); }
.page--more > .section { padding-left: 0; padding-right: 0; }
.sheet { border-radius: 9px 9px 0 0; }
.sheet__grab { width: 28px; height: 2px; }
.toast { border-radius: 5px; backdrop-filter: blur(16px); }

@media (min-width: 760px) {
  .page--positions > .section:nth-child(3) { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .page--positions > .section:nth-child(3) > .btn-row, .page--positions > .section:nth-child(3) > .empty { grid-column: 1 / -1; }
  .page--positions > .section:nth-child(3) .pos { margin: 0; }
}

@media (max-width: 600px) {
  .page--positions > .metrics, .page--account > .metrics, .page--account > .equity-card,
  .page--account > .actions-grid, .page--positions > .section, .page--account > .section,
  .page--more > .section { width: calc(100% - 28px); }
  .page--positions > .metrics, .page--account > .metrics { margin-top: 14px; }
  .page--positions .metric, .page--account .metric { padding: 13px 9px; }
  .metric__v { font-size: 14px; }
  .actions-grid { gap: 6px; }
  .action-tile { min-height: 72px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OBSIDIAN TERMINAL — high-contrast fintech art direction
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #020303;
  --bg-elev: #070909;
  --bg-elev-2: #0b0e0d;
  --surface: #080b0a;
  --surface-2: #0d110f;
  --line: rgba(213, 238, 223, .15);
  --line-soft: rgba(213, 238, 223, .075);
  --text: #f2f7f3;
  --text-2: #9eaaa2;
  --text-3: #5f6a63;
  --accent: #b9ff38;
  --accent-2: #d6ff88;
  --accent-soft: rgba(185, 255, 56, .10);
  --up: #38edaa;
  --down: #ff5a68;
  --up-soft: rgba(56, 237, 170, .10);
  --down-soft: rgba(255, 90, 104, .11);
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .62);
}

html { background: #020303; }
body,
body:has(.auth-page) {
  color: var(--text);
  background: #020303;
}
body::before,
body:has(.auth-page)::before {
  display: block;
  opacity: .34;
  background-image:
    linear-gradient(rgba(205, 255, 219, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 255, 219, .018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.72) 62%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-top: 1px solid rgba(185,255,56,.08);
  background: linear-gradient(115deg, transparent 0 48%, rgba(185,255,56,.018) 48.08%, transparent 48.16%);
}
.app, .sheet-host, .toast-host { position: relative; z-index: 1; }
::selection { color: #050705; background: var(--accent); }

.header {
  height: 64px;
  background: rgba(2, 3, 3, .92);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}
.header__brand { color: #f2f7f3; }
.header__title { font-size: 15px; letter-spacing: -.02em; }
.header__title small { color: var(--text-3); font-family: var(--mono); font-size: 9px; letter-spacing: .025em; }
.icon-btn { color: var(--text-2); background: #080b0a; border-color: var(--line); border-radius: 3px; }
.icon-btn:hover { color: var(--accent); background: #0c100d; border-color: rgba(185,255,56,.38); }

/* Compact desktop + touch friendly language dropdown. */
.language-menu { position: relative; z-index: 80; }
.language-btn {
  height: 36px;
  color: var(--text-2);
  background: #080b0a;
  border-color: var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
}
.language-btn:hover,
.language-menu--open .language-btn { color: var(--text); background: #0c100d; border-color: rgba(185,255,56,.4); }
.language-btn__flag { width: 18px; height: 12px; display: block; object-fit: cover; border: 1px solid rgba(255,255,255,.18); border-radius: 1px; filter: saturate(.86); }
.language-btn__chev { color: var(--accent); transition: transform .2s ease; }
.language-menu--open .language-btn__chev { transform: rotate(180deg); }
.language-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 330px;
  max-height: min(470px, calc(100vh - 88px));
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  color: var(--text);
  background: rgba(5, 7, 6, .985);
  border: 1px solid rgba(185,255,56,.22);
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0,0,0,.75);
  transition: opacity .17s ease, transform .17s ease, visibility .17s;
}
.language-menu--open .language-dropdown { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .language-menu:hover .language-dropdown { opacity: 1; visibility: visible; transform: none; }
}
.language-dropdown__head { grid-column: 1 / -1; min-height: 44px; padding: 5px 7px 9px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.language-dropdown__head b { font-size: 11px; letter-spacing: .03em; }
.language-dropdown__head small { color: var(--accent); font: 8px var(--mono); letter-spacing: .12em; }
.language-drop-option { min-width: 0; padding: 9px 8px; display: grid; grid-template-columns: 25px 1fr 10px; gap: 7px; align-items: center; color: var(--text-2); text-align: left; border: 1px solid transparent; border-radius: 2px; }
.language-drop-option:hover { color: var(--text); background: #0d120f; border-color: var(--line); }
.language-drop-option--active { color: var(--text); background: rgba(185,255,56,.075); border-color: rgba(185,255,56,.2); }
.language-drop-option__flag { width: 21px; height: 14px; display: block; object-fit: cover; border: 1px solid rgba(255,255,255,.15); border-radius: 1px; }
.language-drop-option b, .language-drop-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-drop-option b { font-size: 10.5px; font-weight: 650; }
.language-drop-option small { margin-top: 2px; color: var(--text-3); font-size: 8.5px; }
.language-drop-option i { color: var(--accent); font-size: 7px; font-style: normal; }

.card, .list, .pos, .chart-wrap,
.trade-market, .trade-ticket {
  color: var(--text);
  background: #070909;
  border-color: var(--line);
  border-radius: 4px;
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}
.card:hover { border-color: rgba(185,255,56,.22); }
.section__title, .market-heading span { color: #a7c77d; font-family: var(--mono); }
.tabs { gap: 5px; }
.tab { color: var(--text-3); background: #070908; border-color: var(--line-soft); border-radius: 2px; font-family: var(--mono); }
.tab--active { color: #0a0d09; background: var(--accent); border-color: var(--accent); box-shadow: none; }
.row { min-height: 62px; }
.row:hover { background: rgba(185,255,56,.035); transform: none; }
.row::before { background: var(--accent); }
.symbol-cell, .quote-head__identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.instrument-icon { position: relative; width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: var(--text); background: #0d110e; border: 1px solid var(--line); border-radius: 50%; font: 700 9px var(--mono); }
.instrument-icon img { display: block; width: 70%; height: 70%; object-fit: contain; }
.instrument-icon--stock img { width: 64%; height: 64%; }
.instrument-icon--crypto { background: #0a0d0b; border-color: rgba(255,255,255,.13); }
.instrument-icon--crypto img { width: 100%; height: 100%; }
.instrument-icon--fx { overflow: visible; background: #0a0d0b; }
.instrument-icon--fx img { position: absolute; width: 21px; height: 14px; object-fit: cover; border: 1px solid #141814; border-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,.55); }
.instrument-icon--fx img:first-child { left: 2px; top: 4px; z-index: 2; }
.instrument-icon--fx img:last-child { right: 2px; bottom: 4px; z-index: 1; }
.instrument-icon--metal { color: #161006; background: #d6b662; border-color: #f4dc98; box-shadow: inset 0 0 0 3px rgba(255,255,255,.13); }
.instrument-icon--xag { color: #202522; background: #c9d0cc; border-color: #edf3ef; }
.instrument-icon--xpt { color: #1b2020; background: #aebdbc; border-color: #d8e2e1; }
.instrument-icon--xpd { color: #17211f; background: #9ec8c0; border-color: #d0ece6; }
.instrument-icon--xcu { color: #23110a; background: #c97849; border-color: #efae7f; }
.instrument-icon--xal { color: #202525; background: #b9c2c2; border-color: #e1e7e7; }
.instrument-icon--index { color: var(--accent); font-size: 7px; letter-spacing: .04em; }
.instrument-icon--energy { color: #ffbb52; font-size: 8px; }
.instrument-icon--lg { width: 38px; height: 38px; }
.instrument-icon--lg.instrument-icon--fx img { width: 25px; height: 16px; }
.row__sym, .quote-head__sym { font-family: var(--mono); letter-spacing: -.03em; }
.row__chg { border-radius: 2px; font-family: var(--mono); }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

.nav { background: rgba(2,3,3,.96); border-color: var(--line); backdrop-filter: blur(18px); }
.nav__item { color: #69736d; font-family: var(--mono); }
.nav__item:hover { color: #dce5df; }
.nav__item--active { color: var(--accent); }
.nav__item--active::before { background: var(--accent); box-shadow: 0 0 16px rgba(185,255,56,.5); }

.home-hero {
  height: clamp(270px, 31vw, 385px);
  background: #030504;
  border-color: rgba(202,235,214,.18);
  border-radius: 3px;
  box-shadow: 0 28px 90px rgba(0,0,0,.56);
}
.home-hero::before { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 4px); }
.home-hero > img { filter: grayscale(.86) sepia(.16) hue-rotate(65deg) saturate(.9) contrast(1.2) brightness(.67); }
.home-hero__veil { background: linear-gradient(90deg, #020303 0%, rgba(2,3,3,.94) 38%, rgba(2,3,3,.2) 77%), linear-gradient(0deg, rgba(2,3,3,.56), transparent 62%); }
.home-hero::after, .auth-hero::after { background: radial-gradient(circle 260px at var(--scene-x,68%) var(--scene-y,38%), rgba(185,255,56,.09), transparent 72%); }
.scene-canvas { opacity: .42; mix-blend-mode: screen; filter: sepia(1) hue-rotate(40deg) saturate(2); }
.home-hero__eyebrow { color: var(--accent); font-family: var(--mono); }
.home-hero h1 { max-width: 610px; font-weight: 600; letter-spacing: -.052em; }
.home-hero h1 em { color: var(--accent); }
.home-hero p { color: #87928b; }
.home-hero__cta, .btn--primary {
  color: #080b08;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: none;
}
.home-hero__cta:hover, .btn--primary:hover { color: #020302; background: #d1ff7a; filter: none; }
.home-hero__status { border-color: rgba(185,255,56,.25); border-radius: 2px; background: rgba(3,5,4,.82); }
.home-actions { gap: 6px; }
.home-actions button { padding: 12px; color: var(--text); background: #070909; border-color: var(--line); border-radius: 3px; }
.home-actions button:hover { transform: translateY(-1px); border-color: rgba(185,255,56,.33); background: #0b0f0c; }
.home-actions__icon { color: var(--accent); background: rgba(185,255,56,.065); border: 1px solid rgba(185,255,56,.09); border-radius: 2px; }
.market-heading h2 { font-weight: 600; }

.quote-head__price { text-shadow: 0 0 22px rgba(56,237,170,.14); }
.trade-market, .trade-ticket { border-radius: 3px; background: #050706; }
.trade-workspace .quote-head__sym::before { border-radius: 1px; background: var(--up); box-shadow: 0 0 12px rgba(56,237,170,.45); }
.bidask__cell, .seg { background: #080b09; border-color: var(--line); border-radius: 2px; }
.chart-wrap, .trade-workspace .chart-wrap { position: relative; background: #030504; border-radius: 2px; }
.chart-canvas { cursor: crosshair; touch-action: none; }
.chart-canvas:active { cursor: grabbing; }
.chart-tf { min-height: 43px; padding: 7px 9px; align-items: center; border-color: var(--line); }
.chart-tf__item { color: #657169; border-radius: 2px; font-family: var(--mono); font-size: 10px; }
.chart-tf__item:hover { color: var(--text); }
.chart-tf__item--active { color: #080b08; background: var(--accent); }
.chart-zoom { margin-left: auto; display: flex; align-items: center; gap: 2px; padding-left: 8px; border-left: 1px solid var(--line); }
.chart-zoom button, .chart-zoom span { height: 25px; min-width: 27px; display: grid; place-items: center; color: var(--text-2); background: #0b0e0c; border: 1px solid var(--line-soft); border-radius: 2px; font: 11px var(--mono); }
.chart-zoom span { min-width: 43px; color: var(--accent); font-size: 8.5px; }
.chart-zoom button:hover { color: #050704; background: var(--accent); border-color: var(--accent); }
.chart-ind { border-color: var(--line); }
.chart-ind__item { color: #68736c; background: #0a0d0b; border-radius: 2px; font-family: var(--mono); }
.seg__btn--on { color: var(--accent); background: #111811; box-shadow: inset 0 -1px var(--accent); }
.seg__btn--buy, .btn--buy { color: #03100b; background: var(--up); box-shadow: none; }
.seg__btn--sell, .btn--sell { color: #170306; background: var(--down); box-shadow: none; }
.field__input { color: var(--text); background: #030504; border-color: var(--line); border-radius: 2px; font-family: var(--mono); }
.field__input:hover { border-color: rgba(213,238,223,.28); }
.field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(185,255,56,.08); }
.stepper__btn { border-radius: 2px; }
.lot-slider { accent-color: var(--accent); }
.trade-ticket .btn-row { background: rgba(2,3,3,.9); }

.equity-card,
.page--account > .equity-card { background: #070a08; border-color: rgba(185,255,56,.25); border-radius: 3px; box-shadow: none; }
.page--account > .equity-card::after { background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(185,255,56,.025) 16px 17px); transform: none; }
.equity-card::before { color: rgba(185,255,56,.5); }
.metric, .page--positions .metric, .page--account .metric { background: #070a08; }
.action-tile { background: #070909; border-radius: 3px; }
.action-tile svg { color: var(--accent); }
.pos { border-left-color: var(--accent); }
.pos:hover { background: #0a0e0b; border-color: var(--accent); }
.ticket-label { margin: 13px 0 7px; color: var(--text-3); font: 9px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.direction-preview { display: flex; justify-content: space-between; align-items: center; padding: 10px 11px; border: 1px solid var(--line); background: #030504; }
.direction-preview span { color: var(--text-3); font-size: 11px; }
.direction-preview strong { color: var(--text); font-size: 14px; }
.duration-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; margin-bottom: 14px; }
.duration-chip { min-height: 49px; color: var(--text-3); background: #050806; border: 1px solid var(--line); border-radius: 2px; transition: .18s ease; }
.duration-chip b, .duration-chip span { display: block; font-family: var(--mono); }
.duration-chip b { color: var(--text-2); font-size: 13px; }
.duration-chip span { margin-top: 3px; font-size: 7px; letter-spacing: .1em; }
.duration-chip:hover, .duration-chip--on { border-color: rgba(185,255,56,.55); background: rgba(185,255,56,.07); }
.duration-chip--on b { color: var(--accent); }
.amount-input { position: relative; display: flex; align-items: center; }
.amount-input > span, .amount-input > em { position: absolute; z-index: 1; color: var(--text-3); font: normal 11px var(--mono); }
.amount-input > span { left: 12px; color: var(--accent); }
.amount-input > em { right: 11px; }
.amount-input .field__input { padding-left: 29px; padding-right: 50px; font-size: 18px; }
.settlement-note { display: flex; gap: 9px; margin: 10px 0 12px; padding: 10px; color: var(--text-3); background: rgba(185,255,56,.025); border: 1px solid var(--line-soft); font-size: 10.5px; line-height: 1.55; }
.settlement-note b { color: var(--accent); }
.settlement-note__pulse { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 5px; background: var(--accent); box-shadow: 0 0 0 4px rgba(185,255,56,.08); }
.timed-orders { display: grid; gap: 8px; }
.timed-order { position: relative; overflow: hidden; padding: 14px 15px 11px; background: #060907; border: 1px solid var(--line); }
.timed-order__rail { position: absolute; inset: 0 auto 0 0; width: 2px; }
.timed-order__rail--up { background: var(--up); }
.timed-order__rail--down { background: var(--down); }
.timed-order__head, .timed-order__head > div, .timed-order__foot { display: flex; align-items: center; }
.timed-order__head { justify-content: space-between; }
.timed-order__head > div { gap: 8px; }
.timed-order__head .instrument-icon { width: 25px; height: 25px; }
.timed-order__symbol { font: 600 13px var(--mono); }
.timed-order__product, .timed-result { padding: 3px 5px; color: var(--text-3); background: #0d120f; border: 1px solid var(--line-soft); font: 7px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.timed-order__direction { font: 600 10px var(--mono); }
.timed-order__body { display: grid; grid-template-columns: .8fr 1.2fr .8fr; gap: 12px; margin: 14px 0 11px; }
.timed-order__body div { min-width: 0; }
.timed-order__body span, .timed-order__body b { display: block; }
.timed-order__body span { margin-bottom: 5px; color: var(--text-3); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.timed-order__body b { color: var(--text-2); font: 600 11px var(--mono); }
.timed-order__body i { font-style: normal; }
.timed-order__foot { justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--line-soft); color: var(--text-3); font: 9px var(--mono); }
.timed-order__foot strong { min-width: 48px; color: var(--accent); font-size: 14px; text-align: right; }
.timed-result--win { color: var(--up); }.timed-result--loss { color: var(--down); }.timed-result--draw { color: var(--text-2); }
.section__eyebrow { margin-bottom: 3px; color: var(--accent); font: 7px var(--mono); letter-spacing: .14em; }
@media (min-width: 760px) { .timed-orders { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 420px) { .duration-grid { gap: 3px; }.duration-chip { min-height: 45px; }.timed-order__body { grid-template-columns: 1fr 1fr; }.timed-order__body > div:last-child { grid-column: 1 / -1; } }
.sheet { background: #050706; border-color: var(--line); }

/* Login is deliberately part of the product terminal, not a white marketing page. */
.auth-page { color: var(--text); background: transparent; }
.auth-top { height: 68px; background: rgba(2,3,3,.94); border-bottom: 1px solid var(--line); }
.auth-top__brand { color: var(--text); }
.auth-top__brand b { color: #070a07; background: var(--accent); }
.auth-top .language-btn { color: var(--text-2); background: #070908; border-color: var(--line); }
.auth-shell { gap: 14px; }
.auth-hero { min-height: 560px; border: 1px solid var(--line); border-radius: 3px; background-color: #030504; filter: none; box-shadow: none; }
.auth-hero::before { background: linear-gradient(0deg, rgba(2,3,3,.98), rgba(2,3,3,.08) 78%); }
.auth-hero__eyebrow { color: var(--accent); font-family: var(--mono); }
.auth-hero__eyebrow span { background: var(--accent); box-shadow: none; }
.auth-hero__title { font-weight: 580; }
.auth-hero__title em { color: var(--accent); }
.auth-hero__sub { color: #929c96; }
.auth-proof span { color: #6e7972; font-family: var(--mono); }
.auth-card { color: var(--text); background: #070908; border-color: var(--line); border-radius: 3px; box-shadow: none; }
.auth-card__head > span { color: var(--accent); font-family: var(--mono); }
.auth-card__head h2 { color: var(--text); }
.auth-card__head p, .auth-card .center { color: var(--text-3); }
.auth-card .field__label { color: var(--text-2); }
.auth-card .field__input { color: var(--text); background: #020303; border-color: var(--line); }
.auth-card .field__input:focus { background: #020303; border-color: var(--accent); }
.auth-card .captcha-box { color: var(--accent); background: rgba(185,255,56,.04); border-color: rgba(185,255,56,.2); border-radius: 2px; }
.password-feedback { min-height: 48px; margin: -2px 0 12px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; color: #ff98a1; background: rgba(255,90,104,.055); border: 1px solid rgba(255,90,104,.24); border-radius: 2px; }
.password-feedback[hidden] { display: none; }
.password-feedback__signal { width: 7px; height: 7px; flex: 0 0 auto; background: var(--down); box-shadow: 0 0 0 4px rgba(255,90,104,.09); }
.password-feedback b, .password-feedback small { display: block; }
.password-feedback b { font-size: 10.5px; letter-spacing: .01em; }
.password-feedback small { margin-top: 2px; color: #8d686c; font: 8.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.password-feedback i { color: #ffadb4; font-style: normal; }
.password-feedback--pulse { animation: passwordPulse .32s ease both; }
@keyframes passwordPulse { 0% { transform: translateX(0); } 30% { transform: translateX(-3px); } 65% { transform: translateX(3px); } 100% { transform: translateX(0); } }
.auth-card a { color: var(--accent); }
.auth-card .notice--info { color: #a6b0aa; background: #0a0e0b; border-color: var(--line); }
.auth-legal { color: #465049; }

@media (min-width: 980px) {
  .nav::before { color: #050805; background: var(--accent); border-color: var(--accent); border-radius: 3px; box-shadow: 0 0 24px rgba(185,255,56,.12); }
  .nav__item, .nav__item:hover, .nav__item--active { border-radius: 2px; }
  .nav__item:hover { color: var(--text); background: #090c0a; }
  .nav__item--active { color: var(--accent); background: rgba(185,255,56,.06); }
}

@media (max-width: 600px) {
  .header .language-btn .language-btn__flag,
  .auth-top .language-btn .language-btn__flag { display: inline-flex !important; font-family: "Segoe UI Emoji", sans-serif; }
  .header .language-btn .language-btn__chev,
  .auth-top .language-btn .language-btn__chev,
  .header .language-btn > span:nth-child(2),
  .auth-top .language-btn > span:nth-child(2) { display: none; }
  .language-dropdown { position: fixed; top: 57px; right: 12px; width: min(350px, calc(100vw - 24px)); grid-template-columns: 1fr; max-height: min(590px, calc(100vh - 78px)); }
  .auth-top .language-dropdown { top: 59px; }
  .home-hero { border-radius: 3px; }
  .home-hero h1 { font-size: 32px; }
  .home-actions { gap: 5px; }
  .home-actions button { border-radius: 3px; }
  .auth-hero { min-height: 190px; border-radius: 3px; }
  .auth-card { border-radius: 3px; }
  .chart-tf { gap: 1px; }
  .chart-tf__item { padding-left: 7px; padding-right: 7px; }
  .chart-zoom { padding-left: 4px; }
  .chart-zoom span { display: none; }
  .chart-zoom button { min-width: 24px; }
}

/* Exact-width capture probe: mirrors the mobile media-query composition on
   Windows headless browsers whose native viewport cannot be narrower than
   ~492px. It is only activated by the visual regression harness. */
html.layout-probe-mobile body:not(:has(.auth-page)) .app { max-width: none; margin: 0; padding-left: 0; }
html.layout-probe-mobile body:not(:has(.auth-page)) .page { width: var(--probe-width); padding-bottom: calc(var(--nav-h) + 12px); }
html.layout-probe-mobile .header__brand,
html.layout-probe-mobile .header__rule { display: none; }
html.layout-probe-mobile .header { width: var(--probe-width); height: 58px; padding: 0 14px; }
html.layout-probe-mobile .header .language-btn { width: 36px; padding: 0; justify-content: center; }
html.layout-probe-mobile .header .language-btn .language-btn__flag { display: inline-flex !important; font-family: "Segoe UI Emoji", sans-serif; }
html.layout-probe-mobile .header .language-btn .language-btn__chev,
html.layout-probe-mobile .header .language-btn > span:nth-child(2) { display: none; }
html.layout-probe-mobile .nav { left: 0; right: auto; top: auto; bottom: 0; width: var(--probe-width); height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px); grid-template-columns: repeat(5, minmax(0,1fr)); grid-template-rows: 1fr; border: 0; border-top: 1px solid var(--line); }
html.layout-probe-mobile .nav::before { display: none; }
html.layout-probe-mobile .nav__item { border-radius: 0; }
html.layout-probe-mobile .nav__item--active::before { left: auto; top: 0; width: 28px; height: 2px; }
html.layout-probe-mobile .list .row { grid-template-columns: 1fr auto auto; }
html.layout-probe-mobile .home-hero { width: calc(100% - 28px); height: 250px; margin-top: 14px; border-radius: 3px; }
html.layout-probe-mobile .home-hero > img { width: 100%; height: 100%; margin: 0; transform: none; }
html.layout-probe-mobile .home-hero__content { left: 22px; width: 76%; }
html.layout-probe-mobile .home-hero h1 { font-size: 32px; }
html.layout-probe-mobile .home-hero p { display: none; }
html.layout-probe-mobile .home-hero__status { right: 12px; top: 12px; }
html.layout-probe-mobile .home-actions { width: calc(100% - 28px); grid-template-columns: repeat(2, minmax(0,1fr)); }
html.layout-probe-mobile .market-heading { width: calc(100% - 28px); }
html.layout-probe-mobile .market-heading__live { display: none; }
html.layout-probe-mobile .trade-workspace { width: 100%; margin: 0; display: block; }
html.layout-probe-mobile .trade-market,
html.layout-probe-mobile .trade-ticket { width: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html.layout-probe-mobile .trade-ticket { position: static; }
html.layout-probe-mobile .trade-workspace .quote-head { padding: 16px 14px 10px; }
html.layout-probe-mobile .trade-workspace .bidask { padding: 0 14px 12px; }
html.layout-probe-mobile .trade-ticket > .section { padding: 8px 14px 18px; }
html.layout-probe-mobile .trade-ticket .btn-row { bottom: calc(var(--nav-h) + 4px); }
html.layout-probe-mobile .page--positions > .metrics,
html.layout-probe-mobile .page--account > .metrics,
html.layout-probe-mobile .page--account > .equity-card,
html.layout-probe-mobile .page--account > .actions-grid,
html.layout-probe-mobile .page--positions > .section,
html.layout-probe-mobile .page--account > .section,
html.layout-probe-mobile .page--more > .section { width: calc(100% - 28px); }
html.layout-probe-mobile .page--positions > .section:nth-child(3) { display: block; }
html.layout-probe-mobile .page--positions > .section:nth-child(3) .pos { margin-bottom: 8px; }
html.layout-probe-mobile .page--positions .metric,
html.layout-probe-mobile .page--account .metric { padding: 13px 9px; }
html.layout-probe-mobile .metric__v { font-size: 14px; }
html.layout-probe-mobile .row__price { min-width: 0; }
html.layout-probe-mobile .language-dropdown { position: fixed; top: 57px; right: auto; left: 12px; width: calc(var(--probe-width) - 24px); grid-template-columns: 1fr; }

/* ============================================================================
   Meridian Black Gold — premium trading system
   A restrained obsidian / champagne-gold palette. Green and red remain
   reserved for market direction so financial meaning is never compromised.
   ========================================================================== */
:root {
  --bg: #030303;
  --bg-elev: #070706;
  --bg-elev-2: #0d0c09;
  --surface: #090907;
  --surface-2: #11100c;
  --line: rgba(222, 184, 105, .20);
  --line-soft: rgba(222, 184, 105, .10);
  --text: #f4f0e7;
  --text-2: #aaa397;
  --text-3: #716b60;
  --accent: #d8ad52;
  --accent-2: #f0d38b;
  --accent-soft: rgba(216, 173, 82, .11);
  --up: #35c997;
  --down: #ef6570;
  --warn: #e5a84f;
}

html, body { background: #030303; }
body::before {
  opacity: .42;
  background-image:
    linear-gradient(rgba(224,186,107,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,186,107,.018) 1px, transparent 1px);
}
body::after {
  border-top-color: rgba(224,186,107,.09);
  background: linear-gradient(115deg, transparent 0 48%, rgba(224,186,107,.022) 48.08%, transparent 48.16%);
}
::selection { color: #070603; background: var(--accent); }
a { color: var(--accent-2); }

.boot__mark {
  width: 78px; height: 64px; padding: 0;
  display: grid; place-items: center;
  background: transparent; border-radius: 0;
}
.boot__mark img { width: 100%; height: 100%; object-fit: contain; }
.boot__text { color: #8e8678; font-family: var(--mono); letter-spacing: .08em; }

.header { background: rgba(3,3,3,.92); border-color: var(--line-soft); }
.header__brand { width: 44px; height: 44px; overflow: hidden; }
.header__brand img { width: 44px; height: 44px; object-fit: contain; }
.header__rule { background: var(--line); }
.icon-btn { color: var(--text-2); background: #090907; border-color: var(--line); }
.icon-btn:hover { color: var(--accent-2); background: #12100b; border-color: rgba(216,173,82,.45); }

.language-btn { color: var(--text-2); background: #090907; border-color: var(--line); }
.language-menu--open .language-btn { color: var(--text); background: #12100b; border-color: rgba(216,173,82,.48); }
.language-btn__chev, .language-dropdown__head small, .language-drop-option i { color: var(--accent); }
.language-dropdown { background: rgba(7,7,6,.985); border-color: rgba(216,173,82,.28); box-shadow: 0 22px 70px rgba(0,0,0,.75); }
.language-drop-option:hover { color: var(--text); background: #12100b; border-color: var(--line); }
.language-drop-option--active { color: var(--text); background: rgba(216,173,82,.09); border-color: rgba(216,173,82,.26); }

.card, .trade-market, .trade-ticket, .metric, .page--positions .metric, .page--account .metric,
.action-tile, .timed-order { background: #090907; border-color: var(--line-soft); }
.card:hover { border-color: rgba(216,173,82,.28); }
.section__title, .market-heading span, .section__eyebrow { color: #cfb879; }
.tab { color: var(--text-3); background: #080807; border-color: var(--line-soft); }
.tab--active { color: #080603; background: var(--accent); border-color: var(--accent); }
.row:hover { background: rgba(216,173,82,.04); }
.row::before { background: var(--accent); }

.nav { background: rgba(4,4,3,.97); border-color: var(--line-soft); }
.nav__item { color: #746d61; }
.nav__item:hover { color: #e6dfd0; background: #0d0c09; }
.nav__item--active { color: var(--accent-2); background: rgba(216,173,82,.055); }
.nav__item--active::before { background: var(--accent); box-shadow: 0 0 16px rgba(216,173,82,.35); }
@media (min-width: 980px) {
  .nav::before { color: #070603; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 24px rgba(216,173,82,.16); }
}

.home-hero { background-color: #030303; border-color: var(--line); }
.home-hero > img { filter: grayscale(1) sepia(.72) saturate(1.35) brightness(.72) contrast(1.12); }
.home-hero__veil { background: linear-gradient(90deg, #030303 0%, rgba(3,3,3,.94) 39%, rgba(3,3,3,.24) 78%), linear-gradient(0deg, rgba(3,3,3,.62), transparent 64%); }
.home-hero::after, .auth-hero::after { background: radial-gradient(circle 260px at var(--scene-x,68%) var(--scene-y,38%), rgba(216,173,82,.115), transparent 72%); }
.home-hero__eyebrow, .home-hero h1 em { color: var(--accent-2); }
.home-hero p { color: #928a7d; }
.home-hero__status { border-color: rgba(216,173,82,.3); background: rgba(5,5,4,.86); }
.home-hero__cta, .btn--primary { color: #080603; background: linear-gradient(110deg, #c7963d, #f0d182 48%, #b98228); border-color: transparent; box-shadow: inset 0 1px rgba(255,255,255,.28); }
.home-hero__cta:hover, .btn--primary:hover { color: #030201; background: linear-gradient(110deg, #ddb15c, #f6dda0 48%, #ca9639); }
.home-actions button { color: var(--text); background: #090907; border-color: var(--line); }
.home-actions button:hover { border-color: rgba(216,173,82,.4); background: #12100b; }
.home-actions__icon { color: var(--accent-2); background: rgba(216,173,82,.075); border-color: rgba(216,173,82,.14); }

.bidask__cell, .seg, .chart-zoom button, .chart-zoom span, .chart-ind__item { background: #0c0b08; border-color: var(--line-soft); }
.chart-wrap, .trade-workspace .chart-wrap { background: #040403; }
.chart-tf__item--active { color: #080603; background: var(--accent); }
.chart-zoom span { color: var(--accent-2); }
.chart-zoom button:hover { color: #050403; background: var(--accent); border-color: var(--accent); }
.seg__btn--on { color: var(--accent-2); background: #17130b; box-shadow: inset 0 -1px var(--accent); }
.field__input, .amount-input .field__input { color: var(--text); background: #050504; border-color: var(--line); }
.field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(216,173,82,.10); }
.lot-slider { accent-color: var(--accent); }
.duration-chip { color: var(--text-3); background: #080806; border-color: var(--line); }
.duration-chip:hover, .duration-chip--on { border-color: rgba(216,173,82,.62); background: rgba(216,173,82,.085); }
.duration-chip--on b, .amount-input > span, .settlement-note b, .timed-order__foot strong { color: var(--accent-2); }
.settlement-note { background: rgba(216,173,82,.035); border-color: var(--line-soft); }
.settlement-note__pulse { background: var(--accent); box-shadow: 0 0 0 4px rgba(216,173,82,.09); }
.page--account > .equity-card { background: #0a0907; border-color: rgba(216,173,82,.3); }
.page--account > .equity-card::after { background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(216,173,82,.032) 16px 17px); }
.equity-card::before { color: rgba(216,173,82,.55); }

body:has(.auth-page), .auth-page { background: #030303; color: var(--text); }
.auth-top { height: 76px; background: rgba(3,3,3,.96); border-bottom: 1px solid var(--line-soft); }
.auth-top__brand { width: 88px; height: 68px; }
.auth-top__brand img { width: 100%; height: 100%; object-fit: contain; }
.auth-hero { background-color: #030303; border-color: var(--line); filter: grayscale(.15) sepia(.28); }
.auth-hero::before { background: linear-gradient(0deg, rgba(3,3,3,.985), rgba(3,3,3,.14) 78%); }
.auth-hero__eyebrow, .auth-hero__title em, .auth-card__head > span { color: var(--accent-2); }
.auth-hero__sub { color: #9a9284; }
.auth-proof span { color: #756e62; }
.auth-card { color: var(--text); background: #090907; border-color: rgba(216,173,82,.22); box-shadow: 0 30px 90px rgba(0,0,0,.46); }
.auth-card__head h2 { color: var(--text); }
.auth-card__head p, .auth-card .field__label, .auth-card .center { color: var(--text-2); }
.auth-card .field__input { color: var(--text); background: #040403; border-color: var(--line); }
.auth-card .field__input:focus { background: #040403; border-color: var(--accent); }
.auth-card .captcha-box { color: var(--accent-2); background: rgba(216,173,82,.045); border-color: rgba(216,173,82,.23); }
.auth-card a { color: var(--accent-2); }
.auth-card .notice--info { color: #b7afa0; background: #0d0c09; border-color: var(--line); }
.auth-legal { color: #514c43; }

@media (max-width: 600px) {
  .header__brand, .header__rule { display: none; }
  .auth-top { height: 66px; }
  .auth-top__brand { width: 72px; height: 58px; }
}
