:root{--bg:#f7f8fa;--panel:#fff;--soft:#f5f7fb;--text:#1c2635;--muted:#6b7688;--line:#e5e9f0;--line-strong:#d2d9e5;--blue:#2f65ce;--blue-soft:#edf3ff;--danger:#b94b56;--shadow:0 7px 22px rgba(31,45,66,.05)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;font-size:14px}button,input,textarea,select{font:inherit}.shell{min-height:calc(100vh - 84px);display:grid;grid-template-columns:245px minmax(0,1fr)}.side{background:#fff;border-right:1px solid var(--line);padding:22px 15px;display:flex;flex-direction:column;gap:15px}.brand{display:flex;gap:10px;align-items:center;padding:2px 3px 11px}.mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--blue);color:#fff;font-weight:800;font-size:17px}.brand b{display:block;font-size:16px;letter-spacing:.2px}.brand span,.eyebrow{display:block;color:#7d899a;font-size:10px;letter-spacing:.12em;font-weight:700;margin-top:3px}.side-label{font-size:11px;color:#8a95a4;font-weight:750;letter-spacing:.08em;padding:0 4px}.project-list{display:flex;flex-direction:column;gap:6px;overflow:auto}.project-item{width:100%;border:1px solid transparent;background:transparent;border-radius:9px;padding:10px;text-align:left;color:#465264;cursor:pointer}.project-item:hover{background:#f7f9fc}.project-item.active{background:var(--blue-soft);border-color:#cedcff;color:#244eaa}.project-item b,.project-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-item small{font-size:10px;color:#929cab;margin-top:4px}.project-empty{padding:8px 4px}.side-foot{margin-top:auto;border-top:1px solid var(--line);padding:12px 3px 0;font-size:11px;color:var(--muted);display:flex;gap:7px;align-items:center}.live{height:8px;width:8px;background:#2ea87a;border-radius:50%;box-shadow:0 0 0 3px #e5f7ef}.main{min-width:0}.top{padding:20px 38px 14px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start}.top h1{font-size:25px;margin:3px 0 0}.version{font-size:12px;color:#7b8798;padding-top:10px}.tabs{display:flex;gap:25px;padding:0 38px;background:#fff;border-bottom:1px solid var(--line)}.tab{border:0;border-bottom:2px solid transparent;background:transparent;color:#687487;padding:14px 0 12px;cursor:pointer}.tab:hover,.tab.active{color:var(--blue)}.tab.active{border-bottom-color:var(--blue);font-weight:750}.view{display:none;padding:28px 38px 44px}.view.active{display:block}.hidden{display:none!important}.empty,.empty-result{margin:70px auto;max-width:620px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:13px;padding:38px;color:var(--muted);box-shadow:var(--shadow)}.empty h2{margin:0 0 8px;color:var(--text)}.empty p{line-height:1.7}.page-head{margin-bottom:18px}.page-head h2{font-size:24px;margin:2px 0 5px}.page-head p{margin:0;color:var(--muted);line-height:1.68;max-width:980px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px;box-shadow:var(--shadow)}.card h3,.card h4{margin:0 0 8px}.card-title,.result-toolbar,.visual-toolbar,.export-hero{display:flex;gap:12px;align-items:center;justify-content:space-between}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.metric{background:#fff;border:1px solid var(--line);border-radius:11px;padding:15px;box-shadow:var(--shadow)}.metric span{display:block;color:var(--muted);font-size:12px}.metric strong{font-size:28px;display:block;margin-top:4px}.flow{margin-bottom:16px}.flow-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--muted)}.flow-row span{border:1px solid #dfe5ed;border-radius:7px;background:#fafbfc;padding:8px 11px}.flow-row i{font-style:normal;color:var(--blue)}
.primary,.secondary,.text-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border-radius:8px;border:1px solid transparent;cursor:pointer;text-decoration:none;padding:9px 12px}.primary{background:var(--blue);color:#fff;font-weight:700}.primary:hover{background:#2455b5}.secondary{background:#fff;border-color:var(--line-strong);color:#3f4b5d}.secondary:hover{background:#f8faff;border-color:#adb9cc}.text-btn{border:0;background:transparent;color:var(--blue);padding:4px}.text-btn:hover{text-decoration:underline}.full{width:100%}.small{font-size:12px;padding:6px 9px}.muted{color:var(--muted)}.block-muted{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.import{display:grid;grid-template-columns:.85fr 1.25fr;gap:24px;margin-bottom:16px}.import p{font-size:12px;color:var(--muted);line-height:1.6}.import-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-content:start}.import-fields input:first-child,.import-fields button{grid-column:1/-1}input,textarea,select{width:100%;border:1px solid #d8e0eb;border-radius:8px;background:#fff;color:var(--text);outline:none;padding:9px 10px}input:focus,textarea:focus,select:focus{border-color:#7798e5;box-shadow:0 0 0 3px rgba(47,101,206,.1)}textarea{min-height:76px;resize:vertical}label{display:block;color:#475467;font-size:12px;font-weight:650;margin:8px 0}label input,label textarea,label select{margin-top:5px;font-weight:400}.compact-label{width:260px}.field2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.check{display:flex;align-items:center;gap:7px}.check input{width:auto;margin:0}.check-line{display:grid;grid-template-columns:auto 1fr auto;gap:7px;align-items:center;margin:5px 0;padding:8px;background:#f8faff;border-radius:7px}.check-line input{width:auto;margin:0}.check-line span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.check-line em{font-size:11px;color:var(--muted);font-style:normal}.doc-select{border-top:1px solid var(--line);padding-top:10px;margin-top:12px;max-height:210px;overflow:auto}.topic-grid{display:grid;grid-template-columns:330px minmax(0,1fr);gap:16px}.config{align-self:start;position:sticky;top:14px}.config details{border-top:1px solid var(--line);padding-top:11px;margin-top:11px}.config summary{font-weight:750;cursor:pointer;color:#344054}.field-note{font-size:12px;line-height:1.65;color:var(--muted);margin:9px 0}.lab-main{min-width:0;display:flex;flex-direction:column;gap:14px}.runs{display:flex;gap:8px;overflow:auto}.run-card{flex:0 0 220px;border:1px solid #dce3ed;border-radius:9px;background:#fff;padding:10px;text-align:left;color:#405069;cursor:pointer}.run-card:hover,.run-card.active{background:#f6f9ff;border-color:#88a5e7}.run-card b,.run-card small{display:block}.run-card small{font-size:11px;color:#7d8999;margin-top:4px}.progress-box{border-left:3px solid var(--blue);background:#f2f6ff;color:#38557e;padding:12px;border-radius:6px}.preview-metrics{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.preview-metrics span{background:#f4f7fb;border-radius:6px;padding:7px 8px;color:#5b687a;font-size:12px}.preview-metrics b{color:#1f2f45;margin-left:3px}.sample-list article{border-top:1px solid var(--line);padding:9px 0;line-height:1.65}.sample-list p{margin:4px 0}.word-rows{display:flex;flex-direction:column;gap:7px}.word-row{display:grid;grid-template-columns:92px 1fr 42px;gap:8px;align-items:center}.word-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.word-row>div{height:8px;border-radius:999px;background:#e8edf4;overflow:hidden}.word-row i{display:block;height:100%;background:var(--blue);border-radius:999px}.word-row b{text-align:right;font-size:11px}
.result-tabs,.visual-tabs{display:flex;gap:5px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin:14px 0}.result-tab,.visual-tab{border:0;border-bottom:2px solid transparent;background:transparent;color:#697586;padding:8px 10px;cursor:pointer}.result-tab.active,.visual-tab.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:750}.result-intro{display:flex;gap:12px;align-items:baseline;padding:10px 12px;border-left:3px solid var(--blue);background:#f4f8ff;color:#455a7d;margin-bottom:12px;font-size:12px}.merge-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px;color:var(--muted)}.merge-line select{width:250px;padding:6px 8px}.topic-name{padding:0;border:0;background:transparent;color:var(--blue);text-align:left;font-weight:750;cursor:pointer;line-height:1.5}.keywords{max-width:360px;line-height:1.6;color:#4a5668;font-size:12px}.raw-terms{margin-top:5px;color:var(--muted);font-size:11px}.raw-terms summary{cursor:pointer;color:#5870a7}.representative{min-width:220px;line-height:1.55;color:#4b5565}.row-muted{opacity:.55}.evidence{border-top:1px solid var(--line);padding:13px 2px;white-space:pre-wrap;line-height:1.7;color:#354153}.evidence small{display:block;color:#5271b6;font-size:11px;margin-bottom:5px}.inner-card{box-shadow:none}.link-group{display:flex;gap:8px;flex-wrap:wrap}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{border-bottom:1px solid #e9edf3;padding:9px 8px;vertical-align:top;text-align:left;color:#364254}th{font-size:11px;color:#677487;background:#fbfcfe;white-space:nowrap}.sankey-controls{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.sankey-controls>div{min-width:270px;flex:1}.sankey-controls p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.sankey-controls label{width:130px;margin:0}.sankey-controls input,.sankey-controls select{padding:7px}
.visual-toolbar{align-items:flex-end;margin-bottom:12px}.visual-toolbar>label{width:320px;margin:0}.visual-groups{display:flex;flex-direction:column;gap:8px;border:0;margin:0;align-items:stretch;flex:1}.visual-group{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding-bottom:7px;border-bottom:1px solid #edf0f4}.visual-group:last-child{border-bottom:0}.visual-group>span{width:86px;color:#7a8696;font-size:11px;font-weight:750}.visual-group .visual-tab{border:1px solid #dfe5ee;border-radius:7px;padding:6px 8px;background:#fff}.visual-group .visual-tab.active{background:var(--blue-soft);border-color:#90aceb}.visual-tab:disabled,.visual-disabled{opacity:.42;cursor:not-allowed}.visual-area{min-height:420px}.visual-selector{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:11px;padding:12px 15px;margin-bottom:14px}.visual-selector label{max-width:440px;margin:0}.chart-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px;box-shadow:var(--shadow);margin-bottom:16px}.chart-card-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:14px}.chart-card-head h3{margin:0 0 5px}.chart-card-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.58;max-width:720px}.chart-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.chart-frame{border:1px solid #e4e9f1;border-radius:10px;background:#fff;padding:12px;overflow:auto;display:flex;justify-content:center;align-items:flex-start}.chart-frame svg{display:block;min-width:760px;max-width:100%;height:auto;background:#fff;margin:0 auto}.chart-frame:has(svg){text-align:center}.chart-note{color:var(--muted);font-size:11px;line-height:1.65;margin:10px 2px 0}.export-page{display:flex;flex-direction:column;gap:16px}.export-hero{background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px;box-shadow:var(--shadow)}.export-hero h3{margin:0 0 5px}.export-hero p{color:var(--muted);margin:0;line-height:1.65}.export-section{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px;box-shadow:var(--shadow)}.export-section h3{margin:0 0 8px}.export-section p{margin:0 0 12px;line-height:1.6}.export-grid{display:flex;gap:8px;flex-wrap:wrap}.toast{position:fixed;right:24px;bottom:24px;z-index:20;color:#fff;background:#253b6c;padding:11px 13px;border-radius:8px;box-shadow:0 12px 28px rgba(27,43,74,.22)}.toast.error{background:#9d3f49}dialog{border:1px solid #d8e0eb;border-radius:12px;box-shadow:0 22px 52px rgba(20,32,54,.2)}dialog::backdrop{background:rgba(18,29,47,.3)}.dialog{min-width:min(92vw,420px)}.dialog h3{margin:0 0 10px}.dialog-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px}
@media(max-width:1120px){.shell{grid-template-columns:220px minmax(0,1fr)}.top,.tabs,.view{padding-left:24px;padding-right:24px}.topic-grid,.import,.grid2{grid-template-columns:1fr}.config{position:static}.metrics{grid-template-columns:repeat(2,1fr)}.visual-toolbar{display:block}.visual-toolbar>label{width:100%;margin-bottom:11px}.chart-card-head{display:block}.chart-actions{justify-content:flex-start;margin-top:10px}}@media(max-width:760px){.shell{display:block}.side{display:none}.top,.tabs,.view{padding-left:16px;padding-right:16px}.top h1{font-size:21px}.tabs{gap:15px;overflow:auto}.tab{white-space:nowrap}.metrics{grid-template-columns:1fr 1fr}.field2,.import-fields{grid-template-columns:1fr}.import-fields input:first-child,.import-fields button{grid-column:auto}.compact-label{width:100%}.result-toolbar{align-items:flex-start;flex-direction:column}.chart-frame svg{min-width:660px}.result-intro{display:block}.result-intro span{display:block;margin-top:4px}}
.side-actions{display:flex;flex-direction:column;gap:8px}.quality-summary{display:grid;gap:6px;border:1px solid #dce5ef;border-radius:10px;padding:13px 15px;margin:0 0 16px;background:#f8fbff;color:#3b4a5c;line-height:1.6}.quality-summary b{font-size:14px}.quality-summary ul{margin:3px 0 0;padding-left:18px}.quality-summary.quality-warning{background:#fff8ef;border-color:#efc98f;color:#7e4e16}.quality-summary.quality-ok{background:#f1fbf7;border-color:#9bd8bf;color:#235e47}.input-hint{display:block;font-weight:400;color:#7d899a;font-size:10px;margin-top:3px}.hub-project-list{max-height:52vh;overflow:auto;display:flex;flex-direction:column;gap:8px}.hub-project{border:1px solid #d9e2ee;background:#fff;border-radius:9px;padding:11px;text-align:left;cursor:pointer;color:#344054}.hub-project:hover,.hub-project.active{border-color:#7e9ce1;background:#f5f8ff}.hub-project b,.hub-project small{display:block}.hub-project small{margin-top:4px;color:#7b8798;font-size:11px}.dialog{max-width:640px}
.hub-project{display:flex;align-items:center;justify-content:space-between;gap:12px}.hub-project-meta{min-width:0;display:flex;flex-direction:column;gap:4px}.hub-project-meta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-project-actions{display:flex;gap:7px;align-items:center;flex:0 0 auto}.danger{background:#fff;border-color:#e0a6ab;color:#a33e47}.danger:hover{background:#fff4f5;border-color:#c56b74}@media(max-width:560px){.hub-project{align-items:flex-start;flex-direction:column}.hub-project-actions{width:100%}.hub-project-actions button{flex:1}}

.native-figure-frame{display:block;width:100%;height:760px;border:1px solid #e5eaf2;border-radius:10px;background:#fff;margin:0 auto}.native-chart-card{overflow:hidden}.native-chart-card .chart-card-head{justify-content:space-between}.native-chart-card iframe{max-width:100%}@media(max-width:900px){.native-figure-frame{height:620px}}

/* v3.1 research visual suite */
.visual-group:nth-child(3)>span{width:86px}.chart-card .chart-frame{min-height:80px}.chart-frame svg{font-kerning:normal}.native-chart-card{margin-left:auto;margin-right:auto}


/* v3.1.2 ZhiYan UI alignment and embedding notice */
:root{--zhiyan-blue:#1f5fd2;--zhiyan-ink:#172033;--zhiyan-soft:#f6f8fc}
.zhiyan-top{background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)}
.top-subtitle{margin:5px 0 0;color:#66758a;font-size:12px;line-height:1.55}.brand .mark{background:linear-gradient(135deg,var(--blue),#174ea6)}.brand b{letter-spacing:.4px}.brand span{letter-spacing:.04em;color:#66758a}.api-notice{border:1px solid #dce6f6;background:linear-gradient(180deg,#f7faff,#fff);border-radius:10px;padding:11px 12px;margin:8px 0 12px;color:#30425f}.api-notice b{display:block;font-size:13px;margin-bottom:4px;color:#1e3f86}.api-notice p{margin:0;color:#5e6e84;line-height:1.62;font-size:12px}.api-footnote{margin:8px 1px 0;color:#7a8798;line-height:1.6;font-size:11px}.version{border:1px solid #dfe7f3;background:#f8fbff;border-radius:999px;padding:7px 10px;margin-top:2px;color:#42619a}.tabs{gap:18px}.tab{font-weight:650}.page-head .eyebrow{color:#42619a}.flow-row span{background:#fff;border-color:#dde6f3}.card{border-color:#e1e7f0}.primary{background:var(--zhiyan-blue)}.primary:hover{background:#174ea6}.visual-group .visual-tab.active,.project-item.active{background:#f1f6ff}.config summary{color:#24364f}.topic-grid{align-items:start}


/* v3.1.6 true ZhiYan visual alignment based on uploaded frontend/platform styles */
:root{
  --ink:#16202b; --muted:#6e7b88; --line:#e4e9ee; --soft:#f5f7f9; --paper:#fff;
  --blue:#173b61; --blue2:#245a86; --teal:#0f766e; --danger:#b42318; --warn:#9a6700;
  --shadow:0 14px 38px rgba(24,39,56,.08); --radius:18px;
}
html,body{background:#f5f7f9;color:var(--ink)}
.shell{display:grid;grid-template-columns:274px minmax(0,1fr);min-height:100vh;background:#f5f7f9}
.side{background:#101c28;color:#dce7ef;border-right:0;padding:22px 14px 18px;gap:14px;min-height:100vh}
.brand{padding:0 8px 18px;gap:11px}.mark{width:31px;height:31px;border:1px solid rgba(255,255,255,.46);background:transparent;border-radius:9px;color:#fff;font-weight:800;box-shadow:none}.brand b{color:#fff;font-size:16px;letter-spacing:.6px}.brand span{color:#8ea0af;font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-actions{display:grid;gap:8px;padding:0 4px}.side .primary{background:#fff;color:#173b61;box-shadow:none}.side .secondary{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);color:#c8d6e1}.side-label{color:#8192a1;font-size:11px;letter-spacing:1.3px;margin:10px 8px 0;text-transform:uppercase}.project-list{padding:0 2px}.project-item{border:1px solid transparent;background:transparent;color:#c3d0da;border-radius:12px;padding:11px 12px;margin-bottom:4px}.project-item:hover{background:rgba(255,255,255,.05)}.project-item.active{background:#1a3045;border-color:#284962;color:#fff}.project-item small{color:#8fa2b2}.side-foot{border-top:1px solid rgba(255,255,255,.10);padding:15px 8px 0;color:#8ea0af}.main{background:#f5f7f9;min-width:0}.top{height:84px;display:flex;align-items:center;justify-content:space-between;padding:0 46px;background:rgba(255,255,255,.92);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:2;backdrop-filter:blur(12px)}.top h1{font-size:20px;margin:3px 0 0;font-weight:680;letter-spacing:-.3px}.top-subtitle{font-size:12px;color:#6e7b88}.eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:1.35px;color:#798999;font-weight:700}.version{border:1px solid #d9e1e8;background:#fff;border-radius:999px;color:#607083;padding:7px 11px;font-size:12px;box-shadow:0 3px 10px rgba(20,38,56,.035)}.tabs{height:auto;margin:0;padding:0 46px;background:#fff;border-bottom:1px solid var(--line);gap:26px}.tab{color:#758493;padding:0 0 13px;margin-top:17px;font-size:14px;border-bottom:2px solid transparent}.tab:hover,.tab.active{color:#173b61}.tab.active{border-bottom-color:#173b61;font-weight:700}.view{padding:31px 46px 45px}.page-head h2{font-size:22px;letter-spacing:-.3px;margin:4px 0 7px}.page-head p{color:#6e7b88;max-width:850px;line-height:1.6}.card,.metric,.empty,.empty-result,.export-hero,.export-section,.chart-card,.visual-selector{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 18px rgba(20,38,56,.035)}.card{padding:21px 23px}.primary,.secondary,.text-btn{border-radius:10px;min-height:36px;font-weight:650}.primary{background:#173b61;color:#fff;box-shadow:0 4px 10px rgba(23,59,97,.18)}.primary:hover{background:#0f2e4b}.secondary{background:#fff;border-color:#d9e1e8;color:#263747}.secondary:hover{border-color:#aebdca;background:#f9fbfc}.text-btn{color:#315c7d}.flow-row span{border:1px solid #dfe6ec;background:#fff;border-radius:10px}.topic-grid{grid-template-columns:360px minmax(0,1fr);gap:18px}.config{top:104px}.config summary{color:#263747}.api-notice{border:1px solid #dbe6ef;background:#f8fbfd;border-radius:12px;padding:11px 12px;color:#263747}.api-notice b{color:#173b61}.api-footnote{color:#71808c}.visual-help{display:flex;gap:10px;align-items:flex-start;margin:-4px 0 18px;padding:13px 15px;border:1px solid #dfe7ee;border-radius:14px;background:#fff;color:#536372;box-shadow:0 6px 18px rgba(20,38,56,.025);line-height:1.65}.visual-help b{color:#173b61;white-space:nowrap}.visual-help span{font-size:12px}.visual-toolbar{align-items:flex-start}.visual-groups{gap:9px}.visual-group{border-bottom:1px solid #edf0f3;padding-bottom:8px}.visual-group>span{width:96px;color:#8192a1;letter-spacing:.5px}.visual-group .visual-tab{border:1px solid #dbe3ea;border-radius:999px;background:#fff;padding:7px 10px;color:#425466}.visual-group .visual-tab.active{background:#eef5fb;border-color:#b7c9d7;color:#173b61}.chart-card-head h3{font-size:16px;color:#16202b}.chart-card-head p{color:#6e7b88}.chart-frame{border:1px solid #e4e9ee;border-radius:14px;background:#fff;padding:14px}.result-tab,.visual-tab{font-weight:650}.metrics{gap:14px}.metric{padding:18px}.metric strong{font-size:29px;color:#18334f}.import{gap:18px}.runs{gap:9px}.run-card{border-radius:12px;border-color:#dce5ec}.run-card:hover,.run-card.active{background:#eef5fb;border-color:#b7c9d7}.toast{background:#173b61;border-radius:11px;box-shadow:0 14px 32px rgba(23,59,97,.20)}.toast.error{background:#9f251d}
@media(max-width:1120px){.shell{grid-template-columns:230px minmax(0,1fr)}.top,.tabs,.view{padding-left:24px;padding-right:24px}.topic-grid{grid-template-columns:1fr}.config{top:0}}
@media(max-width:760px){.shell{display:block}.side{display:none}.top{height:auto;padding-top:18px;padding-bottom:18px}.tabs{overflow:auto}.visual-help{display:block}.visual-help b{display:block;margin-bottom:4px}}

/* === ZHIYAN_R36_SCIENTIFIC_CHARTS_CSS_START === */
/* R36: scientific chart presentation for Research Lab visual page */
.r36-visual-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:18px 22px;border:1px solid #e4e9f2;border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 16px 38px rgba(28,43,74,.06)}
.r36-visual-summary span{display:block;color:#5267ff;font-size:11px;font-weight:800;letter-spacing:.14em;margin-bottom:6px}.r36-visual-summary h3{margin:0;color:#0f172a;font-size:23px;letter-spacing:-.02em}.r36-visual-summary p{margin:7px 0 0;color:#64748b;line-height:1.65;max-width:820px}.r36-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.r36-figure-card{border-radius:20px;border-color:#e4e9f2;background:#fff;box-shadow:0 16px 42px rgba(28,43,74,.065);overflow:hidden}.r36-card-head{padding-bottom:12px;border-bottom:1px solid #edf1f7}.r36-card-head h3{font-size:18px;color:#0f172a;letter-spacing:-.01em}.r36-card-head p{font-size:12px;color:#64748b;line-height:1.55}.r36-chart-frame{background:#fff;border:0;padding:12px 6px 4px;overflow:auto}.r36-chart-frame svg{width:100%;height:auto;display:block;min-width:620px}.r36-chart-note{margin:10px 2px 0;padding:10px 12px;border-radius:12px;background:#f8fafc;color:#475569;border:1px solid #edf2f7;line-height:1.6}.r36-missing{min-height:220px;display:grid;place-items:center;text-align:center;color:#64748b;background:#f8fafc;border-radius:16px;border:1px dashed #dbe4ef}.r36-missing b{display:block;color:#0f172a;margin-bottom:6px}.r36-svg text{paint-order:stroke;stroke:#fff;stroke-width:0;stroke-linejoin:round}.visual-area .chart-card{margin-bottom:18px}@media(max-width:1180px){.r36-visual-grid{grid-template-columns:1fr}.r36-chart-frame svg{min-width:760px}}@media(max-width:760px){.r36-visual-summary{display:block}.r36-visual-summary button{margin-top:12px}.r36-chart-frame{padding:8px 0}.r36-chart-frame svg{min-width:720px}}
/* === ZHIYAN_R36_SCIENTIFIC_CHARTS_CSS_END === */

/* === ZHIYAN_R37_SCIENTIFIC_VISUALS_CSS_START === */
/* R37 · BERTopic 科研绘图层 */
.visual-area {
  background: transparent;
}
.visual-area .chart-card.r37-chart-card {
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .07);
  padding: 22px 24px 26px;
  margin-bottom: 24px;
}
.visual-area .r37-chart-head {
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .82);
}
.visual-area .r37-chart-head h3 {
  font-size: 20px;
  letter-spacing: -.03em;
  color: #0f172a;
  margin: 0 0 6px;
}
.visual-area .r37-chart-head p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
.visual-area .r37-chart-frame {
  min-height: 520px;
  padding: 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .7), rgba(255,255,255,.92));
  border-radius: 18px;
  overflow: auto;
}
.visual-area .r37-chart-frame svg.r37-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 980px;
  border-radius: 14px;
  background: #fff;
}
.visual-area .r37-chart-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}
.visual-area .r37-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  padding: 28px;
  color: #64748b;
}
.visual-area .r37-empty b {
  display: block;
  color: #0f172a;
  margin-bottom: 8px;
  font-size: 16px;
}
.visual-area .chart-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.visual-area .chart-actions .secondary.small {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe4f0;
  color: #334155;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15,23,42,.035);
}
.visual-area .chart-actions .secondary.small:hover {
  border-color: #6574ff;
  color: #4f46e5;
}
.visual-tabs.visual-groups {
  gap: 14px 18px;
}
.visual-group {
  padding: 10px 0;
}
.visual-group span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
}
.visual-tab {
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #334155;
  font-weight: 720;
  transition: all .18s ease;
}
.visual-tab:hover:not(:disabled) {
  border-color: #8b95ff;
  color: #4f46e5;
  transform: translateY(-1px);
}
.visual-tab.active {
  background: #eef2ff;
  border-color: #8b95ff;
  color: #4f46e5;
  box-shadow: 0 8px 22px rgba(79,70,229,.08);
}
.visual-tab.visual-disabled,
.visual-tab:disabled {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.1);
}
@media (max-width: 900px) {
  .visual-area .r37-chart-head {
    flex-direction: column;
  }
  .visual-area .r37-chart-frame svg.r37-svg {
    min-width: 760px;
  }
}
/* === ZHIYAN_R37_SCIENTIFIC_VISUALS_CSS_END === */

/* === ZHIYAN_R38_SOURCE_CHARTS_CSS_START === */
/* R38 imported scientific chart styles for ResearchLab visual interpretation */
#view-visual .visual-toolbar,
#view-visual .card.visual-toolbar{
  background:#fff;
  border:1px solid #e8edf5;
  border-radius:18px;
  box-shadow:0 18px 48px rgba(17,24,39,.055);
  padding:18px 22px;
}
#view-visual .visual-groups{gap:10px;}
#view-visual .visual-group{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 0;
  border-bottom:1px solid #eef2f7;
}
#view-visual .visual-group:last-child{border-bottom:0;}
#view-visual .visual-group>span{
  width:92px;
  flex:0 0 92px;
  color:#7b8496;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}
#view-visual .visual-tab{
  border:1px solid #dce4f0;
  background:#fff;
  border-radius:999px;
  padding:7px 13px;
  color:#41506b;
  font-weight:760;
  transition:background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
#view-visual .visual-tab:hover:not(:disabled){
  border-color:#9fb3ff;
  color:#4158e8;
  box-shadow:0 8px 18px rgba(91,104,246,.12);
}
#view-visual .visual-tab.active{
  background:#eef2ff;
  border-color:#7788ff;
  color:#4f5df7;
  box-shadow:0 8px 22px rgba(91,104,246,.14);
}
#view-visual .visual-tab:disabled,
#view-visual .visual-disabled{
  opacity:.42;
  cursor:not-allowed;
  box-shadow:none;
}
#view-visual .chart-card{
  background:#fff;
  border:1px solid #e6edf5;
  border-radius:20px;
  padding:22px;
  box-shadow:0 22px 60px rgba(15,23,42,.06);
  margin-bottom:22px;
}
#view-visual .chart-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:14px;
  border-bottom:1px solid #edf1f6;
  margin-bottom:16px;
}
#view-visual .chart-card-head h3{
  margin:0 0 6px;
  color:#101828;
  font-size:20px;
  font-weight:900;
  letter-spacing:-.03em;
}
#view-visual .chart-card-head p{
  margin:0;
  color:#68758a;
  font-size:13px;
  line-height:1.65;
  max-width:760px;
}
#view-visual .chart-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#view-visual .chart-actions .small,
#view-visual .chart-actions button,
#view-visual .chart-actions a{
  border-radius:999px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#22324c;
  font-weight:760;
  min-height:34px;
  padding:7px 12px;
}
#view-visual .chart-frame{
  border:1px solid #e5ecf5;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  padding:18px;
  overflow:auto;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
