/* GoldFX v3 — benchmark-grade terminal (OANDA · IG · TradingView patterns) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --m4-bg: #080b10;
  --m4-surface: #0f1419;
  --m4-surface-2: #151b23;
  --m4-border: #21262d;
  --m4-border-soft: #30363d;
  --m4-text: #f0f3f6;
  --m4-muted: #8b949e;
  --m4-gold: #d4af37;
  --m4-gold-dim: #9a7b1a;
  --m4-buy: #2ea043;
  --m4-buy-bg: rgba(46, 160, 67, 0.12);
  --m4-sell: #f85149;
  --m4-sell-bg: rgba(248, 81, 73, 0.12);
  --m4-up: #3fb950;
  --m4-down: #f85149;
  --m4-radius: 10px;
  --m4-radius-lg: 14px;
  --m4-font: "IBM Plex Sans", system-ui, sans-serif;
  --m4-mono: "IBM Plex Mono", ui-monospace, monospace;
  --m4-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

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

.m4-root, .m4-root body { background: var(--m4-bg); color: var(--m4-text); margin: 0; font-family: var(--m4-font); -webkit-font-smoothing: antialiased; }

.app-stage--goldfx { background: var(--m4-bg); min-height: 100vh; }
.m4-device { max-width: 1280px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.m4-mark { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; background: linear-gradient(145deg, var(--m4-gold), var(--m4-gold-dim)); color: #080b10; font-size: 0.6rem; font-weight: 800; letter-spacing: -0.02em; }
.m4-mark.sm { width: 1.5rem; height: 1.5rem; font-size: 0.5rem; border-radius: 6px; }

.m4-web-chrome { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--m4-border); background: var(--m4-surface); font-size: 0.85rem; }
.m4-web-chrome-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--m4-text); font-weight: 700; }
.m4-web-chrome-links { display: none; gap: 1.25rem; margin-left: 2rem; }
.m4-web-chrome-links a { color: var(--m4-muted); text-decoration: none; font-weight: 500; }
.m4-web-chrome-links a:hover { color: var(--m4-text); }
.m4-web-chrome-cta { margin-left: auto; color: var(--m4-gold); text-decoration: none; font-weight: 600; font-size: 0.8rem; }

.m4-offline { background: #3d1f00; color: #ffb86c; text-align: center; padding: 0.35rem; font-size: 0.75rem; }

.m4-paper-banner { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.45rem 1rem; background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.08)); border-bottom: 1px solid rgba(212, 175, 55, 0.25); font-size: 0.72rem; color: var(--m4-gold); font-weight: 600; letter-spacing: 0.02em; }
.m4-paper-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--m4-gold); box-shadow: 0 0 8px var(--m4-gold); animation: m4-pulse 2s ease infinite; }
@keyframes m4-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.m4-shell { flex: 1; display: flex; flex-direction: column; }

.m4-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--m4-border); background: var(--m4-surface); gap: 0.75rem; }
.m4-brand { display: flex; align-items: center; gap: 0.6rem; }
.m4-brand strong { display: block; font-size: 1rem; font-weight: 700; }
.m4-brand span { font-size: 0.7rem; color: var(--m4-muted); font-family: var(--m4-mono); }
.m4-topbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.m4-currency-picker select { background: var(--m4-bg); color: var(--m4-text); border: 1px solid var(--m4-border-soft); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.m4-live-badge { font-size: 0.65rem; padding: 0.3rem 0.55rem; border-radius: 6px; border: 1px solid var(--m4-border-soft); background: var(--m4-bg); color: var(--m4-muted); cursor: not-allowed; text-transform: uppercase; letter-spacing: 0.04em; }

.m4-instrument-bar { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: stretch; padding: 1rem 1.25rem; background: var(--m4-surface-2); border-bottom: 1px solid var(--m4-border); }
.m4-instrument-symbol { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.m4-instrument-type { display: block; font-size: 0.65rem; color: var(--m4-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.15rem; }
.m4-spot-oz { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; margin: 0; font-family: var(--m4-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.m4-spot-gram { font-size: 0.8rem; color: var(--m4-muted); margin: 0.1rem 0; font-family: var(--m4-mono); }
.m4-change { font-size: 0.8rem; margin: 0; font-weight: 600; font-family: var(--m4-mono); }
.m4-change.up { color: var(--m4-up); }
.m4-change.down { color: var(--m4-down); }

.m4-book { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: stretch; min-width: 280px; }
.m4-book-side { border: 1px solid var(--m4-border-soft); border-radius: var(--m4-radius); padding: 0.65rem 0.85rem; background: var(--m4-bg); cursor: pointer; transition: border-color 0.15s, background 0.15s; text-align: center; font: inherit; color: inherit; }
.m4-book-side:hover { border-color: var(--m4-gold); }
.m4-book-buy { background: var(--m4-buy-bg); border-color: rgba(46, 160, 67, 0.35); }
.m4-book-sell { background: var(--m4-sell-bg); border-color: rgba(248, 81, 73, 0.35); }
.m4-book-label { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--m4-muted); font-weight: 600; }
.m4-book-buy strong { color: var(--m4-up); font-size: 1.05rem; font-family: var(--m4-mono); font-variant-numeric: tabular-nums; }
.m4-book-sell strong { color: var(--m4-down); font-size: 1.05rem; font-family: var(--m4-mono); font-variant-numeric: tabular-nums; }
.m4-book-unit { font-size: 0.65rem; color: var(--m4-muted); }
.m4-book-spread { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 0.5rem; font-size: 0.65rem; color: var(--m4-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.m4-book-spread strong { font-size: 0.85rem; color: var(--m4-text); font-family: var(--m4-mono); }
.m4-book-note { font-size: 0.55rem; color: var(--m4-gold); text-transform: none; letter-spacing: 0; }

.m4-account-strip { display: flex; flex-direction: column; justify-content: center; gap: 0.65rem; padding-left: 1rem; border-left: 1px solid var(--m4-border); min-width: 140px; }
.m4-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--m4-muted); margin: 0 0 0.2rem; font-weight: 600; }
.m4-balance { font-size: 1.1rem; font-weight: 700; margin: 0; font-family: var(--m4-mono); font-variant-numeric: tabular-nums; }
.m4-equity { font-size: 0.75rem; color: var(--m4-muted); margin: 0; font-family: var(--m4-mono); }

.m4-room-picker { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--m4-border); background: var(--m4-surface); scrollbar-width: none; }
.m4-room-picker::-webkit-scrollbar { display: none; }
.m4-room-btn { flex: 0 0 auto; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--m4-border-soft); background: var(--m4-bg); color: var(--m4-muted); font-size: 0.72rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.m4-room-btn:hover { color: var(--m4-text); border-color: var(--m4-muted); }
.m4-room-btn.active { border-color: var(--m4-gold); color: var(--m4-gold); background: rgba(212, 175, 55, 0.08); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.2); }

.m4-workspace { display: grid; grid-template-columns: 1fr 300px; gap: 0; flex: 1; align-items: start; }
.m4-workspace-main { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.m4-workspace-rail { padding: 1rem; border-left: 1px solid var(--m4-border); background: var(--m4-surface); position: sticky; top: 0; display: flex; flex-direction: column; gap: 0.85rem; min-height: 100%; }

.m4-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.m4-panel-tag, .m4-panel-hint { font-size: 0.65rem; color: var(--m4-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.m4-section-title { font-size: 0.8rem; margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--m4-muted); }

.m4-chart-section { background: var(--m4-surface-2); border: 1px solid var(--m4-border); border-radius: var(--m4-radius-lg); padding: 0.85rem; box-shadow: var(--m4-shadow); }
.m4-chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.65rem; }
.m4-range-tabs { display: flex; gap: 0.25rem; background: var(--m4-bg); padding: 0.2rem; border-radius: 8px; border: 1px solid var(--m4-border); }
.m4-range { padding: 0.35rem 0.7rem; border: none; background: transparent; color: var(--m4-muted); border-radius: 6px; font-size: 0.7rem; font-weight: 600; cursor: pointer; font-family: var(--m4-mono); }
.m4-range:hover { color: var(--m4-text); }
.m4-range.active { background: var(--m4-surface); color: var(--m4-gold); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.m4-room-count { font-size: 0.68rem; color: var(--m4-muted); }
.m4-chart-wrap { position: relative; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, rgba(212,175,55,0.03) 0%, transparent 40%); }
.m4-chart-wrap canvas { width: 100%; height: auto; display: block; min-height: 200px; }
.m4-chart-note { font-size: 0.62rem; color: var(--m4-muted); margin: 0.5rem 0 0; text-align: center; }

.m4-depth-wrap, .m4-positions, .m4-leaderboard { background: var(--m4-surface-2); border: 1px solid var(--m4-border); border-radius: var(--m4-radius); padding: 0.75rem; }
.m4-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--m4-border); }
.m4-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; font-family: var(--m4-mono); }
.m4-table th, .m4-table td { padding: 0.5rem 0.65rem; text-align: left; border-bottom: 1px solid var(--m4-border); }
.m4-table th { color: var(--m4-muted); font-weight: 600; background: var(--m4-bg); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; }
.m4-table tbody tr:not(.m4-empty-row) { cursor: pointer; transition: background 0.1s; }
.m4-table tbody tr:not(.m4-empty-row):hover { background: rgba(255,255,255,0.03); }
.m4-table .pnl-up { color: var(--m4-up); font-weight: 600; }
.m4-table .pnl-down { color: var(--m4-down); font-weight: 600; }
.m4-empty-row td { text-align: center; color: var(--m4-muted); padding: 1.25rem; cursor: default; font-family: var(--m4-font); }
.m4-depth-table tbody tr { cursor: default; }
.m4-depth-table tbody tr:hover { background: transparent; }

.m4-leader-list { list-style: none; margin: 0; padding: 0; }
.m4-leader-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--m4-border); font-size: 0.78rem; }
.m4-leader-list li:last-child { border-bottom: none; }
.m4-leader-rank { font-weight: 700; color: var(--m4-gold); min-width: 1.25rem; font-family: var(--m4-mono); }
.m4-leader-pnl { margin-left: auto; font-family: var(--m4-mono); font-variant-numeric: tabular-nums; }

.m4-ticket { background: var(--m4-surface-2); border: 1px solid var(--m4-border); border-radius: var(--m4-radius-lg); padding: 1rem; box-shadow: var(--m4-shadow); }
.m4-ticket-head { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 0.85rem; }
.m4-side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.25rem; background: var(--m4-bg); border-radius: 10px; border: 1px solid var(--m4-border); }
.m4-side { padding: 0.55rem; border: none; border-radius: 8px; background: transparent; color: var(--m4-muted); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.15s; }
.m4-side.active[data-side="buy"] { background: var(--m4-buy); color: #fff; box-shadow: 0 2px 8px rgba(46,160,67,0.35); }
.m4-side.active[data-side="sell"] { background: var(--m4-sell); color: #fff; box-shadow: 0 2px 8px rgba(248,81,73,0.35); }
.m4-size-pills { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 0.35rem; align-items: center; margin-bottom: 0.75rem; }
.m4-size { padding: 0.45rem 0; border-radius: 8px; border: 1px solid var(--m4-border-soft); background: var(--m4-bg); color: var(--m4-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: var(--m4-mono); transition: all 0.15s; }
.m4-size.active { border-color: var(--m4-gold); color: var(--m4-gold); background: rgba(212,175,55,0.08); }
.m4-size-unit { font-size: 0.65rem; color: var(--m4-muted); padding-right: 0.25rem; }
.m4-sl-tp { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.75rem; }
.m4-sl-tp label { font-size: 0.65rem; color: var(--m4-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; display: flex; flex-direction: column; gap: 0.3rem; }
.m4-sl-tp input { background: var(--m4-bg); border: 1px solid var(--m4-border-soft); border-radius: 8px; color: var(--m4-text); padding: 0.5rem; font-size: 0.8rem; font-family: var(--m4-mono); }
.m4-sl-tp input:focus { outline: none; border-color: var(--m4-gold); }
.m4-ticket-preview { font-size: 0.75rem; color: var(--m4-muted); margin: 0 0 0.75rem; font-family: var(--m4-mono); line-height: 1.4; padding: 0.5rem; background: var(--m4-bg); border-radius: 8px; border: 1px solid var(--m4-border); }
.m4-execute { width: 100%; padding: 0.9rem; border: none; border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; color: #fff; transition: transform 0.1s, filter 0.15s; letter-spacing: 0.02em; }
.m4-execute:hover { filter: brightness(1.08); }
.m4-execute:active { transform: scale(0.98); }
.m4-execute.buy { background: linear-gradient(180deg, #3fb950, var(--m4-buy)); }
.m4-execute.sell { background: linear-gradient(180deg, #ff7b72, var(--m4-sell)); }
.m4-leverage-note { font-size: 0.62rem; color: var(--m4-muted); text-align: center; margin: 0.5rem 0 0; }

.m4-fees-panel { border: 1px solid var(--m4-border); border-radius: var(--m4-radius); background: var(--m4-surface-2); overflow: hidden; }
.m4-fees-panel summary { padding: 0.65rem 0.85rem; cursor: pointer; font-size: 0.75rem; font-weight: 700; color: var(--m4-gold); text-transform: uppercase; letter-spacing: 0.04em; list-style: none; }
.m4-fees-panel summary::-webkit-details-marker { display: none; }
.m4-fees-panel .m4-table-wrap { border: none; border-radius: 0; border-top: 1px solid var(--m4-border); }

.m4-bridges .m4-bridge-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.m4-bridge { display: block; padding: 0.75rem 0.85rem; border: 1px solid var(--m4-border-soft); border-radius: 10px; background: var(--m4-bg); text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s; }
.m4-bridge:hover { border-color: var(--m4-gold); background: rgba(212,175,55,0.05); }
.m4-bridge-label { display: block; font-weight: 700; font-size: 0.8rem; color: var(--m4-gold); }
.m4-bridge-desc { font-size: 0.65rem; color: var(--m4-muted); }

.m4-community-strip { text-align: center; font-size: 0.72rem; margin: 0; padding: 0.5rem; }
.m4-community-strip a { color: var(--m4-gold); text-decoration: none; font-weight: 600; }
.m4-community-strip a:hover { text-decoration: underline; }

.m4-toast, #m4-toast.model-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--m4-surface-2); border: 1px solid var(--m4-border-soft); padding: 0.75rem 1.25rem; border-radius: 10px; font-size: 0.85rem; z-index: 200; transition: transform 0.25s ease; box-shadow: var(--m4-shadow); font-weight: 500; }
#m4-toast.model-toast.show { transform: translateX(-50%) translateY(0); }

/* Inline embed on marketing page — full terminal width */
.product-trade-inline .m4-device { max-width: 1200px; }
.product-trade-inline .m4-web-chrome { display: none; }
.product-trade-inline .m4-paper-banner { border-radius: var(--m4-radius-lg) var(--m4-radius-lg) 0 0; }
.product-trade-inline .m4-shell { border: 1px solid var(--m4-border); border-radius: 0 0 var(--m4-radius-lg) var(--m4-radius-lg); overflow: hidden; box-shadow: var(--m4-shadow); }

