/* ============================================================
   KORVIA 政务端样式 — 登录 / 仪表盘 / 企业库
   藏青 + 朱砂 · 依赖 base.css
   ============================================================ */

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background:
    radial-gradient(1000px 520px at 80% -10%, rgba(181, 74, 57, .10), transparent 55%),
    radial-gradient(900px 600px at 0% 110%, rgba(200, 169, 110, .06), transparent 55%),
    linear-gradient(168deg, var(--ink-2), var(--ink) 60%, #081020);
}
.login-card {
  width: min(420px, 100%);
  padding: 44px 42px 36px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  position: relative;
  animation: fadeUp .6s var(--ease);
}
.login-card::before {
  content: "";
  position: absolute; top: 0; left: 42px; right: 42px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .bn { font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: var(--text-hi); }
.login-sub { margin-top: 26px; }
.login-sub .l1 { font-size: 19px; font-weight: 600; color: var(--text-hi); letter-spacing: .02em; }
.login-sub .l2 { font-size: 12.5px; color: var(--text-mid); margin-top: 6px; letter-spacing: .14em; }
.login-form { margin-top: 30px; display: grid; gap: 16px; }
.login-demo {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed rgba(200, 169, 110, .35);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.8;
}
.login-demo b { color: var(--gold-soft); font-weight: 600; }
.login-back { margin-top: 18px; text-align: center; font-size: 12.5px; }
.login-back a { color: var(--text-mid); transition: color .2s; }
.login-back a:hover { color: var(--gold-soft); }
.login-err { color: #E28D7B; font-size: 12.5px; display: none; }

/* ---------- 工作台骨架 ---------- */
.gov-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100dvh; }
.gov-side {
  background: linear-gradient(180deg, #0D1930, var(--ink) 70%);
  border-right: 1px solid var(--line-dark);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}
.gov-side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; border-bottom: 1px solid var(--line-dark); margin-bottom: 14px; }
.gov-side .brand .bn { font-family: var(--font-serif); font-size: 20px; color: var(--text-hi); letter-spacing: .05em; }
.gov-side .brand .bo { font-size: 10.5px; color: var(--text-mid); letter-spacing: .18em; margin-top: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--text-mid);
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}
.nav-item:hover { color: var(--text-hi); background: rgba(255, 255, 255, .04); }
.nav-item.on {
  color: var(--gold-soft);
  background: rgba(200, 169, 110, .09);
  border-color: rgba(200, 169, 110, .25);
}
.nav-item svg { flex: none; opacity: .8; }
.nav-count { min-width: 20px; height: 20px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; }
.gov-side .foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line-dark); }
.gov-side .org { font-size: 13px; color: var(--text-hi); }
.gov-side .usr { font-size: 11.5px; color: var(--text-mid); margin-top: 2px; }
.gov-side .logout { font-size: 12px; color: var(--text-mid); margin-top: 10px; padding: 6px 0; display: inline-block; transition: color .2s; }
.gov-side .logout:hover { color: #E28D7B; }

.gov-main { min-width: 0; background: var(--paper); }
.gov-topbar {
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 15px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.gov-topbar .tt { font-size: 16px; font-weight: 600; }
.gov-topbar .ts { font-size: 12px; color: var(--ink-text-2); }
.gov-topbar .crumb { margin-left: auto; font-size: 12px; color: var(--ink-text-2); letter-spacing: .04em; }
.gov-body { padding: 30px 32px 60px; }

/* ---------- 概览 ---------- */
.ov-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ov-stat { padding: 22px 24px; position: relative; overflow: hidden; }
.ov-stat .k { font-size: 11px; letter-spacing: .22em; color: var(--ink-text-2); font-weight: 700; }
.ov-stat .v { font-size: 34px; font-weight: 600; margin-top: 10px; font-variant-numeric: tabular-nums; line-height: 1; }
.ov-stat .d { font-size: 12px; margin-top: 10px; color: var(--ok); }
.ov-stat .d.red { color: var(--acc-gov-red); }
.ov-stat::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  opacity: .55;
}
.ov-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-top: 18px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.panel .ph { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.panel .ph h3 { font-size: 15px; }
.panel .ph .more { font-size: 12px; color: #8F7434; cursor: pointer; }

/* 纯 CSS 条形图 */
.bar-chart { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 40px; align-items: center; gap: 12px; font-size: 12.5px; }
.bar-row .bl { color: var(--ink-text-2); }
.bar-row .bv { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-track { height: 8px; border-radius: 99px; background: rgba(11, 21, 38, .06); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1E3A5F, #3D5A82); width: 0; transition: width 1s var(--ease); }
.bar-fill.gold { background: linear-gradient(90deg, #C8A96E, #A8853F); }
.bar-fill.red { background: linear-gradient(90deg, #B54A39, #C97C6A); }

/* 行业分布（环形简表） */
.ind-legend { display: grid; gap: 12px; }
.ind-row { display: grid; grid-template-columns: 12px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.ind-dot { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- 企业库 ---------- */
.lib-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lib-head .search-box { position: relative; flex: 1; min-width: 220px; }
.lib-head .search-box .input { padding-left: 38px; }
.lib-head .search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-text-2); }
.f-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.grade-badge { font-family: var(--font-serif); font-weight: 600; font-size: 14px; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; }
.grade-S { background: rgba(181, 74, 57, .1); color: #B54A39; border: 1px solid rgba(181, 74, 57, .3); }
.grade-T { background: rgba(122, 139, 163, .1); color: #5B6673; border: 1px dashed rgba(122, 139, 163, .45); }
.grade-A { background: rgba(200, 169, 110, .13); color: #8F7434; border: 1px solid rgba(200, 169, 110, .4); }
.grade-B { background: rgba(122, 139, 163, .12); color: #5B6673; border: 1px solid rgba(122, 139, 163, .3); }
.result-count { font-size: 12.5px; color: var(--ink-text-2); }
.result-count b { color: var(--ink-text); }

/* ---------- 企业详情抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(8, 14, 26, .48);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 94vw);
  background: var(--paper);
  z-index: 91;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform .38s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(11, 21, 38, .18);
}
.drawer.open { transform: none; pointer-events: auto; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer-head {
  padding: 22px 28px;
  background: linear-gradient(135deg, #0D1930, var(--ink));
  color: var(--text-hi);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.drawer-head .dn { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.drawer-head .dn .en { font-size: 12.5px; color: var(--text-mid); font-weight: 400; }
.drawer-head .dk { font-size: 11.5px; color: var(--text-mid); margin-top: 8px; letter-spacing: .06em; }
.drawer-close { color: var(--text-mid); font-size: 20px; line-height: 1; padding: 4px; transition: color .2s; }
.drawer-close:hover { color: var(--gold-soft); }
.drawer-close { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px; }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 26px 28px; display: grid; gap: 22px; align-content: start; }
.d-section .sh { font-size: 11px; font-weight: 700; letter-spacing: .26em; color: #8F7434; margin-bottom: 12px; }
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d-kv .cell { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; }
.d-kv .ck { font-size: 11px; color: var(--ink-text-2); letter-spacing: .08em; }
.d-kv .cv { font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.cert-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 12.5px; margin: 0 6px 6px 0; }
.cert-chip svg { color: var(--ok); }

/* 政务端政策引用条目 */
.d-policy { padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13px; margin-bottom: 10px; }
.d-policy .dp-t { font-weight: 600; }
.d-policy .dp-s { color: var(--ink-text-2); font-size: 12.5px; margin-top: 3px; }
.d-policy .dp-src { font-size: 11.5px; color: #A39B87; margin-top: 6px; }
.d-policy .dp-src a { color: #8F7434; text-decoration: underline; text-underline-offset: 3px; }

.official-source-list { display: grid; gap: 8px; margin-top: 10px; }
.official-source-entry { min-width: 0; padding: 10px 11px; border: 1px solid rgba(11,21,38,.09); border-radius: 8px; background: #FAF9F6; }
.official-source-head { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.official-source-head > a { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: #8F7434; text-decoration: underline; text-underline-offset: 3px; }
.official-source-head > a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(460px, 58vw); }
.official-source-head svg { width: 13px; height: 13px; flex: none; }
.official-source-number { flex: none; color: #8F7434; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.official-source-url { margin-top: 6px; color: #A39B87; font-family: Consolas, Menlo, monospace; font-size: 10.5px; line-height: 1.5; overflow-wrap: anywhere; }
.official-source-error { margin-top: 6px; color: #9E4437; font-size: 11.5px; line-height: 1.55; overflow-wrap: anywhere; }
.official-source-empty { display: inline-block; margin-top: 7px; color: #A39B87; font-size: 11.5px; }
.official-source-text { margin-top: 8px; }
.official-source-text summary { display: inline-flex; align-items: center; gap: 5px; color: #8F7434; font-size: 11.5px; cursor: pointer; user-select: none; }
.official-source-text summary svg { width: 13px; height: 13px; flex: none; }
.official-source-meta { display: grid; gap: 6px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid rgba(11,21,38,.08); border-radius: 7px; background: rgba(255,255,255,.65); }
.official-source-meta > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 9px; align-items: start; }
.official-source-meta dt { color: #A39B87; font-size: 10.5px; }
.official-source-meta dd { min-width: 0; margin: 0; color: var(--ink-text-2); font-size: 11.5px; overflow-wrap: anywhere; }
.official-source-meta a { color: #8F7434; }
.official-source-text pre { max-height: 460px; margin: 9px 0 0; overflow: auto; padding: 13px 14px; border: 1px solid rgba(11,21,38,.1); border-radius: 7px; color: var(--ink-text); background: var(--white); font-family: Consolas, Menlo, monospace; font-size: 11.5px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- 政策导入与 MinerU 解读 ---------- */
.btn-with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn-with-icon svg { width: 15px; height: 15px; flex: none; }
.policy-import-form { display: grid; gap: 14px; }
.policy-import-note {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(143, 116, 52, .24);
  border-radius: 8px;
  background: #F8F4EA;
  color: var(--ink-text-2);
  font-size: 12px;
  line-height: 1.65;
}
.policy-import-note svg { width: 16px; height: 16px; color: #8F7434; margin-top: 2px; }
.policy-file-actions { display: flex; align-items: center; gap: 8px; }
.policy-file-actions .btn { flex: 1; }
.policy-file-name {
  margin-top: 7px;
  color: var(--ok);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.policy-file-name:empty { display: none; }
.field-hint { margin-top: 6px; color: var(--ink-text-2); font-size: 11.5px; line-height: 1.5; }
.policy-import-error {
  padding: 10px 12px;
  border: 1px solid rgba(181, 74, 57, .28);
  border-radius: 7px;
  background: rgba(181, 74, 57, .06);
  color: #A13E30;
  font-size: 12px;
  line-height: 1.55;
}
.policy-upload-progress { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.policy-progress-head { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-text-2); font-size: 11.5px; }
.policy-progress-head span:last-child { color: var(--ink-text); font-variant-numeric: tabular-nums; font-weight: 600; }
.policy-progress-track { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: rgba(11, 21, 38, .08); }
.policy-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #A8853F, #D3B77E); transition: width .2s ease; }

.policy-card { position: relative; overflow: hidden; }
.policy-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: rgba(143, 116, 52, .36); }
.policy-card-head { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.policy-card-title { min-width: 180px; flex: 1; font-size: 13.5px; }
.policy-card-meta { color: #A39B87; font-size: 11.5px; }
.policy-source-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.policy-source-link { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.policy-source-link svg { width: 12px; height: 12px; flex: none; }
.policy-source-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(420px, 62vw); }
.policy-job {
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(11, 21, 38, .09);
  border-radius: 8px;
  background: #FAF9F6;
}
.policy-job-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.policy-job-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.policy-job-label svg { width: 14px; height: 14px; }
.policy-job-label.is-queued, .policy-job-label.is-submitting, .policy-job-label.is-parsing { color: #8F7434; }
.policy-job-label.is-succeeded { color: var(--ok); }
.policy-job-label.is-failed { color: #B54A39; }
.policy-job-stage { color: var(--ink-text-2); font-size: 11.5px; }
.policy-job-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.policy-job-actions .btn svg { width: 13px; height: 13px; }
.policy-job-progress { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 9px; margin-top: 9px; }
.policy-job-progress .track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(11, 21, 38, .08); }
.policy-job-progress .track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #C8A96E, #8F7434); transition: width .35s ease; }
.policy-job-progress .value { color: var(--ink-text-2); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.policy-job-error { margin-top: 7px; color: #A13E30; font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }

.policy-result-body { gap: 14px; }
.policy-result-state { color: var(--ink-text-2); font-size: 12px; }
.policy-result-text {
  min-height: 360px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink-text);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

@media (max-width: 1080px) {
  .ov-stats { grid-template-columns: 1fr 1fr; }
  .ov-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .gov-shell { grid-template-columns: 1fr; }
  .gov-side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .gov-side .brand { border: 0; margin: 0; padding: 0 6px 0 0; }
  .gov-side .foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .gov-body { padding: 20px 16px 48px; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- AI 对话（政务端） ---------- */
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-chips .chip { font-size: 12px; padding: 6px 12px; }

.chat-context { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(143,116,52,.28); border-radius: 8px; background: #F7F3E9; }
.chat-context-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--ink-text-2); font-size: 12px; }
.chat-context-head > span { display: inline-flex; align-items: center; gap: 6px; }
.chat-context-head svg { width: 14px; height: 14px; }
.chat-context-head .icon-btn { margin-left: auto; }
.chat-citation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chat-citation { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 8px; align-items: center; min-height: 52px; padding: 8px 9px 8px 11px; border: 1px solid rgba(11,21,38,.12); border-radius: 6px; background: var(--white); }
.chat-citation-main { min-width: 0; }
.chat-citation-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-text); font-size: 12.5px; font-weight: 600; }
.chat-citation-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--ink-text-2); font-size: 11.5px; }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; border: 1px solid rgba(11,21,38,.14); border-radius: 5px; color: var(--ink-text-2); background: transparent; }
.icon-btn:hover { color: var(--ink-text); border-color: var(--ink); background: var(--white); }
.icon-btn svg { width: 14px; height: 14px; }
.chat-composer { display: flex; gap: 10px; margin-top: 10px; }
.chat-composer .btn svg { width: 15px; height: 15px; }
.chat-composer .btn[aria-busy="true"] { opacity: .65; }

.chat-bubble { display: flex; gap: 10px; max-width: 88%; animation: fadeUp .4s var(--ease); }
.chat-bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble .cb-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: linear-gradient(135deg,#0B1526,#24365C); color: #E3D3B0; }
.chat-bubble.user .cb-av { background: linear-gradient(135deg,#4158D6,#6C7FF2); color: #fff; }
.chat-bubble .cb-body { background: var(--white); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 11px 14px; font-size: 13.5px; line-height: 1.75; box-shadow: var(--shadow-sm); min-width: 0; }
.chat-bubble.user .cb-body { background: var(--ink); color: var(--text-hi); border-color: var(--ink); border-radius: 12px 4px 12px 12px; }
.chat-bubble .cb-body b { color: #8F7434; }
.chat-bubble .cb-body .cb-list { margin: 8px 0 0; padding-left: 4px; }
.chat-bubble .cb-body .cb-list li { padding: 3px 0; }
.chat-bubble .cb-body .cb-act { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.chat-bubble .cb-context { margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.18); font-size: 11.5px; color: #D9C79E; }
.chat-bubble.ai .cb-context { color: #8F7434; border-bottom-color: rgba(143,116,52,.2); }
.chat-bubble-stream { width: min(760px, 94%); max-width: 94%; }
.chat-bubble-stream .cb-body { width: 100%; }
.cb-thinking { overflow: hidden; border: 1px solid rgba(143,116,52,.24); border-radius: 8px; background: #F8F5ED; }
.cb-thinking summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: #80682F; cursor: pointer; font-size: 12px; font-weight: 600; list-style: none; }
.cb-thinking summary::-webkit-details-marker { display: none; }
.cb-thinking summary > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.cb-thinking summary svg { width: 15px; height: 15px; flex: none; }
.cb-thinking-state { color: var(--ink-text-2); font-size: 10.5px; font-weight: 500; text-align: right; }
.cb-thinking-text { min-height: 54px; max-height: 300px; margin: 0; overflow: auto; padding: 12px 14px; border-top: 1px solid rgba(143,116,52,.16); color: #615B4D; background: rgba(255,255,255,.62); font-family: var(--font-sans); font-size: 12px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-thinking-text:empty::before { content: "等待 DeepSeek 返回思考过程…"; color: #A39B87; }
.cb-stream-answer { margin-top: 12px; color: var(--ink-text); }
.cb-answer-state { margin-left: 8px; color: var(--ink-text-2); font-size: 12px; }
.cb-final-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-stream-error { margin-top: 10px; padding: 9px 11px; border: 1px solid rgba(181,74,57,.25); border-radius: 6px; color: #A13E30; background: rgba(181,74,57,.05); font-size: 12px; }
.chat-bubble-stream.is-error .cb-thinking { border-color: rgba(181,74,57,.25); }

@media (max-width: 720px) {
  .chat-citation-list { grid-template-columns: 1fr; }
  .chat-bubble { max-width: 96%; }
  .chat-composer { align-items: stretch; }
  .chat-composer .btn { padding-inline: 16px; }
  .chat-bubble-stream { width: 100%; max-width: 100%; }
  .cb-thinking summary { align-items: flex-start; }
  .cb-thinking-state { max-width: 48%; }
  .cb-thinking-text { max-height: 230px; }
  .policy-job-actions { width: 100%; margin-left: 0; }
  .policy-source-link span { max-width: 72vw; }
  .official-source-head > a span { max-width: 68vw; }
  .official-source-meta > div { grid-template-columns: 1fr; gap: 2px; }
  .policy-result-text { min-height: 280px; padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .policy-progress-track span,
  .policy-job-progress .track span { transition: none; }
  .chat-bubble { animation: none; }
}
