/* Mobile finish: quiet champagne accents, layered black surfaces, clear market direction.
   Kept separate from the chart engines so chart data and interaction remain unchanged. */
@media (max-width:768px) {
  html {
    --green:#cbb38b; --lime:#d8c39f;
    --mobile-gold:#d5c09b; --mobile-gold-ink:#191610;
    --mobile-panel:linear-gradient(155deg,#1b1c20 0%,#111215 58%,#0e0f12 100%);
    --mobile-edge:#35343a; --mobile-soft:#a9a4a0;
  }
  body[data-app="modern"] { background:#07080a; }
  .workspace { background:radial-gradient(ellipse at 100% 0,#c3a57008,transparent 52%),#07080a; }
  .topbar>.current-app,.topbar>.operations-launch { display:none; }
  .topbar { background:linear-gradient(180deg,#151619,#0c0d10); border-bottom:1px solid #343137; }
  .wordmark { letter-spacing:-.7px; }
  .wordmark>span { color:var(--mobile-gold); }
  .wordmark small { color:#b1a18a; }
  .search-box { background:linear-gradient(180deg,#1a1b1f,#141518); border-color:#37363c; box-shadow:inset 0 1px 0 #ffffff06,0 3px 8px #0002; border-radius:10px; }
  .search-box input { font-size:16px; }
  .search-box:focus-within { border-color:#aa9574; background:#18191d; }
  .theme-toggle,.account-menu>summary { min-height:44px; }
  .theme-toggle { border-color:#50483b; background:linear-gradient(155deg,#29251f,#19191b); color:#dbc8a7; border-radius:9px; }
  .account-menu>summary { width:44px; height:44px; border-color:#56504a; background:linear-gradient(145deg,#38332d,#1d1e21); color:#e0d4c0; box-shadow:inset 0 1px 0 #ffffff0b; }
  .account-popover { background:linear-gradient(145deg,#242326,#131418); border-color:#51483d; border-radius:14px; box-shadow:0 18px 45px #0008,inset 0 1px 0 #ffffff09; }
  .account-popover>strong,.account-popover>[href*=subscribe] { color:#dfc9a5; }
  .account-popover>a,.account-popover>button { min-height:44px; align-items:center; }
  .mobile-chat-toggle { width:44px; height:44px; border-radius:10px!important; background:linear-gradient(145deg,#302a22,#1d1b19)!important; border-color:#6c5b42!important; color:#dfc7a0!important; }
  .page-intro { padding-bottom:25px; }
  .page-intro h1 { font-weight:500; letter-spacing:-1.3px; }
  .eyebrow { font-size:9px; letter-spacing:1.6px; }
  .intro-note { line-height:1.7; }
  .primary-button,.composer-buttons>#conversation-send,.mobile-nav button:last-child {
    background:linear-gradient(145deg,#e2d3b7 0%,#c7ae82 53%,#b69b6f 100%);
    border:1px solid #d1ba91; color:var(--mobile-gold-ink);
    box-shadow:inset 0 1px 0 #fff7,0 4px 12px #0003;
  }
  .primary-button { min-height:44px; border-radius:10px; }
  .outline-button,.market-choice select,.watch-toolbar select { min-height:44px; border-radius:9px; }
  .outline-button { background:linear-gradient(155deg,#242429,#191a1e); border-color:#45434a; }
  .outline-button[aria-pressed=true] { background:#30291f; border-color:#7e6b4d; color:#e0c9a1; }
  .desk-tabs { gap:24px; margin-top:18px; scrollbar-width:none; }
  .desk-tabs::-webkit-scrollbar,.category-strip::-webkit-scrollbar { display:none; }
  .desk-tabs button { min-height:46px; font-size:12px; }
  .desk-tabs button[aria-pressed=true] { color:#dfc69e; border-color:#bca079; }
  .intel-pulse { border-color:#3b3735; background:#3b3735; border-radius:13px; box-shadow:0 6px 18px #0002; }
  .intel-pulse button { background:var(--mobile-panel); padding-top:16px; padding-bottom:16px; }
  .intel-pulse small,.text-control,.signal-card-foot button,.digest-score>button,.source-link { color:#d2b88f; }
  .signal-card,.market-call,.calendar-event,.watch-overview,.watch-table,.public-listing-intro {
    background:var(--mobile-panel); border-color:var(--mobile-edge); border-radius:14px;
    box-shadow:inset 0 1px 0 #ffffff05,0 5px 16px #0002;
  }
  .signal-card { padding:19px; margin-bottom:15px; }
  .signal-card h3 { font-size:15px; line-height:1.55; font-weight:550; }
  .signal-card>p { line-height:1.8; }
  .signal-card-foot button,.digest-score>button,.text-control { min-height:38px; display:inline-flex; align-items:center; }
  .signal-column-title { padding-bottom:13px; border-bottom-width:1px; }
  .signal-column-title small { font-size:10px; }
  .signal-score { border-left:1px solid #ffffff12; padding-left:14px; }
  .category-strip { gap:8px; padding-bottom:17px; }
  .category-strip button { min-height:40px; border-radius:9px; background:linear-gradient(150deg,#232328,#15161a); border-color:#3c3a40; }
  .category-strip button[aria-pressed=true] { border-color:#b59a73; color:#e7d3b2; background:#30291f; }
  .category-strip small { color:#d0b58d; }
  .digest-controls select,.digest-controls input,.digest-controls button { min-height:40px; border-radius:9px; }
  .digest-row { padding:22px 0; border-color:#2d2c31; }
  .digest-copy h3 { line-height:1.6; }
  .digest-reader { border-color:#5d5140; border-radius:16px; box-shadow:0 20px 65px #0009; }
  .reader-top { background:linear-gradient(155deg,#28252a,#17181c); color:#dcc6a3; }
  .reader-top button { min-height:40px; min-width:40px; border-radius:9px; }
  .watch-overview { padding:0; overflow:hidden; }
  .watch-overview>div { border-color:#363339!important; }
  .watch-overview>div>span { color:#a6a1a0; }
  .watch-overview strong { letter-spacing:-.8px; }
  .watch-row { padding-top:20px; padding-bottom:20px; border-color:#2c2d33; }
  .watch-company { min-width:0; }
  .watch-company>span:last-child>span { max-width:100%; }
  .watch-company small { line-height:1.7; }
  .watch-price,.watch-movement>strong,.instrument-quote strong { font-variant-numeric:tabular-nums; }
  .watch-movement>strong { border-radius:6px; padding:6px 8px; gap:6px; background:#10221a; border-color:#29513c; font-weight:500; }
  .direction-down .watch-movement>strong { background:#28181d; border-color:#593139; }
  /* Drawn line glyphs have consistent weight; the signed percentage remains real text. */
  .watch-movement i { display:inline-block; flex-shrink:0; position:relative; width:13px; height:13px; font-size:0; line-height:0; }
  .watch-movement i::before { content:""; position:absolute; left:0; top:6px; width:14px; height:1.4px; background:currentColor; transform:rotate(-45deg); transform-origin:center; border-radius:1px; }
  .watch-movement i::after { content:""; position:absolute; right:1px; top:1px; width:6px; height:6px; border-top:1.4px solid currentColor; border-right:1.4px solid currentColor; border-radius:0 1px 0 0; }
  .direction-down .watch-movement i::before { transform:rotate(45deg); }
  .direction-down .watch-movement i::after { top:auto; bottom:1px; transform:rotate(90deg); }
  :is(.direction-flat,.direction-unknown) .watch-movement i::before { width:9px; left:2px; transform:none; }
  :is(.direction-flat,.direction-unknown) .watch-movement i::after { content:none; }
  .instrument-head { row-gap:14px; }
  .instrument-head>.outline-button { min-height:40px; }
  .instrument-metrics { gap:10px; padding-top:20px; padding-bottom:22px; }
  .terminal-tabs { min-height:44px; }
  .terminal-tabs>button { min-width:44px; }
  .terminal-tabs>button.active { color:#ddc39b; border-color:#bda078; }
  .more-tabs>summary { min-height:44px; }
  .engine-switch { background:#191a1e; border:1px solid #35343a; border-radius:9px; }
  .engine-switch button { min-height:44px; min-width:44px; border-radius:6px; }
  .engine-switch button.active { background:linear-gradient(145deg,#dbc7a5,#bba17a); color:#201a13; box-shadow:inset 0 1px 0 #ffffff4d; }
  .chart-workspace { border-color:#37343a; box-shadow:0 5px 18px #0003; }
  .native-terminal { border-radius:12px; }
  .native-chart-header,.native-controls,.native-drawing-tools { background:#111216; }
  .native-timeframes button,.native-drawing-tools>button,.native-svg .chartist-stage .chart-tool-tabs button { min-height:44px; }
  .native-svg .chartist-stage :is(.chart-range-button,.chart-window-button,.chart-zoom-button,.chartist-fullscreen,.chartist-target) { min-height:44px; }
  .native-timeframes button.active,.native-timeframes button[aria-pressed=true],.native-drawing-tools>button.active { background:#30291f; color:#e3cba6; border-color:#796447; }
  .native-svg .chartist-stage .chart-tool-tabs { background:linear-gradient(150deg,#242429,#16171b); border-color:#403b3b; }
  .native-svg .chartist-stage .chart-tool-tabs button { border-radius:6px; }
  .native-svg .chartist-stage .chart-tool-tabs button.active { background:#352d23; color:#e5cba2; }
  .native-svg .chartist-target { border-color:#756247; color:#e0c7a0; background:linear-gradient(145deg,#342b20,#211e19); min-height:40px; }
  .native-svg .chartist-target[aria-pressed=true] { border-color:#b49a75; box-shadow:inset 0 1px 0 #ffffff10; }
  .native-svg .chart-lens-choice span svg { width:14px; height:14px; display:inline-block; vertical-align:-2px; margin-right:3px; stroke-width:1.7; }
  .native-svg .chartist-stage button { min-height:44px; }
  .native-svg .chart-window-bar button { min-width:44px; min-height:44px; }
  .native-svg .chart-interval-row,.native-svg .chart-tf-bar { overflow-x:auto; max-width:100%; gap:2px; padding:4px 0; }
  .native-svg .chart-interval-row button,.native-svg .chart-tf-bar button { min-width:44px; flex-shrink:0; }
  .native-svg .chart-tf-btn.active:not(.is-loading) { animation:none; }
  .native-svg .chartist-stage .chart-tf-btn.active,.native-svg .chartist-stage .chart-lens-choice.price.active { background:linear-gradient(145deg,#d7c19c,#b69c76); color:#211a12; border-color:#baa17c; }
  .native-svg .chart-range-btn.active { background:#352d22!important; color:#e3cba5!important; }
  .native-svg .chartist-stage .chart-lens-choice.bull.active { background:#173026; color:#79dfaa; border-color:#37664e; }
  .native-svg .chartist-stage .chart-lens-choice.bear.active { background:#321d26; color:#f39ba8; border-color:#70414e; }
  .native-text-button,.native-section-title>p { color:#d7bc92; }
  .native-svg .chart-tool-tabs,.native-svg .chart-lens-rail { scrollbar-width:thin; }
  .mobile-nav { height:calc(70px + env(safe-area-inset-bottom)); padding:7px 10px calc(7px + env(safe-area-inset-bottom)); gap:7px; background:linear-gradient(180deg,#1c1c20,#101114 70%); border-color:#464038; box-shadow:0 -6px 24px #0004,inset 0 1px 0 #ffffff05; backdrop-filter:none; }
  .mobile-nav button { flex:1; min-width:0; min-height:54px; border:1px solid transparent; border-radius:11px; font-size:9px; color:#aaa8ad; letter-spacing:.15px; }
  .mobile-nav button.active { background:linear-gradient(145deg,#322b23,#211e1b); color:#e1c8a2; border-color:#5d4f3d; box-shadow:inset 0 1px 0 #ffffff07; }
  .mobile-nav button:last-child { border-radius:11px; color:#241c12; border-color:#c8ae84; }
  .mobile-nav button svg { width:20px; height:20px; stroke-width:1.55; }
  .mobile-nav button:last-child svg { stroke-width:1.7; }
  .conversation { z-index:100; background:radial-gradient(ellipse at 50% 20%,#b69b6f0c,transparent 55%),#0c0d10; }
  .conversation-close,.conversation-context>button { min-width:44px; min-height:44px; }
  .conversation-top { background:linear-gradient(180deg,#1a191c,#101115); border-color:#3a3534; }
  .assistant-mark { background:linear-gradient(145deg,#363025,#221e19); color:#ddc7a3; border:1px solid #544838; border-radius:13px; }
  .partner-glyph i,.partner-glyph i:nth-child(2) { background:#ccb38b; }
  .partner-glyph i:nth-child(3) { background:#a68c65; }
  .partner-glyph i:nth-child(4) { background:#74634c; }
  .conversation-context .status-dot { background:#cdb48e; }
  .suggestions button { min-height:48px; background:var(--mobile-panel); border-color:#3c383b; border-radius:11px; }
  .suggestions button:hover { border-color:#8b775b; background:#252225; }
  .conversation-composer { background:linear-gradient(180deg,#17171b,#101114); border-color:#373239; }
  .conversation-composer form { background:linear-gradient(155deg,#202024,#141519); border-color:#5c5041; border-radius:14px; box-shadow:inset 0 1px 0 #ffffff05,0 4px 16px #0003; }
  .input-modes>button { min-height:38px; }
  .input-modes>button[aria-pressed=true] { background:#302a21; color:#dfc7a2; border-radius:8px; }
  #conversation-mic { min-width:44px; min-height:44px; border-radius:10px; background:linear-gradient(145deg,#383025,#211e1a); color:#e3caa4; border-color:#8c7553; }
  #conversation-mic[aria-pressed=true] { background:linear-gradient(145deg,#e0caa6,#b79b6e); color:#231b11; border-color:#d8bd93; box-shadow:0 0 0 4px #c4a57515; }
  .composer-buttons>#conversation-send { min-width:44px; min-height:44px; border-radius:10px; }
  .voice-orb { background:radial-gradient(circle at 35% 25%,#4c4030,#282219 65%); color:#e1c9a2; border-color:#aa8f64; box-shadow:inset 0 1px 0 #f1d8b422,0 9px 26px #0005; }
  .conversation[data-voice-state="listening"] .voice-orb { box-shadow:0 0 0 7px #c4a57512,0 0 0 15px #c4a57508; }
  .voice-wave i { background:#ccb38b; }
  .chat-sources a { color:#dfc69d; border-color:#68543b; background:#27221c; }
  .conversation-status,.conversation-status button { color:#dfc59c; }
  .toast { background:linear-gradient(145deg,#ded0b7,#c3a77f); border-color:#cbb590; color:#211a12; }
  :is(button,a,summary,input,select,textarea):focus-visible { outline-color:#d7bd94; }
}
@media (max-width:680px) {
  .topbar:has(.theme-toggle) { column-gap:7px; height:126px; }
  .topbar .wordmark { font-size:16px; }
  .theme-toggle { padding:7px; }
  .topbar .theme-toggle .theme-button-label { font-size:9px; }
  .account-popover { right:-30px; max-width:calc(100vw - 32px); }
  #workspace-main { padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  .keyboard-open .conversation-top { min-height:56px; }
  .keyboard-open .voice-orb { box-shadow:none; }
}
@media (max-width:768px) {
  html[data-theme="light"] { --green:#8c6a3d; --lime:#927044; --mobile-gold:#7c603d; --mobile-gold-ink:#261d12; --mobile-panel:linear-gradient(150deg,#fff,#faf8f4); --mobile-edge:#ded6c9; --mobile-soft:#756f66; }
  html[data-theme="light"] body[data-app="modern"],html[data-theme="light"] .workspace { background:#f5f3ef; }
  html[data-theme="light"] .topbar { background:linear-gradient(180deg,#fff,#f8f5ef); border-color:#ddd3c5; }
  html[data-theme="light"] .wordmark>span { color:#8b683c; }
  html[data-theme="light"] .wordmark small { color:#88775c; }
  html[data-theme="light"] .search-box { background:linear-gradient(180deg,#fff,#f5f2ec); border-color:#d6cbbb; box-shadow:inset 0 1px 0 #fff,0 3px 8px #685c4810; }
  html[data-theme="light"] :is(.theme-toggle,.account-menu>summary) { background:linear-gradient(145deg,#faf5eb,#ebe2d2); border-color:#c9b99f; color:#735c3d; }
  html[data-theme="light"] .mobile-chat-toggle { background:linear-gradient(145deg,#f7efdf,#e8d9bf)!important; border-color:#c5ae89!important; color:#705739!important; }
  html[data-theme="light"] .account-popover { background:linear-gradient(145deg,#fff,#f9f6f0); border-color:#c9bba5; box-shadow:0 16px 45px #48382122,inset 0 1px 0 #fff; }
  html[data-theme="light"] .account-popover>strong,html[data-theme="light"] .account-popover>[href*=subscribe] { color:#765a33; }
  html[data-theme="light"] :is(.primary-button,.composer-buttons>#conversation-send,.mobile-nav button:last-child) { background:linear-gradient(145deg,#e6d6b6,#c9ad7f); color:#302415; border-color:#bfa175; box-shadow:inset 0 1px 0 #fff9,0 3px 9px #6f542218; }
  html[data-theme="light"] .outline-button { background:linear-gradient(150deg,#fff,#f2eee7); border-color:#d0c5b7; }
  html[data-theme="light"] .outline-button[aria-pressed=true] { color:#775a32; background:#f1e6d4; border-color:#c6ad86; }
  html[data-theme="light"] .desk-tabs { border-color:#ddd5c9; }
  html[data-theme="light"] .desk-tabs button[aria-pressed=true] { color:#7c5c32; border-color:#a38457; }
  html[data-theme="light"] .intel-pulse { border-color:#ddd4c8; background:#ddd4c8; box-shadow:0 5px 16px #6e5e4210; }
  html[data-theme="light"] .intel-pulse button { background:var(--mobile-panel); }
  html[data-theme="light"] :is(.intel-pulse small,.text-control,.signal-card-foot button,.digest-score>button,.source-link,.category-strip small) { color:#82623b; }
  html[data-theme="light"] :is(.signal-card,.market-call,.calendar-event,.watch-overview,.watch-table,.public-listing-intro) { background:var(--mobile-panel); border-color:#ddd5ca; box-shadow:inset 0 1px 0 #fff,0 5px 16px #66583e0c; }
  html[data-theme="light"] .signal-score { border-color:#dcd5c9; }
  html[data-theme="light"] .category-strip button { background:linear-gradient(150deg,#fff,#f3efe7); border-color:#d7ccbc; }
  html[data-theme="light"] .category-strip button[aria-pressed=true] { color:#73532a; background:#eee2cd; border-color:#bba17b; }
  html[data-theme="light"] :is(.digest-row,.watch-row) { border-color:#ded8ce; }
  html[data-theme="light"] .digest-reader { border-color:#cbbda7; }
  html[data-theme="light"] .reader-top { background:linear-gradient(150deg,#f4ede1,#fff); color:#775a34; }
  html[data-theme="light"] .watch-overview>div { border-color:#ddd6cb!important; }
  html[data-theme="light"] .watch-overview>div>span { color:#776f64; }
  html[data-theme="light"] .watch-movement>strong { color:#087345; background:#e7f3eb; border-color:#b5d7c3; }
  html[data-theme="light"] .direction-down .watch-movement>strong { color:#ac2440; background:#fbeced; border-color:#e0b9bf; }
  html[data-theme="light"] :is(.direction-flat,.direction-unknown) .watch-movement>strong { color:#687180; background:#edf0f3; border-color:#d2d7de; }
  html[data-theme="light"] .terminal-tabs>button.active { color:#7d5e35; border-color:#a8895c; }
  html[data-theme="light"] .engine-switch { background:#eee9e1; border-color:#d6ccbd; }
  html[data-theme="light"] .engine-switch button.active { background:linear-gradient(145deg,#ddccab,#c4a77a); color:#342817; }
  html[data-theme="light"] .chart-workspace { border-color:#d7cbbb; box-shadow:0 5px 18px #5e513c12; }
  html[data-theme="light"] :is(.native-chart-header,.native-controls,.native-drawing-tools) { background:#fcfaf7; }
  html[data-theme="light"] :is(.native-timeframes button.active,.native-timeframes button[aria-pressed=true],.native-drawing-tools>button.active) { color:#785a30; background:#eee2cd; border-color:#c6ad86; }
  html[data-theme="light"] .native-svg .chartist-stage .chart-tool-tabs { background:linear-gradient(150deg,#fff,#f2ede5); border-color:#d6cbbb; }
  html[data-theme="light"] .native-svg .chartist-stage .chart-tool-tabs button.active { color:#73532a; background:#eee0c8; }
  html[data-theme="light"] .native-svg .chartist-stage .chart-tf-btn.active,html[data-theme="light"] .native-svg .chartist-stage .chart-lens-choice.price.active { background:linear-gradient(145deg,#e6d7ba,#c9b087); color:#49361b; border-color:#baa17c; }
  html[data-theme="light"] .native-svg .chart-range-btn.active { background:#eee0c8!important; color:#73532a!important; }
  html[data-theme="light"] .native-svg .chartist-stage .chart-lens-choice.bull.active { background:#e2f2e9; color:#087345; border-color:#a1c9b3; }
  html[data-theme="light"] .native-svg .chartist-stage .chart-lens-choice.bear.active { background:#f8e7eb; color:#ac2440; border-color:#d7abb6; }
  html[data-theme="light"] .native-text-button,html[data-theme="light"] .native-section-title>p { color:#82623b; }
  html[data-theme="light"] .native-svg .chartist-target { background:linear-gradient(145deg,#f7efdf,#e9d9bd); color:#785b32; border-color:#c4ab84; }
  html[data-theme="light"] .mobile-nav { background:linear-gradient(180deg,#fff,#f4efe6); border-color:#d5c7b2; box-shadow:0 -5px 20px #6a553512,inset 0 1px 0 #fff; }
  html[data-theme="light"] .mobile-nav button { color:#6b7180; }
  html[data-theme="light"] .mobile-nav button.active { color:#765a32; background:linear-gradient(145deg,#f5eddf,#e9ddc8); border-color:#d4bf9d; }
  html[data-theme="light"] .mobile-nav button:last-child { color:#302415; }
  html[data-theme="light"] .conversation { background:radial-gradient(ellipse at 50% 20%,#d8c29912,transparent 55%),#f9f7f2; }
  html[data-theme="light"] :is(.conversation-top,.conversation-composer) { background:linear-gradient(180deg,#fff,#f6f1e8); border-color:#ddd2c2; }
  html[data-theme="light"] .assistant-mark { background:linear-gradient(145deg,#f7efdf,#e9ddc8); color:#7c603b; border-color:#d1bd9e; }
  html[data-theme="light"] .suggestions button { background:var(--mobile-panel); border-color:#ddd3c4; }
  html[data-theme="light"] .conversation-composer form { background:linear-gradient(155deg,#fff,#fbf8f2); border-color:#c4af90; box-shadow:inset 0 1px 0 #fff,0 4px 16px #7160440b; }
  html[data-theme="light"] .input-modes>button[aria-pressed=true] { background:#eee3cf; color:#795b31; }
  html[data-theme="light"] #conversation-mic { background:linear-gradient(145deg,#f5ead5,#e9d9b9); color:#77572e; border-color:#c2a675; }
  html[data-theme="light"] #conversation-mic[aria-pressed=true] { background:linear-gradient(145deg,#d7bf98,#b79761); color:#2e2110; border-color:#a58a5b; }
  html[data-theme="light"] .voice-orb { background:radial-gradient(circle at 35% 25%,#fff8e8,#e3d2af 70%)!important; color:#7f5f30!important; border-color:#bfa475!important; box-shadow:inset 0 1px 0 #fff,0 8px 24px #7d63331a; }
  html[data-theme="light"] :is(.chat-sources a,.conversation-status,.conversation-status button) { color:#7c5b30; }
  html[data-theme="light"] .chat-sources a { background:#f3ead9; border-color:#cfb995; }
}
@media (max-width:375px) {
  .native-svg .chart-tf-bar { flex-wrap:wrap; gap:5px; }
  .native-svg .chart-tf-bar button { flex:1 0 calc(25% - 6px); }
}
@media (prefers-reduced-motion:reduce) {
  .mobile-nav button,.theme-toggle,.watch-row,.voice-orb { transition:none!important; }
}

/* Narrow laptop: the owner can still reach Old app through Account. */
@media(min-width:769px) and (max-width:1100px){.topbar>#current-app-link{display:none}}