/* v5 — chart axis, crosshair, depth bars, history, points, mobile */
.m4-room-desc { font-size: 0.75rem; color: var(--m4-muted); margin: 0; padding: 0 1.25rem 0.75rem; }
.m4-points { font-size: 0.95rem; font-weight: 700; margin: 0; font-family: var(--m4-mono); color: var(--m4-gold); }
.m4-session-pnl { font-size: 0.85rem; font-weight: 600; margin: 0; font-family: var(--m4-mono); }
.m4-margin-warn { color: var(--m4-sell) !important; }
.m4-sltp { font-size: 0.65rem; color: var(--m4-muted); }
.m4-history { background: var(--m4-surface-2); border: 1px solid var(--m4-border); border-radius: var(--m4-radius); padding: 0.75rem; }

.m4-chart-wrap { position: relative; }
.m4-chart-axis { position: absolute; left: 0; top: 0; bottom: 0; width: 4.5rem; pointer-events: none; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 0.35rem 0; }
.m4-axis-label { font-size: 0.58rem; color: var(--m4-muted); font-family: var(--m4-mono); background: rgba(8, 11, 16, 0.75); padding: 0.1rem 0.25rem; border-radius: 3px; }
.m4-axis-label.mid { align-self: flex-start; margin-top: auto; margin-bottom: auto; }
.m4-chart-crosshair { position: absolute; pointer-events: none; z-index: 3; transform: translate(-50%, -100%); margin-top: -8px; }
.m4-chart-crosshair span { display: block; background: var(--m4-surface-2); border: 1px solid var(--m4-gold); color: var(--m4-gold); font-size: 0.68rem; font-family: var(--m4-mono); padding: 0.2rem 0.45rem; border-radius: 4px; white-space: nowrap; }

