/* Shared visual layer. Trading controls and route contracts stay unchanged. */
:root, html[data-theme="dark"] {
    --bg: #090d0c; --text: #eff4f0; --muted: #9aa9a1;
    --cyan: #8bedb5; --green: #8bedb5; --gold: #f2cc7a; --rose: #ef8191;
    --violet: #bdc9c2; --panel: #111916; --panel-strong: #17221c;
    --line: #2c3931; --bg-primary: #090d0c; --bg-secondary: #101813;
    --bg-card: #141c17; --bg-card-hover: #1b2720;
    --text-primary: #eff4f0; --text-secondary: #a2b1a9; --text-muted: #87968d;
    --neon-cyan: #8bedb5; --neon-green: #8bedb5; --neon-red: #ef8191;
    --neon-orange: #f2cc7a; --neon-purple: #bccdc3;
    --border-glass: #29372e; --border-neon: #8bedb566;
    --shadow-panel: 0 8px 24px #0003; --shadow-card: 0 4px 12px #0003;
    --surface-card: #141c17; --surface-card-strong: #18241d;
}
html[data-theme="light"] {
    --bg-primary: #f2f5f3; --bg-secondary: #e9efeb; --bg-card: #fff;
    --bg-card-hover: #f4f8f5; --text-primary: #182a21; --text-secondary: #4d6557;
    --text-muted: #5d7065; --neon-cyan: #176b44; --neon-green: #176b44;
    --neon-red: #b42d49; --neon-orange: #93621c; --neon-purple: #4d6557;
    --border-glass: #cfdad3; --border-neon: #176b4466;
    --surface-card: #fff; --surface-card-strong: #f8fbf9;
}
body { background: var(--bg-primary, #090d0c); letter-spacing: 0; }
body:not(.qd-public) { font-family: 'Segoe UI', Arial, sans-serif; }
body:not(.qd-public) h1, body:not(.qd-public) h2, body:not(.qd-public) h3,
body:not(.qd-public) strong, body:not(.qd-public) button { font-weight: 600; letter-spacing: 0; }
body:not(.qd-public) .header { background: none; border: 0; border-bottom: 1px solid var(--border-glass); border-radius: 0; box-shadow: none; }
body:not(.qd-public) .header h1 { color: var(--text-primary); font-size: 26px; text-shadow: none; }
body:not(.qd-public) .subtitle { color: var(--text-secondary); text-transform: none; letter-spacing: 0; }
body:not(.qd-public) .executive-panel, body:not(.qd-public) .operator-brief, body:not(.qd-public) .account-hub { background: none; border-radius: 0; box-shadow: none; border: 0; border-bottom: 1px solid var(--border-glass); }
body:not(.qd-public) .executive-panel::before, body:not(.qd-public) .operator-brief::before { display: none; }
body:not(.qd-public) .operator-card, body:not(.qd-public) .executive-metric { background: var(--bg-card); border-color: var(--border-glass); box-shadow: none; }
body:not(.qd-public) .operator-card-value, body:not(.qd-public) .executive-metric-value { font-weight: 600; font-size: 20px; }
body::before, body::after { background: none; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--neon-cyan, #8bedb5); outline-offset: 4px; }
.account-meta { line-height: 1.7; }
.account-card, .account-dashboard-card, .account-pane, .glass-card, .card { border-radius: 8px; }
.account-dashboard-card, .account-pane { box-shadow: none; }
.account-dashboard-card { background: transparent; border-color: var(--border-glass); }
.account-card { border-top-color: #486151; box-shadow: inset 0 1px 0 #ffffff08, 0 6px 18px #0002; }
.account-card:hover { border-color: #698e76; }
.account-action, button, .btn { letter-spacing: 0; }
.auth-shell { position: relative; }
.auth-shell > .brand { margin-bottom: 28px; }
.auth-shell .card { border: 1px solid #344c3d; border-top-color: #688b74; background: #141d17; box-shadow: 0 30px 70px #0007, inset 0 1px 0 #ffffff09; }
.auth-shell input { background: #0b120e; color: #eff4f0; border-color: #354c3d; }
.auth-shell button[type="submit"] { background: #8bedb5; color: #0d2315; box-shadow: 0 4px 0 #4b9268; }
.auth-shell .brand h1 { color: #eff4f0; }

/* Public site */
.qd-public { color: #eff4f0; background: #090d0c; }
.qd-public .page { overflow: clip; }
.qd-public .topbar { width: min(1320px, calc(100% - 80px)); padding: 20px 0; gap: 24px; flex-direction: row; align-items: center; }
.qd-public .topbar::before { height: 82px; background: #090d0cf5; border-color: #26352c; backdrop-filter: blur(12px); }
.qd-public .brand { font-size: 22px; font-weight: 700; }
.qd-public .brand-mark { border-radius: 6px; background: #8bedb5; border-color: #acf1c9; box-shadow: 3px 3px 0 #37624a; }
.qd-public .brand-mark span { border-color: #152e20; }
.qd-public .nav-actions { gap: 26px; flex-wrap: nowrap; width: auto; }
.qd-public .nav-link { min-height: 40px; border: 0; padding: 0; background: none; font-size: 13px; font-weight: 500; color: #b7c8be; white-space: nowrap; }
.qd-public .nav-link:hover { color: #fff; transform: none; }
.qd-public .nav-link:first-child { padding: 0 20px; background: #ecf3ee; color: #14251b; order: 5; border-radius: 5px; font-weight: 700; }
.qd-public .hero { isolation: isolate; position: relative; width: 100%; height: calc(100svh - 165px); min-height: 510px; max-height: 720px; padding: 0; margin: 0; display: flex; align-items: center; border-bottom: 1px solid #24332a; }
.qd-public .hero-inner { position: relative; z-index: 2; pointer-events: none; padding: 0; width: min(1320px, calc(100% - 80px)); max-width: none; margin: 0 auto; }
.qd-public .hero-inner a { pointer-events: auto; }
.qd-public .eyebrow { color: #9bbaa7; font-size: 11px; font-weight: 500; margin-bottom: 26px; text-transform: uppercase; }
.qd-public .eyebrow::before { width: 8px; height: 8px; background: #8bedb5; border-radius: 50%; box-shadow: none; }
.qd-public h1 { font-size: 88px; font-weight: 600; line-height: 1.05; color: #f4f8f5; letter-spacing: 0; }
.qd-public .hero-copy { max-width: 390px; font-size: 18px; line-height: 1.65; color: #a7b8ac; margin-top: 24px; }
.qd-public .hero-actions { margin-top: 32px; gap: 12px; }
.qd-public .btn { border-radius: 5px; font-weight: 600; transition: background .2s, transform .2s; }
.qd-public .btn-primary { color: #14261b; background: #8bedb5; border-color: #b5f7d0; box-shadow: 0 4px 0 #396249; }
.qd-public .btn-primary:hover { background: #adf8cc; transform: translateY(-2px); }
.qd-public .btn-secondary { background: #111b15; border-color: #435b4b; box-shadow: 0 4px 0 #050806; }
.qd-public .hero-actions .btn { min-height: 48px; padding: 0 20px; font-size: 13px; }
.qd-scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.qd-scene canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.qd-scene img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.qd-scene[data-ready="true"] img { display: none; }
.qd-scene-caption { position: absolute; right: 40px; bottom: 22px; display: flex; gap: 18px; align-items: center; font-size: 10px; color: #93a99b; z-index: 1; pointer-events: none; }
.qd-scene-caption span:first-child { color: #e7ce91; }
.qd-public .system-row { width: min(1320px, calc(100% - 80px)); margin: 0 auto; padding: 0; gap: 0; border-bottom: 1px solid #29392f; }
.qd-public .metric { padding: 27px 22px; min-height: 105px; border: 0; border-right: 1px solid #29392f; border-radius: 0; background: none; backdrop-filter: none; }
.qd-public .metric:first-child { padding-left: 0; }
.qd-public .metric:last-child { border-right: 0; }
.qd-public .metric strong { font-size: 14px; font-weight: 600; }
.qd-public .metric span { font-size: 11px; color: #849d8d; }
.qd-public .section { width: min(1320px, calc(100% - 80px)); padding: 80px 0; }
.qd-public .section + .section { border-top: 1px solid #29392f; }
.qd-public .section-head { max-width: 760px; margin-bottom: 32px; }
.qd-public .section-head h2 { font-size: 36px; line-height: 1.2; font-weight: 500; }
.qd-public .section-head p { color: #8fa899; font-size: 14px; line-height: 1.7; }
.qd-public .strategy-kicker { font-size: 11px; color: #a0b5a8; }
.qd-public .strategy-kicker strong { border-radius: 3px; color: #b9e9cd; background: #223b2c; border-color: #355340; }
.qd-public .strategy-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qd-public .strategy-card { border-radius: 8px; min-height: 214px; background: #131c16; border: 1px solid #314336; box-shadow: 0 8px 0 #060a07, inset 0 1px 0 #ffffff0b; padding: 24px; transition: transform .25s, border-color .25s; }
.qd-public .strategy-card:hover { transform: translateY(-4px); border-color: #749c81; }
.qd-public .strategy-card.is-online { background: #15231a; border-color: #496e54; }
.qd-public .strategy-card::before, .qd-public .strategy-card::after { display: none; }
.qd-public .strategy-top { gap: 12px; flex-wrap: wrap; }
.qd-public .strategy-name { min-width: 0; flex: 1 1 180px; }
.qd-public .strategy-name h3 { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.qd-public .strategy-name p { color: #93a69a; min-height: 36px; font-size: 12px; }
.qd-public .strategy-status { font-size: 10px; padding: 5px 8px; border-radius: 4px; background: #263b2d; white-space: normal; }
.qd-public .strategy-meta { border-top: 1px solid #314536; padding-top: 18px; gap: 10px; }
.qd-public .strategy-meta-item { border: 0; background: none; padding: 0; border-radius: 0; min-width: 0; }
.qd-public .strategy-meta-item strong { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qd-public .free-signals { border: 0; border-top: 1px solid #314336; border-radius: 0; padding: 32px 0 0; margin-top: 36px; background: none; box-shadow: none; }
.qd-public .free-signals-title h3 { font-size: 23px; font-weight: 500; }
.qd-public .free-signal-card { background: #141f18; border-color: #35513e; border-radius: 6px; box-shadow: none; }
.qd-public .tour-grid { gap: 24px; }
.qd-public .tour-card { border: 0; background: none; box-shadow: none; border-radius: 0; }
.qd-public .tour-shot { border: 1px solid #405747; border-radius: 6px; object-fit: contain; background: #111a14; box-shadow: 0 16px 30px #0005; }
.qd-public .tour-body { padding: 22px 0; }
.qd-public .tour-body h3 { font-size: 19px; }
.qd-public .tour-body p { color: #9db0a4; }
.qd-public .tour-step { background: none; color: #a3d9b9; padding: 0; border: 0; }
.qd-public .tour-instruction { display: none; }
.qd-public .feature { background: none; border: 0; border-left: 1px solid #385041; border-radius: 0; min-height: 0; padding: 0 24px; box-shadow: none; }
.qd-public .feature-mark { background: none !important; color: #9abea5; width: auto; height: auto; justify-content: start; font-size: 12px; }
.qd-public .feature p { color: #9db0a4; }
.qd-public .access-band { background: #d7ecdf; color: #162c1e; border: 0; }
.qd-public .access-inner { width: min(1320px, calc(100% - 80px)); }
.qd-public .access-inner h2 { font-size: 32px; font-weight: 600; }
.qd-public .access-inner p { color: #45654f; }
.qd-public .access-inner .btn-primary { background: #172f20; color: #e6f4eb; box-shadow: 0 4px 0 #a1c7ae; border-color: #172f20; }
.qd-public .access-inner .btn-secondary { color: #f0f5f1; }
.qd-public .footer { width: min(1320px, calc(100% - 80px)); font-size: 11px; color: #8ba494; padding: 28px 0; }
@media(min-width:1600px) { .qd-public h1 { font-size: 104px; } }
@media(max-width:1050px) {
    .qd-public .topbar, .qd-public .hero-inner, .qd-public .section, .qd-public .system-row, .qd-public .footer, .qd-public .access-inner { width: calc(100% - 48px); }
    .qd-public .nav-actions { gap: 15px; }
    .qd-public h1 { font-size: 68px; }
    .qd-public .hero-copy { max-width: 330px; font-size: 16px; }
    .qd-public .strategy-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:700px) {
    .qd-public .topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 0 10px; }
    .qd-public .topbar::before { height: 112px; }
    .qd-public .brand { font-size: 19px; }
    .qd-public .nav-actions { display: flex; width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
    .qd-public .nav-link { font-size: 11px; min-height: 30px; flex: 0 0 auto; }
    .qd-public .nav-link:first-child { padding: 0 12px; }
    .qd-public .hero { align-items: flex-start; height: calc(100svh - 190px); min-height: 510px; max-height: 640px; }
    .qd-public .hero-inner { padding-top: 30px; }
    .qd-public .eyebrow { margin-bottom: 14px; font-size: 10px; }
    .qd-public h1 { font-size: 54px; }
    .qd-public .hero-copy { font-size: 14px; max-width: 320px; line-height: 1.5; margin-top: 14px; }
    .qd-public .hero-actions { display: flex; margin-top: 20px; gap: 10px; }
    .qd-public .hero-actions .btn { width: auto; min-height: 40px; font-size: 11px; padding: 0 13px; }
    .qd-scene-caption { right: 24px; bottom: 14px; font-size: 9px; }
    .qd-public .system-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .qd-public .metric { padding: 18px 14px; min-height: 76px; border-bottom: 1px solid #29392f; }
    .qd-public .metric:nth-child(odd) { padding-left: 0; }
    .qd-public .metric:nth-child(even) { border-right: 0; }
    .qd-public .metric span { font-size: 10px; }
    .qd-public .section { padding: 48px 0; }
    .qd-public .section-head h2 { font-size: 27px; }
    .qd-public .section-head p { font-size: 12px; }
    .qd-public .strategy-board { grid-template-columns: 1fr; }
    .qd-public .strategy-card { min-height: 198px; }
    .qd-public .feature-grid { gap: 28px; }
    .qd-public .access-inner h2 { font-size: 27px; }
    .qd-public .access-inner { padding: 40px 0; }
    .qd-public .footer { flex-direction: column; gap: 16px; }
}
@media(max-width:360px) { .qd-public h1 { font-size: 46px; } .qd-public .nav-actions { gap: 10px; } .qd-public .nav-link { font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