#view-visual .chart-frame svg{
  display:block;
  width:100%;
  max-width:1280px;
  min-width:760px;
  height:auto;
  background:#fff;
}
#view-visual .chart-note{
  margin:12px 4px 0;
  color:#667085;
  font-size:12px;
  line-height:1.7;
}
#view-visual .visual-selector{
  background:#fff;
  border:1px solid #e6edf5;
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 16px 42px rgba(15,23,42,.045);
  margin-bottom:16px;
}
#view-visual .visual-selector label{
  max-width:440px;
  margin:0;
}
@media(max-width:900px){
  #view-visual .chart-card-head{display:block;}
  #view-visual .chart-actions{justify-content:flex-start;margin-top:12px;}
  #view-visual .visual-group>span{width:100%;flex-basis:100%;}
  #view-visual .chart-frame svg{min-width:680px;}
}

/* R39 native BERTopic figure polish */
.native-bertopic-card .chart-card-head{align-items:flex-start;gap:18px}.native-bertopic-card .chart-card-head small{display:block;margin-top:6px}.native-figure-frame{display:block;width:100%;height:780px;border:1px solid #dbe5f2;border-radius:14px;background:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.75)}.native-chart-card{overflow:hidden}.native-chart-card .chart-actions{white-space:nowrap}@media(max-width:900px){.native-figure-frame{height:640px}.native-bertopic-card .chart-card-head{display:block}.native-chart-card .chart-actions{margin-top:12px}}

/* R40 native BERTopic iframe srcdoc loader */
.native-figure-status {
  margin: 14px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(95, 111, 255, 0.18);
  border-radius: 14px;
  background: rgba(245, 247, 255, 0.86);
  color: #526079;
  font-size: 13px;
  line-height: 1.55;
}
.native-figure-status.error {
  border-color: rgba(228, 80, 80, 0.28);
  background: rgba(255, 247, 247, 0.92);
  color: #9a3412;
}
.native-figure-frame[data-native-loaded="done"] {
  background: #fff;
}
/* === ZHIYAN_R38_SOURCE_CHARTS_CSS_END === */

/* v3.4.32: BER logical-module export page */
.export-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.export-section-head h3{margin:0 0 5px}.export-section-head p{margin:0;color:var(--muted)}
.export-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.export-module-card{border:1px solid #e1e7ed;border-radius:14px;background:#fbfcfd;padding:15px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;min-width:0}.export-module-card h4{margin:4px 0 6px;font-size:14px;color:#172433}.export-module-card p{margin:0;color:#6f7d89;font-size:12px;line-height:1.58}.export-module-kind{display:inline-flex;border-radius:999px;background:#edf4fa;color:#345d7b;padding:3px 7px;font-size:10px;font-weight:750}.export-download{flex:0 0 auto;position:relative}.export-download>summary{list-style:none;cursor:pointer;border:1px solid #d8e1e8;background:#fff;border-radius:9px;padding:7px 10px;color:#263747;font-size:12px;font-weight:650;white-space:nowrap}.export-download>summary::-webkit-details-marker{display:none}.export-download[open]>summary{border-color:#aebdca;background:#f5f9fc}.export-download>div{display:grid;gap:5px;margin-top:7px;min-width:110px}.export-download a{display:block;border:1px solid #e1e7ed;border-radius:8px;background:#fff;padding:7px 9px;color:#244a67;text-decoration:none;font-size:12px}.export-download a:hover{background:#eef5fb;border-color:#b9cbd8}
.export-collapsible>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}.export-collapsible>summary::-webkit-details-marker{display:none}.export-collapsible>summary:after{content:'展开';font-size:12px;color:#55738a;border:1px solid #d8e1e8;border-radius:999px;padding:5px 9px;background:#fff}.export-collapsible[open]>summary:after{content:'收起'}.export-collapsible>summary span{display:grid;gap:4px}.export-collapsible>summary small{font-weight:400;color:var(--muted)}.export-collapsible>.export-grid,.export-collapsible>.export-module-grid{margin-top:14px}
@media(max-width:900px){.export-module-grid{grid-template-columns:1fr}.export-module-card{flex-direction:column}.export-download{width:100%}.export-download>summary{width:100%;text-align:center}}
/* v3.5.0 unified project lifecycle, hero and upload status */
#view-overview>zhiyan-tool-hero{display:block;margin-bottom:20px}.project-item-wrap{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;gap:4px}.project-item-wrap>.project-item{min-width:0}.project-item-wrap .zy-project-menu>button{width:30px;height:30px;border-color:rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#aab7c9}.project-item-wrap.active .zy-project-menu>button,.project-item-wrap:hover .zy-project-menu>button{background:#fff;color:#657085;border-color:#e0e4ec}.project-list{overflow:visible}.ber-upload-operation{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px;padding:12px 14px;border:1px solid #dfe4ff;border-radius:13px;background:#f5f6ff;color:#4f59c8}.ber-upload-operation b{font-size:12px}.ber-upload-operation b:before{content:"";display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;background:#5d68f3;box-shadow:0 0 0 5px rgba(93,104,243,.1);animation:berPulse 1.1s infinite}.ber-upload-operation.done{border-color:#d9eee2;background:#f2fbf6;color:#2b7651}.ber-upload-operation.done b:before{background:#2ca56a;animation:none}.ber-upload-operation span{color:#7a8498;font-size:10px}@keyframes berPulse{50%{opacity:.4}}@media(max-width:760px){.ber-upload-operation{align-items:flex-start;flex-direction:column}}

.preflight-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important}.preflight-actions #runBtn{grid-column:1/-1}.zy-view-loading{opacity:.72;pointer-events:none}.zy-view-loading:before{content:"正在按需读取结果…";display:block;margin:0 0 12px;padding:10px 12px;border:1px solid #dfe7f3;border-radius:10px;background:#f8fbff;color:#52657d;font-size:12px}
@media(max-width:560px){.preflight-actions{grid-template-columns:1fr!important}.preflight-actions #runBtn{grid-column:auto}}

/* v3.6.8.15: BERTopic preflight review layout. */
.preflight-preview-card{
  min-width:0;
  overflow:hidden;
  padding:22px;
}
.preflight-preview-head,
.preflight-section-head,
.preflight-term-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  min-width:0;
}
.preflight-preview-head h3,
.preflight-section-head h4,
.preflight-term-title h4{margin:0}
.preflight-preview-head .eyebrow{margin-bottom:5px}
.preflight-status{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid #dfe5ef;
  border-radius:999px;
  background:#f8fafc;
  color:#59677a;
  font-size:11px;
  font-weight:750;
  white-space:nowrap;
}
.preflight-status.is-ready{border-color:#cce9dc;background:#f0fbf6;color:#16704d}
.preflight-status.is-warning{border-color:#f2d8ae;background:#fff8eb;color:#9a5a11}
.preflight-quality-note:empty{display:none}
.preflight-section{
  min-width:0;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.preflight-section-head{margin-bottom:11px}
.preflight-section-head>div{min-width:0}
.preflight-section-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.preflight-section-head>span,
.preflight-term-title>span{
  flex:0 0 auto;
  color:#7b8798;
  font-size:11px;
  white-space:nowrap;
}
.preflight-source-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border:1px solid #e8ecf3;
  border-radius:11px;
  background:#fff;
}
.preflight-source-table{
  width:100%;
  min-width:600px;
  table-layout:fixed;
}
.preflight-source-table .source-col{width:52%}
.preflight-source-table th,
.preflight-source-table td{padding:10px 11px}
.preflight-source-table th:not(:first-child),
.preflight-source-table td:not(:first-child){text-align:right;white-space:nowrap}
.preflight-source-table td:first-child{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.55;
}
.preflight-source-table tbody tr:last-child td{border-bottom:0}
.preflight-table-empty{text-align:center!important;color:var(--muted)}
.preflight-terms-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
  align-items:stretch;
  min-width:0;
}
.preflight-term-card{
  min-width:0;
  padding:14px;
  border:1px solid #e5eaf2;
  border-radius:12px;
  background:linear-gradient(180deg,#fbfcff 0%,#fff 100%);
}
.preflight-term-title{
  align-items:center;
  margin-bottom:12px;
  padding-bottom:9px;
  border-bottom:1px solid #edf0f5;
}
.preflight-term-card .word-rows{
  max-height:340px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:4px;
}
.preflight-term-card .word-row{
  grid-template-columns:minmax(76px,112px) minmax(62px,1fr) 34px;
  gap:9px;
  min-height:24px;
}
.preflight-term-card .word-row>span{font-size:12px}
.preflight-term-card .word-row>b{font-variant-numeric:tabular-nums}
.preflight-empty{
  display:flex;
  min-height:132px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:18px;
  border:1px dashed #dfe5ef;
  border-radius:10px;
  background:#fafbfe;
  color:var(--muted);
  text-align:center;
}
.preflight-empty b{color:#4d596c;font-size:12px}
.preflight-empty span{font-size:11px;line-height:1.55}
.preflight-empty--wide{min-height:100px}
.preflight-sample-section .sample-list{min-width:0}
.preflight-sample-section .sample-list article:first-child{border-top:0}
.preflight-preview-card .word-rows + .zy-flow-controls,
.preflight-preview-card .preflight-term-card > .zy-flow-controls{display:none!important}
@media(max-width:1320px){
  .preflight-preview-card{padding:18px}
  .preflight-terms-grid{grid-template-columns:1fr}
  .preflight-term-card .word-rows{max-height:290px}
}
@media(max-width:760px){
  .preflight-preview-head,
  .preflight-section-head{flex-direction:column;align-items:stretch}
  .preflight-status{align-self:flex-start}
  .preflight-source-table{min-width:560px}
}