.m4-depth-row td { position: relative; }
.m4-depth-bar { display: inline-block; height: 4px; border-radius: 2px; margin-right: 0.35rem; vertical-align: middle; max-width: 60%; }
.m4-depth-bar.bid { background: rgba(46, 160, 67, 0.5); }
.m4-depth-bar.ask { background: rgba(248, 81, 73, 0.5); }
.m4-depth-bid { color: var(--m4-up); }
.m4-depth-ask { color: var(--m4-down); }
.m4-depth-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

.m4-futures-lane { border: 1px dashed var(--m4-border-soft); border-radius: var(--m4-radius); padding: 0.75rem; opacity: 0.85; }
.m4-futures-note { font-size: 0.68rem; color: var(--m4-muted); margin: 0 0 0.5rem; }
.m4-futures-btn { width: 100%; padding: 0.5rem; border-radius: 8px; border: 1px solid var(--m4-border); background: var(--m4-bg); color: var(--m4-muted); font-size: 0.75rem; cursor: not-allowed; }
.m4-graduate-cta { display: block; margin-top: 0.65rem; text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--m4-gold); text-decoration: none; padding: 0.5rem; border: 1px solid rgba(212, 175, 55, 0.35); border-radius: 8px; }
.m4-graduate-cta:hover { background: rgba(212, 175, 55, 0.08); }

