/* ImpliMineS presentation system. No business controls or data are replaced. */
:root {
    --im-sidebar: 232px;
    --im-bg: #080d16;
    --im-panel: #101824;
    --im-panel-raised: #152030;
    --im-line: #253144;
    --im-text: #dce5f2;
    --im-muted: #8494ab;
    --im-blue: #77a7ff;
    --im-cyan: #5dd6c0;
}
html { scrollbar-color: #33445c #0c1420; scrollbar-width: thin; }
body.im-shell {
    --bg-color: var(--im-bg); --card-bg-color: var(--im-panel); --text-color: var(--im-text);
    --border-color: var(--im-line); --muted-text-color: var(--im-muted);
    --card-bg: var(--im-panel); --text-primary: var(--im-text); --text-secondary: var(--im-muted);
    --primary-color: var(--im-blue); --accent-cyan: var(--im-cyan); --accent-purple: #ac9bf5;
    margin: 0; min-height: 100vh; color: var(--im-text) !important;
    background: radial-gradient(ellipse at 80% 0, #12223955, transparent 48%), var(--im-bg) !important;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    font-size: 15px; line-height: 1.65; animation: none !important; overflow-x: clip;
}
body.im-shell *, body.im-shell *::before, body.im-shell *::after { box-sizing: border-box; }
body.im-shell a { text-underline-offset: 3px; }
body.im-shell :focus-visible { outline: 2px solid var(--im-cyan); outline-offset: 3px; }
body.im-shell .im-skip { position: fixed; z-index: 10000; top: -60px; left: 250px; padding: 10px 18px; background: var(--im-blue); color: #080d16; }
body.im-shell .im-skip:focus { top: 8px; }
body.im-shell .navbar-custom.im-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1040; width: var(--im-sidebar);
    padding: 0 !important; display: flex; flex-direction: column; align-items: stretch;
    background: #0d1420 !important; border: 0; border-right: 1px solid var(--im-line);
    box-shadow: none; backdrop-filter: none; transition: transform 180ms ease, width 180ms ease;
}
body.im-shell .im-sidebar > .container-fluid { height: 100%; display: flex; flex-direction: column; align-items: stretch; padding: 0; }
body.im-shell .im-sidebar .navbar-brand { margin: 0; padding: 24px 20px 14px; min-height: 76px; color: #f4f7fd; font: 750 27px/1.15 "Segoe UI", sans-serif; letter-spacing: -1.3px; }
body.im-shell .im-brand-text { display: inline-flex; align-items: baseline; }
body.im-shell .im-brand-text > span { color: #f4f7fd; }
body.im-shell .im-brand-text b { color: #65d2bd; font-weight: 750; }
body.im-shell .im-brand-text em {
    color: #91b7f7;
    font-size: 1em;
    line-height: inherit;
    font-weight: 750;
    font-style: normal;
    text-transform: uppercase;
    margin-left: 0;
}
body.im-shell .im-workspace-label { margin: 0 18px 19px; padding: 0 2px 14px; color: #9babc1; border: 0; border-bottom: 1px solid var(--im-line); background: transparent; font-size: 14px; font-weight: 600; }
body.im-shell .im-sidebar .navbar-collapse { display: block !important; flex: 1; min-height: 0; overflow: auto; padding: 0 12px 20px; }
body.im-shell .im-sidebar .navbar-nav { flex-direction: column; margin: 0 !important; gap: 4px; }
body.im-shell .im-sidebar .nav-item { margin: 0; }
body.im-shell .im-sidebar .im-nav-section { list-style: none; color: #71849d; padding: 17px 13px 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
body.im-shell .im-sidebar .im-nav-section:first-child { padding-top: 0; }
body.im-shell .im-sidebar .nav-link { min-height: 45px; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 13px !important; color: #a6b5c9 !important; font-size: 14px; font-weight: 550; border: 1px solid transparent; border-radius: 8px; text-shadow: none !important; transition: color 120ms, background 120ms; }
body.im-shell .im-sidebar .nav-link i { width: 18px; text-align: center; font-size: 14px; color: #7287a4; }
body.im-shell .im-sidebar .nav-link::after { display: none; }
body.im-shell .im-sidebar .nav-link:hover { color: #e8f0ff !important; background: #192537; }
body.im-shell .im-sidebar .nav-link.active { color: #bcd4ff !important; background: #1a2b45; border-color: #2d466a; box-shadow: inset 3px 0 #78aaff; }
body.im-shell .im-sidebar .nav-link.active i { color: #8db8ff; }
body.im-shell .im-sidebar-footer { margin: auto 18px 0; padding: 18px 2px 21px; border-top: 1px solid var(--im-line); color: #7f91a8; font-size: 12px; line-height: 1.8; letter-spacing: .04em; }
body.im-shell .im-topbar { min-height: 82px; margin-left: var(--im-sidebar); padding: 12px 28px 13px; display: flex; align-items: center; border-bottom: 1px solid var(--im-line); background: #0c131ef2; }
body.im-shell .im-topbar-title h1 { margin: 0; color: #edf3fd; font-size: 25px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }
body.im-shell .im-topbar-title p { margin: 4px 0 0; color: #8b9cb2; font-size: 13px; line-height: 1.5; }
body.im-shell .im-page-host { margin-left: var(--im-sidebar); width: calc(100% - var(--im-sidebar)); padding: 0; }
body.im-shell .im-page-host > .row { margin: 0; }
body.im-shell .main-content { min-width: 0; width: 100%; padding: 18px 28px 36px !important; overflow: visible; }
body.im-shell .im-page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
body.im-shell .im-page-intro .im-eyebrow { color: #6f9cd1; font-size: 10px; font-weight: 600; letter-spacing: .15em; margin-bottom: 7px; }
body.im-shell .im-page-intro h1 { color: #edf3fd; font-size: 25px; letter-spacing: -.6px; font-weight: 650; margin: 0 0 7px; line-height: 1.3; }
body.im-shell .im-page-intro p { color: var(--im-muted); font-size: 12px; margin: 0; max-width: 720px; }
body.im-shell .im-page-index { margin-top: 7px; color: #627793; font: 11px/1.5 ui-monospace, Consolas, monospace; white-space: nowrap; letter-spacing: 1px; }
body.im-shell h2 { font-size: 22px; font-weight: 650; letter-spacing: -.4px; }
body.im-shell h3 { font-size: 19px; font-weight: 600; }
body.im-shell h4 { font-size: 17px; }
body.im-shell h5 { font-size: 15px; }
body.im-shell h6 { font-size: 13px; }
body.im-shell .card, body.im-shell .glass-panel, body.im-shell .kg-panel {
    background: var(--im-panel) !important; border: 1px solid var(--im-line) !important;
    border-radius: 11px; box-shadow: 0 4px 16px #02050a22 !important; backdrop-filter: none;
    color: var(--im-text); transform: none !important;
}
body.im-shell .card { margin-bottom: 20px; }
body.im-shell .card-header, body.im-shell .panel-header, body.im-shell .kg-panel-head {
    background: #131e2b !important; border-bottom: 1px solid var(--im-line) !important;
    color: #c8d7ec !important; padding: 14px 17px; min-height: 49px; max-height: none; height: auto;
    text-shadow: none !important; font-size: 14px; line-height: 1.5; flex-wrap: wrap; gap: 8px;
}
body.im-shell .card-header > *, body.im-shell .panel-header > * { min-width: 0; }
body.im-shell .card-header h5, body.im-shell .card-header h6 { margin-bottom: 0; }
body.im-shell .card-body { padding: 19px; }
body.im-shell .card-header i, body.im-shell .panel-header i { color: #7fa9dc; text-shadow: none; }
body.im-shell .glass-panel::before, body.im-shell .glass-panel::after { display: none; }
body.im-shell .btn { border-radius: 7px; font-size: 12px; font-weight: 550; padding: 9px 14px; box-shadow: none !important; text-shadow: none !important; transition: background 120ms, border-color 120ms, color 120ms; }
body.im-shell .btn-sm { padding: 6px 11px; font-size: 11px; }
body.im-shell .btn-xs { padding: 4px 8px; }
body.im-shell .btn-primary { background: #5486dc; border-color: #6192e8; color: #fff; }
body.im-shell .btn-primary:hover { background: #699bea; }
body.im-shell .btn-info { background: #56bfb2; border-color: #6fd3c4; color: #071b20; }
body.im-shell .btn-outline-primary, body.im-shell .btn-outline-info { color: #98bde9; border-color: #3b5676; }
body.im-shell .btn-outline-primary:hover, body.im-shell .btn-outline-info:hover { background: #233d5e; color: #e5f2ff; }
body.im-shell .btn-outline-secondary, body.im-shell .btn-outline-light { color: #aebed3; border-color: #35475f; }
body.im-shell .btn-outline-secondary:hover, body.im-shell .btn-outline-light:hover { background: #26364b; color: #e5eefc; }
body.im-shell .btn:disabled { opacity: .5; }
body.im-shell .form-control, body.im-shell .form-select, body.im-shell .input-group-text {
    background-color: #0c1420 !important; color: #d3dff0 !important; border-color: #2c3c52 !important;
    min-height: 40px; font-size: 13px; border-radius: 7px; box-shadow: none; border-width: 1px !important;
}
body.im-shell textarea.form-control { line-height: 1.7; padding: 12px; }
body.im-shell .form-control:focus, body.im-shell .form-select:focus { border-color: #6b99d7 !important; box-shadow: 0 0 0 3px #558ade1a; }
body.im-shell .form-control::placeholder { color: #63748d !important; }
body.im-shell .input-group-text { color: #859ab7 !important; }
body.im-shell label.form-label { color: #a9b9d0; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
body.im-shell .form-text, body.im-shell .text-muted, body.im-shell .text-secondary { color: #8b9db6 !important; }
body.im-shell .text-primary { color: #8eb4ee !important; }
body.im-shell .text-info { color: #73c9c5 !important; }
body.im-shell .table { --bs-table-bg: transparent; --bs-table-color: #c4d1e2; --bs-table-border-color: #263347; --bs-table-striped-bg: #16223288; --bs-table-striped-color: #c4d1e2; --bs-table-hover-bg: #1d3048; --bs-table-hover-color: #f2f6fc; font-size: 13px; font-variant-numeric: tabular-nums; }
body.im-shell .table th { color: #94a8c2; font-size: 12px; font-weight: 650; padding: 12px; background: #0d1724; border-bottom-width: 1px; }
body.im-shell .table td { padding: 12px; vertical-align: middle; }
body.im-shell .table-responsive { border-radius: 7px; }
body.im-shell .list-group-item { background: #101a28; color: #bccce2; border-color: var(--im-line); padding: 12px 15px; }
body.im-shell .list-group-item-action:hover { background: #19283b; color: #e1edff; }
body.im-shell .list-group-item.active { background: #243c60; border-color: #456695; }
body.im-shell .nav-tabs { gap: 4px; border-bottom: 1px solid var(--im-line); padding: 3px; }
body.im-shell .nav-tabs .nav-link { color: #92a7c3; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; padding: 11px 15px; font-size: 12px; }
body.im-shell .nav-tabs .nav-link:hover { background: #1b2a4055; color: #d6e5fc; }
body.im-shell .nav-tabs .nav-link.active { background: #19283c; color: #a9c9f8; border-bottom-color: #7eaaf0; }
body.im-shell .nav-pills .nav-link { color: #9cb2ce; border-radius: 6px; font-size: 12px; }
body.im-shell .nav-pills .nav-link.active:not(.bg-danger):not(.bg-warning) { background: #284b76; color: #eaf3ff; }
body.im-shell .badge { font-weight: 550; font-size: 10px; padding: 5px 8px; border-radius: 5px; letter-spacing: .1px; }
body.im-shell .progress { background: #1d2c40; border-radius: 4px; }
body.im-shell .modal-content, body.im-shell .dropdown-menu, body.im-shell .accordion-item { background: #111c2b; color: #dce6f6; border: 1px solid #30435c; border-radius: 10px; }
body.im-shell .modal-header, body.im-shell .modal-footer { border-color: #2a3b51; padding: 17px 21px; }
body.im-shell .modal-title { font-size: 17px; }
body.im-shell .dropdown-item { color: #c2d1e6; font-size: 12px; }
body.im-shell .dropdown-item:hover { background: #233852; }
body.im-shell .accordion-button { background: #152235; color: #ccddf4; font-size: 13px; }
body.im-shell .accordion-button:not(.collapsed) { background: #213752; color: #c0dbff; }
body.im-shell .alert { border-radius: 8px; font-size: 12px; line-height: 1.7; box-shadow: none; }
body.im-shell .alert-info { background: #122b3b; color: #b0d0e6; border-color: #26485e; }
body.im-shell .bg-light { background-color: #182537 !important; color: #b9cbe2; }
body.im-shell .bg-white { background-color: #121d2c !important; }
body.im-shell .text-dark { color: #c8d9ef !important; }
body.im-shell .bg-warning.text-dark, body.im-shell .btn-warning, body.im-shell .badge.bg-warning { color: #2f2200 !important; }
body.im-shell #loading-overlay { background: #080d16c9; backdrop-filter: blur(3px); }
body.im-shell #task-monitor { z-index: 1030; width: 330px; max-width: calc(100vw - 30px); }
body.im-shell #task-monitor .card-header { cursor: pointer; }

/* Workspace-specific composition; chart containers and control IDs stay intact. */
body.im-shell[data-page="home"] .dashboard-container { height: auto; min-height: calc(100vh - 197px); padding: 0 0 26px; gap: 16px; overflow: visible; grid-template-columns: minmax(210px, .85fr) minmax(430px, 2.4fr) minmax(240px, 1fr); grid-template-rows: auto; }
body.im-shell[data-page="home"] .dashboard-footer { left: var(--im-sidebar); width: calc(100% - var(--im-sidebar)); height: 29px; z-index: 1020; background: #0d1725; border-color: var(--im-line); }
body.im-shell[data-page="home"] .ticker-item { font-size: 11px; }
body.im-shell[data-page="home"] .header-title, body.im-shell[data-page="home"] .panel-header { text-shadow: none; }
body.im-shell[data-page="home"] .glass-panel:hover { border-color: #354b66 !important; }
body.im-shell[data-page="home"] .stat-box { border-color: #2c435d !important; background: #111e2f !important; border-radius: 8px; box-shadow: none !important; }
body.im-shell[data-page="home"] .panel-content { min-height: 130px; }
body.im-shell[data-page="home"] #marketGraph { min-height: 640px; }
body.im-shell[data-page="home"] .news-item { padding: 12px 5px; border-bottom-color: #25344a; background: transparent; }
body.im-shell[data-page="home"] .news-item:hover { background: #182a41; }
body.im-shell[data-page="home"] .news-updated { color: #8fa0b6; font-size: 12px; font-weight: 500; white-space: nowrap; }
body.im-shell[data-page="market_structure"] #marketGraph { border-radius: 9px; background: #0b1320 !important; box-shadow: none !important; }
body.im-shell[data-page="market_structure"] #marketGraph::before, body.im-shell[data-page="market_structure"] #marketGraph::after { display: none; }
body.im-shell[data-page="market_structure"] #analysisModeTab { margin-bottom: 18px; }
body.im-shell .ms-graph-shell { height: 720px; display: flex; flex-direction: column; border: 1px solid var(--im-line); border-radius: 11px; overflow: hidden; background: #0b1421; }
body.im-shell .ms-graph-shell-inner-header { padding: 16px 18px; border-bottom: 1px solid var(--im-line); background: #121e2d; }
body.im-shell .ms-graph-shell-inner-header > small { font-size: 10px; color: #7c91ae; }
body.im-shell .ms-graph-shell-inner-body { flex: 1; min-height: 0; }
body.im-shell .ms-graph-shell #marketGraph, body.im-shell .ms-graph-shell #rpGraph { height: 100% !important; }
body.im-shell .ms-panel-title { font-size: 13px; font-weight: 600; color: #c2d4ed; }
body.im-shell .ms-panel-subtitle { font-size: 10px; color: #7c91ae; line-height: 1.6; }
body.im-shell .ms-graph-core-metrics { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 10px; background: #0d1725; border-radius: 6px; }
body.im-shell .ms-metric-inline-label { color: #7d94b3; font-size: 10px; }
body.im-shell .ms-metric-inline-value { color: #a5c4ed; font: 11px/1.6 Consolas, ui-monospace, monospace; margin-right: 7px; }
body.im-shell .kg-hero { background: #121e2d; border: 1px solid var(--im-line); box-shadow: none; border-radius: 11px; padding: 20px; }
body.im-shell .kg-title { font-size: 20px; letter-spacing: -.4px; }
body.im-shell .kg-kicker { color: #709cc8; letter-spacing: .13em; font-size: 9px; }
body.im-shell .kg-workspace { height: calc(100vh - 357px); min-height: 680px; grid-template-columns: 210px minmax(0,1fr) 270px; gap: 15px; }
body.im-shell .kg-canvas-panel { background: radial-gradient(ellipse at center,#14233855,transparent 60%),#0b1421 !important; }
body.im-shell .kg-chain-btn { padding: 11px 10px; border-radius: 7px; }
body.im-shell .kg-chain-btn.active { background: #1d334e; box-shadow: inset 2px 0 #7faee8; }
body.im-shell .kg-chain-name { font-size: 12px; font-weight: 550; }
body.im-shell .kg-chain-desc { color: #7f93ad; font-size: 10px; line-height: 1.5; }
body.im-shell .kg-detail-title { font-weight: 650; font-size: 19px; }
body.im-shell .kg-property { padding: 11px 0; font-size: 12px; }
body.im-shell .kg-property span { color: #8599b5; font-size: 10px; }
body.im-shell .kg-source { color: #8397b1; line-height: 1.7; }
body.im-shell .kg-scene-title, body.im-shell .kg-scene-tools button { border-color: #2a3d56; background: #101c2eeb; backdrop-filter: none; }
body.im-shell .kg-metric { background: #0c1725; border-color: #27374d; }
body.im-shell .kg-metric span { color: #8398b4; }
body.im-shell .kg-live-dot { background: #68c5ab; box-shadow: 0 0 6px #68c5ab44; }
body.im-shell[data-page="qa"] .main-content { max-width: 1500px; margin-inline: auto; }
body.im-shell[data-page="backtest"] .main-content, body.im-shell[data-page="stock_analysis"] .main-content, body.im-shell[data-page="screener"] .main-content { max-width: 1700px; margin-inline: auto; }
body.im-shell .im-sidebar-scrim { display: none; }
body.im-shell hr, body.im-shell .border-top, body.im-shell .border-bottom { border-color: var(--im-line) !important; }
body.im-shell[data-page="backtest"] .main-content > .container-fluid > .row:first-child { display: none; }

/* Retire page-local neon surfaces, keeping their original semantic elements. */
body.im-shell .stock-dashboard, body.im-shell .screener-container { background: transparent !important; backdrop-filter: none; }
body.im-shell .main-content > .container-fluid { padding: 0 !important; }
body.im-shell .neo-card, body.im-shell .search-card, body.im-shell .glass-card, body.im-shell .sentiment-hero, body.im-shell .qa-sidebar, body.im-shell .qa-main {
    background: var(--im-panel) !important; border: 1px solid var(--im-line) !important; border-radius: 11px;
    box-shadow: none !important; backdrop-filter: none;
}
body.im-shell .neo-card::before, body.im-shell .screener-container .card::before, body.im-shell .rule-engine-header::after { display: none; }
body.im-shell .search-card-header, body.im-shell .glass-card-header, body.im-shell .glow-header, body.im-shell .chat-header, body.im-shell .sidebar-header {
    background: #142031 !important; border-color: var(--im-line); color: #c8d7ec; border-radius: 0; padding: 15px 18px;
}
body.im-shell .tech-glow-text { text-shadow: none !important; color: #b3c8e4 !important; }
body.im-shell .neon-border { border-top: 1px solid var(--im-line); }
body.im-shell .btn-neon { background: #5486dc; }
body.im-shell #stock-table thead, body.im-shell #result-table thead, body.im-shell #s2-result-table thead { background: #121e2e !important; }
body.im-shell #stock-table tbody tr, body.im-shell #result-table tbody tr, body.im-shell #s2-result-table tbody tr { background: #111c2b !important; box-shadow: none !important; }
body.im-shell #stock-table tbody tr:nth-child(even) { background: #142133 !important; }
body.im-shell #stock-table tbody td, body.im-shell #result-table tbody td, body.im-shell #s2-result-table tbody td { background: transparent !important; border-color: #24354b; }
body.im-shell #stock-table tbody tr:hover, body.im-shell #result-table tbody tr:hover, body.im-shell #s2-result-table tbody tr:hover { background: #20344d !important; transform: none !important; box-shadow: inset 2px 0 #7faaff !important; }
body.im-shell .rule-engine-card .card-body { padding: 20px; }
body.im-shell #formula { min-height: 230px; font: 12px/1.8 Consolas, ui-monospace, monospace; }
body.im-shell .sentiment-hero-title { color: #e3edf9; font-size: 22px; text-shadow: none; }
body.im-shell .sentiment-hero h5 { color: #7b97bc; font-size: 11px; letter-spacing: .08em; }
body.im-shell .sentiment-hero { padding: 22px; }
body.im-shell .sentiment-metric { font-variant-numeric: tabular-nums; }
body.im-shell .qa-container { height: calc(100vh - 240px); min-height: 600px; margin: 0; gap: 18px; }
body.im-shell .qa-sidebar { flex-basis: 280px; }
body.im-shell .qa-main { min-width: 0; }
body.im-shell .chat-input-area { background: #131f2f; border-top-color: var(--im-line); padding: 19px; }
body.im-shell .input-wrapper { background: #0a1421; border-color: #344c6c; border-radius: 10px; }
body.im-shell .question-chip { background: #16263b; border-color: #2c405b; border-radius: 8px; color: #a9c2e2; font-size: 12px; padding: 16px; }
body.im-shell .question-chip:hover { background: #203650; box-shadow: none; transform: translateY(-1px); }
body.im-shell .guidance-title { color: #d6e6fc; font-size: 23px; }
body.im-shell .guidance-text { font-size: 12px; color: #879cba; line-height: 1.8; }
body.im-shell .ai .message-bubble { background: #182a40; border-color: #2b4565; }
body.im-shell .user .message-bubble { background: #2a4d79; }
body.im-shell .send-btn { background: #5389d6; border-radius: 7px; }
body.im-shell[data-page="home"] .dashboard-container { height: calc(100vh - 235px); min-height: 680px; padding-bottom: 0; }
body.im-shell[data-page="home"] .left-panel-container, body.im-shell[data-page="home"] .right-panel-container { min-width: 0; min-height: 0; height: 100%; }
body.im-shell[data-page="home"] #defaultRightPanel { height: 100%; }
body.im-shell[data-page="home"] .left-panel-container > .glass-panel:first-child { height: 220px !important; min-height: 180px !important; }
body.im-shell[data-page="home"] .left-panel-container > .glass-panel:nth-child(2) { height: 180px !important; min-height: 150px !important; }
body.im-shell[data-page="home"] #marketGraph { min-height: 0; }
body.im-shell[data-page="home"] .panel-content { min-height: 0; }
body.im-shell[data-page="home"] .indicator-card { background: #132135; border: 1px solid #2d4662; box-shadow: none; border-radius: 8px; min-width: 84px; padding: 9px 12px; }
body.im-shell[data-page="home"] .indicator-val { font-size: 18px; color: #80b8d7; text-shadow: none; }
body.im-shell[data-page="home"] .indicator-label { color: #8399b8; font-size: 10px; }
body.im-shell[data-page="home"] .index-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
body.im-shell[data-page="home"] #msSummaryContent { overflow-y: auto !important; }
body.im-shell[data-page="home"] #msSummaryContent * { text-shadow: none !important; }
body.im-shell[data-page="home"] #msSummaryContent .h5, body.im-shell[data-page="home"] #msSummaryContent h5 { font-size: 16px; }

@media(min-width: 1500px) {
    body.im-shell[data-page="home"] .dashboard-container { grid-template-columns: minmax(230px, .85fr) minmax(520px, 2.4fr) minmax(260px, 1fr); }
}
@media(max-width: 1550px) {
    :root { --im-sidebar: 212px; }
    body.im-shell .main-content { padding: 22px !important; }
    body.im-shell .kg-workspace { grid-template-columns: 190px minmax(0,1fr); }
    body.im-shell .kg-right { display: block; grid-column: 1/-1; min-height: 260px; }
    body.im-shell .kg-workspace { height: auto; }
    body.im-shell .kg-right-scroll { height: auto; max-height: 440px; }
    body.im-shell .kg-canvas-panel { min-height: 680px; }
    body.im-shell[data-page="home"] .dashboard-container { grid-template-columns: minmax(175px,.8fr) minmax(330px,2fr) minmax(205px,1fr); }
}
@media(max-width: 1100px) {
    body.im-shell .im-topbar-note, body.im-shell .im-page-index { display: none; }
    body.im-shell .main-content { padding: 20px !important; }
    body.im-shell .im-topbar { padding: 14px 20px; }
    body.im-shell .kg-hero-row { flex-wrap: wrap; }
    body.im-shell .kg-metrics { display: flex; flex-wrap: wrap; }
    body.im-shell .kg-workspace { grid-template-columns: 170px minmax(0,1fr); }
    body.im-shell .kg-search { min-width: 220px; }
    body.im-shell .kg-scene-title p { max-width: 200px; }
    body.im-shell[data-page="home"] .dashboard-container { display: flex; flex-direction: column; height: auto; }
    body.im-shell[data-page="home"] .dashboard-container > * { width: 100%; }
    body.im-shell[data-page="home"] #mainGraphPanel { height: 650px !important; order: -1; }
    body.im-shell[data-page="home"] .left-panel-container, body.im-shell[data-page="home"] .right-panel-container { height: auto; }
    body.im-shell[data-page="home"] #defaultRightPanel { height: auto; }
    body.im-shell[data-page="home"] .right-panel-container .glass-panel { min-height: 240px !important; }
    body.im-shell .qa-sidebar { flex-basis: 220px; }
}
@media(max-width: 760px) {
    body.im-shell .im-sidebar { position: relative; inset: auto; transform: none; width: 100% !important; min-height: auto; border-right: 0; border-bottom: 1px solid var(--im-line); }
    body.im-shell .im-sidebar > .container-fluid { height: auto; }
    body.im-shell .im-sidebar .navbar-brand { min-height: 60px; padding: 15px 17px 10px; font-size: 24px; }
    body.im-shell .im-workspace-label, body.im-shell .im-sidebar-footer, body.im-shell .im-sidebar .im-nav-section { display: none; }
    body.im-shell .im-sidebar .navbar-collapse { padding: 4px 12px 12px; overflow-x: auto; overflow-y: hidden; }
    body.im-shell .im-sidebar .navbar-nav { flex-direction: row; width: max-content; gap: 5px; }
    body.im-shell .im-sidebar .nav-link { min-height: 40px; white-space: nowrap; padding: 8px 11px !important; }
    body.im-shell .im-page-host { margin-left: 0; width: 100%; }
    body.im-shell .im-topbar { margin-left: 0; min-height: 60px; padding: 12px 16px; }
    body.im-shell .im-topbar-title h1 { font-size: 22px; }
    body.im-shell .im-topbar-title p { font-size: 12px; }
    body.im-shell .main-content { padding: 20px 14px 34px !important; }
    body.im-shell .im-page-intro { margin-bottom: 19px; }
    body.im-shell .im-page-intro h1 { font-size: 23px; }
    body.im-shell .im-page-intro p { line-height: 1.8; }
    body.im-shell .card-body { padding: 15px; }
    body.im-shell .kg-workspace { display: flex; flex-direction: column; }
    body.im-shell .kg-left { height: 225px; }
    body.im-shell .kg-canvas-panel { height: 620px; min-height: 620px; }
    body.im-shell #graph-container { min-height: 620px; }
    body.im-shell .kg-toolbar { gap: 8px; }
    body.im-shell .kg-scene-title { max-width: 52%; padding: 7px; }
    body.im-shell .kg-scene-title h5 { font-size: 12px; }
    body.im-shell .kg-scene-title p { display: none; }
    body.im-shell .kg-scene-tools { gap: 4px; }
    body.im-shell .kg-scene-tools button { padding: 7px 6px; font-size: 10px; }
    body.im-shell .kg-metric { min-width: 83px; }
    body.im-shell .kg-metric strong { font-size: 17px; }
    body.im-shell[data-page="home"] .dashboard-footer { left: 0; width: 100%; }
    body.im-shell[data-page="home"] #marketGraph { min-height: 520px; }
    body.im-shell .nav-tabs { flex-wrap: wrap; }
    body.im-shell .qa-container { flex-direction: column; height: auto; }
    body.im-shell .qa-sidebar { flex: 0 0 260px; }
    body.im-shell .qa-main { min-height: 610px; }
    body.im-shell .common-questions-grid { grid-template-columns: 1fr; }
    body.im-shell .guidance-container { padding: 22px 14px; }
    body.im-shell .guidance-title { font-size: 19px; }
    body.im-shell .sentiment-hero > .d-flex { flex-wrap: wrap; gap: 20px; }
    body.im-shell .sentiment-hero { padding: 16px; }
}
@media(prefers-reduced-motion: reduce) {
    body.im-shell *, body.im-shell *::before, body.im-shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
