:root{
  --bg:#f7f5f0; --surface:#fffefb; --line:#e6e0d6; --ink:#241f1a; --ink2:#4a423a;
  --muted:#8a8076; --green:#1f4739; --green2:#2e6b52; --green-soft:#e7f0ea;
  --amber:#b0762a; --amber-soft:#fbf1df; --red:#a33b2c; --red-soft:#fbeceb;
  --shadow:0 1px 2px rgba(36,31,26,.05),0 8px 24px -12px rgba(36,31,26,.16);
  --r:14px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC",
    system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg); color:var(--ink); font-size:15px; line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--green2);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{margin:0 0 .5em;line-height:1.35;font-weight:650}
h2{font-size:1.32rem} h3{font-size:1.06rem} h4{font-size:.98rem}
p{margin:.5em 0}
code{background:#f0ece4;padding:.1em .35em;border-radius:5px;font-size:.88em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
pre{background:#221f1b;color:#f2ece1;padding:14px 16px;border-radius:12px;overflow:auto;font-size:.86rem}
pre code{background:none;color:inherit;padding:0}
small,.small{font-size:.83rem}
.muted{color:var(--muted)}
.hidden{display:none!important}
.center{text-align:center}

/* ---------- layout ---------- */
.app{display:flex;min-height:100vh}
.side{
  width:252px;flex:0 0 252px;background:linear-gradient(170deg,#214d3e,#173328 70%);
  color:#e9efe9;display:flex;flex-direction:column;padding:20px 16px;position:sticky;top:0;
  height:100vh;
}
.brand{display:flex;gap:11px;align-items:center;color:#fff;text-decoration:none;padding:2px 6px 18px}
.brand:hover{text-decoration:none}
.brand-mark{
  width:40px;height:40px;border-radius:12px;background:#f2e7cf;color:#1f4739;font-weight:700;
  display:flex;align-items:center;justify-content:center;font-size:19px;flex:0 0 40px;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.08)
}
.brand-mark.big{width:64px;height:64px;border-radius:18px;font-size:30px;margin-bottom:18px}
.brand-txt b{display:block;font-size:1.02rem;letter-spacing:.02em}
.brand-txt small{display:block;color:#a9c2b3;font-size:.74rem}
.nav{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.nav-item{
  display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:10px;color:#cfe0d5;
  font-size:.93rem;text-decoration:none;transition:.15s
}
.nav-item i{font-style:normal;font-size:1rem;width:20px;text-align:center;opacity:.9}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff;text-decoration:none}
.nav-item.active{background:#f5efe2;color:#1f4739;font-weight:600}
.nav-item.active i{opacity:1}
.badge{margin-left:auto;font-size:.7rem;background:rgba(255,255,255,.13);padding:1px 7px;border-radius:20px}
.nav-item.active .badge{background:rgba(31,71,57,.12);color:#2e6b52}
.side-foot{margin-top:auto;padding:12px 6px 10px}
.side-foot .tip{font-size:.76rem;color:#8fae9d;line-height:1.6;border-left:2px solid #3d6b57;padding-left:9px}
.who{display:flex;align-items:center;gap:9px;border-top:1px solid rgba(255,255,255,.12);padding-top:12px}
.avatar{width:32px;height:32px;border-radius:50%;background:#f2e7cf;color:#1f4739;
  display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700;flex:0 0 32px}
.avatar.sm{width:28px;height:28px;flex:0 0 28px;font-size:.78rem;margin-top:2px}
.who-txt{min-width:0;line-height:1.3}
.who-txt b{display:block;font-size:.86rem;color:#fff;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who-txt small{color:#9dbaa9;font-size:.72rem}
.logout{margin-left:auto;font-size:.75rem;color:#9dbaa9}
.logout:hover{color:#fff;text-decoration:none}

.main{padding:26px 30px 60px;flex:1;min-width:0;max-width:1240px;width:100%;margin:0 auto}
.main-wide{max-width:1520px}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.page-head h2{margin-bottom:.15em}
.pill{background:var(--green-soft);color:var(--green2);border-radius:20px;padding:4px 12px;
  font-size:.8rem;white-space:nowrap}

/* ---------- cards / forms ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:20px 22px;box-shadow:var(--shadow)}
.card+.card{margin-top:0}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:18px;align-items:start}
@media (max-width:1000px){
  .split,.cols{grid-template-columns:1fr}
  .side{position:static;height:auto;width:100%;flex:1 1 100%}
  .app{flex-direction:column}
  .main{max-width:100%;margin:0;padding:18px 16px 48px}
}
.form{display:flex;flex-direction:column;gap:13px}
.form.dense{gap:10px}
.form label{display:flex;flex-direction:column;gap:5px;font-size:.85rem;color:var(--ink2);font-weight:600}
.form .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.radios{display:flex;flex-direction:column;gap:8px;margin:2px 0 4px}
.radio{display:flex;align-items:center;gap:8px;font-size:.9rem;color:var(--ink2);font-weight:400;cursor:pointer}
.radio input{width:16px;height:16px;margin:0;accent-color:#1f5c45}
input,textarea,select{
  font:inherit;font-size:.92rem;color:var(--ink);background:#fff;border:1px solid var(--line);
  border-radius:10px;padding:9px 12px;width:100%;transition:.15s
}
input:focus,textarea:focus{outline:none;border-color:var(--green2);box-shadow:0 0 0 3px rgba(46,107,82,.12)}
textarea{resize:vertical;line-height:1.65}
.row{display:flex;gap:10px;align-items:center;margin-top:12px}
.grow{flex:1}
.btn{
  font:inherit;font-size:.9rem;font-weight:600;border:1px solid var(--line);background:#fff;
  color:var(--ink);padding:9px 16px;border-radius:10px;cursor:pointer;transition:.15s;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap
}
.btn:hover{border-color:#cfc6b7;background:#faf7f1;text-decoration:none}
.btn.primary{background:var(--green);color:#f6f1e6;border-color:var(--green)}
.btn.primary:hover{background:var(--green2);border-color:var(--green2);color:#fff}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.block{width:100%}
.alert{background:var(--red-soft);color:var(--red);border:1px solid #f0cfcb;
  padding:9px 13px;border-radius:10px;font-size:.86rem;margin:10px 0}

/* ---------- chat ---------- */
.chat-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px;align-items:start}
@media (max-width:900px){.chat-layout{grid-template-columns:1fr}.conv-pane{display:none}}
.conv-pane{position:sticky;top:26px}
.conv-list{margin-top:14px;display:flex;flex-direction:column;gap:3px;max-height:62vh;overflow:auto}
.conv-item{padding:8px 11px;border-radius:9px;color:var(--ink2);font-size:.85rem;
  flex:0 0 auto;
  text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-item:hover{background:#efeae0;text-decoration:none}
.conv-item.active{background:var(--green-soft);color:var(--green2);font-weight:600}
.empty-small{color:var(--muted);font-size:.82rem;padding:8px 4px}
.welcome{max-width:620px;margin:9vh auto 0;text-align:center;padding:0 10px}
.welcome .avatar{width:58px;height:58px;font-size:1.25rem;margin:0 auto 14px}
.welcome-photo{width:76px;height:76px;border-radius:50%;object-fit:cover;object-position:center 18%;margin:0 auto 14px;display:block;border:3px solid #fff;box-shadow:0 6px 18px rgba(24,55,42,.18)}
.welcome h3{margin:0 0 12px;font-size:1.08rem;color:var(--green2)}
.welcome p{margin:0 0 10px;color:var(--ink2);font-size:.93rem;line-height:1.8}
.welcome p.muted{color:var(--muted);font-size:.85rem}
.chat-main{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:calc(100vh - 120px)}
.chat-head{display:flex;justify-content:space-between;align-items:center;
  padding:16px 22px;border-bottom:1px solid var(--line)}
.chat-head h2{margin:0;font-size:1.1rem}
.thread{padding:20px 22px;flex:1;overflow:auto;display:flex;flex-direction:column;gap:16px}
.msg{display:flex;gap:10px;max-width:100%}
.msg.user{justify-content:flex-end}
.msg .bubble{padding:11px 15px;border-radius:14px;font-size:.93rem;max-width:min(760px,90%)}
.msg.user .bubble{background:var(--green);color:#f7f3e9;border-bottom-right-radius:4px}
.msg.bot .bubble{background:#f6f2ea;border:1px solid #ece5d8;border-bottom-left-radius:4px}
.hint-row{display:flex;gap:8px;flex-wrap:wrap;padding:0 22px 12px}
.chip{font:inherit;font-size:.8rem;background:#f2eee6;border:1px solid #e8e1d4;color:var(--ink2);
  padding:5px 11px;border-radius:20px;cursor:pointer}
.chip:hover{background:var(--green-soft);border-color:#cfe2d6;color:var(--green2)}
.composer{display:flex;gap:10px;padding:14px 22px 18px;border-top:1px solid var(--line);align-items:flex-end}
.composer textarea{flex:1;max-height:180px}

/* ---------- result / markdown ---------- */
.result-card{min-height:420px;position:relative}
.out{font-size:.94rem}
.out.empty{display:flex;align-items:center;justify-content:center;min-height:360px}
.placeholder{color:var(--muted);font-size:.9rem}
.md h1,.md h2,.md h3,.md h4{margin:1.1em 0 .45em}
.md h2{font-size:1.12rem;border-bottom:1px solid var(--line);padding-bottom:.3em}
.md h3{font-size:1rem;color:var(--green)}
.md h4{font-size:.94rem}
.md ul,.md ol{padding-left:1.35em;margin:.45em 0}
.md li{margin:.22em 0}
.md blockquote{margin:.6em 0;padding:.4em 1em;border-left:3px solid #cfe2d6;
  background:#f7faf8;color:var(--ink2);border-radius:0 8px 8px 0}
.md hr{border:none;border-top:1px solid var(--line);margin:1.2em 0}
.md table{border-collapse:collapse;width:100%;margin:.7em 0;font-size:.88rem;display:block;overflow:auto}
.md th,.md td{border:1px solid var(--line);padding:6px 10px;text-align:left}
.md th{background:#f3efe7;font-weight:600}
.md strong{color:#1b1713}
.sources{margin-top:16px;border-top:1px dashed var(--line);padding-top:12px;font-size:.8rem;color:var(--muted)}
.sources b{color:var(--ink2)}
.sources span{display:inline-block;margin:2px 6px 2px 0;background:#f3efe7;border-radius:6px;padding:2px 8px}
.probe{margin-bottom:16px;background:#f8faf8;border:1px solid #dceae1;border-radius:12px;padding:13px 16px;font-size:.83rem}
.probe h4{margin:0 0 6px;font-size:.85rem;color:var(--green2)}
.probe ul{margin:0;padding-left:1.2em;color:var(--ink2)}
.probe .warn{color:var(--amber)}
.probe .ok{color:var(--green2)}
.probe .bad{color:var(--red)}
.typing{display:inline-flex;gap:3px;align-items:center}
.typing i{width:5px;height:5px;border-radius:50%;background:var(--muted);animation:bl 1s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes bl{0%,80%,100%{opacity:.25}40%{opacity:1}}

/* ---------- tabs / drop ---------- */
.tabs{display:flex;gap:6px;margin-bottom:12px;border-bottom:1px solid var(--line);padding-bottom:8px}
.tab{font:inherit;font-size:.85rem;background:none;border:none;color:var(--muted);cursor:pointer;
  padding:4px 10px;border-radius:8px}
.tab.active{background:var(--green-soft);color:var(--green2);font-weight:600}
.drop{border:2px dashed #ddd4c4;border-radius:12px;padding:34px 20px;text-align:center;
  background:#fcfaf6;cursor:pointer;transition:.15s}
.drop:hover,.drop.over{border-color:var(--green2);background:var(--green-soft)}
.drop p{margin:.3em 0}

/* ---------- tables / lists ---------- */
.tbl{width:100%;border-collapse:collapse;font-size:.84rem;margin-top:8px}
.tbl th,.tbl td{border-bottom:1px solid var(--line);padding:7px 8px;text-align:left}
.tbl th{color:var(--muted);font-weight:600;font-size:.78rem}
.tbl tr:hover td{background:#faf7f1}
.row-list{display:flex;flex-direction:column;gap:2px;margin-top:8px;max-height:52vh;overflow:auto}
.row-item{padding:9px 11px;border-radius:9px;display:flex;flex-direction:column;gap:1px;color:var(--ink)}
.row-item:hover{background:#f5f1e9;text-decoration:none}
.row-item b{font-weight:600;font-size:.9rem}
.row-item small{color:var(--muted);font-size:.76rem}
.genout{margin-top:10px;background:var(--green-soft);border-radius:10px;padding:10px 13px;font-size:.88rem}
.genout code{font-size:1rem;letter-spacing:.04em}

/* ---------- auth ---------- */
.auth-body{background:linear-gradient(160deg,#eef2ec,#f7f5f0 45%,#f4eee3);
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}
.auth-wrap{display:grid;grid-template-columns:1.05fr .95fr;max-width:940px;width:100%;
  background:var(--surface);border-radius:22px;overflow:hidden;box-shadow:0 24px 60px -30px rgba(36,31,26,.4);
  border:1px solid var(--line)}
.auth-art{background:linear-gradient(165deg,#214d3e,#173328);color:#eef3ee;padding:44px 40px}
.auth-art h1{font-size:1.5rem;margin:0 0 .5em;color:#fff}
.auth-art p{color:#b9cdc0;font-size:.92rem}
.auth-art ul{color:#cfe0d5;font-size:.87rem;padding-left:1.1em;line-height:1.9;margin:1.2em 0}
.auth-note{margin-top:26px;font-size:.78rem;color:#8fae9d;border-left:2px solid #3d6b57;padding-left:10px}
.who-card{display:flex;align-items:center;gap:16px;margin-bottom:26px}
.who-photo{width:92px;height:92px;border-radius:16px;object-fit:cover;object-position:center 15%;border:2px solid rgba(255,255,255,.35);box-shadow:0 8px 22px rgba(0,0,0,.25)}
.who-name{font-size:1.35rem;font-weight:700;color:#fff;letter-spacing:.02em}
.who-role{font-size:.8rem;color:#bcd2c4;margin-top:4px;line-height:1.55}
.who-honors{font-size:.76rem;color:#9dbba9;margin-top:6px;line-height:1.6}
.auth-bio{font-size:.79rem;color:#a9c3b3;line-height:1.8;margin-top:4px}
.auth-card{padding:44px 40px}
.auth-card h2{font-size:1.25rem;margin-bottom:.2em}
@media (max-width:820px){.auth-wrap{grid-template-columns:1fr}.auth-art{display:none}}

/* ---------- 第二次反馈调整（2026-10-27） ---------- */
/* 工具页改为上下分栏：表单在上，结果在下 */
.split{grid-template-columns:minmax(0,1fr)}
@media (max-width:1000px){.split,.cols{grid-template-columns:1fr}}
img.brand-mark{object-fit:cover;object-position:center 18%;display:block}

/* 右侧生成进度 */
.progress{padding:0 0 12px;margin-bottom:4px}
.progress-bar{height:8px;background:#e8e2d4;border-radius:99px;overflow:hidden}
.progress-bar i{display:block;height:100%;width:0;background:#2f6b4f;border-radius:99px;transition:width .25s ease}
.progress-txt{font-size:.78rem;color:var(--muted);margin-top:6px}
.progress.done .progress-bar i{background:#3f8f62}
.progress.hidden{display:none}

/* 关于页 */
.about{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:24px;align-items:start}
@media (max-width:900px){.about{grid-template-columns:1fr}}
.about-photo{width:100%;border-radius:16px;border:1px solid var(--line);box-shadow:var(--shadow);object-fit:cover;object-position:center 15%;display:block}
.about-txt h3{margin:0 0 4px}
.about-txt p{font-size:.94rem;line-height:1.85;margin:.55em 0}

/* 报告页：下载 Word */
.head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.row-report{flex-direction:row;align-items:center;justify-content:space-between;gap:10px}
.row-main{display:flex;flex-direction:column;gap:1px;color:var(--ink);min-width:0}
.row-main:hover{text-decoration:none}
.dl{flex:none;font-size:.74rem;color:var(--green2);border:1px solid #cfe0d5;border-radius:7px;
    padding:2px 8px;background:#fff;white-space:nowrap}
.dl:hover{background:var(--green-soft);text-decoration:none}

/* 诊断页下方：看不懂诊断，接着问 */
.followup{margin-top:18px}
.followup h3{font-size:1rem;color:var(--green);margin:0 0 6px}
.followchat{margin-top:14px;display:flex;flex-direction:column;gap:12px}
.fq{align-self:flex-end;max-width:82%;background:var(--green);color:#f7f3e9;border-radius:12px;
    border-bottom-right-radius:4px;padding:9px 13px;font-size:.9rem;line-height:1.7}
.fa{background:#faf8f2;border:1px solid var(--line);border-radius:12px;border-top-left-radius:4px;
    padding:12px 15px;font-size:.92rem;line-height:1.8;max-width:100%}
.fa p:first-child{margin-top:0}
.fa p:last-child{margin-bottom:0}
@media (max-width:640px){.fq{max-width:92%}}
