
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;background:#f5f6fa;display:flex;height:100vh;overflow:hidden;font-weight:500}
/* Sidebar */
.sidebar{width:220px;background:linear-gradient(180deg,#1a1a1a 0%,#16213e 100%);color:#ccc;display:flex;flex-direction:column;flex-shrink:0;transition:width 0.25s ease;position:relative}
.sidebar-brand{padding:20px 18px;border-bottom:1px solid rgba(255,255,255,0.08);position:relative}
.sidebar-brand h1{padding-right:28px;font-size:18px;color:#fff;font-weight:700;letter-spacing:1px}
.sidebar-brand h1>span{font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC",sans-serif;font-size:19px;font-weight:700;letter-spacing:0;color:#f4f7fb}
.sidebar-brand h1>span>span:first-child{font-weight:700;letter-spacing:.5px}
.sidebar-brand h1>span>span:nth-child(2){color:#f4f7fb!important;font-weight:700}
.sidebar-brand p{font-size:11px;color:#888;margin-top:4px}
.sidebar-toggle{background:none;border:1px solid #e0e0e0;color:#888;width:24px;height:24px;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:color .18s ease,background .18s ease,border-color .18s ease,opacity .18s ease;flex-shrink:0}
.sidebar-toggle:hover{color:#333;background:#f5f5f5;border-color:#ccc}
.sidebar-toggle svg{width:17px;height:17px;color:inherit}
.sidebar-brand-toggle{position:absolute;right:12px;top:22px;border-color:transparent;color:#8f98a7}
.sidebar-brand-toggle:hover{color:#fff;background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.08)}
.sidebar-mobile-toggle{display:none}
.sidebar-nav{flex:1;padding:12px 0;overflow:hidden}
.sidebar-section{margin-bottom:4px}
.sidebar-section-title{padding:8px 18px;font-size:11px;color:#666;text-transform:uppercase;letter-spacing:1px;white-space:nowrap;overflow:hidden}
.sidebar-item{width:100%;padding:10px 18px;cursor:pointer;display:flex;align-items:center;gap:5px;font:inherit;font-size:14px;text-align:left;color:inherit;background:none;transition:all 0.15s;border:0;border-left:3px solid transparent;white-space:nowrap;overflow:hidden}
.sidebar-item:hover{background:rgba(255,255,255,0.05);color:#fff}
.sidebar-item.active{background:rgba(255,255,255,0.08);color:#fff;border-left-color:#c41e3a}
.sidebar-item-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:currentColor}
.sidebar-nav-icon{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar-orange-icon{width:20px;height:20px;fill:none;stroke:none}
.ui-line-icon{display:inline-block;width:17px;height:17px;flex:0 0 17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.settings-nav-item .ui-line-icon{margin-right:9px;vertical-align:-4px}.calc-card-hdr .ui-line-icon,.pm-card-hdr .ui-line-icon{margin-right:6px}.ui-icon-button{display:inline-flex;align-items:center;gap:6px}.ui-icon-button .ui-line-icon{width:15px;height:15px;flex-basis:15px}
.sidebar-icon-sprite{position:absolute;width:0;height:0;overflow:hidden}
.sidebar-item-text{transition:opacity 0.2s ease}
.sidebar-status{padding:16px 18px;border-top:1px solid rgba(255,255,255,0.08);font-size:11px;color:#555;white-space:nowrap;overflow:hidden}
.sidebar-status .dot{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px}
.sidebar-status .dot.online{background:#4caf50}
/* Collapsed sidebar */
.sidebar.collapsed{z-index:200;width:52px}
.sidebar.collapsed .sidebar-brand{padding:16px 10px;text-align:center}
.sidebar.collapsed .sidebar-brand h1{padding-right:0;font-size:16px}
.sidebar.collapsed .sidebar-brand h1 span{display:none}
.sidebar.collapsed .sidebar-brand h1 img{margin:0 auto}
.sidebar.collapsed .sidebar-brand-toggle{z-index:2;left:10px;right:auto;top:14px;width:32px;height:32px;opacity:0;color:#e0e5ec;background:#1a1a1a}
.sidebar.collapsed .sidebar-brand-toggle:hover,.sidebar.collapsed .sidebar-brand-toggle:focus-visible{opacity:1;background:#1a1a1a;border-color:rgba(255,255,255,.12)}
.sidebar.collapsed .sidebar-brand-toggle svg{width:21px;height:21px}
.sidebar.collapsed .sidebar-brand p{display:none}
.sidebar.collapsed .sidebar-section-title{display:none}
.sidebar.collapsed .sidebar-item{padding:10px 12px;justify-content:center;gap:0;border-left-width:0}
.sidebar.collapsed .sidebar-item.active{border-left:none;border-right:3px solid #c41e3a}
.sidebar.collapsed .sidebar-item-text{opacity:0;width:0;display:none}
.sidebar.collapsed .sidebar-item-icon{margin:0}
.sidebar.collapsed #sidebar-user{text-align:center;padding:10px 6px !important}
.sidebar.collapsed #sidebar-user>div{justify-content:center !important}
.sidebar.collapsed #sidebar-user>div>div:last-child{display:none}
.sidebar.collapsed .sidebar-status{text-align:center;padding:12px 6px}
.sidebar.collapsed .sidebar-status span:not(.dot){display:none}
.sidebar.collapsed .sidebar-status .dot{margin-right:0}
/* Tooltip for collapsed items */
.sidebar.collapsed .sidebar-nav{overflow:visible}
.sidebar.collapsed .sidebar-item[data-tooltip]{position:relative;overflow:visible}
@media (min-width:901px) and (hover:hover){.sidebar.collapsed .sidebar-item[data-tooltip]:hover::after{content:attr(data-tooltip);position:absolute;left:58px;top:50%;transform:translateY(-50%);background:#1a1a1a;color:#fff;padding:6px 12px;border-radius:6px;font-size:12px;white-space:nowrap;z-index:3200;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,0.3)}}
/* Main */
.main{min-width:0;flex:1;display:flex;flex-direction:column;overflow:hidden}
.topbar{flex:0 0 auto;background:#fff;padding:14px 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e8e8e8}
.topbar h2{font-size:18px;color:#333}
.topbar-right{display:flex;align-items:center;gap:16px;font-size:13px;color:#888}
.topbar-time{font-family:monospace;background:#f5f5f5;padding:4px 10px;border-radius:4px}
.content{padding:24px;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.content>[id^="page-"]{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px}
.auth-entry{position:fixed;z-index:10000;inset:0;display:grid;grid-template-columns:minmax(380px,36%) 1fr;background:#fff;color:#172033}
.auth-entry[hidden]{display:none}
.auth-entry-panel{min-height:100vh;padding:34px 7vw 26px;display:flex;flex-direction:column;background:#fff;overflow-y:auto}
.auth-entry-brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;color:#15233c;letter-spacing:-.02em}
.auth-entry-brand-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#ff9f1c,#ff6b00);color:#fff;font-size:19px;box-shadow:0 8px 20px rgba(255,124,0,.22)}
.auth-entry-form{width:100%;max-width:390px;margin:auto auto 24px;transform:translateY(clamp(-64px,calc(190px - 25vh),0px))}
.auth-entry-form.registering{transform:none}
.auth-entry-form.wechat-open{margin-top:24px;transform:none}
.auth-entry-kicker{font-size:12px;color:#dd6b20;font-weight:700;letter-spacing:.14em;margin-bottom:10px}
.auth-entry-form h1{font-size:29px;line-height:1.25;margin:0 0 8px;color:#12203a}
.auth-entry-subtitle{font-size:14px;color:#7b8494;margin-bottom:26px}
.auth-entry-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #e8ebf0;margin-bottom:20px}
.auth-entry-tab{appearance:none;border:0;background:none;padding:11px;color:#8a93a2;font-size:14px;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.auth-entry-tab.active{color:#e87510;border-bottom-color:#e87510}
.auth-entry-field{margin-bottom:14px}
.auth-entry-field label{display:block;font-size:12px;font-weight:600;color:#525d70;margin-bottom:7px}
.auth-entry-input{width:100%;box-sizing:border-box;border:1px solid #dfe3e9;border-radius:8px;background:#f7f8fa;padding:13px 14px;font-size:14px;outline:none;transition:.15s}
.auth-entry-input:focus{background:#fff;border-color:#e87510;box-shadow:0 0 0 3px rgba(232,117,16,.1)}
.auth-captcha-row{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:10px;align-items:stretch}
.auth-captcha-image{width:160px;height:52px;border:1px solid #dfe3e9;border-radius:8px;background:#f7f8fa;padding:0;overflow:hidden;cursor:pointer}
.auth-captcha-image:disabled{cursor:default;opacity:.65}
.auth-captcha-image img{display:block;width:100%;height:100%;object-fit:cover}
.auth-captcha-tip{font-size:11px;color:#8a93a2;margin-top:6px}
.auth-sms-row{display:grid;grid-template-columns:1fr 132px;gap:10px}
.auth-sms-send{border:1px solid #e87510;border-radius:8px;background:#fff7ed;color:#d8620d;font-size:13px;font-weight:700;cursor:pointer}
.auth-sms-send:disabled{border-color:#d8dde5;background:#f4f5f7;color:#9aa2af;cursor:not-allowed}
.auth-sms-tip{min-height:16px;font-size:11px;color:#2e7d32;margin-top:6px}
.auth-entry-error{display:none;margin:0 0 12px;padding:9px 11px;border-radius:7px;background:#fff1f0;color:#c43d32;font-size:12px}
.auth-entry-submit{width:100%;border:0;border-radius:8px;background:linear-gradient(135deg,#f28b22,#df6410);color:#fff;padding:13px 16px;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(226,105,16,.2)}
.auth-entry-submit:disabled{opacity:.65;cursor:wait}
.auth-entry-divider{display:flex;align-items:center;gap:12px;color:#b1b7c1;font-size:11px;margin:19px 0}
.auth-entry-divider::before,.auth-entry-divider::after{content:'';height:1px;background:#e6e9ee;flex:1}
.auth-entry-wechat{width:100%;border:1px solid #dfe3e9;border-radius:8px;background:#fff;color:#344054;padding:12px 14px;font-size:14px;font-weight:600;cursor:pointer}
.auth-entry-wechat:hover{background:#f7f8fa}
.auth-entry-qr{display:none;margin-top:14px;text-align:center}
.auth-entry-qr-box{position:relative;width:260px;height:260px;margin:0 auto;background:#fff;border:1px solid #e1e5ea;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden}
.auth-entry-qr-box iframe{position:absolute;top:-45px;left:50%;display:block;width:300px;height:400px;max-width:none;border:0;transform:translateX(-50%) scale(.93);transform-origin:top center}
.auth-entry-qr-box img{max-width:230px;max-height:230px;width:auto;height:auto}
.auth-entry-qr-prompt{max-width:190px;color:#5f6672;font-size:17px;line-height:1.55}
.auth-entry-consent{display:flex;align-items:flex-start;gap:7px;margin-top:16px;color:#8a93a2;font-size:11px;line-height:1.55}
.auth-entry-consent input{margin-top:2px;accent-color:#e87510}
.auth-entry-consent a{color:#576b95;text-decoration:none}.auth-entry-consent a:hover{text-decoration:underline}
.auth-entry-footer{margin-top:0}
.auth-entry-qr-tip{margin-top:18px;color:#64748b;font-size:15px}
.auth-reset-modal{position:fixed;z-index:10001;inset:0;display:grid;place-items:center;padding:20px;background:rgba(8,19,40,.48)}
.auth-reset-modal[hidden]{display:none}
.auth-reset-dialog{position:relative;width:min(420px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:25px;border-radius:14px;background:#fff;box-shadow:0 24px 70px rgba(7,20,45,.28)}
.auth-reset-dialog h2{margin:0 0 6px;font-size:21px;color:#12203a}.auth-reset-dialog p{margin:0 0 20px;color:#7b8494;font-size:13px}
.auth-reset-close{position:absolute;right:12px;top:10px;border:0;background:transparent;color:#7b8494;font-size:26px;line-height:1;cursor:pointer}
.auth-entry-hero{position:relative;min-height:100vh;overflow:hidden;background:linear-gradient(135deg,#07142d 0%,#0a214a 48%,#102d62 100%);display:flex;align-items:center;justify-content:center;padding:7vh 7vw;color:#fff}
.auth-entry-hero::before{content:'';position:absolute;inset:-20% 38% 42% -20%;background:linear-gradient(135deg,rgba(52,92,165,.26),rgba(52,92,165,0));transform:rotate(-8deg)}
.auth-entry-hero::after{content:'ORANGE RESEARCH';position:absolute;left:9%;top:27%;font-size:clamp(64px,8vw,150px);font-weight:900;letter-spacing:-.06em;color:rgba(255,255,255,.055);white-space:nowrap}
.auth-entry-hero-inner{position:relative;z-index:1;width:min(820px,100%);text-align:center}
.auth-entry-hero h2{font-size:clamp(30px,3vw,48px);margin:0 0 10px;letter-spacing:-.03em}
.auth-entry-hero-lead{font-size:clamp(15px,1.4vw,21px);color:#9fb1d0;margin-bottom:38px}
.auth-product-preview{position:relative;margin:0 auto;width:min(760px,92%);height:430px;border:1px solid rgba(166,194,238,.48);border-radius:18px;background:rgba(250,252,255,.96);box-shadow:0 32px 70px rgba(0,0,0,.3);overflow:hidden;text-align:left;color:#233044}
.auth-preview-top{height:42px;background:#f7f8fb;border-bottom:1px solid #e7e9ee;display:flex;align-items:center;gap:7px;padding:0 14px}
.auth-preview-dot{width:8px;height:8px;border-radius:50%;background:#d7dce5}.auth-preview-dot.orange{background:#f28b22}
.auth-preview-body{display:grid;grid-template-columns:122px 1fr;height:calc(100% - 42px)}
.auth-preview-nav{background:#111f39;padding:17px 12px}.auth-preview-nav b{display:block;color:#fff;font-size:12px;margin-bottom:20px}.auth-preview-nav span{display:block;height:9px;border-radius:5px;background:rgba(255,255,255,.12);margin-bottom:15px}.auth-preview-nav span.active{background:#e87510;width:82%}
.auth-preview-main{padding:20px;background:#f5f6f8}.auth-preview-title{font-size:16px;font-weight:800;margin-bottom:15px}.auth-preview-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:13px}.auth-preview-card{height:72px;background:#fff;border-radius:9px;box-shadow:0 2px 7px rgba(24,39,75,.06);padding:12px}.auth-preview-card small{color:#9098a6}.auth-preview-card strong{display:block;margin-top:8px;font-size:18px}.auth-preview-card strong.up{color:#c74737}.auth-preview-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:12px}.auth-preview-chart,.auth-preview-list{height:210px;background:#fff;border-radius:10px;box-shadow:0 2px 7px rgba(24,39,75,.06);padding:13px}.auth-chart-bars{height:150px;display:flex;align-items:flex-end;gap:7px;border-bottom:1px solid #edf0f4}.auth-chart-bars i{display:block;flex:1;background:linear-gradient(#ef9a62,#e87510);border-radius:4px 4px 0 0}.auth-preview-list i{display:block;height:10px;background:#edf0f4;border-radius:5px;margin:13px 0}.auth-preview-list i:nth-child(2n){width:72%}
body.auth-locked{overflow:hidden}
body.auth-locked>.sidebar,body.auth-locked>.sidebar-backdrop,body.auth-locked>main{visibility:hidden;pointer-events:none}
.page-footer-stack{flex:0 0 auto;margin-top:0;padding-top:14px}
.site-legal-footer{margin-top:0;padding:18px 22px;border-top:1px solid #e1e5ea;border-radius:8px;background:#f5f6f8;color:#6b7280;font-size:12px;line-height:1.8;text-align:left}
.site-legal-footer p{margin:0}
.site-legal-footer p+p{margin-top:5px}
.site-legal-footer a{color:#4b5563;text-decoration:none}
.site-legal-footer a:hover{text-decoration:underline;color:#111827}
.site-legal-footer .site-risk-text{color:#4b5563}
.auth-legal-footer{width:100%;max-width:390px;align-self:center;box-sizing:border-box;padding:14px 0 0;border:0;border-radius:0;background:transparent;color:#8a93a2;font-size:11px;line-height:1.7;text-align:left}
.auth-legal-footer .site-about-title{margin-bottom:7px;color:#1f2937;font-size:15px;font-weight:800}
.auth-legal-footer a{color:#7f8ca0}
.auth-legal-footer .site-risk-text{color:#8a93a2}
body[data-theme="dark"] .site-legal-footer{background:#242424;border-color:#3f3f3f;color:#aeb4bd}
body[data-theme="dark"] .site-legal-footer a,body[data-theme="dark"] .site-legal-footer .site-risk-text{color:#d4d8df}
/* Value investing knowledge page */
.value-hero{position:relative;overflow:hidden;padding:27px 30px;border-radius:14px;background:linear-gradient(135deg,#17213b 0%,#263a64 66%,#8b1a1a 145%);color:#fff;box-shadow:0 10px 30px rgba(24,37,65,.13);margin-bottom:16px}
.value-hero::after{content:"VALUE";position:absolute;right:24px;top:-22px;font-size:94px;font-weight:900;letter-spacing:-5px;color:rgba(255,255,255,.045)}
.value-hero-kicker{position:relative;z-index:1;color:#f1b56d;font-size:10px;font-weight:800;letter-spacing:2px;margin-bottom:7px}.value-hero h3{position:relative;z-index:1;margin:0 0 7px;font-size:25px}.value-hero p{position:relative;z-index:1;margin:0;color:#d3dceb;font-size:13px;line-height:1.7}.value-hero-note{position:relative;z-index:1;margin-top:12px;padding:9px 12px;border-left:3px solid #e69a3a;background:rgba(255,255,255,.07);border-radius:0 7px 7px 0;color:#e9edf5;font-size:11px;line-height:1.6;max-width:900px}
.value-hero-pillars .value-pillar-grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.value-hero-pillars .value-pillar-grid article{padding:14px 13px;border-radius:10px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}
.value-hero-pillars .value-pillar-grid b{color:#f1b56d;font:700 12px/1.2 Consolas,monospace}
.value-hero-pillars .value-pillar-grid h4{margin:7px 0 6px;color:#fff;font-size:14px}
.value-hero-pillars .value-pillar-grid p{margin:0;color:#cdd6e5;font-size:11px;line-height:1.7}
.value-section{margin-bottom:16px;padding:19px;background:#fff;border:1px solid #e8ebf0;border-radius:12px;box-shadow:0 2px 10px rgba(26,39,64,.05)}
.value-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:15px}.value-section-head span{color:#8b1a1a;font-size:10px;font-weight:800;letter-spacing:1px}.value-section-head h3{margin:4px 0 0;color:#273142;font-size:17px}.value-section-head p{margin:0;color:#8a93a2;font-size:11px}
.value-note-box{margin-top:14px;padding:13px 16px;background:#f8f9fb;border:1px solid #edf0f4;border-left:3px solid #8b1a1a;border-radius:8px;color:#3b4556;font-size:12px;line-height:1.7}
body[data-theme="dark"] .value-note-box{background:#2a2a2a;border-color:#3a3a3a;border-left-color:#b04a4a;color:#b8bec9}
.value-principle-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.value-principle-grid article{padding:13px 11px;background:#f8f9fb;border:1px solid #edf0f4;border-radius:9px}.value-principle-grid b{color:#b67a35;font:700 10px/1.2 Consolas,monospace}.value-principle-grid h4{margin:7px 0 6px;color:#30394a;font-size:13px}.value-principle-grid p{margin:0;color:#798291;font-size:10px;line-height:1.65}
.value-people-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.value-person{position:relative;padding:15px;border:1px solid #e7eaf0;border-radius:10px;background:linear-gradient(180deg,#fff,#fafbfc);cursor:pointer;transition:transform .16s,border-color .16s,box-shadow .16s}.value-person:hover,.value-person:focus-visible{transform:translateY(-2px);border-color:#c9a36c;box-shadow:0 7px 18px rgba(33,43,66,.1);outline:none}.value-person::after{content:"查看 100 条 →";position:absolute;right:13px;bottom:11px;color:#9b6a31;font-size:9px;font-weight:700}.value-person>div:nth-child(2){padding-left:43px;min-height:35px}.value-person-mark{position:absolute;left:14px;top:14px;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#202c49;color:#f2b665;font:800 11px/1 Consolas,monospace}.value-person h4{margin:0 0 3px;color:#293244;font-size:13px}.value-person small{color:#9a6b35;font-size:9px}.value-person p{margin:11px 0 9px;color:#697384;font-size:10px;line-height:1.65}.value-person ul{margin:0 0 16px;padding-left:16px;color:#3f4858;font-size:10px;line-height:1.7}
.value-checklist{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:4px}.value-checklist div{min-width:0;padding:16px 17px;border:1px solid #e3e7ed;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(26,39,64,.04)}.value-checklist span{display:block;margin-bottom:7px;color:#8b1a1a;font-size:10px;font-weight:700}.value-checklist b{display:block;color:#3b4556;font-size:11px;line-height:1.55}
.value-investor-detail{padding-bottom:8px}.value-detail-back{margin-bottom:12px;padding:7px 12px;border:1px solid #dfe3e9;border-radius:8px;background:#fff;color:#4c5668;font-size:11px;cursor:pointer}.value-detail-back:hover{border-color:#b88a50;color:#8b1a1a}.value-detail-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:22px 24px;border-radius:13px 13px 0 0;background:linear-gradient(135deg,#17213b,#2c416f);color:#fff}.value-detail-head span{color:#efb86f;font-size:10px;font-weight:800;letter-spacing:1px}.value-detail-head h3{margin:5px 0 5px;font-size:22px}.value-detail-head p{margin:0;color:#cbd5e5;font-size:11px}.value-detail-head strong{color:#efb86f;font-size:20px;white-space:nowrap}.value-detail-note{padding:10px 16px;background:#fff8ed;border:1px solid #f0dfc7;border-top:0;color:#86633d;font-size:10px;line-height:1.6}.value-detail-toolbar{display:flex;align-items:center;gap:12px;padding:13px 15px;background:#fff;border:1px solid #e5e8ed;border-top:0}.value-detail-toolbar input{flex:1;min-width:0;padding:9px 11px;border:1px solid #dfe3e9;border-radius:8px;background:#f8f9fb;color:#333;font-size:11px;outline:none}.value-detail-toolbar input:focus{border-color:#b68a52;background:#fff}.value-detail-toolbar span{color:#8b1a1a;font-size:10px;font-weight:700;white-space:nowrap}.value-quote-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:11px}.value-quote-card{display:flex;gap:11px;padding:12px 13px;border:1px solid #e7eaf0;border-radius:9px;background:#fff}.value-quote-card>span{flex:0 0 28px;color:#b78446;font:700 10px/1.5 Consolas,monospace}.value-quote-card small{display:block;margin-bottom:4px;color:#8b1a1a;font-size:9px;font-weight:700}.value-quote-card p{margin:0;color:#4d5768;font-size:11px;line-height:1.7}.value-quote-empty{grid-column:1/-1;padding:36px;text-align:center;color:#929aa8;font-size:11px}
body[data-theme="dark"] .value-section,body[data-theme="dark"] .value-checklist div{background:#252525;border-color:#3a3a3a}body[data-theme="dark"] .value-section-head h3,body[data-theme="dark"] .value-person h4,body[data-theme="dark"] .value-principle-grid h4,body[data-theme="dark"] .value-checklist b{color:#e5e7eb}body[data-theme="dark"] .value-principle-grid article,body[data-theme="dark"] .value-person{background:#292929;border-color:#3a3a3a}body[data-theme="dark"] .value-person p,body[data-theme="dark"] .value-person ul,body[data-theme="dark"] .value-principle-grid p{color:#aeb5c0}
body[data-theme="dark"] #page-value-investing .value-detail-back{background:#252525;border-color:#414141;color:#c7cbd2}
body[data-theme="dark"] #page-value-investing .value-detail-back:hover{background:#2d2d2d;border-color:#b88a50;color:#efb86f}
body[data-theme="dark"] #page-value-investing .value-detail-note{background:#2d2923;border-color:#4b4236;color:#d4b98f}
body[data-theme="dark"] #page-value-investing .value-detail-toolbar{background:#252525;border-color:#3a3a3a}
body[data-theme="dark"] #page-value-investing .value-detail-toolbar input{background:#1d1f22;border-color:#45484d;color:#e5e7eb}
body[data-theme="dark"] #page-value-investing .value-detail-toolbar input:focus{background:#202328;border-color:#b68a52}
body[data-theme="dark"] #page-value-investing .value-detail-toolbar input::placeholder{color:#858c96}
body[data-theme="dark"] #page-value-investing .value-quote-card{background:#252525;border-color:#3d4147}
body[data-theme="dark"] #page-value-investing .value-quote-card p{color:#c7ccd4}
body[data-theme="dark"] #page-value-investing .value-quote-card small{color:#dc9a55}
body[data-theme="dark"] #page-value-investing .value-quote-empty{color:#969da8}
@media(max-width:1180px){.value-principle-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.value-people-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.value-hero{padding:22px 20px}.value-section-head{align-items:flex-start;flex-direction:column;gap:6px}.value-principle-grid,.value-people-grid,.value-checklist,.value-quote-grid{grid-template-columns:1fr}.value-detail-head{align-items:flex-start;flex-direction:column}.value-detail-toolbar{align-items:stretch;flex-direction:column}}
/* ===== 价值投资页 投资不为清单 ===== */
.value-chip-row{display:flex;flex-wrap:wrap;gap:8px}
.value-dontlist-toc{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;padding:11px 13px;background:#f8f9fb;border:1px solid #edf0f4;border-radius:10px}
.value-dontlist-toc a{color:#8b1a1a;font-size:12px;font-weight:600;text-decoration:none;padding:5px 13px;border:1px solid #e5d5d5;border-radius:16px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s}
.value-dontlist-toc a:hover{border-color:#b88a50;background:#fff8ed}
.value-chip{padding:7px 15px;border-radius:20px;font-size:12px;background:#f8f9fb;border:1px solid #edf0f4;color:#3b4556;white-space:nowrap}
.value-chip.red{border-color:#eec9c9;color:#b05050;background:#fff6f6}
.value-chip.fatal{border-color:#c41e3a;color:#c41e3a;background:#fdf0f0;font-weight:700}
.value-chip.gold{border-color:#e8cf9e;color:#9a6b31;background:#fffbf0}
.value-chip-arrow{color:#8a93a2;align-self:center;font-size:15px;padding:0 2px}
.value-rule-table{width:100%;border-collapse:collapse;font-size:12px}
.value-rule-table thead th{background:#f8f9fb;color:#8b1a1a;padding:10px 12px;text-align:left;font-weight:700;border-bottom:2px solid #edf0f4}
.value-rule-table tbody td{padding:10px 12px;border-bottom:1px solid #f0f2f5;vertical-align:top;color:#4d5768;line-height:1.6}
.value-rule-table tbody tr:hover td{background:#fafbfc}
.value-rule-table .vr-n{color:#8b1a1a;font-weight:700;white-space:nowrap;width:30px}
.value-rule-table .vr-q{font-weight:600;color:#3b4556;white-space:nowrap}
.value-dont-list{list-style:none;padding:0}
.value-dont-list li{position:relative;padding:11px 14px 11px 34px;margin-bottom:7px;background:#fff6f6;border-left:3px solid #d0454f;border-radius:7px;font-size:12px;color:#4d5768;line-height:1.6}
.value-dont-list li::before{content:'✕';position:absolute;left:12px;top:10px;color:#d0454f;font-weight:700;font-size:12px}
.value-dont-list li strong{color:#3b4556;margin-right:6px}
.value-dont-list li .reason{display:block;color:#8a93a2;font-size:11px;margin-top:3px}
.value-warn-list{list-style:none;padding:0}
.value-warn-list li{position:relative;padding:11px 14px 11px 34px;margin-bottom:7px;background:#fffaf3;border-left:3px solid #e8913a;border-radius:7px;font-size:12px;color:#4d5768;line-height:1.6}
.value-warn-list li::before{content:'⚡';position:absolute;left:11px;top:9px;color:#e8913a;font-size:12px}
.value-warn-list li strong{color:#3b4556;margin-right:6px}
.value-warn-list li .reason{display:block;color:#8a93a2;font-size:11px;margin-top:3px}
.value-check-list{list-style:none;padding:0}
.value-check-list li{border-bottom:1px solid #f0f2f5}
.value-check-list label{display:flex;align-items:flex-start;gap:10px;padding:11px 4px;cursor:pointer;font-size:12px;color:#4d5768;line-height:1.6}
.value-check-list input[type="checkbox"]{margin-top:3px;accent-color:#8b1a1a;cursor:pointer}
.value-check-list strong{color:#3b4556}
body[data-theme="dark"] .value-dontlist-toc{background:#252525;border-color:#3a3a3a}
body[data-theme="dark"] .value-dontlist-toc a{color:#dc9a55;border-color:#4b4236;background:#2d2923}
body[data-theme="dark"] .value-dontlist-toc a:hover{border-color:#b88a50;background:#3a342a}
body[data-theme="dark"] #page-value-investing .value-chip{background:#292929;border-color:#3a3a3a;color:#aeb5c0}
body[data-theme="dark"] #page-value-investing .value-chip.red{background:#332424;border-color:#6b3a3a;color:#e09595}
body[data-theme="dark"] #page-value-investing .value-chip.fatal{background:#3a2123;border-color:#c41e3a;color:#f0a0a0}
body[data-theme="dark"] #page-value-investing .value-chip.gold{background:#2d2923;border-color:#4b4236;color:#d4b98f}
body[data-theme="dark"] #page-value-investing .value-chip-arrow{color:#7a8190}
body[data-theme="dark"] #page-value-investing .value-rule-table thead th{background:#252525;color:#dc9a55;border-bottom-color:#3a3a3a}
body[data-theme="dark"] #page-value-investing .value-rule-table tbody td{color:#c7ccd4;border-bottom-color:#2f2f2f}
body[data-theme="dark"] #page-value-investing .value-rule-table tbody tr:hover td{background:#2a2a2a}
body[data-theme="dark"] #page-value-investing .value-rule-table .vr-n{color:#dc9a55}
body[data-theme="dark"] #page-value-investing .value-rule-table .vr-q{color:#e5e7eb}
body[data-theme="dark"] #page-value-investing .value-dont-list li{background:#332424;border-left-color:#8a4a4a;color:#c7ccd4}
body[data-theme="dark"] #page-value-investing .value-dont-list li strong{color:#e5e7eb}
body[data-theme="dark"] #page-value-investing .value-dont-list li .reason{color:#9aa2ad}
body[data-theme="dark"] #page-value-investing .value-warn-list li{background:#332b23;border-left-color:#8a6a3a;color:#c7ccd4}
body[data-theme="dark"] #page-value-investing .value-warn-list li strong{color:#e5e7eb}
body[data-theme="dark"] #page-value-investing .value-warn-list li .reason{color:#9aa2ad}
body[data-theme="dark"] #page-value-investing .value-check-list li{border-bottom-color:#2f2f2f}
body[data-theme="dark"] #page-value-investing .value-check-list label{color:#c7ccd4}
body[data-theme="dark"] #page-value-investing .value-check-list strong{color:#e5e7eb}
body[data-theme="dark"] #page-value-investing .value-section [style*="background:#fff6f6"]{background:#332424!important;border-color:#6b3a3a!important;color:#e09595!important}
body[data-theme="dark"] #page-value-investing .value-section [style*="background:#fffaf3"]{background:#332b23!important;border-color:#8a6a3a!important;color:#d4b98f!important}
body[data-theme="dark"] #page-value-investing .value-section [style*="background:#fffbf0"]{background:#2d2923!important;border-color:#4b4236!important;color:#d4b98f!important}
body[data-theme="dark"] #page-value-investing .value-section [style*="background:linear-gradient(135deg,#fffbf0"]{background:#2d2923!important;border-color:#4b4236!important;color:#d4b98f!important}
body[data-theme="dark"] #page-value-investing .value-section blockquote{background:#2d2923!important;border-color:#b88a50!important;color:#d4b98f!important}
body[data-theme="dark"] #value-dontlist-panel [style*="background:#f8f9fb"]{background:#292929!important;border-color:#3a3a3a!important;color:#c7ccd4!important}
body[data-theme="dark"] #value-dontlist-panel [style*="color:#3b4556"]{color:#c7ccd4!important}
body[data-theme="dark"] #value-dontlist-panel [style*="color:#8b1a1a"]{color:#f0a0a0!important}
body[data-theme="dark"] #value-dontlist-panel [style*="color:#86633d"]{color:#d4b98f!important}
@media(max-width:700px){.value-stats{grid-template-columns:1fr!important}.value-rule-table .vr-q{white-space:normal}#page-value-investing #value-dontlist-panel [style*="grid-template-columns"]{grid-template-columns:1fr!important}}
/* Unified analysis activity feed */
.analysis-feed-host{padding:18px!important;text-align:left!important}
.analysis-feed{max-width:720px;margin:0 auto;background:#fff;border:1px solid #e3e7ee;border-radius:14px;box-shadow:0 8px 28px rgba(26,39,64,.07);overflow:hidden;color:#273142}
.analysis-feed-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 18px 13px;background:linear-gradient(135deg,#fbfcfe,#f4f7fb);border-bottom:1px solid #edf0f4}
.analysis-feed-eyebrow{font-size:10px;letter-spacing:.12em;color:#8b95a5;font-weight:700;margin-bottom:4px}
.analysis-feed-title{font-size:15px;font-weight:750;color:#1d2939}.analysis-feed-subtitle{font-size:11px;color:#8b95a5;margin-top:3px}
.analysis-feed-meta{display:flex;align-items:center;gap:8px;white-space:nowrap}.analysis-feed-elapsed{font:11px/1.2 Consolas,monospace;color:#98a2b3}
.analysis-feed-badge{padding:4px 9px;border-radius:999px;background:#fff3e8;color:#c25d0b;font-size:10px;font-weight:700;border:1px solid #ffdfbf}
.analysis-feed-badge.done{background:#ecf8f0;color:#237a45;border-color:#ccebd7}.analysis-feed-badge.error{background:#fff0ef;color:#b42318;border-color:#ffd2cf}.analysis-feed-badge.warning{background:#fff8e7;color:#9b6b00;border-color:#f7e1a0}
.analysis-feed-progress{height:3px;background:#edf0f4}.analysis-feed-progress>i{display:block;height:100%;width:2%;background:linear-gradient(90deg,#d76a17,#f0a34a);transition:width .35s ease}
.analysis-feed-list{padding:8px 18px 13px;max-height:300px;overflow:auto}
.analysis-feed-item{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:10px;padding:10px 0}
.analysis-feed-item:not(:last-child)::after{content:'';position:absolute;left:10px;top:31px;bottom:-6px;width:1px;background:#e5e9ef}
.analysis-feed-icon{position:relative;z-index:1;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#f0f2f5;color:#98a2b3;font-size:11px;font-weight:800}
.analysis-feed-item.running .analysis-feed-icon{background:#fff0e4;color:#d76a17}.analysis-feed-item.running .analysis-feed-icon::after{content:'';position:absolute;inset:-3px;border:1px solid rgba(215,106,23,.3);border-radius:50%;animation:analysisPulse 1.4s ease-out infinite}
.analysis-feed-item.done .analysis-feed-icon{background:#e8f5ed;color:#237a45}.analysis-feed-item.error .analysis-feed-icon{background:#ffebe9;color:#b42318}.analysis-feed-item.warning .analysis-feed-icon{background:#fff5d9;color:#9b6b00}
.analysis-feed-item-title{font-size:12px;font-weight:650;color:#344054;line-height:1.4}.analysis-feed-item.running .analysis-feed-item-title{color:#b6550d}
.analysis-feed-item-detail{font-size:11px;color:#98a2b3;line-height:1.45;margin-top:2px;word-break:break-word}.analysis-feed-item-time{font:10px/1.4 Consolas,monospace;color:#b1b8c3;padding-top:2px}
@keyframes analysisPulse{0%{transform:scale(.85);opacity:1}100%{transform:scale(1.45);opacity:0}}
body[data-theme="dark"] .analysis-feed{background:#252525;border-color:#3a3a3a;color:#e5e7eb}body[data-theme="dark"] .analysis-feed-head{background:linear-gradient(135deg,#2a2a2a,#242424);border-color:#3a3a3a}body[data-theme="dark"] .analysis-feed-title,body[data-theme="dark"] .analysis-feed-item-title{color:#e5e7eb}body[data-theme="dark"] .analysis-feed-item:not(:last-child)::after{background:#3f3f3f}
/* Index Cards */
.index-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:24px}
.index-card{background:#fff;border-radius:10px;padding:18px 16px;box-shadow:0 1px 4px rgba(0,0,0,0.06);border-left:3px solid #ddd;transition:0.2s}
.index-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1);transform:translateY(-1px)}
.index-card .idx-name{font-size:12px;color:#999;margin-bottom:8px}
.index-card .idx-price{font-size:22px;font-weight:700;color:#333;margin-bottom:4px}
.index-card .idx-change{font-size:14px;font-weight:600}
.idx-up{color:#c41e3a}.idx-down{color:#2e7d32}
.index-card.up{border-left-color:#c41e3a;background:#fffbfb}
.index-card.down{border-left-color:#2e7d32;background:#fbfffb}
/* Watchlist */
.watchlist-row{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
.watchlist-panel{background:#fff;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,0.06);overflow:hidden}
.watchlist-header{padding:14px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #f0f0f0}
.watchlist-header h3{font-size:16px;margin:0}
.watchlist-header.a-share{color:#8b1a1a}
.watchlist-header.us{color:#1a56db}
.watchlist-header.stock-watchlist{color:#8b1a1a}
.watchlist-title-row{display:flex;align-items:baseline;gap:10px;min-width:0}
.watchlist-market-hint{color:#999;font-size:11px;font-weight:400;white-space:nowrap}
.btn-add{padding:6px 16px;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:600;color:#fff;transition:0.15s}
.btn-add.a-share{background:#8b1a1a}.btn-add.a-share:hover{background:#6b1414}
.btn-add.us{background:#1a56db}.btn-add.us:hover{background:#1547b5}
.btn-add.stock-watchlist{background:#8b1a1a}.btn-add.stock-watchlist:hover{background:#6b1414}
.watchlist-body{padding:8px 0;min-height:80px;overflow-x:auto}
.watchlist-empty{padding:30px;text-align:center;color:#bbb;font-size:13px}
.watchlist-row-item{display:flex;align-items:center;padding:10px 18px;border-bottom:1px solid #f8f8f8;font-size:13px;transition:0.1s}
.watchlist-row-item:hover{background:#fafafa}
.wl-name{flex:1.8;font-weight:600;color:#333}.wl-code{color:#999;font-size:11px}
.wl-market-tag{display:inline-flex;align-items:center;margin-right:6px;padding:1px 5px;border-radius:4px;background:#f3f4f6;color:#667085;font-size:10px;font-weight:600;line-height:1.5}
.wl-market-tag.a{background:#fdf0f0;color:#8b1a1a}.wl-market-tag.hk{background:#fff4e8;color:#a85d00}.wl-market-tag.us{background:#edf4ff;color:#1a56db}
.wl-price{flex:.8;text-align:right;font-weight:600;color:#333}
.wl-mv{flex:1.05;text-align:right;font-weight:600;color:#333;font-size:12px}
.wl-pe{flex:.8;text-align:right;font-weight:600;color:#333;font-size:12px}
.wl-pb{flex:.8;text-align:right;font-weight:600;color:#333;font-size:12px}
.wl-valuation-percentile{flex:.9;text-align:right;font-weight:600;color:#333;font-size:12px}
.wl-dividend{flex:.9;text-align:right;font-weight:600;color:#333;font-size:12px}
.valuation-low{color:#16813c!important}
.valuation-high{color:#c41e3a!important}
.wl-change{flex:.9;text-align:right;font-weight:600}
.wl-remove{flex:0 0 28px;text-align:right}
.wl-header-row{display:flex;align-items:center;padding:8px 18px;font-size:11px;color:#999;border-bottom:1px solid #f0f0f0;background:#fafafa}
.wl-header-row,.watchlist-row-item{min-width:960px}
.btn-remove{background:none;border:none;color:#ccc;cursor:pointer;font-size:18px;line-height:1;transition:0.15s}
.btn-remove:hover{color:#c41e3a}
/* Company public information */
.company-information-section{margin-top:4px;padding:16px;border:1px solid #e4e7ec;border-radius:14px;background:#fff;box-shadow:0 3px 14px rgba(16,24,40,.04)}
.company-information-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}
.company-information-tab{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:9px 12px;border:1px solid #e4e7ec;border-radius:9px;background:#fff;color:#667085;font-size:13px;font-weight:600;cursor:pointer;transition:.15s}
.company-information-tab:hover{border-color:#cfd4dc;background:#fafafa;color:#344054}
.company-information-tab.active{border-color:#8b1a1a;background:#fdf5f5;color:#8b1a1a;box-shadow:0 0 0 1px rgba(139,26,26,.04)}
.company-information-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#f2f4f7;color:#667085;font-size:10px;font-weight:700}
.company-information-tab.active .company-information-count{background:#8b1a1a;color:#fff}
.company-information-panel{min-height:110px;padding:4px 0}.company-information-scroll{overflow-x:auto}
.company-information-table{width:100%;border-collapse:collapse;font-size:13px}.company-information-table th{padding:9px 10px;border-bottom:1px solid #dfe3e8;color:#667085;text-align:left;font-weight:600;white-space:nowrap}.company-information-table td{padding:10px;border-bottom:1px solid #eef0f3;color:#344054;vertical-align:top}.company-information-table tbody tr:hover{background:#fafafa}
.company-information-link{color:#344054;text-decoration:none}.company-information-link:hover{color:#8b1a1a}.company-information-category{display:inline-flex;padding:2px 7px;border-radius:999px;background:#f2f4f7;color:#667085;font-size:10px;white-space:nowrap}
.company-information-empty{display:flex;align-items:center;justify-content:center;min-height:132px;padding:30px 12px;border:1px dashed #d9dee6;border-radius:10px;background:#fafbfc;text-align:center;color:#7d8795;font-size:13px}
.company-question-list{display:grid;gap:10px}.company-question-card{padding:15px 16px;border:1px solid #e4e7ec;border-radius:10px;background:#fff}.company-question-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;color:#98a2b3;font-size:11px}.company-question-text,.company-answer-text{font-size:13px;line-height:1.7;color:#344054}.company-answer-text{margin-top:9px;padding-top:9px;border-top:1px solid #eef0f3}.company-question-label{margin-right:7px;color:#8b1a1a;font-weight:700}.company-answer-text .company-question-label{color:#237a45}
@media(max-width:900px){.company-information-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.company-question-meta{align-items:flex-start;flex-direction:column;gap:3px}}
/* Dialog */
.dialog-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.4);z-index:9999;justify-content:center;align-items:center}
.dialog-overlay.show{display:flex}
.dialog-box{background:#fff;border-radius:12px;padding:28px;width:440px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow-y:auto;box-shadow:0 12px 40px rgba(0,0,0,0.2)}
.dialog-box h3{margin:0 0 16px;font-size:17px}
.app-dialog-overlay{padding:16px;box-sizing:border-box}
.app-dialog-box{width:min(420px,calc(100vw - 32px));padding:26px;text-align:left;box-sizing:border-box}
.app-dialog-box h3{margin:0 0 10px;color:#20242b;font-size:18px}
.app-dialog-box p{margin:0;min-height:24px;color:#596273;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.app-dialog-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.app-dialog-buttons button{min-width:76px;padding:9px 16px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer}
.app-dialog-buttons .btn-cancel{border:1px solid #dfe3e8;background:#fff;color:#596273}
.app-dialog-confirm{border:1px solid #20252d;background:#20252d;color:#fff}
.dialog-input{width:100%;padding:10px 14px;border:1px solid #ddd;border-radius:8px;font-size:14px;outline:none;transition:0.2s}
.dialog-input:focus{border-color:#8b1a1a;box-shadow:0 0 0 3px rgba(139,26,26,0.1)}
.dialog-results{max-height:240px;overflow-y:auto;margin-top:8px}
.dialog-result-item{padding:10px 12px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;border-radius:6px;margin:2px 0}
.dialog-result-item:hover{background:#f5f5f5}
.dialog-result-item .name{font-weight:600;color:#333}.dialog-result-item .code{font-size:11px;color:#999}
.dialog-buttons{text-align:right;margin-top:16px}
.btn-cancel{padding:8px 20px;background:#f0f0f0;border:none;border-radius:6px;cursor:pointer;font-size:14px}
/* Sub-tabs */
.sub-tabs{display:flex;gap:0;margin-bottom:16px;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,0.06)}
.sub-tab{padding:10px 18px;cursor:pointer;font-size:13px;color:#666;border-bottom:2px solid transparent;transition:all 0.15s;white-space:nowrap}
.sub-tab:hover{color:#333;background:#fafafa}
.sub-tab.active{color:#8b1a1a;border-bottom-color:#8b1a1a;font-weight:600}
/* Sector table */
.sector-table-wrap{background:#fff;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,0.06);overflow:hidden}
.sector-table{width:100%;border-collapse:collapse;font-size:13px}
/* food table uses full width, consistent with medical */
.sector-table th{background:#f8f9fa;padding:8px 5px;text-align:left;font-weight:600;color:#555;border-bottom:2px solid #e0e0e0}
.sector-table td{padding:6px 5px;border-bottom:1px solid #f5f5f5;text-align:left}
#food-table tbody td,#medical-table tbody td{padding-top:11px;padding-bottom:11px}
.sector-table tr:hover{background:#fafafa}
.report-link{color:#333;text-decoration:none;transition:color 0.15s}
.report-link:hover{color:#8b1a1a!important}
.report-download-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1}
.pdf-file-icon{position:relative;display:inline-flex;align-items:flex-end;justify-content:center;width:28px;height:32px;padding-bottom:4px;border-radius:3px;background:#d93025;color:#fff;font-size:9px;font-weight:800;letter-spacing:.2px;box-shadow:0 1px 3px rgba(217,48,37,.2)}
.pdf-file-icon::after{content:'';position:absolute;top:0;right:0;width:0;height:0;border-top:8px solid #fff;border-left:8px solid transparent;border-top-right-radius:2px}
.report-download-link:hover .pdf-file-icon{background:#b4231a;transform:translateY(-1px)}
/* Chain cards */
.chain-card{cursor:pointer;transition:all 0.15s}
.chain-card:hover{background:#fef0f0!important;border-color:#c41e3a!important;color:#8b1a1a!important;transform:translateY(-2px);box-shadow:0 2px 8px rgba(139,26,26,0.1)}
/* Score bars */
.score-bar-row{display:flex;align-items:center;margin-bottom:10px;gap:12px}
.score-bar-label{width:80px;font-size:12px;color:#666;text-align:right;flex-shrink:0}
.score-bar-track{flex:1;height:8px;background:#eee;border-radius:4px;overflow:hidden}
.score-bar-fill{height:100%;width:0%;background:#ddd;border-radius:4px}
/* Detail table */
.detail-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}
.detail-table th{background:#f8f9fa;padding:10px 12px;text-align:left;font-weight:600;color:#555;border-bottom:2px solid #eee}
.detail-table td{padding:10px 12px;border-bottom:1px solid #f5f5f5;color:#bbb}
/* Focus hover effects */
.hover-panel{transition:all 0.2s ease;cursor:default}
.hover-panel:hover{box-shadow:0 4px 16px rgba(139,26,26,0.08)!important;transform:translateY(-1px);border-left:3px solid #8b1a1a}
.food-block{transition:all 0.2s ease}
.food-block:hover{box-shadow:0 4px 16px rgba(0,0,0,0.1)!important;transform:translateY(-1px)}
.sub-tab{transition:all 0.15s ease}
.sub-tab:hover{background:#fef0f0!important;color:#8b1a1a!important}
.sidebar-item{transition:all 0.2s ease}
.sidebar-item:hover{background:rgba(255,255,255,0.08)!important;color:#fff!important;padding-left:22px}
.sidebar.collapsed .sidebar-item:hover{padding-left:12px!important}
.watchlist-row-item{transition:all 0.15s ease}
.watchlist-row-item:hover{background:#fef8f8!important;padding-left:22px}
.report-link{transition:color 0.15s ease}
.report-link:hover{color:#8b1a1a!important}
.index-card{transition:all 0.25s ease}
.index-card:hover{box-shadow:0 6px 20px rgba(0,0,0,0.12)!important;transform:translateY(-2px)}
.sector-table tbody tr{transition:all 0.15s ease}
.sector-table tbody tr:hover{background:#fef8f8!important}
.detail-table tbody tr{transition:all 0.15s ease}
.detail-table tbody tr:hover{background:#fef8f8!important;color:#555!important}
.score-bar-row{transition:all 0.15s ease}
.score-bar-row:hover{background:#fdf6f6;border-radius:4px;padding-left:4px}
.btn-add{transition:all 0.2s ease}
.btn-add:hover{transform:scale(1.05)}
.btn-remove{transition:all 0.15s ease}
.btn-remove:hover{color:#c41e3a!important;transform:scale(1.3)}
.dialog-result-item{transition:all 0.15s ease}
.dialog-result-item:hover{background:#fef0f0!important;padding-left:16px}
/* Chart container */
.chart-wrap { position:relative; height:300px; width:100%; }
.chart-wrap canvas { width:100% !important; height:100% !important; }

/* Market sentiment: one focused window per indicator */
.sentiment-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.sentiment-page-head h3{margin:0 0 4px;color:#242b35;font-size:18px}
.sentiment-page-head span{color:#8b94a1;font-size:12px}
.sentiment-refresh-button{border:1px solid #d8dde4;border-radius:8px;background:#fff;color:#475160;padding:8px 13px;font-size:12px;font-weight:600;cursor:pointer}
.sentiment-refresh-button:hover{border-color:#aeb6c2;background:#f7f8fa}
.sentiment-metric-tabs{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px;margin-bottom:14px}
.sentiment-metric-tab{min-width:0;border:1px solid #e0e4e9;border-radius:10px;background:#fff;padding:12px 13px;text-align:left;color:#646e7c;cursor:pointer;transition:border-color .16s,background .16s,box-shadow .16s}
.sentiment-metric-tab:hover{border-color:#c3cad3;background:#fafbfc}
.sentiment-metric-tab.active{border-color:#a64646;background:#fff8f8;box-shadow:0 0 0 2px rgba(166,70,70,.08)}
.sentiment-metric-tab span,.sentiment-metric-tab strong,.sentiment-metric-tab small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sentiment-metric-tab span{font-size:12px;font-weight:600;color:#596373}
.sentiment-metric-tab strong{margin-top:6px;color:#252d37;font-size:17px}
.sentiment-metric-tab small{margin-top:3px;color:#929aa5;font-size:11px}
.sentiment-metric-tab.active span,.sentiment-metric-tab.active strong{color:#922c32}
.sentiment-window{overflow:hidden;border:1px solid #dde2e8;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(30,40,55,.05)}
.sentiment-window-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid #e9ecf0}
.sentiment-window-kicker{display:block;margin-bottom:5px;color:#929aa5;font-size:11px}
.sentiment-window-head h3{margin:0;color:#252d37;font-size:17px}
.sentiment-window-current{display:flex;align-items:baseline;gap:9px;text-align:right}
.sentiment-window-current strong{color:#222a34;font-size:24px}
.sentiment-window-current span{color:#7f8996;font-size:12px}
.sentiment-window-actions{display:flex;align-items:center;gap:10px}
.chart-datalabel-btn{position:absolute;top:10px;right:10px;width:30px;height:30px;border:1px solid #ddd;border-radius:4px;background:#fff;color:#aaa;font-size:11px;font-weight:700;cursor:pointer;text-align:center;line-height:28px;padding:0;z-index:2;transition:0.15s}
.chart-datalabel-btn:hover{border-color:#8b1a1a;color:#8b1a1a}
.chart-datalabel-btn.active{background:#8b1a1a;color:#fff;border-color:#8b1a1a}
.sentiment-date-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:14px 22px;border-bottom:1px solid #e9ecf0;background:#fafbfc}
.sentiment-control-label{margin-right:5px;color:#4d5764;font-size:12px;font-weight:700}
.sentiment-date-controls label{display:flex;align-items:center;height:38px;border:1px solid #d9dee5;border-radius:7px;background:#fff;color:#67717e;font-size:12px;overflow:hidden}
.sentiment-date-controls input{width:170px;height:100%;border:0;border-left:1px solid #e2e5e9;border-radius:0;padding:0 16px;background:#fff;color:#2f3742;font:inherit}
.sentiment-quick-ranges{display:flex;align-items:center;border:1px solid #d9dee5;border-radius:7px;overflow:hidden;background:#fff}
.sentiment-quick-ranges button{height:32px;border:0;border-right:1px solid #e2e5e9;background:transparent;color:#5d6775;padding:0 10px;font-size:11px;cursor:pointer}
.sentiment-quick-ranges button:last-child{border-right:0}
.sentiment-quick-ranges button:hover{background:#eef1f5;color:#252d37}
.sentiment-quick-ranges button.active{background:#8b1a1a;color:#fff;font-weight:700}
.sentiment-chart-stage{position:relative;height:430px;padding:18px 22px 10px}
.sentiment-chart-stage canvas{width:100%!important;height:100%!important}
.sentiment-empty{grid-column:1/-1;padding:38px 20px;color:#8c95a2;text-align:center;font-size:13px}
.sentiment-chart-note{padding:12px 22px 16px;border-top:1px solid #e9ecf0;background:#fafbfc}
.sentiment-chart-note p{margin:0;color:#65707e;font-size:12px;line-height:1.8}
.sentiment-cursor-bar{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 22px;border-top:1px solid #e9ecf0;background:#fff}
.sentiment-cursor-arrow{width:32px;height:30px;border:1px solid #d9dee5;border-radius:7px;background:#fff;color:#5d6775;font-size:14px;line-height:1;cursor:pointer}
.sentiment-cursor-arrow:hover:not(:disabled){border-color:#aeb6c2;background:#f7f8fa;color:#252d37}
.sentiment-cursor-arrow:disabled{opacity:.4;cursor:not-allowed}
.sentiment-cursor-label{color:#4d5764;font-size:12px;min-height:18px;text-align:center}

/* ===== 7步分析（市场情绪风格：7图同页网格）===== */
.sevenstep-freq-control{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 22px;border-bottom:1px solid #e9ecf0;background:#fafbfc}
.sevenstep-freq-toggle{display:flex;align-items:center;border:1px solid #d9dee5;border-radius:7px;overflow:hidden;background:#fff}
.sevenstep-freq-toggle button{height:32px;border:0;border-right:1px solid #e2e5e9;background:transparent;color:#5d6775;padding:0 14px;font-size:11px;cursor:pointer}
.sevenstep-freq-toggle button:last-child{border-right:0}
.sevenstep-freq-toggle button:hover{background:#eef1f5;color:#252d37}
.sevenstep-freq-toggle button.active{background:#8b1a1a;color:#fff;font-weight:700}
.sevenstep-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px 22px}
.sevenstep-card{display:flex;flex-direction:column;background:#fff;border:1px solid #e9ecf0;border-radius:10px;overflow:hidden;box-shadow:0 1px 4px rgba(30,40,55,.04)}
.sevenstep-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid #e9ecf0;background:#fafbfc}
.sevenstep-card-head h4{margin:0;font-size:13px;color:#252d37;font-weight:600}
.sevenstep-card-stage{position:relative;height:240px;padding:10px 12px 4px}
.sevenstep-card-stage canvas{width:100%!important;height:100%!important}
.sevenstep-card-desc{padding:8px 14px 10px;border-top:1px solid #e9ecf0;background:#fafbfc;color:#65707e;font-size:11px;line-height:1.7}

body[data-theme="dark"] .sevenstep-freq-control{border-color:#363b42;background:#1d2024}
body[data-theme="dark"] .sevenstep-freq-toggle{border-color:#41474f;background:#262a2f;color:#abb2bc}
body[data-theme="dark"] .sevenstep-freq-toggle button{border-color:#41474f;color:#bac0c8}
body[data-theme="dark"] .sevenstep-freq-toggle button:hover{background:#343940;color:#fff}
body[data-theme="dark"] .sevenstep-freq-toggle button.active{background:#8b1a1a;color:#fff;font-weight:700}
body[data-theme="dark"] .sevenstep-card{border-color:#363b42;background:#212429;box-shadow:none}
body[data-theme="dark"] .sevenstep-card-head,body[data-theme="dark"] .sevenstep-card-desc{border-color:#363b42;background:#1d2024}
body[data-theme="dark"] .sevenstep-card-head h4{color:#eef0f3}
body[data-theme="dark"] .sevenstep-card-desc{color:#adb4be}

@media (max-width:1100px){
  .sevenstep-card-stage{height:210px}
}
@media (max-width:700px){
  .sevenstep-freq-control{padding:12px 16px}
  .sevenstep-grid{grid-template-columns:1fr;padding:12px 16px;gap:12px}
  .sevenstep-card-stage{height:200px}
}

body[data-theme="dark"] .sentiment-page-head h3{color:#eceff3}
body[data-theme="dark"] .sentiment-page-head span{color:#8f98a4}
body[data-theme="dark"] .sentiment-refresh-button{border-color:#40454c;background:#26292e;color:#d2d6dc}
body[data-theme="dark"] .sentiment-refresh-button:hover{border-color:#59616b;background:#2d3137}
body[data-theme="dark"] .sentiment-metric-tab{border-color:#363b42;background:#23262b;color:#b8bec7}
body[data-theme="dark"] .sentiment-metric-tab:hover{border-color:#4b525c;background:#292d33}
body[data-theme="dark"] .sentiment-metric-tab.active{border-color:#9f5156;background:#332628;box-shadow:0 0 0 2px rgba(173,85,91,.09)}
body[data-theme="dark"] .sentiment-metric-tab span{color:#adb4be}
body[data-theme="dark"] .sentiment-metric-tab strong{color:#eef0f3}
body[data-theme="dark"] .sentiment-metric-tab small{color:#878f9a}
body[data-theme="dark"] .sentiment-metric-tab.active span,body[data-theme="dark"] .sentiment-metric-tab.active strong{color:#ff969b}
body[data-theme="dark"] .sentiment-window{border-color:#363b42;background:#212429;box-shadow:none}
body[data-theme="dark"] .sentiment-window-head{border-color:#363b42}
body[data-theme="dark"] .sentiment-window-kicker{color:#87909b}
body[data-theme="dark"] .sentiment-window-head h3,body[data-theme="dark"] .sentiment-window-current strong{color:#eef0f3}
body[data-theme="dark"] .sentiment-window-current span{color:#a7aeb7}
body[data-theme="dark"] .sentiment-date-controls{border-color:#363b42;background:#1d2024}
body[data-theme="dark"] .sentiment-control-label{color:#d0d4da}
body[data-theme="dark"] .sentiment-date-controls label,body[data-theme="dark"] .sentiment-quick-ranges{border-color:#41474f;background:#262a2f;color:#abb2bc}
body[data-theme="dark"] .sentiment-date-controls input{border-color:#41474f;background:#262a2f;color:#e0e3e7}
body[data-theme="dark"] .sentiment-quick-ranges button{border-color:#41474f;color:#bac0c8}
body[data-theme="dark"] .sentiment-quick-ranges button:hover{background:#343940;color:#fff}
body[data-theme="dark"] .sentiment-quick-ranges button.active{background:#8b1a1a;color:#fff;font-weight:700}
body[data-theme="dark"] .chart-datalabel-btn{border-color:#4a4a4a;background:#2d2d2d;color:#aaa}
body[data-theme="dark"] .chart-datalabel-btn:hover{border-color:#c41e3a;color:#f0a0a0}
body[data-theme="dark"] .chart-datalabel-btn.active{background:#8b1a1a;color:#fff;border-color:#8b1a1a}
body[data-theme="dark"] .sentiment-chart-note{border-color:#363b42;background:#1d2024}
body[data-theme="dark"] .sentiment-chart-note p{color:#adb4be}
body[data-theme="dark"] .sentiment-empty{color:#929aa5}

@media (max-width:1100px){.sentiment-metric-tabs{grid-template-columns:repeat(3,minmax(130px,1fr))}.sentiment-chart-stage{height:380px}}
@media (max-width:700px){
  .sentiment-page-head{align-items:flex-start}.sentiment-page-head h3{font-size:16px}
  .sentiment-metric-tabs{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:4px}
  .sentiment-metric-tab{flex:0 0 132px;scroll-snap-align:start}
  .sentiment-window-head{padding:16px;align-items:center}.sentiment-window-current{display:block}.sentiment-window-current strong,.sentiment-window-current span{display:block}
  .sentiment-window-current strong{font-size:20px}.sentiment-date-controls{padding:12px 16px;align-items:stretch}
  .sentiment-control-label{flex:1 0 100%;margin:0}.sentiment-date-controls label{flex:1 1 150px}.sentiment-date-controls input{min-width:0;flex:1}
  .sentiment-quick-ranges{order:4;flex:1 0 100%}.sentiment-quick-ranges button{flex:1;padding:0 5px}
  .sentiment-chart-stage{height:320px;padding:14px 10px 8px}
}
/* Loading */
.loading{text-align:center;padding:40px;color:#999}
.spinner{display:inline-block;width:24px;height:24px;border:3px solid #eee;border-top-color:#8b1a1a;border-radius:50%;animation:spin 0.6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.report-summary-progress{color:#333;font-size:13px}
.report-summary-progress-head{display:flex;align-items:center;gap:11px}
.report-summary-progress-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;background:#fff3e8;border-radius:50%;animation:reportSummaryBreathe 1.8s ease-in-out infinite}
.report-summary-progress-phase{font-size:14px;font-weight:600;color:#8b1a1a;line-height:1.6}
.report-summary-progress-note{font-size:12px;color:#888;line-height:1.6}
.report-summary-progress-dots{display:inline-flex;gap:3px;margin-left:4px;vertical-align:2px}
.report-summary-progress-dots i{width:3px;height:3px;border-radius:50%;background:currentColor;animation:reportSummaryDot 1.2s infinite ease-in-out}
.report-summary-progress-dots i:nth-child(2){animation-delay:.16s}
.report-summary-progress-dots i:nth-child(3){animation-delay:.32s}
.report-summary-progress-track{height:4px;margin:13px 0 9px;overflow:hidden;border-radius:4px;background:#f1e7df}
.report-summary-progress-track span{display:block;width:34%;height:100%;border-radius:4px;background:linear-gradient(90deg,#d9824b,#8b1a1a);animation:reportSummaryTrack 1.6s ease-in-out infinite}
.report-summary-progress-meta{display:flex;justify-content:space-between;gap:14px;color:#888;font-size:12px;line-height:1.5}
@keyframes reportSummaryBreathe{0%,100%{transform:scale(.94);opacity:.82}50%{transform:scale(1);opacity:1}}
@keyframes reportSummaryDot{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
@keyframes reportSummaryTrack{0%{transform:translateX(-110%)}100%{transform:translateX(310%)}}
@media(max-width:640px){.report-summary-progress-meta{display:block}.report-summary-progress-meta span{display:block;margin-top:3px}}
@media(prefers-reduced-motion:reduce){.report-summary-progress-icon,.report-summary-progress-dots i,.report-summary-progress-track span{animation-duration:4s}}
/* Industry tabs */
.ind-tab-bar{display:flex;gap:0;margin-bottom:0;border-bottom:2px solid #e8e8e8}
.ind-tab-item{padding:10px 22px;cursor:pointer;font-size:14px;color:#888;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all 0.15s}
.ind-tab-item:hover{color:#333}
.ind-tab-item.active{color:#8b1a1a;font-weight:600;border-bottom-color:#8b1a1a}
/* Screen dims */
.screen-dim-row{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.screen-dim-row label.dim-label{width:70px;font-size:13px;color:#333;font-weight:500}
.screen-dim-row input[type=range]{flex:1;max-width:200px;accent-color:#8b1a1a}
.screen-dim-row .dim-val{width:36px;text-align:center;font-size:13px;font-weight:600;color:#8b1a1a}
.screen-opt{display:inline-flex;align-items:center;gap:6px;margin-right:16px;font-size:13px;cursor:pointer}
.screen-result-card{background:#fff;border-radius:10px;padding:16px;box-shadow:0 1px 4px rgba(0,0,0,0.06);margin-bottom:10px;display:flex;justify-content:space-between;align-items:center;transition:box-shadow 0.15s}
.screen-result-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.screen-preset{display:inline-block;padding:6px 14px;border:1px solid #d29922;border-radius:14px;font-size:12px;color:#d29922;cursor:pointer;margin-right:8px;transition:all 0.15s}
.screen-preset:hover{background:#d29922;color:#fff}
/* Settings page */
.settings-nav-item.active{background:#e8f5e9;color:#07c160!important;font-weight:600}
.settings-nav-item:hover{background:#f5f5f5}
.sidebar-user-entry{display:block;width:100%;padding:12px 16px;border:0;border-top:1px solid rgba(255,255,255,.08);background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.sidebar-user-entry:hover{background:rgba(255,255,255,.05)}
.sidebar-user-entry:focus-visible{outline:2px solid rgba(242,139,34,.85);outline-offset:-3px}
.account-settings-panel,.appearance-settings-panel,.model-settings-panel{box-sizing:border-box;border:1px solid #eceff3;border-radius:14px;background:#fff;box-shadow:0 4px 18px rgba(28,39,56,.05)}
.account-settings-panel{padding:28px 32px}.account-profile-shell{width:100%;max-width:none;margin:0}.account-profile-card{padding:18px;border:1px solid #e5e9ef;border-radius:16px;background:linear-gradient(145deg,#fff,#f8fafc);box-shadow:0 10px 30px rgba(23,31,42,.05)}.account-profile-header{display:flex;align-items:center;gap:14px}.account-avatar{display:flex;align-items:center;justify-content:center;width:56px;height:56px;flex:0 0 56px;border-radius:16px;background:linear-gradient(135deg,#07c160,#07944c);box-shadow:0 8px 20px rgba(7,193,96,.16);color:#fff;font-size:24px;font-weight:700}.account-profile-copy{min-width:0}.account-profile-name{color:#1e2732;font-size:18px;font-weight:700;line-height:1.35}.account-profile-phone{margin-top:3px;color:#8b95a3;font-size:12px}.account-membership-card{margin-top:15px;padding:10px 12px;border:1px solid #e6e9ed;border-radius:10px;background:#f7f8fa;text-align:left;color:#596273;font-size:12px;line-height:1.5}.account-membership-card.is-paid{border-color:#bcebd0;background:#f1fbf5;color:#16764a}.account-membership-card.is-trial{border-color:#fed7aa;background:#fff8ef;color:#b45309}.account-membership-card.is-expired{border-color:#f1c9c9;background:#fff6f6;color:#9f2525}.account-membership-action{display:inline-block;vertical-align:middle;margin:0 0 0 10px;padding:5px 11px;border:0;border-radius:7px;background:#8b1a1a;color:#fff;font:600 12px/1.4 inherit;cursor:pointer;white-space:nowrap}.account-membership-testing{display:inline-block;margin-left:10px;padding:5px 11px;border-radius:7px;background:#e6e8eb;color:#8b929b;font-weight:600}.account-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.account-setting-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:76px;box-sizing:border-box;padding:13px 14px;border:1px solid #e5e9ef;border-radius:13px;background:#fff;color:#2c3440;text-align:left;font:inherit}.account-action-row{cursor:pointer}.account-action-row:hover{border-color:#d4d9e0;background:#fafbfc;box-shadow:0 6px 18px rgba(23,31,42,.05)}.account-setting-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:11px;background:#f2f4f7;color:#596273}.account-setting-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.account-setting-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.account-info-label{color:#8b95a3;font-size:11px;font-weight:500;line-height:1.2}.account-info-value{min-width:0;color:#29313d;font-size:14px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}.account-info-arrow{color:#b0b7c0;font-size:17px;line-height:1}.account-session-actions{display:flex;justify-content:center;margin-top:18px}.account-logout-button{padding:10px 34px;border:1px solid #efc7c9;border-radius:22px;background:transparent;color:#b4232c;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}.account-logout-button:hover{background:#fff5f5;border-color:#e8a8aa}#auth-logged-out{max-width:520px;margin:0 auto}
.appearance-settings-panel{padding:28px}.settings-section-heading h3,.model-settings-header h3{margin:0;color:#252b35;font-size:20px;line-height:1.35}.settings-section-heading p,.model-settings-header p{margin:7px 0 0;color:#8b929d;font-size:13px;line-height:1.6}.appearance-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:22px}.appearance-theme-card{position:relative;display:flex;align-items:center;gap:15px;min-height:96px;padding:16px;border:1px solid #dfe3e8;border-radius:12px;background:#fff;color:#252b35;text-align:left;cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.appearance-theme-card:hover{border-color:#aeb7c3;transform:translateY(-1px)}.appearance-theme-card.active{border-color:#07a954;box-shadow:0 0 0 3px rgba(7,169,84,.1)}.appearance-theme-preview{display:flex;flex-direction:column;gap:5px;width:78px;height:56px;box-sizing:border-box;padding:10px;border:1px solid #dde2e8;border-radius:8px;background:#f7f8fa}.appearance-theme-preview.dark{border-color:#414854;background:#20242b}.appearance-theme-preview i{display:block;height:5px;border-radius:3px;background:#cdd3db}.appearance-theme-preview i:nth-child(2){width:76%}.appearance-theme-preview i:nth-child(3){width:48%;background:#07a954}.appearance-theme-preview.dark i{background:#626c79}.appearance-theme-preview.dark i:nth-child(3){background:#40c77f}.appearance-theme-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:5px}.appearance-theme-copy strong{font-size:14px}.appearance-theme-copy small{color:#8b929d;font-size:11px;line-height:1.45}.appearance-theme-check{display:none;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#07a954;color:#fff;font-size:11px;font-weight:700}.appearance-theme-card.active .appearance-theme-check{display:flex}
.model-settings-panel{padding:30px}.model-settings-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:22px}.model-config-list{display:flex;flex-direction:column;gap:10px}.model-config-empty{display:flex;align-items:center;flex-direction:column;padding:34px 20px;border:1px dashed #d9dee5;border-radius:12px;background:#fafbfc;color:#8c95a2;text-align:center}.model-config-empty>span{font-size:24px}.model-config-empty strong{margin-top:8px;color:#535d6b;font-size:14px}.model-config-empty p{margin:5px 0 0;font-size:12px}.model-config-card{display:flex;align-items:center;gap:14px;padding:15px 16px;border:1px solid #e1e5ea;border-radius:12px;background:#fff;transition:border-color .16s,box-shadow .16s}.model-config-card.active{border-color:#9ad9b8;box-shadow:0 0 0 3px rgba(7,169,84,.07)}.model-config-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 44px;border-radius:11px;background:color-mix(in srgb,var(--model-color) 10%,#fff);color:var(--model-color);font-size:21px}.model-config-copy{min-width:0;flex:1}.model-config-title{display:flex;align-items:center;gap:8px}.model-config-title strong{min-width:0;color:#262d37;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-config-title span{padding:2px 7px;border-radius:999px;background:#e9f8f0;color:#16824a;font-size:10px;font-weight:700}.model-config-meta{display:flex;align-items:center;gap:7px 12px;flex-wrap:wrap;margin-top:5px;color:#8c95a2;font-size:11px}.model-config-meta .secure{color:#4e8767}.model-config-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.model-config-actions button{padding:6px 10px;border:1px solid #dfe3e8;border-radius:7px;background:#fff;color:#596273;font-size:11px;cursor:pointer}.model-config-actions button:hover{border-color:#aeb7c3;background:#f7f8fa}.model-config-actions button.danger{color:#b4232c}.model-add-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 18px}.model-add-actions button{min-height:52px;border:1px dashed #cfd5dd;border-radius:11px;background:#fff;color:#384250;font-size:13px;cursor:pointer}.model-add-actions button:hover{border-color:#7c8795;background:#fafbfc}.model-add-actions button span{margin-right:5px;font-size:18px}.model-config-message{margin-top:10px;color:#16824a;font-size:12px;text-align:center}
.model-dialog-overlay{position:fixed;z-index:10000;inset:0;align-items:center;justify-content:center;padding:20px;background:rgba(17,24,39,.48);overflow:auto}.model-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100vh - 40px);box-sizing:border-box;padding:24px;border:1px solid #e3e7ec;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.25);overflow:auto}.model-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.model-dialog-header h3{margin:0;color:#242b35;font-size:19px}.model-dialog-header p{margin:5px 0 0;color:#8b929d;font-size:12px}.model-dialog-header>button{width:30px;height:30px;border:0;border-radius:8px;background:#f3f4f6;color:#737b87;font-size:20px;cursor:pointer}.model-field-label,.model-field>span,.model-field-grid label>span{display:block;margin:0 0 7px;color:#596273;font-size:12px;font-weight:600}.model-provider-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:18px}.model-provider-option{display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:8px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;color:#4b5563;cursor:pointer}.model-provider-option.selected,.model-option.selected{border-color:#07a954;background:#f0faf5;color:#126b40}.model-provider-option span{font-size:17px}.model-provider-option strong{font-size:11px}.model-option-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:18px}.model-option{min-height:42px;padding:9px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;color:#4b5563;font-size:11px;cursor:pointer}.model-field,.model-field-grid label{display:block;margin-bottom:15px}.model-field-grid{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px}.model-field input,.model-field textarea,.model-field select,.model-field-grid input,.model-field-grid select{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;color:#262d37;font:13px/1.45 inherit;outline:none}.model-field textarea{resize:vertical;min-height:68px}.model-field input:focus,.model-field textarea:focus,.model-field-grid input:focus,.model-field-grid select:focus{border-color:#07a954;box-shadow:0 0 0 3px rgba(7,169,84,.09)}.model-field small{display:block;margin-top:6px;color:#939ba7;font-size:10px;line-height:1.45}.model-dialog-error{margin:2px 0 14px;padding:9px 11px;border-radius:8px;background:#fff2f0;color:#b4232c;font-size:12px}.model-dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:5px}.model-dialog-actions button{min-width:82px;padding:9px 15px;border-radius:8px;font-size:13px;cursor:pointer}.model-dialog-actions .secondary{border:1px solid #dfe3e8;background:#fff;color:#4b5563}.model-dialog-actions .primary{border:1px solid #20252d;background:#20252d;color:#fff}.model-dialog-actions button:disabled{opacity:.55;cursor:wait}
.settings-layout-shell{width:100%;max-width:none;margin:0;align-items:flex-start}.settings-side-nav-card{width:190px!important;box-sizing:border-box;margin-left:0;padding:10px;border:1px solid #e8ebef;border-radius:14px;background:#fff;box-shadow:0 4px 18px rgba(28,39,56,.04);position:sticky;top:0}.settings-nav-item{display:flex;align-items:center;min-height:42px;box-sizing:border-box;padding:10px 12px!important;margin-bottom:3px!important;border-radius:9px!important;color:#596273!important}.settings-nav-item:last-child{margin-bottom:0!important}.settings-nav-item.active{background:#eef8f2;color:#16824a!important}.settings-panel-surface{box-sizing:border-box;width:100%;min-height:260px;padding:28px!important;border:1px solid #e8ebef!important;border-radius:14px!important;background:#fff!important;box-shadow:0 4px 18px rgba(28,39,56,.05)!important}.font-size-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:22px}.font-size-card{display:flex;min-height:116px;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:15px;border:1px solid #e1e5ea;border-radius:12px;background:#fff;color:#3f4854;font:inherit;cursor:pointer}.font-size-card:hover{border-color:#aeb7c3;background:#fafbfc}.font-size-card strong{font-size:13px}.font-size-card small{color:#929aa5;font-size:10px}.font-size-sample{color:#596273;font-weight:650;line-height:1}.font-size-sample.small{font-size:17px}.font-size-sample.medium{font-size:22px}.font-size-sample.large{font-size:28px}.font-zoom-card{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(260px,1.2fr);align-items:center;gap:24px;margin-top:16px;padding:18px;border:1px solid #e5e9ef;border-radius:12px;background:#fafbfc}.font-zoom-card>div:first-child{display:flex;flex-direction:column;gap:5px}.font-zoom-card strong{color:#343c47;font-size:13px}.font-zoom-card small{color:#929aa5;font-size:10px}.font-zoom-control{display:grid;grid-template-columns:auto minmax(120px,1fr) auto 48px;align-items:center;gap:10px}.font-zoom-control output{color:#16824a;font-size:12px;font-weight:700;text-align:right}.about-product-card{display:flex;align-items:center;gap:14px;margin-top:22px;padding:17px;border:1px solid #e5e9ef;border-radius:13px;background:#fafbfc}.about-product-mark{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:13px;background:#172033;color:#f5a23a;font-size:20px;font-weight:700}.about-product-card>div:last-child{display:flex;flex-direction:column;gap:4px}.about-product-card strong{color:#2d3540;font-size:15px}.about-product-card span{color:#929aa5;font-size:11px}.about-description{margin-top:14px;padding:17px;border:1px solid #e5e9ef;border-radius:13px;color:#596273;font-size:12px;line-height:1.75}.about-description p{margin:0}.about-description p+p{margin-top:8px;color:#8b5b37}.about-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.about-action-grid button{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;padding:14px;border:1px solid #e5e9ef;border-radius:12px;background:#fff;color:#596273;text-align:left;cursor:pointer}.about-action-grid button:hover{border-color:#cbd2da;background:#fafbfc}.about-action-grid button>span{display:flex;flex-direction:column;gap:3px}.about-action-grid strong{color:#343c47;font-size:12px}.about-action-grid small{color:#929aa5;font-size:10px}.about-action-grid b{color:#b0b7c0;font-size:18px}.about-update-bar{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;box-sizing:border-box;margin-top:14px;padding:15px 16px;border:1px solid #e5e9ef;border-radius:12px;background:#fafbfc;color:#596273;text-align:left;cursor:pointer}.about-update-bar:hover{border-color:#cbd2da;background:#f0faf5}.about-update-bar>svg{color:#16824a}.about-update-copy{display:flex;flex-direction:column;gap:3px}.about-update-copy strong{color:#343c47;font-size:13px}.about-update-copy small{color:#16824a;font-size:11px}.about-update-arrow{color:#b0b7c0;font-size:18px}.evaluation-settings-panel>div:first-child{margin-bottom:22px!important}.evaluation-settings-panel section{border-color:#e5e9ef!important;border-radius:12px!important;background:#fafbfc}.evaluation-settings-panel #model-eval-history,.evaluation-settings-panel #model-eval-details-body{border-color:#e5e9ef!important;border-radius:12px!important}.admin-subtab{display:inline-flex;align-items:center;gap:7px}.admin-settings-panel>div:first-child{border-color:#e8ebef!important}
.font-size-card.active{border-color:#79cda3;background:#f1faf5;box-shadow:0 0 0 3px rgba(7,169,84,.08)}
#settings-layout.admin-users-expanded{max-width:none!important;height:100%;min-height:0}
#settings-layout.admin-users-expanded #settings-side-nav{display:none}
#settings-layout.admin-users-expanded #settings-content{width:100%;display:flex;min-width:0}
#settings-panel-admin-users.admin-users-expanded{width:100%;min-height:100%;display:flex!important;flex-direction:column;padding:26px 30px}
#admin-users-table-wrap{flex:1;min-height:360px;overflow:auto;border:1px solid #edf0f3;border-radius:10px}
@media(max-width:720px){#settings-panel-admin-users.admin-users-expanded{padding:18px 14px}#admin-users-table-wrap{min-height:300px}}
/* Dark mode */
body[data-theme="dark"] { background:#1a1a1a; color:#e0e0e0; }
body[data-theme="dark"] .sidebar { background:#151515; }
body[data-theme="dark"] .sidebar-item { color:#999; }
body[data-theme="dark"] .sidebar-item:hover { color:#e0e0e0; background:rgba(255,255,255,0.05); }
body[data-theme="dark"] .sidebar-item.active { color:#07c160; background:rgba(7,193,96,0.1); }
body[data-theme="dark"] .sidebar.collapsed .sidebar-item[data-tooltip]:hover::after { background:#151515; color:#e0e0e0; }
body[data-theme="dark"] .sub-tab { color:#999; }
body[data-theme="dark"] .sub-tab.active { color:#07c160; background:rgba(7,193,96,0.1); }
body[data-theme="dark"] .kpi-card { background:#252525; }
body[data-theme="dark"] table.sector-table th { background:#2d2d2d; color:#ccc; }
body[data-theme="dark"] table.sector-table td { color:#bbb; border-color:#333; }
body[data-theme="dark"] .chain-card { background:#252525!important; border-color:#3f3f3f!important; color:#aaa!important; }
body[data-theme="dark"] .chain-card:hover { background:#2f2f2f!important; }
body[data-theme="dark"] input, body[data-theme="dark"] select { background:#2d2d2d; color:#e0e0e0; border-color:#444; }
body[data-theme="dark"] #main-content { background:#1a1a1a; }
body[data-theme="dark"] .settings-nav-item:hover { background:rgba(255,255,255,0.05); }
body[data-theme="dark"] .settings-nav-item.active { background:rgba(7,193,96,0.15); }
body[data-theme="dark"] .sidebar-toggle { color:#999; border-color:#444; }
body[data-theme="dark"] .sidebar-toggle:hover { color:#e0e0e0; background:#333; border-color:#555; }
body[data-theme="dark"] .sidebar-brand-toggle { color:#8f98a7; border-color:transparent; }
body[data-theme="dark"] .sidebar-brand-toggle:hover { color:#fff; background:#252525; border-color:rgba(255,255,255,.12); }
body[data-theme="dark"] .sidebar.collapsed .sidebar-brand-toggle { background:#151515; }
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .index-card,
body[data-theme="dark"] .watchlist-panel,
body[data-theme="dark"] .sub-tabs,
body[data-theme="dark"] .sector-table-wrap,
body[data-theme="dark"] .dialog-box,
body[data-theme="dark"] .moat-card,
body[data-theme="dark"] .screen-result-card { background:#252525; color:#e0e0e0; }
body[data-theme="dark"] .index-card.up,
body[data-theme="dark"] .index-card.down { background:#2a2a2a; }
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .watchlist-header,
body[data-theme="dark"] .watchlist-row-item,
body[data-theme="dark"] .wl-header-row { border-color:#3a3a3a; }
body[data-theme="dark"] .topbar h2,
body[data-theme="dark"] .index-card .idx-price,
body[data-theme="dark"] .watchlist-header h3,
body[data-theme="dark"] .wl-name,
body[data-theme="dark"] .wl-price,
body[data-theme="dark"] .wl-mv,
body[data-theme="dark"] .wl-pe,
body[data-theme="dark"] .wl-pb,
body[data-theme="dark"] .wl-valuation-percentile,
body[data-theme="dark"] .wl-dividend,
body[data-theme="dark"] .dialog-box h3 { color:#f0f0f5; }
body[data-theme="dark"] .app-dialog-box{background:#242424;border:1px solid #3b3b3b;box-shadow:0 20px 60px rgba(0,0,0,.5)}
body[data-theme="dark"] .app-dialog-box p{color:#c7cbd1}
body[data-theme="dark"] .app-dialog-buttons .btn-cancel{border-color:#4a4a4a;background:#2d2d2d;color:#d4d7dc}
body[data-theme="dark"] .app-dialog-confirm{border-color:#e6e6e6;background:#e6e6e6;color:#171717}
/* Dark mode — skill detail modal */
body[data-theme="dark"] #skillDetailName { color:#f0f0f5 !important; }
body[data-theme="dark"] #skillDetailDesc { color:#bbb !important; }
body[data-theme="dark"] #skillDetailCat { color:#d97706 !important; }
body[data-theme="dark"] #skillDetailFavBtn { background:#2a2a2a; border-color:#444; color:#bbb; }
body[data-theme="dark"] #skillDetailFavBtn.fav-active { background:#3a1a1a; border-color:#6b2020; color:#e88; }
#skill-detail-box{--skill-detail-text-size:15px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif}
#skillDetailDesc{font-size:var(--skill-detail-text-size);font-weight:400;line-height:1.8;letter-spacing:0;color:#555}
.skill-import-open-btn{margin-left:auto;border:1px solid #d7dce5;background:#fff;color:#344054;border-radius:8px;padding:7px 14px;font-size:12px;font-weight:600;cursor:pointer}
.skill-import-open-btn:hover{border-color:#8b1a1a;color:#8b1a1a;background:#fff8f8}
.skill-import-first-card{width:100%;min-height:112px;display:flex;align-items:flex-start;gap:11px;padding:14px;text-align:left;font:inherit;color:#24272d}.skill-import-first-card:hover{border-color:#9ab9ff;background:#f8faff;box-shadow:0 3px 12px rgba(44,91,180,.08)}.skill-import-card-icon{flex:0 0 auto;width:34px;height:34px;border-radius:9px;background:#edf3ff;color:#316ff3;display:flex;align-items:center;justify-content:center;font-size:22px;line-height:1}.skill-import-card-copy{display:flex;min-width:0;flex-direction:column;gap:8px}.skill-import-card-copy small{color:#77849a;font-size:11px;line-height:1.6;font-weight:400}
.skill-toggle-card,.skill-plaza-card{height:126px;min-height:126px;padding:14px 14px 12px;border:1px solid #e2e5ea;border-radius:10px;transition:border-color .15s,box-shadow .15s;cursor:pointer;background:#fff;box-sizing:border-box}
.skill-personal-card,.skill-plaza-card,.skill-import-first-card{height:148px;min-height:148px}
.skill-toggle-card:hover,.skill-plaza-card:hover{border-color:#9ab9ff;box-shadow:0 3px 12px rgba(44,91,180,.08)}
.skill-card-title{font-size:14px;font-weight:650;color:#24272d;line-height:1.45}
.skill-private-tag{display:inline-block;margin-left:7px;padding:1px 5px;border-radius:4px;background:#fff0e6;color:#ad5d16;font-size:10px;font-weight:600;vertical-align:1px}
.skill-plaza-tag{display:inline-block;margin-left:7px;padding:1px 5px;border-radius:4px;background:#edf4ff;color:#3478d4;font-size:10px;font-weight:600;vertical-align:1px}
.skill-enable-switch{position:relative;flex:0 0 auto;width:40px;height:23px;padding:0;border:0;border-radius:999px;background:#c8ced8;cursor:pointer;transition:background .18s}
.skill-enable-switch span{position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.22);transition:transform .18s}
.skill-enable-switch.on{background:#4f86f7}.skill-enable-switch.on span{transform:translateX(17px)}
.skill-card-controls{display:flex;align-items:center;gap:8px;position:relative}.skill-card-menu-wrap{position:relative}.skill-card-more{width:26px;height:20px;padding:0;border:0;background:transparent;color:#8b919c;font-size:12px;font-weight:700;line-height:1;letter-spacing:.5px;cursor:pointer;border-radius:5px}.skill-card-more:hover{background:#f1f2f4;color:#686e78}.skill-card-menu{display:none;position:absolute;z-index:40;right:0;top:30px;width:174px;padding:7px;background:#fff;border:1px solid #e5e8ee;border-radius:9px;box-shadow:0 10px 28px rgba(24,39,75,.18)}.skill-card-menu.show{display:block}.skill-card-menu button{width:100%;display:flex;align-items:center;gap:11px;padding:10px 9px;border:0;border-radius:6px;background:transparent;color:#20242b;font-size:13px;text-align:left;cursor:pointer;white-space:nowrap}.skill-card-menu button:hover{background:#f3f6fb}.skill-card-menu button span{width:20px;height:20px;color:#52606f;text-align:center}.skill-card-menu button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.skill-card-menu button.danger{color:#b42318}.skill-card-menu button.danger span{color:#b42318}
.skill-personal-card{display:flex;flex-direction:column}.skill-card-footer,.skill-plaza-footer{display:flex;align-items:center;width:100%;min-height:27px;box-sizing:border-box;margin-top:auto;padding-top:9px;border-top:1px solid #eef0f3}.skill-card-footer{justify-content:flex-end;gap:10px}.skill-card-footer .skill-card-menu{top:28px;bottom:auto}
.skill-card-action{border:0;background:transparent;color:#3468d4;font-size:11px;font-weight:600;cursor:pointer;padding:2px 0}
.skill-card-action:hover{text-decoration:underline}.skill-card-action.muted{color:#777}
.skill-plaza-card{display:flex;flex-direction:column}.skill-plaza-card-body{display:flex;justify-content:space-between;align-items:flex-start;gap:6px}.skill-card-description-clamp{margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.skill-plaza-footer{justify-content:flex-start}.skill-plaza-owner{display:flex;align-items:center;gap:5px;min-width:0;color:#7b8190;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-plaza-owner i{font-size:11px;font-style:normal;filter:grayscale(1);opacity:.72}.skill-card-main{min-height:58px}
.skill-import-box{width:min(760px,calc(100vw - 32px));max-width:none;padding:26px}
.skill-import-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.skill-import-title-row h3{margin:0;font-size:20px}.skill-import-title-row button{border:0;background:none;color:#777;font-size:20px;cursor:pointer}
.skill-import-drop{min-height:250px;border:1.5px dashed #6291f8;border-radius:10px;background:#f4f8ff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;cursor:pointer;transition:.15s}
.skill-import-drop.dragging,.skill-import-drop:hover{border-color:#2f6ff2;background:#edf4ff}.skill-import-icon{width:66px;height:54px;border-radius:9px;background:#fff;color:#6a4ce0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;box-shadow:0 5px 18px rgba(62,103,190,.13);transform:rotate(-3deg);margin-bottom:8px}
.skill-import-drop strong{font-size:16px;color:#25272c}.skill-import-drop span{font-size:12px;color:#858b98}.skill-import-select{margin-top:10px;border:0;border-radius:7px;background:#316ff3;color:#fff;padding:9px 20px;font-size:13px;font-weight:600;cursor:pointer}
.skill-import-notes{margin-top:14px;padding:14px 16px;border:1px solid #eceef2;border-radius:8px;background:#fafafa;color:#626875;font-size:12px}.skill-import-notes strong{color:#333}.skill-import-notes ul{margin:8px 0 0;padding-left:18px;line-height:1.8}
.skill-import-files{margin-top:10px;max-height:100px;overflow:auto;color:#8b909b;font-size:12px}.skill-import-files>div{display:flex;justify-content:space-between;gap:12px;padding:6px 8px;border-bottom:1px solid #eee;color:#444}.skill-import-files small{color:#999}
.skill-import-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.skill-import-actions button{border:0;border-radius:7px;padding:9px 18px;cursor:pointer}.skill-import-actions .btn-cancel{background:#f1f2f4;color:#555}.skill-import-actions #skillImportSubmit{background:#316ff3;color:#fff}.skill-import-actions #skillImportSubmit:disabled{opacity:.45;cursor:not-allowed}
.skill-metadata-box{width:min(680px,calc(100vw - 32px));padding:30px 32px}.skill-metadata-box .skill-import-title-row{margin-bottom:24px}.skill-metadata-box .skill-import-title-row h3{font-size:23px}.skill-metadata-field{display:flex;flex-direction:column;gap:9px;margin-top:20px;color:#20242b;font-size:16px;font-weight:500}.skill-metadata-field>span:first-child b{margin-right:4px;color:#f04438;font-weight:500}.skill-metadata-control{position:relative;display:block}.skill-metadata-field input,.skill-metadata-field textarea{box-sizing:border-box;width:100%;border:1px solid transparent;border-radius:8px;padding:13px 58px 13px 14px;background:#f4f5f7;color:#20242b;font:inherit;font-size:15px;font-weight:400;line-height:1.65;outline:none;resize:none}.skill-metadata-field textarea{padding-right:16px;padding-bottom:36px;min-height:210px}.skill-metadata-field input:focus,.skill-metadata-field textarea:focus{border-color:#5b8ff9;box-shadow:0 0 0 3px rgba(68,123,239,.12)}.skill-metadata-control small{position:absolute;right:14px;bottom:12px;color:#a4aab4;font-size:12px;font-weight:400}.skill-metadata-field:not(:last-of-type) .skill-metadata-control small{top:50%;bottom:auto;transform:translateY(-50%)}.skill-metadata-box .skill-import-actions{margin-top:28px}.skill-metadata-box .skill-import-actions button{min-width:142px;padding:12px 24px;font-size:16px}.skill-metadata-box #skillMetadataSubmit{background:#316ff3;color:#fff}.skill-metadata-box #skillMetadataSubmit:disabled{opacity:.5}
body[data-theme="dark"] .skill-toggle-card,body[data-theme="dark"] .skill-plaza-card,body[data-theme="dark"] .skill-import-open-btn{background:#1d1f24;border-color:#393d46;color:#ddd}body[data-theme="dark"] .skill-import-first-card{background:#202735;border-color:#46689e;color:#8fb7ff}body[data-theme="dark"] .skill-card-title{color:#eee}body[data-theme="dark"] .skill-plaza-footer{border-top-color:#343942}body[data-theme="dark"] .skill-import-drop{background:#202735}body[data-theme="dark"] .skill-import-notes{background:#202126;border-color:#3b3e46;color:#bbb}
body[data-theme="dark"] .skill-card-menu{background:#25282e;border-color:#3e424b}body[data-theme="dark"] .skill-card-menu button{color:#e5e7eb}body[data-theme="dark"] .skill-card-menu button:hover{background:#31353d}body[data-theme="dark"] .skill-metadata-box{background:#202126}body[data-theme="dark"] .skill-metadata-field{color:#ddd}body[data-theme="dark"] .skill-metadata-field input,body[data-theme="dark"] .skill-metadata-field textarea{background:#191b20;border-color:#3c414b;color:#eee}
@media(max-width:760px){#skillTopTabs{flex-wrap:wrap}.skill-import-open-btn{width:100%;margin:6px 0 0}.skill-import-box{padding:18px!important}.skill-import-drop{min-height:220px}.skill-toggle-card{height:126px;min-height:126px}.skill-personal-card,.skill-plaza-card,.skill-import-first-card{height:148px;min-height:148px}}
body[data-theme="dark"] .wl-header-row,
body[data-theme="dark"] .watchlist-row-item:hover { background:#2f2f2f!important; color:#e4e6eb!important; }
body[data-theme="dark"] .company-information-section{border-color:#3b424c;background:#22262c;box-shadow:none}
body[data-theme="dark"] .company-information-tab{background:#24272c;border-color:#3b424c;color:#aeb6c2}
body[data-theme="dark"] .company-information-tab:hover{background:#2b3037;border-color:#505966;color:#eef1f5}
body[data-theme="dark"] .company-information-tab.active{background:#332426;border-color:#9d4449;color:#ff8a91}
body[data-theme="dark"] .company-information-count{background:#363b43;color:#c4cad3}
body[data-theme="dark"] .company-information-tab.active .company-information-count{background:#9d4449;color:#fff}
body[data-theme="dark"] .company-information-table th{border-color:#3b424c;color:#aeb6c2}
body[data-theme="dark"] .company-information-table td{border-color:#343a43;color:#d7dce3}
body[data-theme="dark"] .company-information-table tbody tr:hover{background:#2b3037}
body[data-theme="dark"] .company-information-link{color:#d7dce3}
body[data-theme="dark"] .company-information-link:hover{color:#ff8a91}
body[data-theme="dark"] .company-information-category{background:#353a42;color:#c4cad3}
body[data-theme="dark"] .company-question-card{background:#24272c;border-color:#3b424c}
body[data-theme="dark"] .company-question-text,body[data-theme="dark"] .company-answer-text{color:#d7dce3}
body[data-theme="dark"] .company-answer-text{border-color:#3b424c}
body[data-theme="dark"] .company-information-empty{border-color:#414853;background:#272c33;color:#aeb6c2}
body[data-theme="dark"] .sub-tab:not(.active):hover { background:#2d333b!important; color:#e4e8ed!important; }
body[data-theme="dark"] .sector-table tbody tr:hover,
body[data-theme="dark"] .detail-table tbody tr:hover,
body[data-theme="dark"] .score-bar-row:hover { background:#2b3037!important; color:#d7dce3!important; }

/* Dark mode — settings panels & tables */
body[data-theme="dark"] #settings-panel-account,
body[data-theme="dark"] #settings-panel-admin-users,
body[data-theme="dark"] #settings-panel-appearance,
body[data-theme="dark"] #settings-panel-font,
body[data-theme="dark"] #settings-panel-model,
body[data-theme="dark"] #settings-panel-model-evaluation,
body[data-theme="dark"] #settings-panel-about { background:#252525; color:#e0e0e0; box-shadow:0 1px 4px rgba(0,0,0,0.3); }
body[data-theme="dark"] .settings-nav-item { color:#bbb !important; }
body[data-theme="dark"] .settings-nav-item.active { color:#07c160 !important; }
body[data-theme="dark"] #settings-panel-admin-users h3,
body[data-theme="dark"] #settings-panel-account h3,
body[data-theme="dark"] #settings-panel-appearance h3,
body[data-theme="dark"] #settings-panel-font h3,
body[data-theme="dark"] #settings-panel-model h3,
body[data-theme="dark"] #settings-panel-model-evaluation h3,
body[data-theme="dark"] #settings-panel-about h3 { color:#f0f0f5; }
body[data-theme="dark"] #settings-panel-model-evaluation section,
body[data-theme="dark"] #model-eval-history { border-color:#444 !important;background:#2d2d2d !important; }
@media(max-width:760px){#settings-panel-model-evaluation>div[style*="grid-template-columns"]{grid-template-columns:1fr!important}#model-eval-cases{grid-template-columns:1fr!important}}
body[data-theme="dark"] #settings-panel-account div,
body[data-theme="dark"] #settings-panel-admin-users div,
body[data-theme="dark"] #settings-panel-account span,
body[data-theme="dark"] #settings-panel-admin-users span { color:#ccc; }
body[data-theme="dark"] #settings-panel-account h3 ~ div > span,
body[data-theme="dark"] #settings-panel-admin-users div[style] { color:#ccc !important; }
/* Settings list items */
body[data-theme="dark"] #settings-panel-account [style*="border-bottom:1px solid #f5f5f5"] { border-color:#3a3a3a !important; }
body[data-theme="dark"] #settings-panel-account [style*="border-bottom:1px solid #f5f5f5"] span:first-child { color:#ccc !important; }
/* User mgmt stats cards */
body[data-theme="dark"] #admin-count-registered,
body[data-theme="dark"] #admin-count-active,
body[data-theme="dark"] #admin-count-login { color:#f0f0f5 !important; }
body[data-theme="dark"] #settings-panel-admin-users [style*="background:#f7f8fa"] { background:#2d2d2d !important; }
body[data-theme="dark"] #settings-panel-admin-users [style*="background:#f1faf5"] { background:#1d2d1d !important; }
body[data-theme="dark"] #settings-panel-admin-users [style*="background:#fff8ef"] { background:#2a241a !important; }
/* Admin sub-tabs */
body[data-theme="dark"] .admin-subtab { color:#888; }
body[data-theme="dark"] .admin-subtab.active { color:#f28b22; }
/* Tables in user mgmt & promo */
body[data-theme="dark"] #settings-panel-admin-users table thead tr,
body[data-theme="dark"] #admin-promo-table-wrap table thead tr { background:#2d2d2d !important; color:#ccc !important; }
body[data-theme="dark"] #settings-panel-admin-users table th,
body[data-theme="dark"] #admin-promo-table-wrap table th { color:#ccc !important; }
body[data-theme="dark"] #settings-panel-admin-users table td,
body[data-theme="dark"] #admin-promo-table-wrap table td { color:#bbb; }
/* Upgrade modal */
body[data-theme="dark"] #upgrade-card { background:#252525; color:#e0e0e0; box-shadow:0 16px 48px rgba(0,0,0,0.5); }
body[data-theme="dark"] #upgrade-title { color:#f0f0f5 !important; }
body[data-theme="dark"] #upgrade-body { color:#ccc; }
body[data-theme="dark"] #upgrade-body [style*="background:#fafafa"] { background:#2d2d2d !important; }
body[data-theme="dark"] #pricing-cards > div { border-color:#3a3a3a !important; background:#252545 !important; }
body[data-theme="dark"] #pricing-cards > div > div:first-of-type { color:#ddd !important; }
body[data-theme="dark"] #pricing-cards > div > div:nth-of-type(2) { color:#f0f0f5 !important; }
body[data-theme="dark"] #pricing-cards [id^="pricing-btn-"] { background:#3a3a3a !important; color:#bbb !important; }
/* Settings surfaces in dark mode */
body[data-theme="dark"] .account-profile-shell,body[data-theme="dark"] .appearance-settings-panel,body[data-theme="dark"] .model-settings-panel{color:#e5e7eb}
body[data-theme="dark"] .account-profile-card,body[data-theme="dark"] .account-setting-card,body[data-theme="dark"] .appearance-theme-card,body[data-theme="dark"] .model-config-card,body[data-theme="dark"] .model-add-actions button{border-color:#3b424c;background:#252a31;color:#d8dde5}
body[data-theme="dark"] .account-profile-card{background:linear-gradient(145deg,#272c33,#22272d);box-shadow:0 10px 30px rgba(0,0,0,.16)}body[data-theme="dark"] .account-setting-icon{background:#30363e;color:#aeb7c2}body[data-theme="dark"] .account-membership-card{border-color:#3b424c;background:#2a3037;color:#b8c0ca}body[data-theme="dark"] .account-membership-card.is-paid{border-color:#315d47;background:#20362b;color:#7dd3a5}body[data-theme="dark"] .account-membership-card.is-trial{border-color:#665033;background:#382f23;color:#f0bd74}body[data-theme="dark"] .account-membership-card.is-expired{border-color:#684041;background:#392728;color:#ef9a9e}
body[data-theme="dark"] .account-action-row:hover,body[data-theme="dark"] .model-config-actions button:hover,body[data-theme="dark"] .model-add-actions button:hover{background:#2d333b}
body[data-theme="dark"] .account-profile-name,body[data-theme="dark"] .account-info-label,body[data-theme="dark"] .settings-section-heading h3,body[data-theme="dark"] .model-settings-header h3,body[data-theme="dark"] .appearance-theme-copy strong,body[data-theme="dark"] .model-config-title strong{color:#f1f3f5}
body[data-theme="dark"] .account-profile-phone,body[data-theme="dark"] .account-info-value,body[data-theme="dark"] .settings-section-heading p,body[data-theme="dark"] .model-settings-header p,body[data-theme="dark"] .appearance-theme-copy small,body[data-theme="dark"] .model-config-meta{color:#a6afbb}
body[data-theme="dark"] .appearance-theme-card.active{border-color:#35c77a;box-shadow:0 0 0 3px rgba(53,199,122,.13)}
body[data-theme="dark"] .model-config-card.active{border-color:#467e61;box-shadow:0 0 0 3px rgba(53,199,122,.08)}
body[data-theme="dark"] .model-config-empty{border-color:#414852;background:#22272e}body[data-theme="dark"] .model-config-empty strong{color:#d8dde5}
body[data-theme="dark"] .model-config-actions button{border-color:#464d57;background:#2b3037;color:#bdc5cf}
body[data-theme="dark"] .font-size-card.active{border-color:#467e61!important;background:#20362b!important;box-shadow:0 0 0 3px rgba(53,199,122,.08)}
body[data-theme="dark"] .settings-side-nav-card,body[data-theme="dark"] .settings-panel-surface{border-color:#363d46!important;background:#22272d!important;box-shadow:0 4px 18px rgba(0,0,0,.16)!important}body[data-theme="dark"] .settings-nav-item{color:#b5bdc7!important}body[data-theme="dark"] .settings-nav-item.active{background:#233b30!important;color:#76d8a4!important}body[data-theme="dark"] .font-size-card,body[data-theme="dark"] .font-zoom-card,body[data-theme="dark"] .about-product-card,body[data-theme="dark"] .about-description,body[data-theme="dark"] .about-action-grid button,body[data-theme="dark"] .evaluation-settings-panel section{border-color:#3b424c!important;background:#282e35!important;color:#c6ccd4!important}body[data-theme="dark"] .font-size-card:hover,body[data-theme="dark"] .about-action-grid button:hover{background:#30363e!important}body[data-theme="dark"] .font-size-card strong,body[data-theme="dark"] .font-zoom-card strong,body[data-theme="dark"] .about-product-card strong,body[data-theme="dark"] .about-action-grid strong{color:#e4e8ed}body[data-theme="dark"] .font-size-card small,body[data-theme="dark"] .font-zoom-card small,body[data-theme="dark"] .about-product-card span,body[data-theme="dark"] .about-action-grid small{color:#9ba4af}body[data-theme="dark"] .about-description{color:#bdc5cf}body[data-theme="dark"] .about-description p+p{color:#d2a77f}body[data-theme="dark"] .about-update-bar{border-color:#3b424c;background:#282e35;color:#c6ccd4}body[data-theme="dark"] .about-update-bar:hover{background:#30363e}body[data-theme="dark"] .about-update-copy strong{color:#e4e8ed}body[data-theme="dark"] .about-product-mark{background:#151b26;color:#f5a23a}
body[data-theme="dark"] .model-dialog{border-color:#3b424c;background:#24292f}body[data-theme="dark"] .model-dialog-header h3{color:#f1f3f5}body[data-theme="dark"] .model-dialog-header>button{background:#30363d;color:#b8c0ca}
body[data-theme="dark"] .model-provider-option,body[data-theme="dark"] .model-option,body[data-theme="dark"] .model-dialog-actions .secondary{border-color:#444b55;background:#2a3037;color:#c5ccd5}body[data-theme="dark"] .model-provider-option.selected,body[data-theme="dark"] .model-option.selected{border-color:#35c77a;background:#213b2e;color:#76d8a4}
body[data-theme="dark"] .model-field input,body[data-theme="dark"] .model-field textarea,body[data-theme="dark"] .model-field select,body[data-theme="dark"] .model-field-grid input,body[data-theme="dark"] .model-field-grid select{border-color:#444b55;background:#1f242a;color:#e5e7eb}
body[data-theme="dark"] #settings-panel-about > div { color:#bbb !important; }
/* Promo dialog */
body[data-theme="dark"] #promo-dialog-overlay > div { background:#252525; }
body[data-theme="dark"] #promo-dialog-overlay h3 { color:#f0f0f5; }
body[data-theme="dark"] #promo-dialog-overlay [style*="font-size:12px;color:#999"] { color:#888 !important; }
body[data-theme="dark"] #promo-result { background:#1d2d1d !important; }
/* Add model dialog */
body[data-theme="dark"] #add-model-overlay > div { background:#252525; }
body[data-theme="dark"] #add-model-overlay h3 { color:#f0f0f5; }
/* Font size cards */
body[data-theme="dark"] #fs-opt-sm,
body[data-theme="dark"] #fs-opt-md,
body[data-theme="dark"] #fs-opt-lg { border-color:#3a3a3a !important; }
body[data-theme="dark"] #fs-opt-sm div:last-child,
body[data-theme="dark"] #fs-opt-md div:last-child,
body[data-theme="dark"] #fs-opt-lg div:last-child { color:#ccc !important; }
@media(max-width:700px){.model-settings-panel,.appearance-settings-panel,.account-settings-panel{padding:20px 16px}.model-config-card{align-items:flex-start;flex-wrap:wrap}.model-config-copy{min-width:calc(100% - 60px)}.model-config-actions{width:100%;justify-content:flex-start;padding-left:58px}.model-add-actions{grid-template-columns:1fr}.model-provider-options{grid-template-columns:repeat(2,minmax(0,1fr))}.model-field-grid{grid-template-columns:1fr}.appearance-theme-grid{grid-template-columns:1fr}}
@media(max-width:820px){.settings-layout-shell{display:block!important}.settings-side-nav-card{position:static;width:100%!important;display:flex;gap:5px;margin-bottom:12px;padding:7px;overflow-x:auto}.settings-nav-item{flex:0 0 auto;margin:0!important;padding:9px 11px!important;white-space:nowrap}.settings-panel-surface{padding:20px!important}.font-size-grid{grid-template-columns:1fr}.font-size-card{min-height:82px;display:grid;grid-template-columns:54px 1fr;grid-template-rows:auto auto;text-align:left}.font-size-sample{grid-row:1/3}.font-zoom-card{grid-template-columns:1fr;gap:14px}.about-action-grid{grid-template-columns:1fr}}
@media(max-width:620px){.account-profile-card{padding:15px}.account-avatar{width:50px;height:50px;flex-basis:50px;border-radius:14px;font-size:22px}.account-settings-grid{grid-template-columns:1fr;gap:9px}.account-setting-card{min-height:68px;padding:11px 12px}.account-membership-action{display:inline-block;margin:6px 0 0 8px;vertical-align:middle}.account-session-actions{justify-content:stretch}.account-logout-button{width:100%}.model-config-actions{padding-left:0}}

/* ── Page-level dark mode: all remaining pages ── */

/* Topbar */
body[data-theme="dark"] .topbar { background:#1e1e1e; border-color:#2d2d2d; }
body[data-theme="dark"] .topbar h2 { color:#f0f0f5 !important; }

/* Auth entry */
body[data-theme="dark"] .auth-entry,
body[data-theme="dark"] .auth-entry-panel { background:#1a1a1a; }
body[data-theme="dark"] .auth-entry-form h1,
body[data-theme="dark"] .auth-entry-form label,
body[data-theme="dark"] .auth-entry-form p { color:#e0e0e0; }
body[data-theme="dark"] .auth-entry-wechat { background:#2d2d2d; color:#ccc; border-color:#444; }
body[data-theme="dark"] .auth-entry-qr-box { background:#2d2d2d; border-color:#444; }
body[data-theme="dark"] .auth-reset-dialog { background:#252525; color:#e0e0e0; }

/* Index cards, watchlist, sub-tabs, sector table, dialog, moat, screen */
body[data-theme="dark"] .index-card { background:#252525; }
body[data-theme="dark"] .index-card .idx-name,
body[data-theme="dark"] .index-card .idx-change { color:#bbb; }
body[data-theme="dark"] .watchlist-panel,
body[data-theme="dark"] .sub-tabs,
body[data-theme="dark"] .sector-table-wrap,
body[data-theme="dark"] .dialog-box,
body[data-theme="dark"] .moat-card,
body[data-theme="dark"] .screen-result-card { background:#252525; }
body[data-theme="dark"] .watchlist-header h3 { color:#f0f0f5; }

/* Generic card pattern: white bg cards in all pages */
body[data-theme="dark"] [style*="background:#fff;border-radius:10px"],
body[data-theme="dark"] [style*="background:#fff; border-radius:10px"],
body[data-theme="dark"] [style*="background:#fff;border-radius:12px"],
body[data-theme="dark"] [style*="background: #fff; border-radius"] { background:#252525 !important; box-shadow:0 1px 4px rgba(0,0,0,0.25) !important; }

/* Generic table-wrap cards */
body[data-theme="dark"] [style*="background:#fff;border-radius:10px;overflow"],
body[data-theme="dark"] [style*="background:#fff; border-radius:10px; overflow"],
body[data-theme="dark"] [style*="background:#fff;border-radius:10px;overflow-x"] { background:#252525 !important; }

/* Dropdown / suggestions */
body[data-theme="dark"] [style*="background:#fff;border:1px solid #ddd;border-radius:0"] { background:#2d2d2d !important; border-color:#444 !important; }

/* Calculator cards */
body[data-theme="dark"] .calc-card { background:#252525 !important; }
body[data-theme="dark"] .calc-card h3 { color:#f0f0f5; }
body[data-theme="dark"] .calc-card label,
body[data-theme="dark"] .calc-card td,
body[data-theme="dark"] .calc-card th { color:#ccc; }

/* Position management */
body[data-theme="dark"] .pm-card { background:#252525 !important; }
body[data-theme="dark"] .pm-card h3,
body[data-theme="dark"] .pm-card h4 { color:#f0f0f5; }
body[data-theme="dark"] .pm-card label,
body[data-theme="dark"] .pm-card td,
body[data-theme="dark"] .pm-card th { color:#ccc; }
body[data-theme="dark"] .pm-select { background:#2d2d2d; color:#e0e0e0; border-color:#444; }
body[data-theme="dark"] .pm-suggestions,
body[data-theme="dark"] #pmSuggestions { background:#2d2d2d !important; border-color:#444 !important; }
body[data-theme="dark"] .pm-tab { background:#2d2d2d; color:#bbb; border-color:#444; }
body[data-theme="dark"] .pm-tab.active { background:#f28b22; color:#fff; border-color:#f28b22; }

/* Moats / industry analysis */
body[data-theme="dark"] .moat-check-item.fail { background:#2a2218; }

/* Analysis feed */
body[data-theme="dark"] .analysis-feed-badge { background:#2a2218; color:#e0a050; border-color:#4a3820; }
body[data-theme="dark"] .analysis-feed-badge.done { background:#1a3022; color:#60c080; border-color:#2a4a32; }
body[data-theme="dark"] .analysis-feed-icon { color:#ccc !important; }

/* Generic: all inline-styled divs with white bg in page content */
body[data-theme="dark"] #page-industry [style*="background:#fff"],
body[data-theme="dark"] #page-company [style*="background:#fff"],
body[data-theme="dark"] #page-food [style*="background:#fff"],
body[data-theme="dark"] #page-medical [style*="background:#fff"],
body[data-theme="dark"] #page-sentiment [style*="background:#fff"],
body[data-theme="dark"] #page-reports [style*="background:#fff"],
body[data-theme="dark"] #page-overview [style*="background:#fff"],
body[data-theme="dark"] #page-calculator [style*="background:#fff"],
body[data-theme="dark"] #page-position [style*="background:#fff"],
body[data-theme="dark"] #page-chat [style*="background:#fff"] { background:#252525 !important; box-shadow:0 1px 4px rgba(0,0,0,0.25) !important; }

/* Generic table headers in dark mode */
body[data-theme="dark"] [style*="background:#f7f8fa"] { background:#2d2d2d !important; color:#ccc !important; }
body[data-theme="dark"] [style*="background:#fafafa"] { background:#252545 !important; }

/* Generic text colors in dark mode — make ALL text light and readable */
body[data-theme="dark"] [style*="color:#333"] { color:#e8e8e8 !important; }
body[data-theme="dark"] [style*="color:#222"] { color:#e8e8e8 !important; }
body[data-theme="dark"] [style*="color:#666"] { color:#ccc !important; }
body[data-theme="dark"] [style*="color:#555"] { color:#ccc !important; }
body[data-theme="dark"] [style*="color:#999"] { color:#bbb !important; }
body[data-theme="dark"] [style*="color:#888"] { color:#bbb !important; }
body[data-theme="dark"] [style*="color:#777"] { color:#bbb !important; }

/* Descriptions and secondary text — boost readability */
body[data-theme="dark"] [style*="color:#999"],
body[data-theme="dark"] [style*="color:#888"],
body[data-theme="dark"] [style*="color:#aaa"] { color:#bbb !important; }

/* Table cell text across all pages */
body[data-theme="dark"] td[style*="color:#666"],
body[data-theme="dark"] td[style*="color:#555"],
body[data-theme="dark"] td[style*="color:#888"],
body[data-theme="dark"] td[style*="color:#999"] { color:#ccc !important; }

/* Food / Medical / Industry / Company tables — force light text */
body[data-theme="dark"] #page-food td,
body[data-theme="dark"] #page-medical td,
body[data-theme="dark"] #page-industry td,
body[data-theme="dark"] #page-company td { color:#ddd !important; }
body[data-theme="dark"] #page-food th,
body[data-theme="dark"] #page-medical th { color:#ccc !important; }

/* Food sector overview stat cards */
body[data-theme="dark"] #food-overview > div > div:first-child,
body[data-theme="dark"] #medical-overview > div > div:first-child { color:#bbb !important; }

/* Food/Medical table empty state */
body[data-theme="dark"] #food-table td[colspan],
body[data-theme="dark"] #medical-table td[colspan] { color:#bbb !important; }

/* Food & medical: keep every overview, list and report surface in the dark palette. */
body[data-theme="dark"] #page-food,
body[data-theme="dark"] #page-medical{color:#d7dce3}
body[data-theme="dark"] #page-food .sub-tabs,
body[data-theme="dark"] #page-medical .sub-tabs,
body[data-theme="dark"] #page-food .food-block,
body[data-theme="dark"] #page-medical .food-block,
body[data-theme="dark"] #page-food .sector-table-wrap,
body[data-theme="dark"] #page-medical .sector-table-wrap,
body[data-theme="dark"] #page-food #food-overview,
body[data-theme="dark"] #page-medical #medical-overview,
body[data-theme="dark"] #page-food [style*="background:#fff"],
body[data-theme="dark"] #page-medical [style*="background:#fff"]{
  background:#24282f!important;
  border-color:#373d46!important;
  box-shadow:0 4px 16px rgba(0,0,0,.18)!important;
}
body[data-theme="dark"] #page-food .chain-card,
body[data-theme="dark"] #page-food [style*="background:#fdf6f6"]{
  background:#30272a!important;
  border-color:#65464b!important;
  color:#c9c1c3!important;
}
body[data-theme="dark"] #page-medical .chain-card,
body[data-theme="dark"] #page-medical [style*="background:#f2f8fa"]{
  background:#223036!important;
  border-color:#41616d!important;
  color:#c0cbd0!important;
}
body[data-theme="dark"] #page-food [style*="background:#f5f5f5"],
body[data-theme="dark"] #page-medical [style*="background:#f5f5f5"]{
  background:#2c3138!important;
  border-color:#464d57!important;
  color:#bdc5cf!important;
}
body[data-theme="dark"] #page-food .chain-card:hover{
  background:#3a292d!important;
  border-color:#a95d69!important;
  color:#f0c6cc!important;
}
body[data-theme="dark"] #page-medical .chain-card:hover{
  background:#263b43!important;
  border-color:#4f8798!important;
  color:#b9e2ee!important;
}
body[data-theme="dark"] #page-food .sub-tab:hover,
body[data-theme="dark"] #page-medical .sub-tab:hover{
  background:#2d3239!important;
  color:#e4e8ed!important;
}
body[data-theme="dark"] #page-food .sector-table th,
body[data-theme="dark"] #page-medical .sector-table th,
body[data-theme="dark"] #page-food .detail-table th,
body[data-theme="dark"] #page-medical .detail-table th{
  background:#2d3239!important;
  border-color:#444b55!important;
  color:#cbd1d8!important;
}
body[data-theme="dark"] #page-food .sector-table td,
body[data-theme="dark"] #page-medical .sector-table td,
body[data-theme="dark"] #page-food .detail-table td,
body[data-theme="dark"] #page-medical .detail-table td{
  border-color:#363c45!important;
}
body[data-theme="dark"] #page-food .sector-table tbody tr:hover,
body[data-theme="dark"] #page-medical .sector-table tbody tr:hover,
body[data-theme="dark"] #page-food .detail-table tbody tr:hover,
body[data-theme="dark"] #page-medical .detail-table tbody tr:hover,
body[data-theme="dark"] #page-food .score-bar-row:hover,
body[data-theme="dark"] #page-medical .score-bar-row:hover{
  background:#2b3037!important;
}
body[data-theme="dark"] #page-food .score-bar-label,
body[data-theme="dark"] #page-medical .score-bar-label{color:#b8c0ca}
body[data-theme="dark"] #page-food .score-bar-track,
body[data-theme="dark"] #page-medical .score-bar-track{background:#3a414a}
body[data-theme="dark"] #page-food .score-bar-fill,
body[data-theme="dark"] #page-medical .score-bar-fill{background:#697380}
body[data-theme="dark"] #page-food .report-link,
body[data-theme="dark"] #page-medical .report-link{color:#dce1e7}

/* Report search summary: the summary is injected after the theme is applied. */
body[data-theme="dark"] #page-reports #report-summary-box{
  background:#24282f!important;
  border:1px solid #373d46!important;
  color:#d7dce3!important;
  box-shadow:0 4px 16px rgba(0,0,0,.18)!important;
}
body[data-theme="dark"] #page-reports #report-summary-box [style*="color:#333"]{color:#d7dce3!important}
body[data-theme="dark"] #page-reports #report-summary-box [style*="color:#999"]{color:#a2aab5!important}
body[data-theme="dark"] #page-reports .report-summary-progress{color:#d7dce3}
body[data-theme="dark"] #page-reports .report-summary-progress-icon{background:#3a2f2b}
body[data-theme="dark"] #page-reports .report-summary-progress-note,
body[data-theme="dark"] #page-reports .report-summary-progress-meta{color:#a2aab5}
body[data-theme="dark"] #page-reports .report-summary-progress-track{background:#463932}
body[data-theme="dark"] #page-reports #report-summary-history{border-top-color:#3b424c!important}
body[data-theme="dark"] #page-reports #report-summary-history .sub-tab{border-color:#464d57!important;background:#2c3138!important;color:#bdc5cf!important}

/* Company analysis: second-level tabs and generated analysis panels. */
body[data-theme="dark"] #page-company #company-tabs,
body[data-theme="dark"] #page-company .sub-tab-bar{
  background:#24282f!important;
  border-color:#3b424c!important;
  box-shadow:none!important;
}
body[data-theme="dark"] #page-company .sub-tab:not(.active){background:transparent!important;color:#aeb6c1!important}
body[data-theme="dark"] #page-company .sub-tab:hover{background:#2d333b!important;color:#e4e8ed!important}
body[data-theme="dark"] #page-company .sub-tab.active{background:#233b30!important;color:#76d8a4!important}
body[data-theme="dark"] #page-company #company-dupont-panel,
body[data-theme="dark"] #page-company #company-sevenstep-panel,
body[data-theme="dark"] #page-company #screener-results,
body[data-theme="dark"] #page-company .chart-card,
body[data-theme="dark"] #page-company .moat-card{
  background:#24282f!important;
  border-color:#373d46!important;
  color:#d7dce3!important;
  box-shadow:0 4px 16px rgba(0,0,0,.18)!important;
}
body[data-theme="dark"] #page-company #screener-rules{
  background:#292e35!important;
  border-color:#414852!important;
  color:#d7dce3!important;
}
body[data-theme="dark"] #page-company #screener-rules-content{color:#c5ccd5!important}
body[data-theme="dark"] #page-company #company-reports{border-top-color:#3b424c!important}
body[data-theme="dark"] #page-company .company-analysis-output .moat-hero,
body[data-theme="dark"] #page-company .company-analysis-output [style*="background:linear-gradient"]{
  background:#292e35!important;
  border-color:#414852!important;
  color:#d7dce3!important;
  box-shadow:0 4px 16px rgba(0,0,0,.16)!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .company-result-tint{
  background:#2b3037!important;
  border-color:#4a535f!important;
  color:#d7dce3!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .moat-force-row{
  background:#2b3037!important;
  color:#d7dce3!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .moat-check-item.pass{
  background:#20372a!important;
  color:#d8e8df!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .moat-check-item.fail{
  background:#3a2d22!important;
  color:#eaded2!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .moat-dim-bar,
body[data-theme="dark"] #page-company .company-analysis-output .moat-force-bar,
body[data-theme="dark"] #page-company .company-analysis-output [style*="background:#e8e8e8"]{
  background:#3b424c!important;
}
body[data-theme="dark"] #page-company .company-analysis-output .moat-dim-label,
body[data-theme="dark"] #page-company .company-analysis-output .moat-force-name{color:#d7dce3!important}
body[data-theme="dark"] #page-company .company-analysis-output .moat-dim-text,
body[data-theme="dark"] #page-company .company-analysis-output .moat-force-text,
body[data-theme="dark"] #page-company .company-analysis-output .moat-check-detail{color:#aeb6c1!important}

/* Food/medical sector detail text (PE/PB/ROE descriptions etc) */
body[data-theme="dark"] [style*="font-size:11px;color:#999"],
body[data-theme="dark"] [style*="font-size:12px;color:#999"],
body[data-theme="dark"] [style*="font-size:11px;color:#888"],
body[data-theme="dark"] [style*="font-size:12px;color:#888"] { color:#bbb !important; }

/* Ensure headings stay bright */
body[data-theme="dark"] [style*="font-size:18px"],
body[data-theme="dark"] [style*="font-size: 18px"],
body[data-theme="dark"] [style*="font-size:20px"],
body[data-theme="dark"] [style*="font-size: 20px"] { color:#f0f0f5 !important; }

/* Links and interactive text — keep distinguishable */
body[data-theme="dark"] a[style*="color"] { color:#7eb8f0 !important; }

/* Generic borders */
body[data-theme="dark"] [style*="border-bottom:1px solid #f0f0f0"] { border-color:#3a3a3a !important; }
body[data-theme="dark"] [style*="border-bottom:1px solid #f5f5f5"] { border-color:#3a3a3a !important; }
body[data-theme="dark"] [style*="border-top:1px solid #f0f0f0"] { border-color:#3a3a3a !important; }
body[data-theme="dark"] [style*="border:1px solid #e0e0e0"] { border-color:#444 !important; }
body[data-theme="dark"] [style*="border:1px solid #e8e8e8"] { border-color:#444 !important; }

/* Selected plan card in dark mode */
body[data-theme="dark"] #pricing-card-monthly[style*="background:#fff7ed"],
body[data-theme="dark"] #pricing-card-quarterly[style*="background:#fff7ed"],
body[data-theme="dark"] #pricing-card-yearly[style*="background:#fff7ed"] { background:#302820 !important; }

/* Password result box */
body[data-theme="dark"] #admin-password-result { background:#2a2218 !important; border-color:#4a3820 !important; }
body[data-theme="dark"] #admin-password-result div:first-child { color:#d4a030 !important; }
body[data-theme="dark"] #admin-temporary-password { color:#e0e0e0 !important; }

/* Industry/company/report-search dropdown & search */
.report-search-controls{display:flex;align-items:stretch;gap:10px;width:100%}
.report-search-input-wrap{position:relative;flex:1 1 420px;min-width:240px}
.report-search-input-wrap .dialog-input{width:100%;height:42px;font-size:14px}
.report-search-filter{position:relative;flex:0 0 150px}
.report-search-page-filter{flex-basis:122px}
.report-search-filter select{width:100%;height:42px;padding:0 34px 0 13px;border:1px solid #d9dde5;border-radius:8px;background:#fff;color:#444;font-size:13px;cursor:pointer;outline:none}
.report-search-filter select:focus{border-color:#7aa7f7;box-shadow:0 0 0 3px rgba(52,120,246,.12)}
.report-search-submit{flex:0 0 72px;height:42px;border:0;border-radius:8px;background:#8b1a1a;color:#fff;font-size:13px;font-weight:600;cursor:pointer}
.report-search-submit:hover{background:#a32020}
.report-search-submit:focus-visible{outline:3px solid rgba(139,26,26,.2);outline-offset:2px}
body[data-theme="dark"] .report-search-filter select{background:#292929;color:#e4e6eb;border-color:#464646;color-scheme:dark}
@media(max-width:720px){.report-search-controls{flex-wrap:wrap}.report-search-input-wrap{flex-basis:100%}.report-search-filter{flex:1 1 calc(50% - 46px)}.report-search-submit{flex-basis:72px}}
body[data-theme="dark"] #industry-dropdown,
body[data-theme="dark"] #company-dropdown,
body[data-theme="dark"] #report-search-dropdown,
body[data-theme="dark"] #pmSuggestions { background:#292929 !important; border-color:#464646 !important; box-shadow:0 12px 30px rgba(0,0,0,.42) !important; }
.search-suggestion-item{padding:8px 12px;cursor:pointer;border-bottom:1px solid #f5f5f5;font-size:13px}
body[data-theme="dark"] .search-suggestion-list .dialog-result-item,
body[data-theme="dark"] .search-suggestion-list .search-suggestion-item { color:#e4e6eb !important; border-bottom-color:#404040 !important; }
body[data-theme="dark"] .search-suggestion-list .dialog-result-item .name { color:#f2f3f5 !important; }
body[data-theme="dark"] .search-suggestion-list .dialog-result-item .code,
body[data-theme="dark"] .search-suggestion-list .search-suggestion-item .code { color:#aeb3bb !important; }
body[data-theme="dark"] .search-suggestion-list .dialog-result-item:hover,
body[data-theme="dark"] .search-suggestion-list .search-suggestion-item:hover,
body[data-theme="dark"] .search-suggestion-list .is-highlighted { background:#3a3030 !important; color:#fff !important; }

/* Chat/AI page */
body[data-theme="dark"] #page-chat [style*="background"] { background:#252525 !important; }
body[data-theme="dark"] #page-chat textarea { background:#2d2d2d; color:#e0e0e0; border-color:#444; }

/* Sub-tab bars (industry, company, etc.) */
body[data-theme="dark"] .ind-tab-bar,
body[data-theme="dark"] .sub-tab-bar { background:#252525; }
body[data-theme="dark"] .ind-tab,
body[data-theme="dark"] .sub-tab:not(.active) { color:#999; }

/* Responsive table wraps */
body[data-theme="dark"] [id$="-table-wrap"] { background:#252525; }
body[data-theme="dark"] [id$="-reports-list"] { background:#252525; }

/* Chart containers */
body[data-theme="dark"] canvas { filter:brightness(0.9); }

/* Keyboard focus */
button:focus-visible,[role="button"]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(26,86,219,.35);outline-offset:2px}

/* Mobile navigation backdrop */
.sidebar-backdrop{display:none}

/* Site-wide responsive layout */
@media (max-width: 900px){
  .auth-entry{grid-template-columns:1fr}
  .auth-entry-panel{padding:28px 24px 22px}
  .auth-entry-hero{display:none}
  .sidebar,.sidebar.collapsed{position:fixed;z-index:3000;inset:0 auto 0 0;width:52px;height:100dvh;transform:none;transition:width .22s ease;box-shadow:3px 0 12px rgba(0,0,0,.12)}
  .sidebar.mobile-open,.sidebar.collapsed.mobile-open{width:min(84vw,240px);box-shadow:12px 0 32px rgba(0,0,0,.22)}
  .sidebar .sidebar-brand{padding:16px 10px;text-align:center}
  .sidebar .sidebar-brand h1{padding-right:0;font-size:16px}
  .sidebar .sidebar-brand h1 span,.sidebar .sidebar-brand p,.sidebar .sidebar-section-title{display:none}
  .sidebar .sidebar-brand h1 img{margin:0 auto}
  .sidebar .sidebar-brand-toggle{z-index:2;left:10px;right:auto;top:14px;width:32px;height:32px;opacity:0;background:#1a1a1a}
  .sidebar .sidebar-brand-toggle:focus-visible{opacity:1}
  .sidebar .sidebar-brand-toggle svg{width:21px;height:21px}
  .sidebar .sidebar-nav{overflow-x:hidden;overflow-y:auto}
  .sidebar .sidebar-item{padding:10px 12px;justify-content:center;gap:0;border-left-width:0}
  .sidebar .sidebar-item.active{border-left:0;border-right:3px solid #c41e3a}
  .sidebar .sidebar-item-text{display:none;width:0;opacity:0}
  .sidebar #sidebar-user{padding:10px 6px!important;text-align:center}
  .sidebar #sidebar-user>div{justify-content:center!important}
  .sidebar #sidebar-user>div>div:last-child{display:none}
  .sidebar .sidebar-status{padding:12px 6px;text-align:center}
  .sidebar .sidebar-status span:not(.dot){display:none}
  .sidebar .sidebar-status .dot{margin-right:0}
  .sidebar.mobile-open .sidebar-brand{padding:20px 18px;text-align:left}
  .sidebar.mobile-open .sidebar-brand h1{padding-right:28px;font-size:18px}
  .sidebar.mobile-open .sidebar-brand h1 span{display:inline}
  .sidebar.mobile-open .sidebar-brand-toggle{left:auto;right:12px;top:22px;width:24px;height:24px;opacity:1;background:transparent}
  .sidebar.mobile-open .sidebar-brand-toggle svg{width:17px;height:17px}
  .sidebar.mobile-open .sidebar-brand p,.sidebar.mobile-open .sidebar-section-title{display:block}
  .sidebar.mobile-open .sidebar-item{padding:10px 18px;justify-content:flex-start;gap:5px;border-left-width:3px}
  .sidebar.mobile-open .sidebar-item.active{border-left:3px solid #c41e3a;border-right:0}
  .sidebar.mobile-open .sidebar-item-text{display:inline;width:auto;opacity:1}
  .sidebar.mobile-open #sidebar-user{padding:12px 16px!important;text-align:left}
  .sidebar.mobile-open #sidebar-user>div{justify-content:flex-start!important}
  .sidebar.mobile-open #sidebar-user>div>div:last-child{display:block}
  .sidebar.mobile-open .sidebar-status{padding:16px 18px;text-align:left}
  .sidebar.mobile-open .sidebar-status span:not(.dot){display:inline}
  .sidebar-backdrop{position:fixed;z-index:2999;inset:0;background:rgba(10,14,30,.48)}
  .sidebar-backdrop.show{display:block}
  .main{width:calc(100% - 52px);min-width:0;margin-left:52px}
  .topbar{position:sticky;top:0;z-index:100;padding:12px 16px;gap:12px}
  .sidebar-mobile-toggle{display:flex}
  .topbar-right{gap:8px}
  .topbar-time,#topbar-model-name{display:none}
  .content{padding:16px}
  .index-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
  .index-card{padding:14px 12px}
  .index-card .idx-price{font-size:19px}
  .watchlist-row,.moat-two-col{grid-template-columns:1fr}
  .sub-tabs,.ind-tab-bar,.sub-tab-bar{overflow-x:auto;overscroll-behavior-inline:contain}
  .sector-table-wrap,.table-wrap,[id$="-table-wrap"],[id$="-reports-list"]{overflow-x:auto!important}
  .sector-table,.detail-table{min-width:720px}
  [style*="grid-template-columns:1fr 1fr"],[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr!important}
  [style*="grid-template-columns:repeat(3,1fr)"],[style*="grid-template-columns:repeat(4,1fr)"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  [style*="min-width:280px"]{min-width:0!important}
  .moat-hero{align-items:flex-start;padding:18px}
}

@media (max-width: 560px){
  .auth-entry-panel{padding:22px 18px 18px}
  .auth-entry-brand{font-size:18px}
  .auth-entry-form h1{font-size:25px}
  .auth-entry-form{transform:none}
  .analysis-feed-head{padding:14px}.analysis-feed-list{padding:7px 14px 11px}.analysis-feed-meta{flex-direction:column;align-items:flex-end;gap:5px}
  .topbar h2{font-size:17px}
  .topbar-right button{padding:7px 10px!important;font-size:0!important}
  .topbar-right button::after{content:'刷新';font-size:12px}
  .index-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .index-card .idx-name{font-size:12px}
  .index-card .idx-price{font-size:18px}
  .watchlist-header{padding:13px 14px}
  .watchlist-row-item,.wl-header-row{padding-left:14px;padding-right:14px}
  .dialog-overlay{padding:16px}
  .dialog-box{width:100%!important;padding:22px!important}
  [style*="grid-template-columns:repeat(3,1fr)"],[style*="grid-template-columns:repeat(4,1fr)"]{grid-template-columns:1fr!important}
  .screen-dim-row{gap:8px}
  .screen-dim-row label.dim-label{width:60px}
  .site-legal-footer{padding:15px 14px;margin-top:20px;font-size:11px}
  .auth-legal-footer{font-size:11px}
}
/* ===== Company Moat Analysis ===== */
.moat-hero{display:flex;align-items:center;gap:20px;padding:24px;border-radius:10px;margin-bottom:16px}
.moat-hero.s-grade{background:linear-gradient(135deg,#e8f5e9,#c8e6c9);border:1px solid #a5d6a7}
.moat-hero.a-grade{background:linear-gradient(135deg,#e3f2fd,#bbdefb);border:1px solid #90caf9}
.moat-hero.b-grade{background:linear-gradient(135deg,#fff8e1,#ffecb3);border:1px solid #ffe082}
.moat-hero.c-grade{background:linear-gradient(135deg,#fff3e0,#ffe0b2);border:1px solid #ffcc80}
.moat-hero.d-grade{background:linear-gradient(135deg,#ffebee,#ffcdd2);border:1px solid #ef9a9a}
.moat-hero-badge{font-size:48px;font-weight:800;line-height:1}
.moat-hero-info{flex:1}.moat-hero-total{font-size:36px;font-weight:700}
.moat-two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:16px;overflow:hidden}
.moat-card{background:#fff;border-radius:10px;padding:18px;box-shadow:0 1px 4px rgba(0,0,0,0.06);margin-bottom:16px}
.moat-dim-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:12px}
.moat-dim-label{width:70px;text-align:right;flex-shrink:0;color:#666;font-weight:500}
.moat-dim-bar{flex:1;height:8px;background:#eee;border-radius:4px;overflow:hidden}
.moat-dim-bar-inner{height:100%;border-radius:4px}
.moat-dim-score{width:36px;text-align:center;font-weight:700;font-size:13px}
.moat-dim-text{font-size:11px;color:#999;margin-left:80px;margin-top:-6px;margin-bottom:6px}
.moat-force-row{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:12px;padding:8px;border-radius:6px;background:#fafafa}
.moat-force-name{width:80px;font-weight:600;color:#333;flex-shrink:0}
.moat-force-score{font-weight:700;width:28px;text-align:center}
.moat-force-score.low{color:#2e7d32}.moat-force-score.mid{color:#d29922}.moat-force-score.high{color:#c41e3a}
.moat-force-bar{flex:1;height:6px;background:#e8e8e8;border-radius:3px;overflow:hidden}
.moat-force-bar-inner{height:100%;border-radius:3px}
.moat-force-text{font-size:11px;color:#999;margin-left:88px;margin-top:-4px;margin-bottom:6px}
.moat-checklist{display:flex;flex-direction:column;gap:10px}
.moat-check-item{display:flex;align-items:flex-start;gap:10px;padding:10px 14px;border-radius:8px;font-size:13px}
.moat-check-item.pass{background:#e8f5e9;border-left:3px solid #2e7d32}
.moat-check-item.fail{background:#fff3e0;border-left:3px solid #e67e22}
.moat-check-icon{font-size:18px;flex-shrink:0;margin-top:1px}
.moat-check-body{flex:1}.moat-check-body b{display:block;margin-bottom:2px}
.moat-check-detail{font-size:11px;color:#888;margin-top:2px}
.report-mode-bar{display:flex;gap:6px;margin-bottom:16px;padding:4px;background:#f2f3f5;border-radius:10px;width:max-content}
.report-mode-btn{border:0;background:transparent;color:#666;padding:8px 18px;border-radius:7px;cursor:pointer;font-size:13px;font-weight:600}
.report-mode-btn.active{background:#fff;color:#8b1a1a;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.private-report-card{background:#fff;border-radius:10px;padding:16px 18px;box-shadow:0 1px 4px rgba(0,0,0,.06);margin-bottom:16px}
.private-report-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;margin-top:14px}
.private-report-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.private-report-field label{font-size:11px;color:#777;font-weight:600}
.private-report-field input{width:100%;border:1px solid #ddd;border-radius:7px;padding:8px 10px;font-size:13px;background:#fff;color:#333}
.private-report-file{grid-column:1/-1;border:1px dashed #d5a3a3;border-radius:8px;padding:11px;background:#fffafa}
#report-rag-stats{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-top:14px;overflow-x:auto;padding-bottom:2px}
#report-rag-stats .private-report-file{grid-column:auto;min-width:120px}
.private-report-actions{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.private-report-primary{border:0;border-radius:7px;background:#8b1a1a;color:#fff;padding:8px 16px;font-size:12px;font-weight:600;cursor:pointer}
.private-report-primary:disabled{opacity:.55;cursor:not-allowed}
.private-report-secondary{border:1px solid #ddd;border-radius:7px;background:#fff;color:#555;padding:7px 13px;font-size:12px;cursor:pointer}
.private-report-status{font-size:12px;color:#777;min-height:18px}
.private-report-table-wrap{background:#fff;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,.06);overflow-x:auto}
.private-report-table{width:100%;border-collapse:collapse;min-width:820px}
.private-report-table th,.private-report-table td{padding:11px 12px;border-bottom:1px solid #f0f0f0;text-align:left;font-size:12px;vertical-align:middle}
.private-report-table th{background:#fafafa;color:#777;font-weight:600}
.private-report-table td{color:#444}
.private-report-row-actions{display:flex;gap:6px;white-space:nowrap}
.private-report-row-actions button,.private-report-row-actions a{border:1px solid #ddd;background:#fff;color:#555;border-radius:5px;padding:4px 8px;font-size:11px;cursor:pointer;text-decoration:none}
.private-report-row-actions .analyze{border-color:#b8c9ef;color:#1a56db;background:#f6f9ff}
body[data-theme="dark"] .report-mode-bar{background:#1f1f1f}
body[data-theme="dark"] .report-mode-btn{color:#aaa}
body[data-theme="dark"] .report-mode-btn.active{background:#353535;color:#f2a06b}
body[data-theme="dark"] .private-report-card,body[data-theme="dark"] .private-report-table-wrap{background:#252525}
body[data-theme="dark"] .private-report-field input,body[data-theme="dark"] .private-report-secondary,body[data-theme="dark"] .private-report-row-actions button,body[data-theme="dark"] .private-report-row-actions a{background:#2d2d2d;color:#ddd;border-color:#444}
body[data-theme="dark"] .private-report-file{background:#2b2424;border-color:#665050}
body[data-theme="dark"] .private-report-table th{background:#2d2d2d;color:#ccc}
body[data-theme="dark"] .private-report-table td{color:#ddd;border-color:#3a3a3a}
@media(max-width:760px){.private-report-form{grid-template-columns:1fr}.report-mode-bar{width:100%}.report-mode-btn{flex:1}.private-report-card{padding:14px}}


        .calc-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
        @media (max-width:900px) { .calc-grid { grid-template-columns:1fr; } }
        .calc-card { background:#fff; border-radius:10px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,0.06); }
        .calc-card-hdr { font-size:16px; font-weight:600; margin-bottom:16px; padding-bottom:10px; border-bottom:1px solid #f0f0f0; display:flex; align-items:center; gap:8px; }
        .calc-form-group { margin-bottom:12px; }
        .calc-form-group label { display:block; font-size:13px; color:#888; margin-bottom:4px; font-weight:500; }
        .calc-form-group label .unit { color:#8b1a1a; }
        .calc-input { width:100%; padding:8px 12px; border:1px solid #ddd; border-radius:6px; font-size:14px; font-family:"SF Mono",Consolas,"Microsoft YaHei",monospace; transition:border-color 0.2s; }
        .calc-input:focus { outline:none; border-color:#8b1a1a; box-shadow:0 0 0 3px rgba(139,26,26,0.08); }
        .calc-result { background:linear-gradient(135deg,#fdf6f6,#fafafa); border:1px solid #f0e0e0; border-radius:8px; padding:14px 18px; margin-top:12px; }
        .calc-result .label { font-size:12px; color:#999; margin-bottom:4px; }
        .calc-result .val { font-size:24px; font-weight:700; color:#8b1a1a; }
        .calc-result .detail { font-size:12px; color:#999; margin-top:4px; }
        .calc-table { width:100%; font-size:13px; border-collapse:collapse; }
        .calc-table th { color:#999; font-weight:500; border-bottom:1px solid #eee; text-align:left; padding:5px 4px; }
        .calc-table td { padding:5px 4px; border-bottom:1px solid #f5f5f5; }
        .calc-table tr:hover td { background:#fdf6f6; }
        .calc-formula { font-size:13px; color:#666; line-height:2.2; }
        .calc-formula b { color:#8b1a1a; }

        /* Compound calculator: eliminate light surfaces in dark mode. */
        body[data-theme="dark"] #page-calculator{color:#d7dce3}
        body[data-theme="dark"] #page-calculator .calc-card{background:#24282f!important;border:1px solid #373d46;box-shadow:0 4px 16px rgba(0,0,0,.18)!important}
        body[data-theme="dark"] #page-calculator .calc-card-hdr{color:#e5e9ef;border-bottom-color:#3a4049}
        body[data-theme="dark"] #page-calculator .calc-input{background:#1e2228!important;border-color:#414852!important;color:#e5e9ef!important;color-scheme:dark}
        body[data-theme="dark"] #page-calculator .calc-input::placeholder{color:#737c88}
        body[data-theme="dark"] #page-calculator .calc-result{background:#292e35!important;border-color:#414852!important;box-shadow:none!important}
        body[data-theme="dark"] #page-calculator .calc-result .label,
        body[data-theme="dark"] #page-calculator .calc-result .detail{color:#a2aab5}
        body[data-theme="dark"] #page-calculator .calc-table{color:#d5dae1}
        body[data-theme="dark"] #page-calculator .calc-table th{border-bottom-color:#444b55;color:#aeb6c1}
        body[data-theme="dark"] #page-calculator .calc-table td{border-bottom-color:#363c45;color:#d5dae1}
        body[data-theme="dark"] #page-calculator .calc-table tr:hover td{background:#2b3037!important}
        body[data-theme="dark"] #page-calculator .calc-formula{color:#bac1ca}
        body[data-theme="dark"] #page-calculator [style*="border-right:1px solid #f0f0f0"]{border-right-color:#414852!important}
        body[data-theme="dark"] #page-calculator [style*="border-top:1px solid #f0f0f0"]{border-top-color:#414852!important}


        .pm-header{background:linear-gradient(135deg,#8b1a1a 0%,#5c0f0f 50%,#1a1a1a 100%);padding:24px;text-align:center;border-radius:10px;margin-bottom:18px;color:#fff}
        .pm-header h2{font-size:22px;font-weight:700;letter-spacing:2px;margin:0}
        .pm-header h2 span{color:#ffc107}
        .pm-header p{color:#ccc;margin-top:4px;font-size:13px}
        .pm-grid{display:grid;grid-template-columns:minmax(320px, 1fr) minmax(400px, 1fr);gap:20px}
        @media(max-width:900px){.pm-grid{grid-template-columns:1fr}}
        .pm-card{background:#fff;border-radius:10px;padding:20px;box-shadow:0 1px 4px rgba(0,0,0,0.06);margin-bottom:16px}
        .pm-card-hdr{font-size:15px;font-weight:600;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;gap:8px}
        .pm-form-group{margin-bottom:12px}
        .pm-form-group label{display:block;font-size:13px;color:#888;margin-bottom:4px;font-weight:500}
        .pm-form-group label .unit{color:#8b1a1a}
        .pm-input-row{display:flex;gap:8px;align-items:center}
        .pm-input-row input{flex:1}
        .pm-input{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:"SF Mono",Consolas,"Microsoft YaHei",monospace;transition:border-color .2s}
        .pm-input:focus{outline:none;border-color:#8b1a1a;box-shadow:0 0 0 3px rgba(139,26,26,.08)}
        .pm-select{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:6px;font-size:14px;background:#fff}
        .pm-search{position:relative}
        .pm-suggestions{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #ddd;border-radius:0 0 8px 8px;max-height:200px;overflow-y:auto;z-index:100;display:none;box-shadow:0 4px 16px rgba(0,0,0,.1)}
        .pm-suggestions .item{padding:8px 12px;cursor:pointer;font-size:13px;display:flex;justify-content:space-between;border-bottom:1px solid #f5f5f5}
        .pm-suggestions .item:hover{background:#fdf6f6}
        .pm-suggestions .item .code{color:#999;font-size:11px}
        .pm-price{min-height:40px;margin-top:10px;padding:10px 14px;background:#fafafa;border-radius:6px;display:none;align-items:center;gap:12px}
        .pm-price .name{font-weight:600;font-size:14px}
        .pm-price .price{font-size:20px;font-weight:700;color:#8b1a1a}
        .pm-price .chg{font-size:12px}
        .pm-price .chg.up{color:#c41e3a}.pm-price .chg.down{color:#2e7d32}
        .pm-result{background:linear-gradient(135deg,#fdf8f6,#fafafa);border:1px solid #f0e0e0;border-radius:8px;padding:14px 18px;margin-top:12px}
        .pm-result .label{font-size:12px;color:#999}
        .pm-result .val{font-size:24px;font-weight:700;color:#8b1a1a}
        .pm-result .detail{font-size:12px;color:#999;margin-top:4px}
        .pm-dash{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:12px}
        @media(max-width:700px){.pm-dash{grid-template-columns:repeat(2,1fr)}}
        .pm-kpi{background:#fafafa;border-radius:8px;padding:12px;text-align:center;border-top:3px solid #8b1a1a}
        .pm-kpi.gold{border-top-color:#c9a84c}
        .pm-kpi.blue{border-top-color:#1565c0}
        .pm-kpi.green{border-top-color:#2e7d32}
        .pm-kpi .lbl{font-size:11px;color:#999;margin-bottom:3px}
        .pm-kpi .val{font-size:20px;font-weight:700;color:#333}
        .pm-kpi .sub{font-size:11px;color:#999;margin-top:2px}
        .pm-tabs{display:flex;gap:0;margin-bottom:14px}
        .pm-tab{padding:8px 18px;cursor:pointer;font-size:13px;font-weight:500;border:1px solid #e0e0e0;background:#fff;color:#888;transition:all .15s;white-space:nowrap}
        .pm-tab:first-child{border-radius:8px 0 0 8px}
        .pm-tab:last-child{border-radius:0 8px 8px 0}
        .pm-tab.active{background:#8b1a1a;color:#fff;border-color:#8b1a1a}
        .pm-tab:hover:not(.active){color:#8b1a1a}
        .pm-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}
        .pm-table th{background:#f8f9fa;padding:7px 8px;text-align:center;font-weight:600;font-size:11px;color:#888;border-bottom:2px solid #e0e0e0}
        .pm-table td{padding:7px 8px;text-align:center;border-bottom:1px solid #f5f5f5}
        .pm-table tr:hover td{background:#fdf6f6}
        .pm-tier-tag{display:inline-block;padding:2px 10px;border-radius:12px;font-size:11px;font-weight:600}
        .pm-tier-tag.t1{background:rgba(139,26,26,.15);color:#8b1a1a}
        .pm-tier-tag.t2{background:rgba(201,168,76,.2);color:#b8860b}
        .pm-tier-tag.t3{background:rgba(21,101,192,.15);color:#1565c0}
        .pm-tier-tag.t4{background:rgba(46,125,50,.15);color:#2e7d32}
        .pm-tier-tag.res{background:rgba(139,148,158,.15);color:#888}
        .pm-chart-wrap{position:relative;height:300px;margin-top:14px}
        .pm-strategy-note{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;font-size:12px;color:#888;line-height:1.8;margin-top:12px}
        .pm-strategy-note strong{color:#8b1a1a}
        .pm-hidden{display:none!important}

        /* Cost manager: complete dark-theme surface coverage. */
        body[data-theme="dark"] #page-position{color:#d7dce3}
        body[data-theme="dark"] #page-position .pm-card{background:#24282f!important;border:1px solid #373d46;box-shadow:0 4px 16px rgba(0,0,0,.18)!important}
        body[data-theme="dark"] #page-position .pm-card-hdr{color:#e5e9ef;border-bottom-color:#3a4049}
        body[data-theme="dark"] #page-position .pm-input,
        body[data-theme="dark"] #page-position .pm-select{background:#1e2228!important;border-color:#414852!important;color:#e5e9ef!important;color-scheme:dark}
        body[data-theme="dark"] #page-position .pm-input::placeholder{color:#737c88}
        body[data-theme="dark"] #page-position .pm-price,
        body[data-theme="dark"] #page-position .pm-kpi{background:#2c3138!important;color:#d7dce3}
        body[data-theme="dark"] #page-position .pm-result,
        body[data-theme="dark"] #page-position .result-box{background:#292e35!important;border-color:#414852!important;box-shadow:none!important}
        body[data-theme="dark"] #page-position .pm-result .detail,
        body[data-theme="dark"] #page-position .pm-result .label,
        body[data-theme="dark"] #page-position .pm-kpi .lbl,
        body[data-theme="dark"] #page-position .pm-kpi .sub{color:#9fa7b2}
        body[data-theme="dark"] #page-position .pm-kpi .val,
        body[data-theme="dark"] #page-position #pmTotalCost{color:#e5e9ef!important}
        body[data-theme="dark"] #page-position .pm-table{color:#d5dae1}
        body[data-theme="dark"] #page-position .pm-table th{background:#2d3239!important;border-bottom-color:#444b55;color:#aeb6c1}
        body[data-theme="dark"] #page-position .pm-table td{border-bottom-color:#363c45;color:#d5dae1}
        body[data-theme="dark"] #page-position .pm-table tr:hover td{background:#2b3037!important}
        body[data-theme="dark"] #page-position .pm-tab{background:#292e35;color:#adb5c0;border-color:#414852}
        body[data-theme="dark"] #page-position .pm-tab.active{background:#8b1a1a;color:#fff;border-color:#8b1a1a}
        body[data-theme="dark"] #page-position .pm-strategy-note>div{padding:12px;border:1px solid #3a4049;border-radius:8px;background:#292e35}
        body[data-theme="dark"] #page-position button[style*="background:#fff"]{background:#2b3037!important;border-color:#48505b!important;color:#cbd2db!important}
        body[data-theme="dark"] #page-position #pmSuggestions{background:#24282f!important;border-color:#414852!important;color:#d7dce3}
        body[data-theme="dark"] #page-position #pmPnlSection{border-top-color:#454c56!important}
      

        #page-chat{overflow:hidden;display:flex;flex-direction:column}
        #page-chat.chat-fullscreen{position:fixed;inset:0;z-index:9500;height:100vh!important;padding:0;background:#f5f6fa}
        #page-chat.chat-fullscreen .chat-container{height:100vh;border-radius:0;box-shadow:none}
        body[data-theme="dark"] #page-chat.chat-fullscreen{background:#1a1a1a}
        .chat-container{display:flex;flex:1;min-height:0;gap:0;border:1px solid rgba(0,0,0,.08);border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 12px 40px rgba(0,0,0,.07)}
        .chat-sidebar{width:260px;min-width:260px;background:#f5f5f7;border-right:1px solid rgba(0,0,0,.08);display:flex;flex-direction:column;transition:width 0.2s ease,min-width 0.2s ease}
        .chat-sidebar.collapsed{width:56px;min-width:56px}
        .chat-sidebar-toggle{background:rgba(255,255,255,.75);border:1px solid rgba(0,0,0,.1);border-radius:8px;width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#6e6e73;flex-shrink:0;transition:all 0.15s}
        .chat-sidebar-toggle:hover{background:#eee;color:#333}
        .chat-sidebar-toggle svg{display:block}
        .chat-mobile-menu-btn{display:none;background:none;border:0;border-radius:7px;width:34px;height:34px;padding:0;color:#555;font-size:20px;cursor:pointer;align-items:center;justify-content:center;flex:0 0 auto}
        .chat-mobile-backdrop{display:none}
        .chat-sidebar-header{padding:10px 9px;border-bottom:1px solid rgba(0,0,0,.07);display:flex;align-items:flex-start;gap:6px}
        .chat-nav{flex:1;display:flex;flex-direction:column;gap:3px}
        .chat-nav-item{display:flex;align-items:center;gap:10px;min-height:40px;box-sizing:border-box;padding:8px 11px;border-radius:10px;cursor:pointer;color:#515154;font-size:13px;font-weight:560;transition:background .15s,color .15s;white-space:nowrap;user-select:none}
        .chat-nav-item:hover{background:rgba(0,0,0,.045);color:#1d1d1f}
        .chat-nav-item.active{background:#fff;color:#8b1a1a;font-weight:650;box-shadow:0 1px 4px rgba(0,0,0,.07)}
        .chat-nav-icon{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;flex:0 0 18px}
        .chat-nav-icon svg{display:block;width:18px;height:18px}
        .chat-nav-label{overflow:hidden;text-overflow:ellipsis}
        .chat-panel{flex:1;overflow-y:auto;display:flex;flex-direction:column;min-height:0}
        .chat-skills-view{flex:1;overflow:hidden;background:#fff}
        .chat-skills-head{padding:12px 20px 0}
        .skill-market-toolbar{padding:8px 0 10px;display:flex;align-items:center;gap:10px}
        .chat-skills-list{flex:1;overflow-y:auto;padding:8px}
        .chat-skills-search{margin:0 0 6px 0;padding:6px 10px;border:1px solid #e5e5e5;border-radius:8px;font-size:12px;outline:none;width:100%;box-sizing:border-box;transition:border-color 0.15s}
        .chat-skills-search:focus{border-color:#8b1a1a}
        .chat-skills-category{margin-bottom:6px}
        .chat-skills-cat-title{font-size:11px;color:#999;text-transform:uppercase;letter-spacing:0.5px;padding:6px 8px 2px 8px;font-weight:600}
        .chat-skill-card{display:block;width:100%;padding:8px 10px;border:none;background:transparent;text-align:left;cursor:pointer;border-radius:6px;margin-bottom:1px;transition:0.12s;font:inherit}
        .chat-skill-card:hover{background:#f0f2f7}
        .chat-skill-card-name{font-size:12px;color:#333;font-weight:500;margin-bottom:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
        .chat-skill-card-desc,.skill-description-text{font-size:12px;color:#999;line-height:1.5}
        .chat-skill-card-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
        /* Collapsed sidebar */
        .chat-sidebar.collapsed .chat-nav{order:2;display:flex;flex:0 0 auto;width:100%;gap:5px}
        .chat-sidebar.collapsed .chat-panel{display:none !important}
        .chat-sidebar.collapsed .chat-sidebar-header{height:100%;box-sizing:border-box;align-items:center;justify-content:flex-start;flex-direction:column;gap:10px;padding:10px 7px;border-bottom:none}
        .chat-sidebar.collapsed .chat-sidebar-toggle{order:1;width:40px;height:36px;border-color:transparent;background:transparent}
        .chat-sidebar.collapsed .chat-nav-item{position:relative;width:40px;min-height:40px;padding:0;justify-content:center;gap:0;border-radius:10px}
        .chat-sidebar.collapsed .chat-nav-icon{width:20px;height:20px;flex-basis:20px}
        .chat-sidebar.collapsed .chat-nav-icon svg{width:20px;height:20px}
        .chat-sidebar.collapsed .chat-nav-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
        .chat-sidebar.collapsed .chat-list{display:none}
        /* Slash autocomplete */
        .chat-slash-hint{position:absolute;left:0;right:0;bottom:100%;background:#fff;border:1px solid #e0e0e0;border-radius:10px 10px 0 0;box-shadow:0 -2px 16px rgba(0,0,0,0.1);max-height:260px;overflow-y:auto;display:none;z-index:50;margin-bottom:2px}
        .chat-slash-hint.show{display:block}
        .chat-slash-item{padding:8px 14px;cursor:pointer;display:flex;gap:10px;align-items:center;transition:0.08s;user-select:none}
        .chat-slash-item:hover,.chat-slash-item.selected{background:#fdf2f2}
        .chat-slash-item-name{font-size:13px;color:#333;font-weight:500;white-space:nowrap;flex-shrink:0}
        .chat-slash-item-desc{font-size:11px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
        .chat-list{flex:1;overflow-y:auto;padding:10px 9px}
        .chat-list-item{padding:11px 12px;border-radius:11px;cursor:pointer;margin-bottom:3px;transition:background .15s,border-color .15s,box-shadow .15s;border:1px solid transparent}
        .chat-list-item:hover{background:#eef0f4}
        .chat-list-item.active{background:#fff;border-color:#d0d5dd;box-shadow:0 1px 3px rgba(0,0,0,0.06)}
        .chat-background-spinner{display:inline-block;width:14px;height:14px;margin-left:7px;border:2px solid rgba(20,184,166,.22);border-top-color:#14b8a6;border-right-color:#14b8a6;border-radius:50%;vertical-align:-2px;animation:chat-background-spin .75s linear infinite}
        @keyframes chat-background-spin{to{transform:rotate(360deg)}}
        .chat-list-item-title{font-size:13px;font-weight:500;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}
        .chat-list-item-time{font-size:11px;color:#999}
        .chat-list-item-running{margin-top:4px;font-size:11px;color:#c26a00;font-weight:650}
        .chat-list-item-row{display:flex;justify-content:space-between;align-items:center}
        .chat-list-item-actions{display:flex;align-items:center;visibility:hidden}
        .chat-list-item:hover .chat-list-item-actions{visibility:visible}
        .chat-list-item-rename,.chat-list-item-del{font-size:15px;color:#aaa;cursor:pointer;padding:0 4px;line-height:1}
        .chat-list-item-rename:hover{color:#576b95}
        .chat-list-item-del:hover{color:#e74c3c}
        .chat-list-item-input{width:100%;min-width:0;border:1px solid #8aa4cf;border-radius:5px;padding:4px 6px;font-size:13px;outline:none;background:#fff;color:#333}
        .chat-list-empty{text-align:center;color:#bbb;padding:30px 20px;font-size:13px}
        .chat-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#fff}
        .chat-artifact-preview{width:46%;min-width:420px;display:none;flex-direction:column;background:#fff;border-left:1px solid #e5e7eb;min-height:0}
        .chat-artifact-preview.open{display:flex}
        .chat-artifact-header{height:44px;box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #eee;background:#fafbfc}
        .chat-artifact-title{font-size:13px;font-weight:600;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
        .chat-artifact-btn{border:1px solid #ddd;background:#fff;color:#555;border-radius:6px;padding:5px 9px;cursor:pointer;font-size:12px;text-decoration:none}
        .chat-artifact-btn:hover{border-color:#8b1a1a;color:#8b1a1a}
        .chat-artifact-body{flex:1;min-height:0;overflow:hidden;position:relative}
        .chat-artifact-frame{width:100%;height:100%;border:0;background:#fff}
        .chat-artifact-markdown{height:100%;overflow:auto;padding:24px 28px;box-sizing:border-box;color:#252525;line-height:1.75}
        .chat-artifact-card{display:flex;align-items:center;gap:10px;margin:10px 0 4px;padding:10px 12px;border:1px solid #f0c9aa;background:#fff8f1;border-radius:9px;cursor:pointer}
        .chat-artifact-card:hover{border-color:#c35a16;background:#fff3e7}
        .chat-artifact-card-name{flex:1;min-width:0;font-size:12px;font-weight:600;color:#7c3512;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
        .chat-main-header{min-height:50px;box-sizing:border-box;padding:9px 16px;border-bottom:1px solid rgba(0,0,0,.07);display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.82);backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px)}
        .chat-main-header h3{font-size:15px;color:#1d1d1f;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650;letter-spacing:-.01em}
        .chat-header-spacer{flex:1;min-width:8px}
        .chat-fullscreen-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid rgba(0,0,0,.1);background:#f5f5f7;color:#515154;border-radius:9px;padding:6px 10px;cursor:pointer;font-size:12px;white-space:nowrap}
        .chat-fullscreen-btn:hover{border-color:#8b1a1a;color:#8b1a1a}
        .chat-messages{flex:1;overflow-y:auto;min-width:0;min-height:0;padding:20px clamp(16px,4vw,48px);scrollbar-gutter:stable}
        .chat-msg{width:min(100%,900px);display:flex;min-width:0;max-width:100%;margin:0 auto 18px;animation:fadeInUp 0.25s ease}
        .chat-msg.user{justify-content:flex-end}
        .chat-msg-bubble{min-width:0;max-width:78%;box-sizing:border-box;padding:10px 14px;border-radius:14px;line-height:1.6;font-size:14px;word-break:break-word;overflow-wrap:anywhere}
        .chat-msg-bubble>*{max-width:100%;box-sizing:border-box}
        .chat-msg-bubble a{overflow-wrap:anywhere;word-break:break-all}
        .chat-msg-bubble img,.chat-msg-bubble svg,.chat-msg-bubble video{max-width:100%;height:auto}
        .chat-msg.user .chat-msg-bubble{background:#f2f2f7;color:#1d1d1f;border:1px solid #e5e5ea;border-bottom-right-radius:5px}
        .chat-msg.user .chat-msg-bubble.chat-skill-invocation-bubble{background:#f5f5f5;color:#151515;border-bottom-right-radius:14px;padding:9px 11px}
        .chat-msg.assistant .chat-msg-bubble{width:100%;max-width:100%;padding:10px 2px;background:transparent;color:#1d1d1f;border-radius:0;font-size:13px;line-height:1.75;font-style:normal}
        .chat-msg.assistant .chat-msg-bubble em,.chat-msg.assistant .chat-msg-bubble i,.chat-msg.assistant .chat-msg-bubble blockquote{font-style:normal}
        .chat-msg-bubble p{margin:0 0 6px 0}
        .chat-msg-bubble p:last-child{margin-bottom:0}
        .chat-msg-bubble pre{width:100%;max-width:100%;box-sizing:border-box;background:#1e1e2e;color:#e0e0e0;padding:12px 14px;border-radius:8px;overflow-x:auto;font-size:13px;line-height:1.5;margin:8px 0}
        .chat-msg-bubble code{font-family:"SF Mono",Consolas,monospace;font-size:13px}
        .chat-msg-bubble :not(pre)>code{background:rgba(0,0,0,0.08);padding:2px 5px;border-radius:4px}
        .chat-msg.user .chat-msg-bubble :not(pre)>code{background:rgba(0,0,0,.06)}
        .chat-msg-bubble table{width:100%;border-collapse:collapse;margin:8px 0;font-size:13px}
        .chat-msg-bubble table th,.chat-msg-bubble table td{border:1px solid #ddd;padding:6px 10px;text-align:left}
        .chat-msg-bubble table th{background:#f5f5f5;font-weight:600}
        .chat-msg-bubble ul,.chat-msg-bubble ol{margin:4px 0;padding-left:20px}
        .chat-msg-bubble blockquote{border-left:3px solid #8b1a1a;padding-left:12px;margin:8px 0;color:#666;font-style:normal}
        .chat-msg-bubble h1,.chat-msg-bubble h2,.chat-msg-bubble h3{margin:10px 0 5px 0;font-weight:600}
        .chat-msg-bubble h3{font-size:15px}
        .chat-thinking{border:1px solid #e8d5b7;background:#fffaf3;border-radius:8px;padding:10px 14px;margin:8px 0;font-size:13px;color:#8b6914;cursor:pointer;user-select:none}
        .chat-thinking summary{font-weight:600;color:#b8860b}
        .chat-thinking-content{margin-top:8px;white-space:pre-wrap;line-height:1.5}
        .chat-harness-preview{margin:0 0 12px;border:1px solid #9b6a32;border-radius:9px;background:#fffaf3;color:#5f4328;font-size:12px}
        .chat-harness-preview summary{display:flex;align-items:center;gap:8px;padding:8px 10px;cursor:pointer;list-style:none;font-weight:600}
        .chat-harness-preview summary::-webkit-details-marker{display:none}
        .chat-harness-preview-badge{display:inline-flex;align-items:center;border-radius:999px;background:#a94f00;color:#fff;padding:2px 8px;font-size:11px;letter-spacing:.02em}
        .chat-harness-preview-steps{display:grid;gap:6px;padding:0 10px 10px}
        .chat-harness-preview-step{display:flex;align-items:flex-start;gap:7px;color:#5f6672;line-height:1.45}
        .chat-harness-preview-step>span:first-child{color:#216e27;font-weight:700}
        .chat-tool-call{border:1px solid #c8d6e5;background:#f5f8fc;border-radius:8px;padding:10px 14px;margin:8px 0;font-size:13px}
        .chat-tool-call summary{font-weight:600;color:#4a6fa5;cursor:pointer}
        .chat-tool-call pre{margin:8px 0 0 0;font-size:12px}
        #streamingMsg .chat-msg-bubble{width:100%;max-width:none;padding:12px 2px;border-radius:0;background:transparent}
        #streamingMsg .chat-msg-bubble:has(.chat-codex-flow){padding:10px 4px 14px;background:transparent;border-radius:0}
        .chat-codex-flow{display:flex;flex-direction:column;min-width:0;margin:0;padding:2px 0 6px;color:#333;overflow:hidden}
        .chat-codex-elapsed{padding:2px 0 11px;color:#7b7f86;font-size:14px;font-variant-numeric:tabular-nums}
        .chat-codex-divider{height:1px;margin:0 0 14px;background:#e8eaee}
        .chat-codex-events{display:flex;flex-direction:column;gap:10px}
        .chat-codex-event{display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px;align-items:start;color:#555;font-size:14px;line-height:1.6}
        .chat-codex-event-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:20px;color:#8d929a;font-size:13px}
        .chat-codex-event.done .chat-codex-event-icon{color:#5f8d6d}
        .chat-codex-event.error .chat-codex-event-icon{color:#c94a4a}
        .chat-codex-event.current{color:#222}
        .chat-codex-event-title{font-weight:500;overflow-wrap:anywhere}
        .chat-codex-event-detail{margin-top:2px;color:#8b9098;font-size:13px;line-height:1.55;overflow-wrap:anywhere;white-space:normal}
        .chat-codex-progress-summary{margin:7px 0 0 28px;color:#a0a4ac;font-size:11px;line-height:1.4}
        .chat-codex-pulse{display:inline-flex;align-items:center;gap:3px;height:20px}
        .chat-codex-pulse i{display:block;width:4px;height:4px;border-radius:50%;background:#d97706;animation:chat-status-pulse 1.2s ease-in-out infinite}
        .chat-codex-pulse i:nth-child(2){animation-delay:.16s}.chat-codex-pulse i:nth-child(3){animation-delay:.32s}
        .chat-current-status-indicator{display:inline-flex;align-items:center;gap:3px;height:20px;padding-top:1px;flex-shrink:0}
        .chat-current-status-indicator i{display:block;width:5px;height:5px;border-radius:50%;background:#d97706;animation:chat-breath 1.6s ease-in-out infinite}
        .chat-current-status-indicator i:nth-child(2){animation-delay:.2s}.chat-current-status-indicator i:nth-child(3){animation-delay:.4s}
        @keyframes chat-status-pulse{0%,70%,100%{opacity:.28;transform:translateY(0)}35%{opacity:1;transform:translateY(-2px)}}
        .chat-current-status-body{min-width:0;flex:1}
        .chat-current-status-label{margin-bottom:2px;color:#98a2b3;font-size:10px;font-weight:700;letter-spacing:.08em}
        .chat-current-status-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:4px 7px;min-width:0;font-size:13px;line-height:1.5}
        .chat-current-status-mode{flex-shrink:0;color:#a85b00;font-weight:700}
        .chat-current-status-title{min-width:0;color:#333;font-weight:600;overflow-wrap:anywhere;white-space:normal}
        .chat-current-status-elapsed{margin-left:auto;flex-shrink:0;color:#999;font-size:11px;font-variant-numeric:tabular-nums;font-weight:500}
        .chat-current-status-detail{margin-top:4px;color:#888;font-size:12px;line-height:1.5;overflow-wrap:anywhere;white-space:normal}
        .chat-current-status .chat-activity-content{position:relative;clear:both;margin-top:7px;max-width:100%;box-sizing:border-box}
        .chat-completed-steps-title{margin:7px 0 3px;color:#999;font-size:11px;font-weight:600}
        .chat-activity-line{position:relative;display:flex;gap:9px;align-items:flex-start;padding:4px 0 4px 2px;color:#666;font-size:12px;line-height:1.45}
        .chat-activity-line:before{content:"";position:absolute;left:6px;top:18px;bottom:-5px;width:1px;background:#ddd}
        .chat-activity-line:last-child:before{display:none}
        .chat-activity-dot{width:9px;height:9px;margin-top:4px;border-radius:50%;background:#d97706;box-shadow:0 0 0 3px #fff3df;flex-shrink:0;z-index:1}
        .chat-activity-step{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:19px;margin-right:7px;border-radius:10px;background:#fff0da;color:#a85b00;font-size:10px;font-weight:700;vertical-align:1px}
        .chat-activity-line.done .chat-activity-dot{background:#2e9b54;box-shadow:0 0 0 3px #e8f5ec}
        .chat-activity-line.error .chat-activity-dot{background:#d14343;box-shadow:0 0 0 3px #fdeaea}
        .chat-activity-detail{color:#999;margin-top:1px;max-width:520px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
        .chat-activity-content{position:relative;margin:5px 0 3px;padding:8px 10px;border:1px solid #e7e9ed;border-radius:7px;background:#fff;color:#555;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;max-height:156px;max-width:100%;box-sizing:border-box;contain:layout paint}
        .chat-activity-summary{padding:3px 0 6px 20px;color:#999;font-size:11px}
        .chat-activity-time{color:#aaa;font-variant-numeric:tabular-nums;margin-right:6px;font-size:10px}
        .chat-thinking-status{display:flex;align-items:flex-start;gap:10px;padding:8px 2px;color:#7a7f89;font-size:13px;line-height:1.4}
        .chat-thinking-status .chat-current-status-indicator{position:static;flex:0 0 auto;margin-top:3px}
        .chat-thinking-status .chat-current-status-elapsed{margin-left:2px;color:#a0a4ac;font-size:11px}
        .chat-thinking-body{display:flex;flex-direction:column;gap:1px;min-width:0}
        .chat-thinking-label{color:#6b7280;font-size:13px;font-weight:500;overflow-wrap:anywhere}
        .chat-thinking-detail{color:#9aa1ab;font-size:12px;overflow-wrap:anywhere;white-space:normal}
        @keyframes chat-breath{0%,100%{opacity:.25;transform:scale(.7)}50%{opacity:1;transform:scale(1.15)}}
        .chat-stream-answer{min-width:0;max-width:100%;margin:0;padding:0;border:0;overflow-wrap:anywhere}
        .chat-input-area{padding:10px clamp(12px,4vw,48px) 14px;border-top:0;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 18%)}
        /* Minimal WorkBuddy-style input container */
        .chat-queue{display:none;width:100%;max-width:900px;margin:0 auto 8px;box-sizing:border-box}.chat-queue.show{display:block}.chat-queue-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;padding:0 4px;color:#737983;font-size:11px}.chat-queue-head strong{color:#424852;font-size:12px}.chat-queue-item{display:grid;grid-template-columns:22px minmax(0,1fr) 26px;align-items:center;gap:8px;margin-top:5px;padding:7px 8px;border:1px solid #e1e4e8;border-radius:10px;background:rgba(255,255,255,.94);color:#4b5360;font-size:12px}.chat-queue-index{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#eef0f3;color:#69717c;font-size:10px;font-weight:700}.chat-queue-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-queue-item button{width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:#939aa4;font-size:17px;cursor:pointer}.chat-queue-item button:hover{background:#f1f2f4;color:#4d5560}
        .chat-input-box{width:100%;max-width:900px;margin:0 auto;box-sizing:border-box;background:rgba(255,255,255,.96);border:1px solid #d2d2d7;border-radius:22px;padding:8px 9px 8px 14px;box-shadow:0 8px 28px rgba(0,0,0,.09);transition:border-color .2s,box-shadow .2s,transform .2s}
        .chat-input-box:focus-within{border-color:#86868b;box-shadow:0 10px 34px rgba(0,0,0,.12),0 0 0 3px rgba(0,0,0,.035)}
        .chat-input-main{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:64px}
        .chat-inline-input{position:relative;min-width:0;width:100%}
        .chat-selected-skill{display:none;align-items:center;gap:5px;flex-shrink:0;margin:3px 0;padding:4px 9px;border:0;border-radius:9px;background:#f1f1f1;color:#202124;font:500 15px/1.45 inherit;white-space:nowrap;cursor:pointer;max-width:min(430px,55vw)}
        .chat-selected-skill.show{display:inline-flex}
        .chat-selected-skills{position:absolute;z-index:2;top:2px;left:2px;display:flex;align-items:center;gap:5px;max-width:70%;width:auto;overflow:hidden;white-space:nowrap}
        .chat-selected-skills .chat-selected-skill{margin:1px 0;padding:2px 7px;font-size:12px;line-height:1.35}
        .chat-selected-skills .chat-selected-skill-icon{font-size:15px}
        .chat-attachments{display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:100%;width:100%}
        .chat-selected-skills:empty,.chat-attachments:empty{display:none}
        .chat-attachment-chip{display:inline-flex;align-items:center;gap:5px;max-width:220px;margin:3px 0;padding:4px 8px;border:1px solid #e1e5ea;border-radius:9px;background:#f7f8fa;color:#475467;font-size:11px;line-height:1.4;white-space:nowrap}
        .chat-attachment-name{overflow:hidden;text-overflow:ellipsis}
        .chat-attachment-remove{border:0;background:transparent;color:#98a0ad;cursor:pointer;padding:0;font-size:14px;line-height:1}
        .chat-selected-skill:hover{background:#e8e8e8}
        .chat-selected-skill:disabled{opacity:.6;cursor:default}
        .chat-selected-skill-icon{font-size:19px;line-height:1;color:#202124}
        .chat-selected-skill-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
        .chat-invoked-skill-wrap{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 7px}
        .chat-invoked-skill{display:inline-flex;align-items:center;gap:6px;max-width:min(430px,70vw);padding:4px 10px;border-radius:999px;background:#e7e7e7;color:#151515;font-size:15px;font-weight:500;line-height:1.45;white-space:nowrap}
        .chat-invoked-skill-icon{font-size:19px;line-height:1;color:#151515}
        .chat-invoked-skill-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
        .chat-skill-question{color:inherit;white-space:pre-wrap}
        .skill-create-btn{margin-left:auto;border:0;border-radius:8px;background:#8b1a1a;color:#fff;padding:8px 14px;font-size:12px;font-weight:600;cursor:pointer}
        .skill-create-form{display:grid;gap:13px}.skill-create-form label{display:grid;gap:6px;color:#525d70;font-size:12px;font-weight:600}
        .skill-create-form input,.skill-create-form textarea,.skill-create-form select{width:100%;box-sizing:border-box;border:1px solid #dfe3e9;border-radius:8px;background:#f7f8fa;padding:10px 12px;font:inherit;font-size:13px;outline:none}
        .skill-create-form textarea{min-height:100px;resize:vertical}.skill-tool-options{display:flex;flex-wrap:wrap;gap:10px;color:#555;font-size:12px}.skill-tool-options label{display:flex;align-items:center;gap:5px;font-weight:500}
        .chat-input-box textarea{flex:1 1 auto;min-width:0;width:100%;box-sizing:border-box;border:none;outline:none;background:transparent;color:#1d1d1f;font-size:13px;font-family:inherit;resize:none;min-height:56px;max-height:140px;line-height:1.5;padding:5px 2px 4px;overflow-wrap:anywhere;text-indent:var(--chat-skill-indent,0px)}
        .chat-input-box textarea.queue-placeholder::placeholder{font-size:calc(1em - 1px)}
        .chat-input-box textarea:disabled{opacity:0.6}
        .chat-input-bottom{position:relative;display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;margin-top:3px;padding-right:2px}
        .chat-input-bottom>*{min-width:0}
        .chat-input-tool{height:32px;border:0;border-radius:9px;background:transparent;color:#6e6e73;display:inline-flex;align-items:center;gap:4px;padding:0 7px;font-family:inherit;font-size:11px;font-weight:550;line-height:1;cursor:pointer;white-space:nowrap}
        .chat-input-tool:hover,.chat-input-tool.active{background:#f1f2f4;color:#202124}
        .chat-add-skill-btn{width:32px;padding:0;justify-content:center;font-size:19px;font-weight:400;line-height:1}
        .chat-input-tool-icon{font-size:15px;line-height:1}
        .chat-input-tool-icon svg{display:block;width:15px;height:15px}
        .chat-input-popover{position:absolute;left:0;bottom:34px;z-index:80;display:none;width:min(340px,calc(100vw - 56px));max-height:330px;overflow:auto;padding:8px;border:1px solid #e1e4e8;border-radius:13px;background:#fff;box-shadow:0 14px 38px rgba(24,32,48,.16)}
        .chat-input-popover.show{display:block}
        .chat-skill-picker-search{width:100%;box-sizing:border-box;margin-bottom:6px;border:1px solid #e2e5e9;border-radius:8px;padding:8px 10px;font:inherit;font-size:12px;outline:none}
        .chat-skill-picker-loading{padding:18px 10px;text-align:center;color:#9aa2af;font-size:12px}
        .chat-skill-picker-list{display:grid;gap:2px}
        .chat-skill-picker-item{display:block;width:100%;border:0;border-radius:9px;background:transparent;padding:9px 10px;text-align:left;cursor:pointer}
        .chat-skill-picker-item:hover{background:#f4f5f7}
        .chat-skill-picker-item.selected{background:#f7ecec}
        .chat-skill-picker-item.selected .chat-skill-picker-name{color:#8b1a1a}
        .chat-skill-picker-name{display:block;color:#252525;font-size:13px;font-weight:650}
        .chat-skill-picker-desc{display:block;margin-top:3px;color:#8a94a6;font-size:11px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .chat-permission-anchor{position:relative;display:flex;align-items:center}
        .chat-permission-popover{left:0;right:auto;bottom:31px;width:300px;max-height:none;overflow:visible;padding:15px}
        .chat-permission-copy{color:#7a8494;font-size:12px;line-height:1.7;padding-bottom:12px;border-bottom:1px solid #eceef1}
        .chat-permission-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:13px;color:#202124;font-size:14px;font-weight:600}
        .chat-permission-note{margin-top:7px;color:#98a0ad;font-size:10px;line-height:1.45}
        .chat-permission-switch{position:relative;width:42px;height:24px;flex:0 0 auto}
        .chat-permission-switch input{position:absolute;opacity:0;pointer-events:none}
        .chat-permission-switch span{position:absolute;inset:0;border-radius:999px;background:#e4e7eb;cursor:pointer;transition:.18s}
        .chat-permission-switch span:after{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.18s}
        .chat-permission-switch input:checked+span{background:#8b1a1a}
        .chat-permission-switch input:checked+span:after{transform:translateX(18px)}
        .chat-skill-source-wrap{align-items:center;gap:7px;min-width:0;color:#8a94a6;font-size:11px}
        .chat-attach-btn{border:1px solid #e2e5e9;border-radius:12px;background:#f7f8fa;color:#555;padding:5px 9px;font-size:11px;cursor:pointer;white-space:nowrap}
        #chatSkillSourceStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}
        .chat-skill-draft-card{margin-top:12px;padding:13px 14px;border:1px solid #e7c7a8;border-radius:10px;background:#fff9f3;color:#4c3b2d;font-size:12px;line-height:1.7}
        .chat-skill-draft-title{font-size:14px;font-weight:700;color:#8b1a1a;margin-bottom:4px}
        .chat-skill-draft-tools{color:#777;margin:4px 0 9px}
        .chat-skill-draft-card button{border:0;border-radius:7px;background:#8b1a1a;color:#fff;padding:7px 12px;font-weight:600;cursor:pointer}
        .chat-skill-draft-card button:disabled{opacity:.7;cursor:default}
        .chat-input-bottom .chat-model-wrap{position:relative;margin-left:auto;display:flex;flex:0 1 164px;max-width:164px;height:30px;align-items:center;min-width:64px}
        /* Message-level action buttons */
        .chat-msg-actions{display:flex;align-items:center;gap:2px;margin-top:6px;padding-top:6px;border-top:1px solid #f0f0f0;opacity:1;transition:opacity .18s}
        .chat-msg.assistant:hover .chat-msg-actions{opacity:1}
        .chat-action-btn{width:24px;height:24px;border:none;border-radius:5px;background:transparent;color:#8f949c;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.15s;padding:0}
        .chat-action-btn:hover{background:#f0f0f2;color:#555}
        .chat-action-btn.active{color:#8b1a1a}
        .chat-action-btn.active[data-type="up"] svg,.chat-action-btn.active[data-type="down"] svg{fill:currentColor;stroke:currentColor}
        .chat-action-btn svg{display:block}
        /* Codex-style run history: live is expanded, completed is collapsed. */
        .chat-activity-summary-bar{appearance:none;display:flex;align-items:center;gap:9px;width:100%;margin:3px 0 0;padding:8px 2px 11px;border:0;border-bottom:1px solid #eceef1;background:transparent;color:#7b7f86;font:inherit;font-size:13px;text-align:left;cursor:pointer;user-select:none}
        .chat-activity-summary-bar:hover{color:#3a3a3c}
        .chat-activity-summary-bar .sum-done{flex-shrink:0;color:#6f747c;font-weight:500;font-variant-numeric:tabular-nums}
        .chat-activity-summary-bar .sum-current{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#999ea6}
        .chat-activity-summary-bar .chev{margin-left:auto;color:#9ca1a9;font-size:19px;line-height:1;transition:transform .18s}
        .chat-activity-summary-bar.open .chev{transform:rotate(90deg)}
        .chat-activity-detail{display:none;margin:0 0 10px;padding:10px 2px 12px;border:0;border-bottom:1px solid #eceef1;background:transparent}
        .chat-activity-detail.open{display:block}
        .chat-act-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:start;gap:9px;padding:7px 0;font-size:13px;color:#3f4652}
        .chat-act-row .act-status{width:18px;height:20px;display:flex;align-items:center;justify-content:center;color:#878c94;flex-shrink:0}
        .chat-act-row .act-status svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
        .chat-act-row.running .act-status{color:#b56a12}
        .chat-act-row.error .act-status{color:#d14343}
        .chat-act-copy{display:flex;min-width:0;flex-direction:column;gap:2px;line-height:1.5}
        .chat-act-title{font-weight:500;overflow-wrap:anywhere}
        .chat-act-detail{color:#9297a0;font-size:12px;overflow-wrap:anywhere}
        .chat-act-row .act-time{margin-left:auto;color:#a0a4ac;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
        body[data-theme="dark"] .chat-activity-summary-bar,body[data-theme="dark"] .chat-activity-detail{border-color:#343447;color:#9aa3b2}
        body[data-theme="dark"] .chat-act-row{color:#c9d1dc}
        /* Intent summary card (Phase 2) */
        .chat-intent-card{margin:6px 12px 8px;padding:10px 13px;border:1px solid #f3d2b9;border-radius:9px;background:#fff8f2;color:#63462f;font-size:12.5px;line-height:1.6}
        .chat-intent-card .intent-head{display:flex;align-items:center;gap:6px;font-weight:650;color:#a34e18;margin-bottom:3px}
        .chat-intent-card .intent-steps{color:#7a5a42;font-size:12px}
        .chat-intent-collapsed{display:flex;align-items:center;gap:6px;margin:6px 12px 8px;padding:6px 12px;border:1px solid #f3d2b9;border-radius:999px;background:#fff8f2;color:#a34e18;font-size:12px;cursor:pointer;user-select:none}
        .chat-intent-collapsed .chev{margin-left:auto;color:#c98b5f;font-size:11px}
        body[data-theme="dark"] .chat-intent-card{background:#231d1a;border-color:#4a3427;color:#d9c3ae}
        body[data-theme="dark"] .chat-intent-collapsed{background:#231d1a;border-color:#4a3427;color:#e0a878}
        .chat-run-summary{appearance:none;display:flex;align-items:center;gap:8px;width:100%;margin:0 0 14px;padding:8px 2px 12px;border:0;border-bottom:1px solid #eceef1;background:transparent;color:#7d828a;font:500 14px/1.4 inherit;text-align:left;cursor:pointer}
        .chat-run-summary:hover{color:#30343a}
        .chat-run-chevron{color:#9ca1a9;font-size:22px;line-height:1;transition:transform .18s}
        .chat-run-summary.open .chat-run-chevron{transform:rotate(90deg)}
        .chat-run-detail{margin-top:-14px;margin-bottom:16px;padding-top:7px}
        body[data-theme="dark"] .chat-run-summary{border-color:#343447;color:#aab0b9}
        body[data-theme="dark"] .chat-run-summary:hover{color:#f0f0f0}
        /* KPI chip cards (Phase 5) */
        .chat-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 14px}
        .chat-kpi-card{padding:11px 13px;border:1px solid #e8eaee;border-radius:10px;background:linear-gradient(180deg,#fff,#fafbfc);box-shadow:0 4px 12px rgba(15,35,59,.05)}
        .chat-kpi-name{font-size:10.5px;font-weight:700;color:#8a94a6;letter-spacing:.04em;margin-bottom:4px}
        .chat-kpi-value{font-size:19px;font-weight:780;color:#132238;line-height:1.2}
        .chat-kpi-note{font-size:10.5px;color:#6b7280;margin-top:3px}
        body[data-theme="dark"] .chat-kpi-card{background:#1c1c36;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-kpi-value{color:#e8edf5}
        /* Report citation source links */
        .chat-citation-wrap{margin:10px 0 4px;padding:10px 12px;border:1px solid #e4e7eb;border-radius:9px;background:#fafbfc;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
        .chat-citation-title{font-size:11px;font-weight:700;color:#57606a;margin-right:2px}
        .chat-citation-link{display:inline-flex;align-items:center;padding:3px 9px;border:1px solid #d5d9e0;border-radius:999px;font-size:10.5px;font-weight:600;line-height:1.5;color:#57606a;white-space:nowrap;cursor:default}
        body[data-theme="dark"] .chat-citation-wrap{border-color:#2a2a4a;background:#17172e}
        body[data-theme="dark"] .chat-citation-title{color:#9aa3b2}
        body[data-theme="dark"] .chat-citation-link{border-color:#3a3a5e;color:#9aa3b2}
        /* Pill model selector */
        .chat-model-display{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;overflow:hidden;border-radius:15px;background:#f2f2f5;padding:0 22px;color:#515154;font-size:11.5px;line-height:1;white-space:nowrap;text-align:center;text-overflow:ellipsis;pointer-events:none;transition:background-color .15s}
        .chat-model-display::after{content:"";position:absolute;right:7px;top:50%;width:11px;height:11px;transform:translateY(-50%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E") center/11px 11px no-repeat}
        .chat-model-select{position:relative;z-index:2;width:100%;height:30px;appearance:none;-webkit-appearance:none;background:transparent;border:none;border-radius:15px;padding:0;color:transparent;font-size:11.5px;cursor:pointer;outline:none}
        .chat-model-select option{text-align:center;color:#515154;background:#fff}
        .chat-model-select optgroup{text-align:center;color:#515154;background:#fff}
        .chat-model-wrap:hover .chat-model-display,.chat-model-wrap:focus-within .chat-model-display{background:#e8e8ec}
        .chat-send-btn,.chat-stop-btn{width:36px;height:36px;box-sizing:border-box;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer;transition:transform .15s;flex:0 0 36px;display:flex;align-items:center;justify-content:center;line-height:1;margin-left:3px;padding:0;overflow:hidden;position:relative}
        .chat-send-btn:before,.chat-stop-btn:before{content:"";position:absolute;inset:2px;border-radius:50%;background:#111;transition:background .15s,transform .15s}
        .chat-send-btn svg,.chat-stop-btn svg{position:relative;z-index:1;display:block;width:17px;height:17px;flex:0 0 17px}.chat-stop-btn svg{width:15px;height:15px;flex-basis:15px}
        .chat-send-btn:hover:before,.chat-stop-btn:hover:before{background:#333}
        .chat-send-btn:active,.chat-stop-btn:active{transform:scale(.94)}
        .chat-send-btn:disabled{color:#fff;cursor:not-allowed}.chat-send-btn:disabled:before{background:#d0d2d5}
        .chat-cursor{display:inline-block;width:2px;height:1em;background:#8b1a1a;margin-left:2px;animation:chatCursorBlink 0.8s infinite;vertical-align:text-bottom}
        @keyframes chatCursorBlink{0%,50%{opacity:1}51%,100%{opacity:0}}
        .chat-typing{display:flex;gap:4px;padding:12px 0}
        .chat-typing span{width:7px;height:7px;border-radius:50%;background:#bbb;animation:typingBounce 1.4s infinite}
        .chat-typing span:nth-child(2){animation-delay:0.2s}
        .chat-typing span:nth-child(3){animation-delay:0.4s}
        @keyframes typingBounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}
        @keyframes fadeInUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
        @keyframes fadeInOut{0%{opacity:0;transform:translateY(4px)}15%{opacity:1;transform:translateY(0)}75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-4px)}}
        .chat-scroll-btn{position:absolute;bottom:100px;right:30px;width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid #e0e0e0;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,0.1);display:none;align-items:center;justify-content:center;font-size:16px;z-index:10}
        .chat-scroll-btn.show{display:flex}
        .chat-error-banner{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;padding:10px 16px;border-radius:8px;margin:0 20px 10px 20px;font-size:13px}
        /* Dark theme */
        body[data-theme="dark"] .chat-sidebar{background:#1a1a1a;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-sidebar-header{border-color:#2a2a4a}
        body[data-theme="dark"] .chat-sidebar-toggle{border-color:#3a3a5a;color:#aaa}
        body[data-theme="dark"] .chat-sidebar-toggle:hover{background:#252545;color:#e0e0e0}
        body[data-theme="dark"] .chat-list-item:hover{background:#252545}
        body[data-theme="dark"] .chat-list-item.active{background:#2a2a2a;border-color:#3a3a5a}
        body[data-theme="dark"] .chat-list-item-title{color:#e0e0e0}
        body[data-theme="dark"] .chat-main{background:#1e1e36}
        body[data-theme="dark"] .chat-main-header{background:#1a1a1a;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-main-header h3{color:#e0e0e0}
        body[data-theme="dark"] .chat-artifact-preview{background:#1e1e36;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-artifact-header{background:#1a1a1a;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-artifact-title{color:#e0e0e0}
        body[data-theme="dark"] .chat-artifact-markdown{color:#e0e0e0}
        body[data-theme="dark"] .chat-msg.assistant .chat-msg-bubble{background:transparent;color:#e0e0e0}
        body[data-theme="dark"] .chat-msg.user .chat-msg-bubble{background:#3a3a3c;border-color:#48484a;color:#f5f5f7}
        body[data-theme="dark"] .chat-msg.user .chat-msg-bubble.chat-skill-invocation-bubble{background:#333;color:#f0f0f0}
        body[data-theme="dark"] .chat-msg-bubble pre{background:#0d0d1a}
        body[data-theme="dark"] .chat-msg-bubble blockquote,body[data-theme="dark"] .chat-artifact-markdown blockquote{background:#272c33;border-color:#8b3a3a;color:#c4c9d0}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table,body[data-theme="dark"] #page-chat .chat-artifact-markdown table{background:#24282f;color:#d7dce3}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table th,body[data-theme="dark"] #page-chat .chat-artifact-markdown table th{background:#30353d !important;color:#edf0f4 !important;border-color:#4a515b !important}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table td,body[data-theme="dark"] #page-chat .chat-artifact-markdown table td{background:#24282f !important;color:#d7dce3 !important;border-color:#414852 !important}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table tbody tr:nth-child(even) td,body[data-theme="dark"] #page-chat .chat-artifact-markdown table tbody tr:nth-child(even) td{background:#282d34 !important}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table tbody tr:hover td,body[data-theme="dark"] #page-chat .chat-artifact-markdown table tbody tr:hover td{background:#30363e !important}
        body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble hr,body[data-theme="dark"] #page-chat .chat-artifact-markdown hr{border-color:#414852}
        body[data-theme="dark"] .chat-input-area{background:#1a1a1a;border-color:#2a2a4a}
        body[data-theme="dark"] .chat-input-box{background:#2a2a2a;border-color:#3a3a5a}
        body[data-theme="dark"] .chat-queue-item{border-color:#3a4048;background:#252a31;color:#c8cdd5}body[data-theme="dark"] .chat-queue-head{color:#8f98a4}body[data-theme="dark"] .chat-queue-head strong{color:#d8dde5}body[data-theme="dark"] .chat-queue-index{background:#343a43;color:#c8cdd5}body[data-theme="dark"] .chat-queue-item button:hover{background:#343a43;color:#e7eaf0}
        body[data-theme="dark"] .chat-input-box textarea{color:#e0e0e0}
        body[data-theme="dark"] .chat-input-tool{color:#b5bbc5}
        body[data-theme="dark"] .chat-attachment-chip{background:#303030;border-color:#484848;color:#ddd}
        body[data-theme="dark"] .chat-input-tool:hover,body[data-theme="dark"] .chat-input-tool.active{background:#363636;color:#fff}
        body[data-theme="dark"] .chat-input-popover{background:#252525;border-color:#414141}
        body[data-theme="dark"] .chat-skill-picker-search{background:#303030;border-color:#484848;color:#eee}
        body[data-theme="dark"] .chat-skill-picker-loading{color:#8f96a3}
        body[data-theme="dark"] .chat-skill-picker-item:hover{background:#333}
        body[data-theme="dark"] .chat-skill-picker-name,body[data-theme="dark"] .chat-permission-row{color:#eee}
        body[data-theme="dark"] .chat-permission-copy{border-color:#414141;color:#b3bac6}
        body[data-theme="dark"] .chat-selected-skill{background:#3a3a3a;color:#f0f0f0}
        body[data-theme="dark"] .chat-selected-skill:hover{background:#444}
        body[data-theme="dark"] .chat-selected-skill-icon{color:#f0f0f0}
        body[data-theme="dark"] .chat-invoked-skill{background:#444;color:#f0f0f0}
        body[data-theme="dark"] .chat-invoked-skill-icon{color:#f0f0f0}
        body[data-theme="dark"] .chat-input-box:focus-within{border-color:#8b3a3a;box-shadow:0 0 0 3px rgba(139,58,58,0.12)}
        body[data-theme="dark"] .chat-model-display{background:#2a2a4a;color:#ccc}
        body[data-theme="dark"] .chat-model-select option,body[data-theme="dark"] .chat-model-select optgroup{background:#2a2a4a;color:#ccc}
        body[data-theme="dark"] .chat-model-wrap:hover .chat-model-display,body[data-theme="dark"] .chat-model-wrap:focus-within .chat-model-display{background:#32325a}
        body[data-theme="dark"] .chat-action-btn{color:#666}
        body[data-theme="dark"] .chat-action-btn:hover{background:#2a2a4a;color:#ccc}
        body[data-theme="dark"] .chat-action-btn.active{color:#e06c6c}
        body[data-theme="dark"] .chat-msg-actions{border-color:#2a2a4a}
        body[data-theme="dark"] .chat-tool-call{background:#1e2d3d;border-color:#2a4a6a}
        body[data-theme="dark"] .chat-activity-title{color:#ddd}
        body[data-theme="dark"] .chat-codex-flow{color:#ddd}
        body[data-theme="dark"] .chat-codex-divider{background:#383852}
        body[data-theme="dark"] .chat-codex-event.current{color:#eee}
        body[data-theme="dark"] .chat-codex-event,body[data-theme="dark"] .chat-codex-event-detail,body[data-theme="dark"] .chat-codex-elapsed{color:#999}
        body[data-theme="dark"] .chat-current-status{background:#24243b;border-color:#383852;color:#ddd}
        body[data-theme="dark"] .chat-current-status-title{color:#eee}
        body[data-theme="dark"] .chat-current-status-detail,body[data-theme="dark"] .chat-completed-steps-title{color:#999}
        body[data-theme="dark"] .chat-current-status-mode{color:#f4bd72}
        body[data-theme="dark"] .chat-activity-line{color:#bbb}
        body[data-theme="dark"] .chat-activity-line:before{background:#444}
        body[data-theme="dark"] .chat-activity-dot{box-shadow:0 0 0 3px #49351d}
        body[data-theme="dark"] .chat-activity-step{background:#49351d;color:#f4bd72}
        body[data-theme="dark"] .chat-activity-content{background:#1b1b30;border-color:#383852;color:#c8c8d8}
        body[data-theme="dark"] #streamingMsg .chat-msg-bubble{background:#24243d}
        body[data-theme="dark"] .chat-thinking{background:#2d2514;border-color:#5a4a2a}
        body[data-theme="dark"] .chat-msg-bubble :not(pre)>code{background:rgba(255,255,255,0.1)}
        /* Dark mode — new tab/skill elements */
        body[data-theme="dark"] .chat-nav-item{color:#888}
        body[data-theme="dark"] .chat-nav-item:hover{background:#252545;color:#ccc}
        body[data-theme="dark"] .chat-nav-item.active{background:#2a1a1a;color:#e06c6c}
        body[data-theme="dark"] .chat-panel-new div[style*="color:#555"]{color:#ccc !important}
        body[data-theme="dark"] .chat-panel-new div[style*="color:#999"]{color:#888 !important}
        body[data-theme="dark"] .chat-skill-card:hover{background:#252545}
        body[data-theme="dark"] .chat-skill-card-name{color:#e0e0e0}
        body[data-theme="dark"] .chat-skill-card-desc,body[data-theme="dark"] .skill-description-text{color:#888}
        body[data-theme="dark"] .chat-skills-search{background:#2a2a2a;border-color:#3a3a5a;color:#e0e0e0}
        body[data-theme="dark"] .chat-skills-search:focus{border-color:#8b3a3a}
        body[data-theme="dark"] #skillCatTabs .ind-tab-item{background:#1e1e36;border-color:#3a3a5a;color:#aaa}
        body[data-theme="dark"] #skillCatTabs .ind-tab-item.active{background:#342022;border-color:#8b3a3a;color:#e58a8a}
        body[data-theme="dark"] .chat-slash-hint{background:#1e1e36;border-color:#3a3a5a}
        body[data-theme="dark"] .chat-slash-item:hover,body[data-theme="dark"] .chat-slash-item.selected{background:#2a2a2a}
        body[data-theme="dark"] .chat-slash-item-name{color:#e0e0e0}
        body[data-theme="dark"] .chat-slash-item-desc{color:#888}
        body[data-theme="dark"] .chat-skills-view h3{color:#e0e0e0 !important}
        body[data-theme="dark"] .chat-skill-card-row{background:#1e1e36 !important;border-color:#3a3a5a !important}
        body[data-theme="dark"] .chat-skill-card-row:hover{border-color:#8b3a3a !important;background:#252545 !important}
        body[data-theme="dark"] .chat-skill-card-row .chat-skill-card-name{color:#e0e0e0 !important}
        @media (max-width:1100px){
          .chat-input-bottom{gap:3px;overflow:visible}
          .chat-input-tool{width:34px;height:34px;max-width:34px;padding:0;justify-content:center;overflow:hidden;flex:0 0 34px}
          .chat-add-skill-btn{width:34px}
          #chatWorkspaceLabel,#chatPermissionLabel{display:none}
          #chatWorkspaceLabel+span,#chatPermissionLabel+span{display:none}
          .chat-input-bottom .chat-model-wrap{flex:0 1 108px;min-width:70px;max-width:108px;overflow:hidden}
          .chat-model-select{width:100%;max-width:108px;min-width:0;text-overflow:ellipsis}
          .chat-send-btn,.chat-stop-btn{width:34px;height:34px;flex-basis:34px;margin-left:2px}
          .chat-skills-head{padding:10px 14px 0}
          #skillTopTabs .ind-tab-item{flex:1;text-align:center;padding:9px 12px;white-space:nowrap}
          #skillCatTabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:6px;border-bottom:0;overflow:visible}
          #skillCatTabs .ind-tab-item{margin:0;padding:7px 8px;border:1px solid #e4e7ec;border-radius:8px;text-align:center;font-size:12px;white-space:nowrap;background:#fff}
          #skillCatTabs .ind-tab-item.active{border-color:#8b1a1a;background:#fdf2f2;color:#8b1a1a}
          .skill-market-toolbar{align-items:stretch;flex-direction:column;gap:5px}
          #chatSkillsSearch{width:100%!important}
        }
        @media (max-width:768px){
          #page-chat{min-height:0;margin:-4px -8px 0}
          #page-chat.chat-fullscreen{height:100dvh!important}
          #page-chat.chat-fullscreen .chat-container{height:100dvh}
          .chat-container{position:relative;flex-direction:row;height:calc(100dvh - 112px);min-height:460px;border-radius:8px}
          .chat-sidebar,.chat-sidebar.collapsed{position:absolute;inset:0 auto 0 0;width:min(86vw,320px);min-width:0;max-height:none;z-index:82;border-right:1px solid #e1e4e8;border-bottom:0;box-shadow:12px 0 28px rgba(16,24,40,.18);transform:translateX(-105%);transition:transform .2s ease;background:#f8f9fb}
          .chat-sidebar.mobile-open,.chat-sidebar.collapsed.mobile-open{transform:translateX(0)}
          .chat-sidebar.collapsed .chat-nav{display:flex}
          .chat-sidebar.collapsed .chat-panel{display:flex!important}
          .chat-sidebar.collapsed .chat-sidebar-header{height:auto;align-items:flex-start;justify-content:initial;flex-direction:row;gap:6px;padding:8px;border-bottom:1px solid #e8e8e8}
          .chat-sidebar.collapsed .chat-nav{order:initial;flex:1;width:auto;gap:3px}
          .chat-sidebar.collapsed .chat-nav-item{width:auto;min-height:40px;padding:8px 11px;justify-content:flex-start;gap:10px}
          .chat-sidebar.collapsed .chat-nav-icon{width:18px;height:18px;flex-basis:18px}
          .chat-sidebar.collapsed .chat-nav-icon svg{width:18px;height:18px}
          .chat-sidebar.collapsed .chat-nav-label{position:static;width:auto;height:auto;padding:0;margin:0;overflow:hidden;clip:auto;white-space:nowrap;border:0}
          .chat-mobile-backdrop{position:absolute;inset:0;z-index:81;background:rgba(15,23,42,.32)}
          .chat-mobile-backdrop.show{display:block}
          .chat-mobile-menu-btn{display:inline-flex}
          .chat-sidebar-toggle{display:none}
          .chat-main{width:100%}
          .chat-main-header{height:48px;box-sizing:border-box;padding:7px 10px;gap:8px}
          .chat-main-header h3{font-size:14px}
          .chat-fullscreen-btn{display:none}
          .chat-messages{width:100%;max-width:100%;box-sizing:border-box;padding:10px 9px 6px;overscroll-behavior:contain;overflow-x:hidden}
          .chat-msg{width:100%;margin-bottom:12px}
          .chat-msg.assistant{justify-content:flex-start}
          .chat-msg-bubble{max-width:94%;padding:9px 11px;font-size:14px;line-height:1.65;overflow-x:hidden}
          .chat-msg.assistant .chat-msg-bubble{width:100%;max-width:100%}
          .chat-msg-bubble pre{max-width:100%;padding:10px;font-size:12px}
          .chat-msg-bubble table{display:block;overflow-x:auto;max-width:100%;white-space:nowrap}
          .chat-msg-bubble :not(pre)>code{white-space:normal;overflow-wrap:anywhere;word-break:break-all}
          .chat-run-summary,.chat-run-detail{min-width:0;max-width:100%}
          .chat-citation-link{max-width:100%;white-space:normal;overflow-wrap:anywhere}
          #streamingMsg .chat-msg-bubble{padding:9px 5px}
          .chat-codex-event{grid-template-columns:18px minmax(0,1fr);gap:6px;font-size:13px}
          .chat-codex-event-detail{font-size:12px}
          .chat-input-area{padding:7px 7px calc(8px + env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(255,255,255,0),#fff 14%)}
          .chat-input-box{border-radius:20px;padding:6px 6px 6px 10px}
          .chat-input-main{min-height:54px;gap:4px}
          .chat-selected-skills{max-width:70%}
          .chat-attachments{max-width:100%;width:100%}
          .chat-selected-skill{max-width:calc(100vw - 40px);font-size:13px}
          .chat-attachment-chip{max-width:calc(100vw - 40px)}
          .chat-input-box textarea{width:100%;min-height:46px;max-height:112px;font-size:14px;padding:4px 2px}
          .chat-input-bottom{gap:2px;min-width:0;max-width:100%;padding-right:0;overflow:visible}
          .chat-input-tool{width:44px;height:44px;max-width:44px;padding:0;justify-content:center;overflow:hidden;border-radius:12px}
          .chat-add-skill-btn{width:44px}
          #chatWorkspaceLabel,#chatPermissionLabel{display:none}
          #chatWorkspaceLabel+span,#chatPermissionLabel+span{display:none}
          .chat-input-bottom .chat-model-wrap{min-width:56px;max-width:84px;height:40px;overflow:hidden}
          .chat-model-display{border-radius:13px;padding:0 20px;font-size:10.5px}
          .chat-model-select{width:100%;height:40px;max-width:84px;min-width:0;font-size:10.5px;border-radius:13px}
          .chat-send-btn,.chat-stop-btn{width:40px;height:40px;flex-basis:40px;margin-left:2px;border-radius:50%}
          .chat-send-btn:before,.chat-stop-btn:before{inset:3px}
          .chat-input-popover{position:fixed;left:8px;right:8px;bottom:calc(76px + env(safe-area-inset-bottom));width:auto;max-height:min(55dvh,420px);z-index:95}
          .chat-permission-popover{left:auto;right:8px;width:min(300px,calc(100vw - 16px));padding:13px}
          .chat-scroll-btn{right:14px;bottom:104px}
          .chat-error-banner{margin:0 8px 7px;padding:8px 10px}
          .chat-skills-head{padding:8px 10px 0!important}
          #skillCatTabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
          #skillCatTabs .ind-tab-item{padding:7px 4px;font-size:11px;overflow:hidden;text-overflow:ellipsis}
          #chatSkillsSearch{width:100%!important}
          #skillMarketHeader span{display:none}
          #chatSkillsCatalog{padding:0 10px 10px!important}
          .chat-artifact-preview{position:absolute;inset:0;width:100%;min-width:0;z-index:90}
          .chat-artifact-header{height:48px;padding:7px 9px}
          .chat-artifact-markdown{padding:16px 14px}
        }

.model-config-actions button[data-status="success"]{border-color:#a5d6b5;background:#edf8f1;color:#237a47}.model-config-actions button[data-status="error"]{border-color:#efb2b2;background:#fff2f2;color:#b4232c}body[data-theme="dark"] .model-config-actions button[data-status="success"]{border-color:#356448;background:#20392b;color:#80d3a2}body[data-theme="dark"] .model-config-actions button[data-status="error"]{border-color:#713e43;background:#42282c;color:#f0a0a6}

/* Complete dark theme surface coverage. Inline light styles are legacy page
   markup, so the theme must override them explicitly. */
body[data-theme="dark"] .content,
body[data-theme="dark"] #main-content,
body[data-theme="dark"] #settings-layout,
body[data-theme="dark"] #settings-content,
body[data-theme="dark"] .content>[id^="page-"]{background:#1a1a1a!important;color:#d7dce3}
body[data-theme="dark"] #settings-panel-admin-users { background:#252525 !important;color:#d7dce3;border-color:#363d46!important }
body[data-theme="dark"] #main-content [style*="background:#fff"]:not(#wechat-qr-placeholder),
body[data-theme="dark"] #main-content [style*="background: #fff"]:not(#wechat-qr-placeholder),
body[data-theme="dark"] #main-content [style*="background:white"]:not(#wechat-qr-placeholder),
body[data-theme="dark"] #main-content [style*="background: white"]:not(#wechat-qr-placeholder){background:#252525!important;box-shadow:none!important}
body[data-theme="dark"] #main-content [style*="background:#fafafa"],
body[data-theme="dark"] #main-content [style*="background:#f7f8fa"],
body[data-theme="dark"] #main-content [style*="background:#f5f5f5"],
body[data-theme="dark"] #main-content [style*="background:#f0f0f0"]{background:#2a2f36!important}
body[data-theme="dark"] .private-report-card,
body[data-theme="dark"] .private-report-table-wrap,
body[data-theme="dark"] .chat-container,
body[data-theme="dark"] .chat-main,
body[data-theme="dark"] .chat-skills-view,
body[data-theme="dark"] .chat-artifact-preview,
body[data-theme="dark"] .chat-activity-content,
body[data-theme="dark"] .chat-input-popover{background:#252a31!important;border-color:#3b424c!important;color:#d7dce3}
body[data-theme="dark"] textarea,
body[data-theme="dark"] .private-report-field input,
body[data-theme="dark"] .chat-list-item-input{background:#1f242a!important;border-color:#444b55!important;color:#e5e7eb!important}
body[data-theme="dark"] .private-report-secondary,
body[data-theme="dark"] .private-report-row-actions button,
body[data-theme="dark"] .private-report-row-actions a,
body[data-theme="dark"] .chat-artifact-btn,
body[data-theme="dark"] .chat-scroll-btn,
body[data-theme="dark"] #settings-panel-admin-users button[style*="background:#fff"]{background:#2b3037!important;border-color:#464d57!important;color:#c8cfd8!important}
body[data-theme="dark"] .account-membership-card{background:#33281d!important;border-color:#665037!important}
body[data-theme="dark"] #auth-wechat-bind-tip{background:#1e382b!important;color:#82d6a5!important}
body[data-theme="dark"] #auth-error,
body[data-theme="dark"] #admin-users-error,
body[data-theme="dark"] #model-eval-error,
body[data-theme="dark"] .model-dialog-error{background:#42282c!important;color:#f1a0a7!important}
body[data-theme="dark"] #model-eval-progress,
body[data-theme="dark"] #admin-password-result{background:#352c20!important;border-color:#695331!important;color:#e6c37f!important}
body[data-theme="dark"] #admin-users-table-wrap,
body[data-theme="dark"] #admin-promo-table-wrap,
body[data-theme="dark"] #model-eval-details-body{background:#22272e!important;border-color:#3b424c!important}
body[data-theme="dark"] table tbody tr{border-color:#343a43!important}
body[data-theme="dark"] hr,
body[data-theme="dark"] [style*="border-bottom:1px solid #eee"],
body[data-theme="dark"] [style*="border-bottom:1px solid #f0f0f0"]{border-color:#3b424c!important}
body[data-theme="dark"] .value-checklist div{border-color:#3b424c;background:#252a31;box-shadow:none}
@media(max-width:1100px) and (min-width:701px){.value-checklist{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* AI assistant dark theme: neutral, low-contrast layers inspired by modern
   desktop AI workspaces. Keep this block after the legacy global overrides. */
body[data-theme="dark"] #page-chat{
  --chat-dark-canvas:#171717;
  --chat-dark-main:#1b1b1b;
  --chat-dark-raised:#242424;
  --chat-dark-hover:#2a2a2a;
  --chat-dark-border:#353535;
  --chat-dark-text:#d6d6d6;
  --chat-dark-muted:#929292;
  color-scheme:dark;
  background:var(--chat-dark-canvas)!important;
}
body[data-theme="dark"] #page-chat .chat-container{background:var(--chat-dark-canvas)!important;border-color:var(--chat-dark-border)!important;box-shadow:none}
body[data-theme="dark"] #page-chat .chat-sidebar{background:var(--chat-dark-canvas)!important;border-color:#303030!important}
body[data-theme="dark"] #page-chat .chat-sidebar-header{border-color:#303030}
body[data-theme="dark"] #page-chat .chat-sidebar-toggle{background:#242424;border-color:#3a3a3a;color:#a7a7a7}
body[data-theme="dark"] #page-chat .chat-sidebar-toggle:hover{background:#303030;border-color:#474747;color:#ededed}
body[data-theme="dark"] #page-chat .chat-nav-item{color:#a5a5a5}
body[data-theme="dark"] #page-chat .chat-nav-item:hover{background:#222;color:#e3e3e3}
body[data-theme="dark"] #page-chat .chat-nav-item.active{background:#292929;color:#ededed;box-shadow:none}
body[data-theme="dark"] #page-chat .chat-list-item:hover{background:#222}
body[data-theme="dark"] #page-chat .chat-list-item.active{background:#272727;border-color:#3a3a3a;box-shadow:none}
body[data-theme="dark"] #page-chat .chat-list-item-title{color:#d8d8d8}
body[data-theme="dark"] #page-chat .chat-list-item-time{color:#797979}
body[data-theme="dark"] #page-chat .chat-main,
body[data-theme="dark"] #page-chat .chat-skills-view,
body[data-theme="dark"] #page-chat .chat-messages{background:var(--chat-dark-main)!important}
body[data-theme="dark"] #page-chat .chat-main-header{background:rgba(27,27,27,.94);border-color:#303030;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
body[data-theme="dark"] #page-chat .chat-main-header h3{color:#ededed}
body[data-theme="dark"] #page-chat .chat-fullscreen-btn{background:#242424;border-color:#3a3a3a;color:#bcbcbc}
body[data-theme="dark"] #page-chat .chat-fullscreen-btn:hover{background:#2d2d2d;border-color:#4a4a4a;color:#f0f0f0}
body[data-theme="dark"] #page-chat .chat-msg{width:min(100%,960px)}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble{background:transparent!important;color:var(--chat-dark-text);font-weight:400;line-height:1.78}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble strong{color:#e5e5e5;font-weight:620}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble h1,
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble h2,
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble h3{color:#ededed}
body[data-theme="dark"] #page-chat .chat-msg.user .chat-msg-bubble{background:#292929;border-color:#3a3a3a;color:#ededed}
body[data-theme="dark"] #page-chat .chat-msg.user .chat-msg-bubble.chat-skill-invocation-bubble{background:#292929;border-color:#3a3a3a;color:#ededed}
body[data-theme="dark"] #page-chat .chat-msg-bubble pre,
body[data-theme="dark"] #page-chat .chat-artifact-markdown pre{background:#111!important;border:1px solid #343434;color:#d7d7d7}
body[data-theme="dark"] #page-chat .chat-msg-bubble :not(pre)>code,
body[data-theme="dark"] #page-chat .chat-artifact-markdown :not(pre)>code{background:#2c2c2c;color:#e0e0e0}
body[data-theme="dark"] #page-chat .chat-msg-bubble blockquote,
body[data-theme="dark"] #page-chat .chat-artifact-markdown blockquote{background:#222;border-color:#686868;color:#bdbdbd}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table,
body[data-theme="dark"] #page-chat .chat-artifact-markdown table{background:#1d1d1d;color:#d4d4d4}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table th,
body[data-theme="dark"] #page-chat .chat-artifact-markdown table th{background:#262626!important;color:#e4e4e4!important;border-color:#3f3f3f!important}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table td,
body[data-theme="dark"] #page-chat .chat-artifact-markdown table td{background:#1d1d1d!important;color:#d2d2d2!important;border-color:#3b3b3b!important}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table tbody tr:nth-child(even) td,
body[data-theme="dark"] #page-chat .chat-artifact-markdown table tbody tr:nth-child(even) td{background:#202020!important}
body[data-theme="dark"] #page-chat .chat-msg.assistant .chat-msg-bubble table tbody tr:hover td,
body[data-theme="dark"] #page-chat .chat-artifact-markdown table tbody tr:hover td{background:#282828!important}
body[data-theme="dark"] #page-chat .chat-kpi-grid{margin-left:0;margin-right:0}
body[data-theme="dark"] #page-chat .chat-kpi-card{background:#232323;border-color:#373737;box-shadow:none}
body[data-theme="dark"] #page-chat .chat-kpi-name{color:#969696}
body[data-theme="dark"] #page-chat .chat-kpi-value{color:#ededed}
body[data-theme="dark"] #page-chat .chat-kpi-note{color:#a0a0a0}
body[data-theme="dark"] #page-chat .chat-citation-wrap{background:#222;border-color:#373737}
body[data-theme="dark"] #page-chat .chat-citation-title,
body[data-theme="dark"] #page-chat .chat-citation-link{color:#a8a8a8}
body[data-theme="dark"] #page-chat .chat-citation-link{border-color:#414141}
body[data-theme="dark"] #page-chat .chat-msg-actions{border-color:#303030}
body[data-theme="dark"] #page-chat .chat-action-btn{color:#898989}
body[data-theme="dark"] #page-chat .chat-action-btn:hover{background:#292929;color:#d2d2d2}
body[data-theme="dark"] #page-chat .chat-input-area{background:linear-gradient(180deg,rgba(27,27,27,0),var(--chat-dark-main) 24%)!important}
body[data-theme="dark"] #page-chat .chat-input-box{max-width:960px;background:#272727!important;border-color:#3b3b3b;box-shadow:0 10px 32px rgba(0,0,0,.24)}
body[data-theme="dark"] #page-chat .chat-input-box:focus-within{border-color:#555;box-shadow:0 12px 34px rgba(0,0,0,.3),0 0 0 1px #555}
body[data-theme="dark"] #page-chat .chat-input-box textarea{background:transparent!important;border:0!important;color:#e2e2e2!important;box-shadow:none!important}
body[data-theme="dark"] #page-chat .chat-input-box textarea::placeholder{color:#777}
body[data-theme="dark"] #page-chat .chat-input-tool{color:#b3b3b3}
body[data-theme="dark"] #page-chat .chat-input-tool:hover,
body[data-theme="dark"] #page-chat .chat-input-tool.active{background:#343434;color:#f0f0f0}
body[data-theme="dark"] #page-chat .chat-model-display{background:#303030;color:#d0d0d0}
body[data-theme="dark"] #page-chat .chat-model-wrap:hover .chat-model-display,
body[data-theme="dark"] #page-chat .chat-model-wrap:focus-within .chat-model-display{background:#393939}
body[data-theme="dark"] #page-chat .chat-send-btn,
body[data-theme="dark"] #page-chat .chat-stop-btn{color:#1b1b1b}
body[data-theme="dark"] #page-chat .chat-send-btn:before,
body[data-theme="dark"] #page-chat .chat-stop-btn:before{background:#ededed}
body[data-theme="dark"] #page-chat .chat-send-btn:hover:before,
body[data-theme="dark"] #page-chat .chat-stop-btn:hover:before{background:#fff}
body[data-theme="dark"] #page-chat .chat-send-btn:disabled:before{background:#4a4a4a}
body[data-theme="dark"] #page-chat .chat-send-btn:disabled{color:#888}
body[data-theme="dark"] #page-chat .chat-input-popover{background:#252525!important;border-color:#3b3b3b!important;box-shadow:0 18px 44px rgba(0,0,0,.46)}
body[data-theme="dark"] #page-chat .chat-skill-picker-search,
body[data-theme="dark"] #page-chat .chat-list-item-input{background:#1d1d1d!important;border-color:#414141!important;color:#e2e2e2!important}
body[data-theme="dark"] #page-chat .chat-queue-item{background:#222;border-color:#373737;color:#c8c8c8}
body[data-theme="dark"] #page-chat .chat-queue-index{background:#303030;color:#cfcfcf}
body[data-theme="dark"] #page-chat .chat-artifact-preview{background:var(--chat-dark-main)!important;border-color:#353535!important}
body[data-theme="dark"] #page-chat .chat-artifact-header{background:#202020;border-color:#353535}
body[data-theme="dark"] #page-chat .chat-artifact-markdown{background:var(--chat-dark-main);color:var(--chat-dark-text)}
body[data-theme="dark"] #page-chat .chat-artifact-card{background:#242424;border-color:#3d3d3d}
body[data-theme="dark"] #page-chat .chat-artifact-card:hover{background:#2b2b2b;border-color:#555}
body[data-theme="dark"] #page-chat .chat-artifact-card-name{color:#d1d1d1}
body[data-theme="dark"] #page-chat .chat-tool-call,
body[data-theme="dark"] #page-chat .chat-thinking{background:#222;border-color:#393939;color:#c5c5c5}
body[data-theme="dark"] #page-chat .chat-harness-preview{background:#2a2118;border-color:#8c7358;color:#f1dfc9}
body[data-theme="dark"] #page-chat .chat-harness-preview-step{color:#d0c1b0}
body[data-theme="dark"] #page-chat .chat-harness-preview-badge{background:#b85c00;color:#fff}
body[data-theme="dark"] #page-chat .chat-harness-preview-step>span:first-child{color:#8bd18f}
body[data-theme="dark"] #page-chat .chat-current-status,
body[data-theme="dark"] #page-chat .chat-activity-content{background:#222!important;border-color:#393939!important;color:#cfcfcf}
body[data-theme="dark"] #page-chat #streamingMsg .chat-msg-bubble{background:transparent!important}
body[data-theme="dark"] #page-chat .chat-codex-divider,
body[data-theme="dark"] #page-chat .chat-run-summary{border-color:#343434}
body[data-theme="dark"] #page-chat .chat-scroll-btn{background:#292929!important;border-color:#414141!important;color:#cfcfcf!important}
body[data-theme="dark"] #page-chat .chat-messages,
body[data-theme="dark"] #page-chat .chat-list,
body[data-theme="dark"] #page-chat .chat-artifact-markdown{scrollbar-color:#555 transparent}
body[data-theme="dark"] #page-chat .chat-messages::-webkit-scrollbar,
body[data-theme="dark"] #page-chat .chat-list::-webkit-scrollbar,
body[data-theme="dark"] #page-chat .chat-artifact-markdown::-webkit-scrollbar{width:10px;height:10px}
body[data-theme="dark"] #page-chat .chat-messages::-webkit-scrollbar-track,
body[data-theme="dark"] #page-chat .chat-list::-webkit-scrollbar-track,
body[data-theme="dark"] #page-chat .chat-artifact-markdown::-webkit-scrollbar-track{background:transparent}
body[data-theme="dark"] #page-chat .chat-messages::-webkit-scrollbar-thumb,
body[data-theme="dark"] #page-chat .chat-artifact-markdown::-webkit-scrollbar-thumb{border:3px solid var(--chat-dark-main);border-radius:999px;background:#555}
body[data-theme="dark"] #page-chat .chat-list::-webkit-scrollbar-thumb{border:3px solid var(--chat-dark-canvas);border-radius:999px;background:#4b4b4b}

/* Food and medical analysis copy is populated dynamically. Semantic classes
   keep it readable after every sector switch instead of matching inline RGB. */
body[data-theme="dark"] #page-food .food-block,
body[data-theme="dark"] #page-medical .food-block{background:#232323!important;border:1px solid #343434!important;box-shadow:none!important}
body[data-theme="dark"] #page-food .food-block:hover,
body[data-theme="dark"] #page-medical .food-block:hover{background:#262626!important;border-color:#414141!important;box-shadow:0 8px 24px rgba(0,0,0,.18)!important}
body[data-theme="dark"] #page-food .food-block>div:first-child,
body[data-theme="dark"] #page-medical .food-block>div:first-child{color:#e5e7eb!important}
body[data-theme="dark"] #page-food .sector-analysis-copy,
body[data-theme="dark"] #page-medical .sector-analysis-copy{color:#c5cad1!important;font-weight:400;line-height:1.85!important}
body[data-theme="dark"] #page-food .sector-analysis-meta,
body[data-theme="dark"] #page-medical .sector-analysis-meta{color:#aeb5be!important}
body[data-theme="dark"] #page-food #food-sector-title,
body[data-theme="dark"] #page-medical #medical-sector-title{color:#f0f1f3!important}
body[data-theme="dark"] #page-food .sub-tab:not(.active),
body[data-theme="dark"] #page-medical .sub-tab:not(.active){color:#abb1b9!important}
body[data-theme="dark"] #page-food .sector-table td,
body[data-theme="dark"] #page-medical .sector-table td,
body[data-theme="dark"] #page-food .detail-table td,
body[data-theme="dark"] #page-medical .detail-table td{color:#c8cdd4!important}

/* Tushare custom company screener */
.company-search-card{margin-bottom:16px;padding:18px 20px;border:1px solid #e7eaf0;border-radius:12px;background:#fff;box-shadow:0 3px 14px rgba(16,24,40,.05)}
.company-section-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;margin:0 0 16px!important;padding:0;background:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
.company-section-tab{display:flex;align-items:center;gap:12px;min-height:74px;padding:14px 16px!important;border:1px solid #e2e6ec!important;border-radius:12px!important;background:#fff!important;color:#344054!important;text-align:left;box-shadow:0 2px 10px rgba(16,24,40,.04);transition:border-color .16s,background .16s,box-shadow .16s,transform .16s}
.company-section-tab:hover{border-color:#c9cfd8!important;background:#fbfcfd!important;color:#1d2939!important;box-shadow:0 5px 16px rgba(16,24,40,.07);transform:translateY(-1px)}
.company-section-tab.active{border-color:#9f3a3a!important;background:#fffafa!important;color:#8b1a1a!important;box-shadow:0 0 0 1px rgba(139,26,26,.08),0 5px 16px rgba(139,26,26,.07)}
.company-section-tab-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#f2f4f7;color:#667085}
.company-section-tab-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.company-section-tab.active .company-section-tab-icon{background:#f8e9e9;color:#8b1a1a}
.company-section-tab-copy{display:grid;gap:4px;min-width:0}.company-section-tab-copy strong{font-size:14px;line-height:1.2}.company-section-tab-copy small{color:#8a93a2;font-size:11px;font-weight:400;line-height:1.35;white-space:normal}
.company-section-tab.active .company-section-tab-copy small{color:#9a6262}
.company-analysis-tabs{max-width:620px}
.tushare-screener-shell{margin-bottom:16px;padding:20px;border:1px solid #e2e6ec;border-radius:14px;background:#fff;box-shadow:0 4px 18px rgba(16,24,40,.05)}
.tushare-screener-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.tushare-screener-heading h3{margin:0 0 5px;color:#1d2939;font-size:18px}.tushare-screener-heading p{margin:0;color:#667085;font-size:12px;line-height:1.6}.tushare-source-badge{padding:5px 10px;border-radius:999px;background:#eef4ff;color:#3155a4;font-size:11px;font-weight:700}
.tushare-screener-scope{display:grid;grid-template-columns:minmax(150px,200px) minmax(180px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end;padding:14px;border:1px solid #e8ebf0;border-radius:10px;background:#f8fafc}.tushare-screener-scope label:not(.tushare-screener-check){display:grid;gap:6px}.tushare-screener-scope label>span{color:#667085;font-size:11px;font-weight:600}.tushare-screener-scope select,.tushare-screener-scope input[type="search"]{width:100%;height:40px;padding:0 34px 0 11px;border:1px solid #d7dce3;border-radius:8px;background:#fff;color:#344054;font-size:13px}.tushare-screener-scope input[type="search"]{padding-right:11px}.tushare-screener-check{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;color:#475467;font-size:12px;white-space:nowrap}.tushare-screener-check input{accent-color:#8b1a1a}
.tushare-screener-picker{margin-top:16px;border:1px solid #e7eaf0;border-radius:10px;overflow:hidden}.tushare-screener-toolbar{display:flex;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #e7eaf0;background:#f8fafc}.tushare-metric-tabs{display:flex;gap:4px;flex:1;overflow-x:auto}.tushare-metric-tabs button{padding:7px 11px;border:0;border-radius:7px;background:transparent;color:#667085;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}.tushare-metric-tabs button:hover{background:#eef1f5;color:#344054}.tushare-metric-tabs button.active{background:#8b1a1a;color:#fff}.tushare-screener-toolbar input{width:210px;height:36px;padding:0 11px;border:1px solid #d7dce3;border-radius:8px;background:#fff;color:#344054;font-size:12px}
.tushare-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px}.tushare-metric-option{display:flex;align-items:center;gap:9px;min-height:54px;padding:9px 11px;border:1px solid #e3e7ed;border-radius:9px;background:#fff;color:#344054;text-align:left;cursor:pointer}.tushare-metric-option:hover{border-color:#c8ced8;background:#fafbfc}.tushare-metric-option.selected{border-color:#8b1a1a;background:#fdf5f5}.tushare-metric-check{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:22px;border-radius:50%;background:#eef1f5;color:#667085;font-size:14px;font-weight:700}.tushare-metric-option.selected .tushare-metric-check{background:#8b1a1a;color:#fff}.tushare-metric-option strong,.tushare-metric-option small{display:block}.tushare-metric-option strong{font-size:12px}.tushare-metric-option small{margin-top:3px;color:#98a2b3;font-size:10px;font-weight:400}
.tushare-selected-heading{display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px}.tushare-selected-heading>div{display:flex;align-items:center;gap:8px}.tushare-selected-heading strong{color:#344054;font-size:13px}.tushare-selected-heading span{color:#98a2b3;font-size:11px}.tushare-selected-heading button{border:0;background:transparent;color:#8b1a1a;font-size:12px;cursor:pointer}.tushare-selected-filters{display:grid;gap:8px}.tushare-filter-row{position:relative;display:flex;align-items:end;gap:10px;padding:10px 12px;border:1px solid #e4e7ec;border-radius:9px;background:#fbfcfd;min-width:0}.tushare-filter-row>.tushare-filter-drag{flex:0 0 28px}.tushare-filter-row>.tushare-filter-name{flex:1 1 0;min-width:0;overflow:hidden}.tushare-filter-row>.tushare-filter-time{flex:1 1 0;min-width:0}.tushare-filter-row>label:nth-of-type(1){flex:1 1 0;min-width:0}.tushare-filter-row>label:nth-of-type(2){flex:1 1 0;min-width:0}.tushare-filter-row>.tushare-filter-actions{flex:0 0 62px}.tushare-filter-row.dragging{opacity:.55}.tushare-filter-row.drag-before::before,.tushare-filter-row.drag-after::after{content:"";position:absolute;right:8px;left:8px;height:2px;border-radius:2px;background:#8b1a1a}.tushare-filter-row.drag-before::before{top:-5px}.tushare-filter-row.drag-after::after{bottom:-5px}.tushare-filter-drag{display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#98a2b3;font-size:15px;line-height:1;cursor:grab}.tushare-filter-drag:active{cursor:grabbing}.tushare-filter-drag:hover{background:#eef1f5;color:#475467}.tushare-filter-drag{display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#98a2b3;font-size:15px;line-height:1;cursor:grab}.tushare-filter-drag:active{cursor:grabbing}.tushare-filter-drag:hover{background:#eef1f5;color:#475467}.tushare-filter-name{min-width:0}.tushare-filter-name strong,.tushare-filter-name small{display:block}.tushare-filter-name strong{color:#344054;font-size:12px}.tushare-filter-name small{margin-top:4px;color:#98a2b3;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tushare-filter-time{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;min-width:0}.tushare-filter-time>span{color:#98a2b3;font-size:10px}.tushare-filter-time select,.tushare-filter-date-input{width:100%;height:36px;padding:0 9px;border:1px solid #d7dce3;border-radius:7px;background:#fff;color:#344054;font-size:11px}.tushare-filter-time .tushare-filter-date-input{margin-top:4px}.tushare-filter-row label{position:relative;display:grid;gap:4px;min-width:0}.tushare-filter-row label span{color:#98a2b3;font-size:10px}.tushare-filter-row input{width:100%;box-sizing:border-box;height:36px;padding:0 42px 0 10px;border:1px solid #d7dce3;border-radius:7px;background:#fff;color:#344054;font-size:11px;min-width:0}.tushare-filter-row input::placeholder{color:#98a2b3;font-size:11px;opacity:1}.tushare-filter-row em{position:absolute;right:10px;bottom:10px;color:#98a2b3;font-size:10px;font-style:normal}.tushare-filter-actions{display:flex;align-items:center;justify-content:flex-end;gap:2px}.tushare-filter-copy,.tushare-filter-remove{display:flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:0;border-radius:7px;background:transparent;color:#667085;cursor:pointer}.tushare-filter-copy svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tushare-filter-copy:hover{background:#eef1f5;color:#344054}.tushare-filter-remove{color:#d92d20;font-size:21px;line-height:1}.tushare-filter-remove:hover{background:#fbeaec;color:#b42318}.tushare-screener-empty{grid-column:1/-1;padding:26px 12px;color:#98a2b3;text-align:center;font-size:12px}.tushare-screener-empty.error{color:#b42318}.tushare-screener-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.tushare-screener-actions span{color:#98a2b3;font-size:11px}.tushare-screener-actions button{padding:10px 24px;border:0;border-radius:8px;background:#8b1a1a;color:#fff;font-size:13px;font-weight:600;cursor:pointer}.tushare-screener-results{padding:14px;border-radius:12px;background:#fff;overflow-x:auto;overflow-y:visible}

/* Good-industry controls remain legible in dark mode. */
body[data-theme="dark"] #page-industry .screen-dim-row label.dim-label,
body[data-theme="dark"] #page-industry .screen-opt{color:#d5dae1!important}
body[data-theme="dark"] #page-industry .screen-dim-row .dim-val{color:#f08c8c!important}
body[data-theme="dark"] #page-industry .screen-dim-row input[type="range"]{filter:brightness(1.2)}

body[data-theme="dark"] .tushare-screener-shell{border-color:#363c45;background:#22262c;box-shadow:none}
body[data-theme="dark"] .company-search-card{border-color:#353b44;background:#22262c;box-shadow:none}
body[data-theme="dark"] .company-section-tabs{background:transparent!important}
body[data-theme="dark"] .company-section-tab{border-color:#363d47!important;background:#22262c!important;color:#d8dde4!important;box-shadow:none}
body[data-theme="dark"] .company-section-tab:hover{border-color:#505966!important;background:#292e35!important;color:#f2f4f7!important}
body[data-theme="dark"] .company-section-tab.active{border-color:#a74a4e!important;background:#342527!important;color:#ff9096!important;box-shadow:0 0 0 1px rgba(167,74,78,.1)}
body[data-theme="dark"] .company-section-tab-icon{background:#30363f;color:#aeb6c2}
body[data-theme="dark"] .company-section-tab.active .company-section-tab-icon{background:#4a2d31;color:#ff9096}
body[data-theme="dark"] .company-section-tab-copy small{color:#9fa7b2}
body[data-theme="dark"] .company-section-tab.active .company-section-tab-copy small{color:#d7a4a7}
body[data-theme="dark"] .tushare-screener-heading h3,
body[data-theme="dark"] .tushare-selected-heading strong{color:#e6e9ed}
body[data-theme="dark"] .tushare-screener-heading p,
body[data-theme="dark"] .tushare-screener-actions span{color:#aab1bb}
body[data-theme="dark"] .tushare-source-badge{background:#27364a;color:#a9c7f5}
body[data-theme="dark"] .tushare-screener-scope,
body[data-theme="dark"] .tushare-screener-toolbar{border-color:#3a414b;background:#292e35}
body[data-theme="dark"] .tushare-screener-picker,
body[data-theme="dark"] .tushare-filter-row{border-color:#3a414b;background:#272c33}
body[data-theme="dark"] .tushare-screener-scope label>span,
body[data-theme="dark"] .tushare-screener-check,
body[data-theme="dark"] .tushare-metric-tabs button,
body[data-theme="dark"] .tushare-filter-name strong{color:#c9cfd7}
body[data-theme="dark"] .tushare-screener-scope select,
body[data-theme="dark"] .tushare-screener-scope input[type="search"],
body[data-theme="dark"] .tushare-screener-toolbar input,
body[data-theme="dark"] .tushare-filter-row input,
body[data-theme="dark"] .tushare-filter-time select{border-color:#49515d;background:#20242a;color:#e3e6ea}
body[data-theme="dark"] .tushare-metric-tabs button:hover{background:#343a43;color:#f0f2f4}
body[data-theme="dark"] .tushare-metric-tabs button.active{background:#8b1a1a;color:#fff}
body[data-theme="dark"] .tushare-metric-option{border-color:#3d444e;background:#292e35;color:#dce0e5}
body[data-theme="dark"] .tushare-metric-option:hover{border-color:#555f6d;background:#30363f}
body[data-theme="dark"] .tushare-metric-option.selected{border-color:#a94a4a;background:#392729}
body[data-theme="dark"] .tushare-metric-check{background:#3a414b;color:#c8ced7}
body[data-theme="dark"] .tushare-filter-drag{color:#aeb6c2}
body[data-theme="dark"] .tushare-filter-drag:hover{background:#343a43;color:#f0f2f4}
body[data-theme="dark"] .tushare-filter-copy{color:#b8c0ca}
body[data-theme="dark"] .tushare-filter-copy:hover{background:#343a43;color:#f0f2f4}
body[data-theme="dark"] .tushare-screener-results{background:#24282f}
body[data-theme="dark"] .tushare-screener-results table thead tr,
body[data-theme="dark"] .tushare-screener-results table tbody tr{background:#24282f!important}
body[data-theme="dark"] .tushare-screener-results table tbody tr:nth-child(even){background:#282d34!important}
body[data-theme="dark"] .tushare-screener-results table th,
body[data-theme="dark"] .tushare-screener-results table td{border-color:#3c434d!important;color:#d6dbe2!important}
body[data-theme="dark"] .tushare-screener-results button{border-color:#4a525e!important;background:#292e35!important;color:#d6dbe2!important}

.tushare-filter-primary{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}.tushare-filter-primary strong{flex:0 0 auto}.tushare-filter-variants{display:inline-grid;grid-template-columns:76px 104px;flex:0 0 auto;gap:5px;margin-top:0}
.tushare-filter-variants select{min-width:0;height:30px;padding:0 7px;border:1px solid #d7dce3;border-radius:6px;background:#fff;color:#344054;font-size:10px}
body[data-theme="dark"] .tushare-filter-variants select{border-color:#49515d;background:#20242a;color:#e3e6ea}

@media(max-width:1100px){.tushare-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tushare-filter-row{grid-template-columns:30px minmax(140px,1fr) minmax(160px,1fr) minmax(140px,1fr) 16px minmax(140px,1fr) 66px}}
@media(max-width:900px){.company-section-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important}.company-section-tab{min-height:68px;padding:12px!important}.company-section-tab-icon{flex-basis:34px;width:34px;height:34px}.tushare-screener-shell{padding:14px}.tushare-screener-scope{grid-template-columns:1fr 1fr}.tushare-screener-check{grid-column:1/-1}.tushare-screener-toolbar{align-items:stretch;flex-direction:column}.tushare-screener-toolbar input{width:100%}.tushare-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tushare-filter-row{flex-wrap:wrap}.tushare-filter-row>.tushare-filter-name{flex:1 1 calc(100% - 110px);order:1}.tushare-filter-row>.tushare-filter-drag{order:1}.tushare-filter-row>.tushare-filter-actions{order:1}.tushare-filter-row>.tushare-filter-time{order:2;flex:1 1 32%}.tushare-filter-row>label:nth-of-type(1){order:2;flex:1 1 30%}.tushare-filter-row>label:nth-of-type(2){order:2;flex:1 1 30%}.tushare-filter-primary{white-space:normal;flex-wrap:wrap}.tushare-filter-variants{display:inline-flex;flex-wrap:wrap;flex-basis:100%;margin-top:4px}.tushare-screener-actions{align-items:stretch;flex-direction:column}.tushare-screener-actions button{width:100%}}
@media(max-width:620px){.company-section-tabs{grid-template-columns:1fr!important}.company-section-tab{min-height:58px}.company-search-card{padding:14px}.tushare-screener-scope,.tushare-metric-grid{grid-template-columns:1fr}.tushare-screener-check{grid-column:auto}.company-information-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Credit center */
.credit-center-panel{padding:0!important;overflow:hidden}.credit-center-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 28px;border-bottom:1px solid #edf0f3}.credit-center-head h3{margin:0;color:#242b35;font-size:20px}.credit-center-head p{margin:5px 0 0;color:#8b95a3;font-size:12px}.credit-recharge-button{padding:10px 24px;border:0;border-radius:9px;background:#1769e8;color:#fff;font-size:14px;font-weight:700;cursor:pointer}.credit-recharge-button:hover{background:#0f5bce}.credit-recharge-testing{padding:9px 16px;border-radius:9px;background:#e6e8eb;color:#8b929b;font-size:13px;font-weight:600}.credit-center-card{border:1px solid #e8ebef;border-radius:13px;background:#f7f8fa}.credit-balance-card{display:flex;align-items:baseline;gap:8px;margin:24px 28px 18px;padding:20px}.credit-balance-card svg{align-self:center;width:30px;height:30px;color:#f5a623}.credit-balance-card strong{color:#202733;font-size:36px;line-height:1}.credit-balance-card span{color:#8b95a3;font-size:13px}.credit-center-tabs{display:flex;gap:28px;margin:0 28px;border-bottom:1px solid #edf0f3}.credit-center-tabs button{padding:10px 2px;border:0;border-bottom:3px solid transparent;background:transparent;color:#596273;font-size:14px;cursor:pointer}.credit-center-tabs button.active{border-bottom-color:#1769e8;color:#1769e8;font-weight:700}.credit-center-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:16px;padding:18px 28px 28px}.credit-ledger-panel{min-width:0}.credit-ledger-list{display:flex;max-height:520px;flex-direction:column;gap:10px;overflow-y:auto}.credit-ledger-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-radius:12px;background:#f7f8fa}.credit-ledger-row>div{display:flex;min-width:0;flex-direction:column;gap:5px}.credit-ledger-row strong{color:#343c47;font-size:14px;font-weight:600;overflow-wrap:anywhere}.credit-ledger-row span{color:#8b95a3;font-size:11px}.credit-ledger-row>b{font-size:15px;white-space:nowrap}.credit-ledger-row>b.income{color:#1769e8}.credit-ledger-row>b.expense{color:#ff5a1f}.credit-ledger-empty{padding:40px 20px;border-radius:12px;background:#f7f8fa;color:#8b95a3;text-align:center;font-size:13px}.credit-ledger-empty.is-error{color:#b4232c}.credit-center-help{padding:18px}.credit-center-help h4{margin:0 0 7px;color:#303846;font-size:13px}.credit-center-help h4:not(:first-child){margin-top:20px}.credit-center-help p{margin:0;color:#788392;font-size:11px;line-height:1.7}.credit-center-help .credit-center-rate{margin-top:22px;padding-top:14px;border-top:1px solid #e5e9ef;color:#1769e8;font-weight:700}
body[data-theme="dark"] .credit-center-card{border-color:#3b424c;background:#282e35}body[data-theme="dark"] .credit-center-head{border-color:#363d46}body[data-theme="dark"] .credit-center-head h3,body[data-theme="dark"] .credit-balance-card strong,body[data-theme="dark"] .credit-ledger-row strong,body[data-theme="dark"] .credit-center-help h4{color:#e4e8ed}body[data-theme="dark"] .credit-center-tabs{border-color:#363d46}body[data-theme="dark"] .credit-center-tabs button{color:#aeb7c2}body[data-theme="dark"] .credit-center-tabs button.active{color:#6ba4ff}body[data-theme="dark"] .credit-ledger-row,body[data-theme="dark"] .credit-ledger-empty{background:#282e35}body[data-theme="dark"] .credit-center-help p,body[data-theme="dark"] .credit-ledger-row span{color:#9ba4af}
@media(max-width:900px){.credit-center-layout{grid-template-columns:1fr}.credit-center-help{order:2}.credit-ledger-list{max-height:none}}
@media(max-width:620px){.credit-center-head{padding:18px}.credit-balance-card{margin:18px 18px 12px}.credit-center-tabs{margin:0 18px}.credit-center-layout{padding:14px 18px 20px}.credit-balance-card strong{font-size:30px}.credit-recharge-button{padding:9px 18px}}

/* Model billing selector */
.model-billing-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}.model-billing-option{display:flex;min-height:82px;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;padding:14px;border:1px solid #dfe3e8;border-radius:11px;background:#fff;color:#4b5563;text-align:left;cursor:pointer}.model-billing-option strong{font-size:13px}.model-billing-option span{color:#8b95a3;font-size:10px;line-height:1.45}.model-billing-option.selected{border-color:#1769e8;background:#f1f5ff;color:#174ea6;box-shadow:0 0 0 2px rgba(23,105,232,.08)}.model-plan-notice{margin:0 0 16px;padding:9px 11px;border-radius:8px;background:#fff8e8;color:#8a6116;font-size:10px;line-height:1.55}.model-option{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;text-align:left}.model-option strong{font-size:11px}.model-option span{color:#929aa5;font-size:9px;font-weight:400}
body[data-theme="dark"] .model-billing-option{border-color:#444b55;background:#2a3037;color:#c5ccd5}body[data-theme="dark"] .model-billing-option.selected{border-color:#5790ef;background:#24324a;color:#8eb6ff}body[data-theme="dark"] .model-billing-option span,body[data-theme="dark"] .model-option span{color:#9ba4af}body[data-theme="dark"] .model-plan-notice{background:#3a321f;color:#e8c873}
@media(max-width:620px){.model-billing-options{grid-template-columns:1fr}.model-provider-options{grid-template-columns:repeat(2,minmax(0,1fr))}.model-option-list{grid-template-columns:1fr}}

/* Fixed-evidence core research, scoped to its own page. */
#page-core-research{--core-bg:#fff;--core-text:#222f40;--core-muted:#536174;--core-border:#d9e0e9;--core-soft:#f3f6fa;color:var(--core-text);width:100%;min-width:0;box-sizing:border-box;max-width:1320px;margin:0 auto;line-height:1.65}
.core-research-assumptions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:16px 0}.core-research-assumptions fieldset{min-width:0;border:1px solid var(--core-border);border-radius:8px;padding:14px}.core-research-assumptions legend{font-size:17px;font-weight:700}.core-research-assumptions label{display:block;margin:8px 0 4px}#page-core-research input{font:inherit;padding:8px;border:1px solid var(--core-border);border-radius:6px;color:var(--core-text);background:var(--core-bg);max-width:100%;box-sizing:border-box}.core-research-assumptions input{width:100%}#core-research-plan-name{display:block;width:320px;margin:8px 0}#page-core-research input:focus-visible{outline:3px solid #277cbd;outline-offset:2px}.core-research-editor>button{font:inherit;padding:8px 12px;border:1px solid var(--core-border);border-radius:6px;background:var(--core-bg);color:var(--core-text);cursor:pointer}.core-research-compare-controls{margin-top:16px}.core-research-compare-controls select{max-width:100%;min-width:0}.core-research-history button{overflow-wrap:anywhere}#core-research-comparison table{font-size:13px;min-width:660px}#core-research-comparison th,#core-research-comparison td{padding:10px}#core-research-comparison p{overflow-wrap:anywhere}@media(max-width:760px){.core-research-assumptions{grid-template-columns:1fr}}
#page-core-research h2{font-size:25px;margin:8px 0}#page-core-research h3{font-size:19px;margin:0 0 14px}#page-core-research h4{font-size:16px;margin:0 0 10px}#page-core-research p{margin:10px 0}#page-core-research a{color:#1765a4;text-decoration:underline;overflow-wrap:anywhere}
.core-research-card{padding:24px;background:var(--core-bg);border:1px solid var(--core-border);border-radius:14px;margin-bottom:20px;min-width:0}
.core-research-eyebrow{font-size:12px;font-weight:700;letter-spacing:1px;color:var(--core-muted)}.core-research-intro textarea{display:block;width:100%;margin:8px 0 14px;background:var(--core-soft);color:var(--core-text);border:1px solid var(--core-border);border-radius:8px;padding:12px;font:inherit;resize:vertical}
.core-research-controls,.core-research-history{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.core-research-controls button,.core-research-controls select,.core-research-history button{font:inherit;font-size:14px;padding:9px 14px;border-radius:8px;border:1px solid var(--core-border);cursor:pointer;background:var(--core-bg);color:var(--core-text)}#core-research-run{background:#8b1a1a;color:#fff;border-color:#8b1a1a}#page-core-research button:disabled{opacity:.55;cursor:not-allowed}#page-core-research button:focus-visible,#page-core-research select:focus-visible,#page-core-research summary:focus-visible{outline:3px solid #277cbd;outline-offset:3px}#core-research-status{min-height:24px;color:var(--core-muted)}
.core-research-company-search{display:flex;gap:10px;margin:8px 0}.core-research-company-search input{flex:1;min-width:180px;font:inherit;padding:10px 12px;border:1px solid var(--core-border);border-radius:8px;background:var(--core-bg);color:var(--core-text)}.core-research-company-results{display:flex;flex-wrap:wrap;gap:8px;min-height:24px;margin-bottom:12px;color:var(--core-muted)}.core-research-company-results button{font:inherit;padding:7px 10px;border:1px solid var(--core-border);border-radius:8px;background:var(--core-bg);color:var(--core-text);cursor:pointer}
.core-research-summary{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:12px 4px}.core-research-badge{padding:8px 14px;border-radius:20px;white-space:nowrap;font-size:13px}.core-research-badge.pass{color:#146340;background:#e5f4ec}.core-research-badge.blocked{color:#93301f;background:#fff0e9}.core-research-notice{color:var(--core-muted)}
.core-research-steps{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 24px;counter-reset:core-step}.core-research-steps li{background:var(--core-soft);border:1px solid var(--core-border);padding:12px;border-radius:8px;font-size:13px}.core-research-steps li:before{counter-increment:core-step;content:counter(core-step) ' · ';font-weight:bold}.core-research-steps small{display:block;color:var(--core-muted)}
.core-research-metrics,.core-research-scenarios{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.core-research-metrics article,.core-research-scenarios article{padding:18px;background:var(--core-soft);border:1px solid var(--core-border);border-radius:10px;min-width:0}.core-research-metrics article>strong{display:block;font-size:30px;letter-spacing:-1px;margin:8px 0}.core-research-muted{color:var(--core-muted);font-size:13px}
#page-core-research details{font-size:13px;margin:12px 0;overflow-wrap:anywhere}#page-core-research summary{cursor:pointer;font-weight:600;min-height:28px}#page-core-research pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#page-core-research ul{padding-left:20px}.core-research-scenarios dl{display:grid;grid-template-columns:1fr auto;gap:6px;font-size:13px}.core-research-scenarios dd{font-weight:700}.core-research-scenarios h4{font-size:21px!important}.core-research-price{margin:18px 0}.core-research-price>span{display:block;color:var(--core-muted);font-size:12px}.core-research-price strong{display:block;font-size:27px;margin-bottom:10px}.core-research-price small{font-size:12px;font-weight:500;margin-left:6px}.core-research-table-wrap{overflow:auto}.core-research-table-wrap table{border-collapse:collapse;min-width:270px;font-size:11px}.core-research-table-wrap th,.core-research-table-wrap td{padding:6px;border-bottom:1px solid var(--core-border);text-align:right}
.core-research-claims{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.core-research-claims article{padding:14px;background:var(--core-soft);border-radius:8px;overflow-wrap:anywhere}.core-research-tag{font-size:12px;border:1px solid var(--core-border);padding:3px 7px;border-radius:5px;margin-right:10px}.core-research-claims strong{font-size:12px}.core-research-claims small{color:var(--core-muted)}
.core-research-evidence{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.core-research-evidence article{border-top:1px solid var(--core-border);padding:16px 0;min-width:0;overflow-wrap:anywhere;font-size:13px}.core-research-evidence-value{font-size:19px;font-weight:700}.core-research-risk{border-left:3px solid #a76419;padding:4px 16px;margin:16px 0}.core-research-footer{font-size:12px;color:var(--core-muted);padding:10px 4px 32px;overflow-wrap:anywhere}.core-research-blocked{border-left:4px solid #ae4326}
body[data-theme="dark"] #page-core-research{--core-bg:#252931;--core-text:#edf1f7;--core-muted:#b4bfce;--core-border:#47515f;--core-soft:#2d3440}body[data-theme="dark"] #page-core-research a{color:#93c9ff}
@media(max-width:760px){.core-research-card{padding:16px}.core-research-summary{align-items:flex-start;flex-direction:column;gap:4px}.core-research-metrics,.core-research-scenarios,.core-research-claims,.core-research-evidence{grid-template-columns:1fr}.core-research-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.core-research-controls{align-items:stretch}.core-research-controls select{max-width:100%}#page-core-research h2{font-size:22px}}

/* Admin operations health */
.admin-subtabs .admin-subtab{flex:0 0 auto;white-space:nowrap;padding:14px 16px!important}
.admin-health-panel{color:#384250}.admin-health-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.admin-health-header h3{margin:0 0 5px;color:#222;font-size:18px}.admin-health-header>div>div{color:#89929f;font-size:12px}.admin-health-header button{border:1px solid #dbe1e8;border-radius:7px;background:#fff;color:#4e5968;padding:7px 15px;font:600 12px/1.5 inherit;cursor:pointer}.admin-health-header button:hover{border-color:#9ca7b5;background:#fafbfc}.admin-health-header button:disabled{opacity:.55;cursor:wait}.admin-health-error{margin-bottom:14px;padding:10px 12px;border:1px solid #f4c7c7;border-radius:8px;background:#fff5f5;color:#b4232c;font-size:12px}.admin-health-summary{display:grid;grid-template-columns:minmax(150px,.6fr) repeat(2,minmax(220px,1fr));gap:11px}.admin-health-card{box-sizing:border-box;padding:15px 16px;border:1px solid #e6e9ee;border-radius:11px;background:#fafbfc}.admin-health-card>span{display:block;color:#8a94a2;font-size:11px}.admin-health-card>strong{display:block;margin-top:7px;color:#27313d;font-size:14px;line-height:1.45;overflow-wrap:anywhere}.admin-health-card>small{display:block;margin-top:6px;color:#919aa6;font-size:10px;line-height:1.5}.admin-health-card>small b{color:inherit;font-weight:600}.admin-health-overall-card{display:flex;justify-content:center;align-items:flex-start;flex-direction:column}.admin-health-overall-card>div{margin-top:10px}.admin-health-status{display:inline-flex!important;align-items:center;min-height:24px;box-sizing:border-box;padding:3px 9px;border-radius:999px;font-size:10px!important;font-weight:750;letter-spacing:.03em}.admin-health-status.is-ready{background:#e9f8f0;color:#147847}.admin-health-status.is-degraded{background:#fff4df;color:#9a5b08}.admin-health-status.is-down{background:#ffeded;color:#b4232c}.admin-health-status.is-unknown{background:#eef1f4;color:#67717e}.admin-health-section{margin-top:18px}.admin-health-section-title{display:flex;align-items:baseline;gap:10px;margin-bottom:9px}.admin-health-section-title h4{margin:0;color:#303946;font-size:14px}.admin-health-section-title span{color:#939ca8;font-size:10px}.admin-health-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.admin-health-service-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-health-service-card>div>strong{color:#303946;font-size:13px}.admin-health-service-card dl{display:grid;grid-template-columns:64px minmax(0,1fr);gap:6px 10px;margin:13px 0 0;font-size:10px;line-height:1.5}.admin-health-service-card dt{color:#929ba7}.admin-health-service-card dd{margin:0;color:#53606f;text-align:right;overflow-wrap:anywhere}.admin-health-table-wrap{overflow:auto;border:1px solid #e6e9ee;border-radius:11px}.admin-health-provider-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px}.admin-health-provider-table th{padding:10px 12px;background:#f5f7f9;color:#7b8592;text-align:left;font-weight:650}.admin-health-provider-table td{padding:11px 12px;border-top:1px solid #edf0f3;color:#53606f}.admin-health-provider-table td:first-child strong{display:block;color:#303946;font-size:11px}.admin-health-provider-table td:first-child small{display:block;margin-top:2px;color:#a0a7b1;font-size:9px}.admin-health-runtime-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.admin-health-metric strong{font-size:20px;font-variant-numeric:tabular-nums}.admin-health-muted{color:#aab1ba}.admin-health-empty{grid-column:1/-1;padding:25px!important;color:#9aa3af!important;text-align:center}.admin-health-footnote{margin-top:15px;padding:10px 12px;border-radius:8px;background:#f5f7f9;color:#7e8895;font-size:10px;line-height:1.6}
#settings-panel-admin-users .admin-health-status.is-ready{color:#147847!important}#settings-panel-admin-users .admin-health-status.is-degraded{color:#9a5b08!important}#settings-panel-admin-users .admin-health-status.is-down{color:#b4232c!important}#settings-panel-admin-users .admin-health-status.is-unknown{color:#67717e!important}
body[data-theme="dark"] .admin-health-card{border-color:#3b424c;background:#272c33}body[data-theme="dark"] .admin-health-table-wrap{border-color:#3b424c}body[data-theme="dark"] .admin-health-provider-table th{background:#2d333b;color:#aeb7c2}body[data-theme="dark"] .admin-health-provider-table td{border-color:#343a43;color:#cbd2dc}body[data-theme="dark"] .admin-health-header button{border-color:#464d57;background:#2b3037;color:#d7dce3}body[data-theme="dark"] .admin-health-footnote{background:#2d333b;color:#abb4c0}body[data-theme="dark"] .admin-health-error{border-color:#714044;background:#3a2729;color:#f0a4a9}body[data-theme="dark"] #settings-panel-admin-users .admin-health-status.is-ready{background:#203b2e;color:#7dd3a5!important}body[data-theme="dark"] #settings-panel-admin-users .admin-health-status.is-degraded{background:#40331f;color:#f1bd6f!important}body[data-theme="dark"] #settings-panel-admin-users .admin-health-status.is-down{background:#402629;color:#f19aa0!important}body[data-theme="dark"] #settings-panel-admin-users .admin-health-status.is-unknown{background:#353b43;color:#bdc5cf!important}
@media(max-width:840px){.admin-health-summary{grid-template-columns:1fr}.admin-health-service-grid{grid-template-columns:1fr}.admin-health-runtime-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.admin-health-panel{padding:18px 12px!important}.admin-health-header{align-items:center}.admin-health-runtime-grid{grid-template-columns:1fr}.admin-health-section-title{display:block}.admin-health-section-title span{display:block;margin-top:3px}}