.m4-live-badge--on { background: rgba(46, 160, 67, 0.2); border-color: var(--m4-buy); color: #7ee787; cursor: pointer; }

.m4-lane-tabs { display: flex; gap: 0.35rem; padding: 0.5rem 1rem; background: var(--m4-surface-2); border-bottom: 1px solid var(--m4-border); }
.m4-lane-tab { flex: 1; max-width: 160px; min-height: 44px; padding: 0.45rem 0.75rem; border: 1px solid var(--m4-border-soft); border-radius: 8px; background: var(--m4-bg); color: var(--m4-muted); font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.m4-lane-tab.active { border-color: var(--m4-gold); color: var(--m4-gold); background: rgba(212, 175, 55, 0.08); }
.m4-live-banner { padding: 0.45rem 1rem; background: rgba(46, 160, 67, 0.12); border-bottom: 1px solid rgba(46, 160, 67, 0.35); color: #7ee787; font-size: 0.72rem; font-weight: 600; text-align: center; }

.m4-kyc-sheet { border: 1px solid var(--m4-border); border-radius: 12px; padding: 1rem; background: var(--m4-surface); color: var(--m4-text); max-width: 400px; width: calc(100% - 2rem); }
.m4-kyc-sheet::backdrop { background: rgba(0, 0, 0, 0.65); }
.m4-kyc-lead { font-size: 0.78rem; color: var(--m4-muted); margin: 0 0 0.75rem; }
.m4-kyc-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; margin-bottom: 0.65rem; }
.m4-kyc-field input { padding: 0.5rem; border-radius: 8px; border: 1px solid var(--m4-border); background: var(--m4-bg); color: var(--m4-text); }
.m4-kyc-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.75rem; }
.m4-kyc-cancel, .m4-kyc-submit { min-height: 44px; padding: 0.45rem 0.85rem; border-radius: 8px; font-weight: 700; cursor: pointer; }
.m4-kyc-cancel { border: 1px solid var(--m4-border); background: transparent; color: var(--m4-muted); }
.m4-kyc-submit { border: none; background: var(--m4-gold); color: #0d1117; }

.m4-mobile-tabs { display: none; }
.m4-mobile-book { display: none; }
.m4-sheet-handle { display: none; }

@media (max-width: 900px) {
  .m4-instrument-bar { grid-template-columns: 1fr; }
  .m4-account-strip { flex-direction: row; flex-wrap: wrap; justify-content: space-between; border-left: none; border-top: 1px solid var(--m4-border); padding: 0.75rem 0 0; min-width: 0; gap: 0.5rem; }
  .m4-account-strip > div { flex: 1 1 40%; min-width: 100px; }
  .m4-workspace { grid-template-columns: 1fr; padding-bottom: 0; }
  .m4-workspace-rail { border-left: none; border-top: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; max-height: 55vh; overflow-y: auto; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5); padding-top: 0.5rem; }
  .m4-sheet-handle { display: block; width: 40px; height: 4px; background: var(--m4-border-soft); border-radius: 2px; margin: 0 auto 0.75rem; }
  .m4-mobile-book { display: flex; position: fixed; bottom: 55vh; left: 0; right: 0; z-index: 99; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--m4-surface); border-top: 1px solid var(--m4-border); }
  .m4-mobile-book-btn { flex: 1; min-height: 44px; border: none; border-radius: 10px; font-weight: 700; font-size: 0.85rem; cursor: pointer; font-family: var(--m4-mono); }
  .m4-mobile-book-btn.buy { background: var(--m4-buy); color: #fff; }
  .m4-mobile-book-btn.sell { background: var(--m4-sell); color: #fff; }
  .m4-mobile-tabs { display: flex; gap: 0.35rem; margin-bottom: 0.5rem; }
  .m4-mobile-tab { flex: 1; min-height: 44px; padding: 0.5rem; border: 1px solid var(--m4-border-soft); border-radius: 8px; background: var(--m4-bg); color: var(--m4-muted); font-size: 0.72rem; font-weight: 600; cursor: pointer; }
  .m4-mobile-tab.active { border-color: var(--m4-gold); color: var(--m4-gold); }
  .m4-mobile-panel { display: none; }
  .m4-mobile-panel.active { display: block; }
  .m4-history { display: none; }
  .m4-workspace-main { padding-bottom: calc(55vh + 3.5rem); }
  .m4-book { display: none; }
  .m4-web-chrome-links { display: none; }
}

@media (min-width: 901px) {
  .m4-web-chrome-links { display: flex; }
}

@media (max-width: 520px) {
  .m4-book { grid-template-columns: 1fr; }
  .m4-book-spread { flex-direction: row; gap: 0.5rem; padding: 0.35rem 0; }
}
