/* 百川入海（新）——干净、耐读的中文阅读样式 */
:root{
  --ink:#2b2a26; --muted:#8a8578; --paper:#f7f5ef; --card:#fffdf8;
  --line:#e6e1d5; --accent:#b03a2e; --blue:#31556b;
}
*{box-sizing:border-box}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font:16px/1.8 "Noto Serif SC","Source Han Serif SC","Songti SC",Georgia,serif;
}

/* 左导航 + 右正文 */
.layout{display:flex; align-items:flex-start; min-height:100vh}
.sidebar{
  width:200px; flex:0 0 200px; position:sticky; top:0; height:100vh;
  padding:22px 14px 22px 18px; display:flex; flex-direction:column;
  background:var(--card); border-right:1px solid var(--line);
}
.brand{font-weight:700; font-size:18px; color:var(--ink); text-decoration:none; letter-spacing:3px}
.sidebar nav{display:flex; flex-direction:column; gap:2px; flex:1; margin-top:18px}
.sidebar nav a{color:var(--muted); text-decoration:none; font-size:15px; padding:7px 10px; border-radius:6px}
.sidebar nav a:hover{background:#f4efe3; color:var(--accent)}
.sidebar nav a.on{color:var(--accent); background:#f6f1e6; font-weight:700}
.sidebar .runform{margin-top:14px}
.sidebar .runform button{width:100%}
.content{flex:1; min-width:0; max-width:960px; margin:0 auto; padding:0 30px 10px}
@media(max-width:760px){
  .layout{flex-direction:column}
  .sidebar{width:auto; height:auto; position:static; flex-direction:row; align-items:center;
    overflow-x:auto; border-right:none; border-bottom:1px solid var(--line); padding:10px 14px}
  .sidebar nav{flex-direction:row; margin:0; overflow-x:auto; gap:6px}
  .sidebar .runform{margin:0 0 0 8px}
  .content{max-width:none; padding:0 18px}
}

.btn{border:1px solid var(--line); background:#fff; border-radius:6px; padding:6px 14px;
  font-size:14px; cursor:pointer; color:var(--ink); font-family:inherit}
a.btn{display:inline-block; text-decoration:none; line-height:1.5}
.btn:hover{border-color:var(--accent); color:var(--accent)}
.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.btn.primary:hover{opacity:.9; color:#fff}
.btn.small{padding:3px 10px; font-size:13px}
.card{background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px 22px; margin:14px 0}
.card .headline{font-size:19px; font-weight:700; margin:0 0 8px; line-height:1.6}
.rank{color:var(--accent); font-weight:700; margin-right:8px}
.meta{color:var(--muted); font-size:13px; margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.why{color:#444; margin:6px 0}
.keynum{margin:6px 0}
.keynum b,.think b{color:var(--blue)}
.think{margin:6px 0; color:#555; font-size:15px}
a.more{color:var(--accent); text-decoration:none; font-size:14px}
h1{font-size:22px; letter-spacing:1px; margin:0}
h3{font-size:17px; margin:18px 0 8px}
h4{font-size:15px; margin:12px 0 6px}
.pagehead{display:flex; align-items:baseline; gap:14px; margin:24px 0 8px; flex-wrap:wrap}
.pagehead .sub{color:var(--muted); font-size:14px}
table{width:100%; border-collapse:collapse; font-size:14px; background:var(--card)}
th,td{border-bottom:1px solid var(--line); padding:9px 8px; text-align:left; vertical-align:top}
th{color:var(--muted); font-weight:600; font-size:13px}
.nowrap{white-space:nowrap}
textarea,input[type=text],input[type=number]{
  width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:6px;
  font:inherit; background:#fff; color:var(--ink)
}
textarea{min-height:100px; line-height:1.7}
label{display:block; margin:16px 0 5px; font-weight:700; font-size:14px}
.hint{color:var(--muted); font-size:13px; margin:6px 0}
pre.log{background:#211f1a; color:#e8e2d2; padding:14px; border-radius:8px;
  font-size:13px; overflow:auto; max-height:420px; white-space:pre-wrap; font-family:Consolas,monospace}
.foot{color:var(--muted); font-size:13px; text-align:center; padding:32px 0 44px}
.empty{color:var(--muted); padding:56px 0; text-align:center; font-size:17px}
/* ===== 原文正文阅读排版（详情页 tab1 的报道全文） ===== */
.prose{font:16px/1.95 "Noto Serif SC","Source Han Serif SC","Songti SC",Georgia,serif;
  color:var(--ink); word-break:break-word}
.prose p{margin:0 0 14px; text-align:justify; text-indent:2em}
.prose h1,.prose h2{margin:28px 0 12px; font-size:19px; font-weight:700; letter-spacing:1px}
.prose h3{margin:22px 0 10px; font-size:17px; font-weight:700}
.prose h4,.prose h5{margin:18px 0 8px; font-size:16px; font-weight:700}
.prose img{display:block; max-width:100%; height:auto; margin:18px auto 0;
  border-radius:8px; border:1px solid var(--line); background:#fff}
.prose .fig{margin:6px 0 18px; font-size:13px; color:var(--muted); text-align:center; text-indent:0}
.prose blockquote{margin:16px 0; padding:10px 16px; border-left:3px solid var(--accent);
  background:#f8f4ea; color:#5a564c; border-radius:0 6px 6px 0}
.prose blockquote p{margin:0; text-indent:0}
.prose a{color:var(--blue); text-decoration:underline; text-underline-offset:3px}
.prose a:hover{color:var(--accent)}
.prose ul,.prose ol{margin:0 0 14px; padding-left:1.7em}
.prose li{margin:4px 0}
.prose table{border-collapse:collapse; margin:14px 0; width:100%; font-size:14px; line-height:1.7}
.prose th,.prose td{border:1px solid var(--line); padding:6px 10px; text-align:left}
.prose thead th{background:#f4efe3; font-weight:700}
.prose tbody tr:nth-child(even){background:#fbf8f1}
.prose th.c,.prose td.c{text-align:center}
.prose th.r,.prose td.r{text-align:right}
.prose hr{border:none; border-top:1px solid var(--line); margin:22px 0}
.prose code{font-family:Consolas,monospace; font-size:13.5px; background:#f4efe3;
  border-radius:4px; padding:1px 5px}
.prose pre{padding:12px 14px; overflow-x:auto; background:#f4efe3; border-radius:6px}
.prose pre code{padding:0; background:none}
/* 逐句对照翻译（学英文模式） */
.prose .en{margin:0 0 2px; text-indent:0; text-align:left}
.prose .zh{margin:0 0 12px; text-indent:0; text-align:left; color:var(--muted);
  font-size:14.5px; line-height:1.75; border-left:2px solid var(--line); padding-left:10px}
/* ===== AI 报告排版（深度解读 / 前提条件） ===== */
.report{font:15.5px/1.9 "Noto Serif SC","Source Han Serif SC","Songti SC",Georgia,serif;
  color:var(--ink); word-break:break-word}
.report p{margin:0 0 12px}
.report h2{margin:24px 0 10px; font-size:19px; font-weight:700; letter-spacing:1px;
  padding-bottom:6px; border-bottom:1px solid var(--line)}
.report h3{margin:20px 0 8px; font-size:17px; font-weight:700;
  border-left:3px solid var(--accent); padding-left:10px}
.report h4{margin:16px 0 6px; font-size:15.5px; font-weight:700}
.report h5{margin:14px 0 6px; font-size:15px; font-weight:700; color:var(--muted)}
.report ul,.report ol{margin:0 0 12px; padding-left:1.7em}
.report li{margin:5px 0}
.report ul>li::marker{color:var(--accent)}
.report blockquote{margin:14px 0; padding:9px 15px; border-left:3px solid var(--accent);
  background:#f8f4ea; color:#5a564c; border-radius:0 6px 6px 0}
.report blockquote p{margin:0}
.report a{color:var(--blue); text-decoration:underline; text-underline-offset:3px}
.report a:hover{color:var(--accent)}
.report code{font-family:Consolas,"Courier New",monospace; font-size:13px;
  background:#f4efe3; border-radius:4px; padding:1px 5px}
.report pre{margin:12px 0; padding:14px 16px; overflow-x:auto; background:#faf6ec;
  border:1px solid var(--line); border-radius:8px; line-height:1.55}
.report pre code{background:none; padding:0; font-size:13px; white-space:pre}
.report table{border-collapse:collapse; margin:14px 0; width:100%; font-size:14px; line-height:1.75}
.report th,.report td{border:1px solid var(--line); padding:7px 11px; text-align:left}
.report thead th{background:#f4efe3; font-weight:700; color:var(--ink); white-space:nowrap}
.report tbody tr:nth-child(even){background:#fbf8f1}
.report th.c,.report td.c{text-align:center}
.report th.r,.report td.r{text-align:right}
.report hr{border:none; border-top:1px solid var(--line); margin:20px 0}
.report strong{color:#1f1e1a}
.gentime{margin:14px 0 0; font-size:12.5px; color:var(--muted)}
.subcard{background:#faf7f0; border:1px solid var(--line); border-radius:8px; padding:10px 14px}
.subcard h4{margin:0 0 8px; font-size:15px}
.subcard ul{margin:0; padding-left:1.4em}
.subcard li{margin:3px 0; font-size:14.5px}
/* 花费账本 */
.costcards{display:flex; gap:14px; margin:6px 0 18px; flex-wrap:wrap}
.costcard{flex:1; min-width:150px; background:var(--card); border:1px solid var(--line);
  border-radius:10px; padding:14px 16px}
.costcard .cclabel{font-size:13px; color:var(--muted)}
.costcard .ccnum{font-size:24px; font-weight:700; color:var(--accent); margin:4px 0 2px;
  font-family:Georgia,serif}
.costcard .cchint{font-size:12.5px; color:var(--muted)}
/* 登录页 */
.loginwrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px}
.logincard{width:100%; max-width:340px; background:var(--card); border:1px solid var(--line);
  border-radius:12px; padding:28px 26px}
.loginbrand{font-size:22px; font-weight:700; letter-spacing:4px; color:var(--ink); text-align:center}
.logincard .hint{text-align:center; margin:6px 0 16px}
.logincard input{width:100%; margin-bottom:10px}
.logincard .btn{width:100%}
/* 侧栏用户区 */
.userbox{display:flex; align-items:center; justify-content:space-between; margin-top:10px;
  padding-top:8px; border-top:1px solid var(--line); font-size:13px; color:var(--muted)}
.userbox .ulogout{color:var(--muted); text-decoration:none}
.userbox .ulogout:hover{color:var(--accent)}
/* 顶栏身份切换 */
.topbar{display:flex; align-items:center; justify-content:flex-end; gap:10px;
  padding:10px 2px 12px; border-bottom:1px solid var(--line); margin-bottom:14px}
.topbar .tbhint{font-size:13px; color:var(--muted)}
.topbar select{font:inherit; font-size:14.5px; padding:6px 10px; border:1px solid var(--line);
  border-radius:8px; background:var(--card); color:var(--ink); cursor:pointer; min-width:190px}
.topbar select:hover{border-color:var(--accent)}
.topbar select:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 2px rgba(176,58,46,.12)}
.topbar .tbnew{font-size:13.5px; color:var(--muted); text-decoration:none;
  border:1px dashed var(--line); border-radius:8px; padding:6px 10px; background:none}
.topbar .tbnew:hover{color:var(--accent); border-color:var(--accent)}
/* 父子结构导航：父节点点击展开/收起 */
.navparent{margin-top:10px; border-top:1px solid var(--line); padding-top:6px}
.navtoggle{display:flex; align-items:center; justify-content:space-between; width:100%;
  background:none; border:none; font:inherit; font-size:15px; color:var(--ink);
  padding:7px 10px; cursor:pointer; border-radius:6px}
.navtoggle:hover{background:#f4efe3; color:var(--accent)}
.navtoggle .arrow{font-size:11px; color:var(--muted); transition:transform .15s}
.navchildren{display:none; flex-direction:column; padding:2px 0 4px;
  border-left:1px solid var(--line); margin-left:18px; padding-left:8px}
.navparent.open .navchildren{display:flex}
.navparent.open .arrow{transform:rotate(180deg)}
.navchildren a{padding:6px 10px; font-size:14.5px}
.radiogroup{display:flex; flex-direction:column; gap:6px; margin-bottom:10px}
.radio{display:flex; align-items:flex-start; gap:8px; font-size:15px; cursor:pointer;
  padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--card)}
.radio:hover{border-color:var(--accent)}
.radio input{margin-top:3px}
.advanced{margin:10px 0}
.advanced summary{cursor:pointer; color:var(--muted); font-size:14px; user-select:none}
.advanced summary:hover{color:var(--accent)}
.pill{display:inline-block; border:1px solid var(--line); border-radius:999px; padding:1px 10px;
  font-size:12px; color:var(--muted)}
.msg{background:#fdf3d7; border:1px solid #eadfb8; border-radius:8px; padding:9px 14px;
  font-size:14px; margin:12px 0}
.two{display:grid; grid-template-columns:1fr 1fr; gap:16px}
@media(max-width:700px){.two{grid-template-columns:1fr}}

/* 详情页 tab */
.tabs{display:flex; gap:4px; border-bottom:1px solid var(--line); margin:16px 0 0}
.tabbtn{background:none; border:none; padding:9px 16px; font:inherit; color:var(--muted);
  cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px}
.tabbtn:hover{color:var(--accent)}
.tabbtn.active{color:var(--accent); border-bottom-color:var(--accent); font-weight:700}
.tabpane{display:none}
.tabpane.active{display:block}
.chip{background:#f4efe3; border-radius:4px; padding:1px 6px; font-size:12px; margin-right:6px;
  font-family:Consolas,monospace}
