:root {
  --ink: #1b2926;
  --muted: #6c7974;
  --line: #dfe6e0;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --green: #195f4c;
  --green-2: #dff0e8;
  --amber: #bd6b2c;
  --amber-bg: #fff1e3;
  --blue: #286078;
  --blue-bg: #eaf4f7;
  --shadow: 0 14px 36px rgba(28, 52, 44, .07);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(40, 96, 120, .35); outline-offset: 2px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 5vw, 76px); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--green); font-size: 19px; font-weight: 700; border-radius: 5px; }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 17px; letter-spacing: 0; }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #3b9b6d; box-shadow: 0 0 0 3px #e1f2e7; }
.divider { width: 1px; height: 17px; background: var(--line); margin: 0 4px; }
.shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.intro-band { display: flex; justify-content: space-between; align-items: end; gap: 36px; padding: 51px 0 38px; }
.intro-band h2 { max-width: 620px; margin-bottom: 13px; font-size: clamp(25px, 3vw, 39px); line-height: 1.18; letter-spacing: 0; }
.intro-copy { max-width: 600px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.experiment-note { width: min(320px, 100%); display: flex; gap: 11px; padding: 15px 16px; color: var(--green); background: var(--green-2); border: 1px solid #cfe3d8; border-left: 3px solid var(--green); }
.experiment-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; color: #fff; background: var(--green); border-radius: 50%; font-size: 12px; font-weight: 800; }
.experiment-note strong { display: block; margin-bottom: 5px; color: #16543f; font-size: 12px; }
.experiment-note p { margin: 0; font-size: 12px; line-height: 1.55; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-panel { padding: 27px 29px 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-heading.compact { padding-bottom: 15px; }
.panel-heading h3, .subsection-heading h3 { margin: 0; font-size: 17px; }
.text-button { border: 0; padding: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { color: #0b392b; text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; padding: 25px 0 18px; }
label { display: block; }
label > span { display: block; margin-bottom: 7px; color: #51605b; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--ink); background: #fbfcfb; border: 1px solid #d7dfd9; border-radius: 3px; outline: none; transition: border-color .15s, box-shadow .15s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(25, 95, 76, .1); }
.question-field { padding-top: 2px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 20px; }
.form-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.primary-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 17px; color: #fff; background: var(--green); border: 0; border-radius: 3px; font-size: 13px; font-weight: 700; }
.primary-button:hover { background: #104a3a; }
.primary-button:disabled, .icon-button:disabled, .feedback-button:disabled { cursor: wait; opacity: .65; }
.button-icon { font-size: 18px; line-height: 0; }
.form-status { display: block; min-height: 16px; margin-top: 5px; color: var(--green); font-size: 11px; }
.side-column { display: grid; gap: 18px; }
.workflow-panel, .library-panel { padding: 21px; }
.live-label { padding: 4px 7px; color: var(--green); background: var(--green-2); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.flow-list { display: grid; gap: 0; padding: 17px 0 2px; margin: 0; list-style: none; }
.flow-list li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; min-height: 55px; }
.flow-list li > span { color: #98a6a0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.flow-list li > div { padding-bottom: 14px; border-left: 1px solid #cfdad3; padding-left: 16px; position: relative; }
.flow-list li > div::before { content: ""; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; background: #fff; border: 1px solid var(--green); border-radius: 50%; }
.flow-list strong { display: block; margin-bottom: 4px; font-size: 12px; }
.flow-list small { color: var(--muted); font-size: 11px; }
.icon-button { width: 27px; height: 27px; color: var(--green); background: var(--green-2); border: 0; border-radius: 3px; font-size: 18px; line-height: 1; }
.library-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 17px 0; background: var(--line); border: 1px solid var(--line); }
.library-stats div { padding: 10px 7px; background: #fbfcfb; text-align: center; }
.library-stats strong { display: block; color: var(--green); font-size: 20px; }
.library-stats span { color: var(--muted); font-size: 10px; }
.library-filters { padding: 14px 0 4px; }
.filter-search > span, .filter-row label > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.filter-search input { height: 36px; font-size: 11px; }
.filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.filter-row select { height: 34px; padding: 0 6px; font-size: 10px; }
.filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.filter-actions > span { color: var(--muted); font-size: 10px; }
.policy-mini-list { display: grid; gap: 0; }
.policy-mini { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0ed; }
.policy-mini-main { min-width: 0; }
.policy-mini strong { display: block; overflow-wrap: anywhere; margin-bottom: 4px; font-size: 11px; line-height: 1.45; }
.policy-mini small { color: var(--muted); font-size: 10px; }
.mini-source { color: var(--green); text-decoration: none; }
.mini-source:hover { text-decoration: underline; }
.policy-status { align-self: start; flex: 0 0 auto; padding: 4px 5px; color: #936131; background: var(--amber-bg); font-size: 9px; text-align: right; }
.policy-status.active { color: var(--green); background: var(--green-2); }
.policy-status.expired { color: #936131; background: var(--amber-bg); }
.policy-status small { display: block; margin-top: 3px; color: inherit; font-size: 8px; }
.results-section { padding: 60px 0 40px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.results-heading h2 { margin: 0; font-size: 28px; }
.result-meta { color: var(--muted); font-size: 11px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 18px; align-items: start; }
.result-main, .result-side { min-width: 0; }
.answer-card { padding: 22px 24px; color: #24433b; background: var(--green-2); border: 1px solid #bedfce; border-left: 4px solid var(--green); }
.answer-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--green); font-size: 11px; font-weight: 800; }
.answer-badge { display: grid; place-items: center; width: 23px; height: 23px; color: #fff; background: var(--green); border-radius: 3px; font-size: 10px; }
.answer-card p { margin: 0; font-size: 14px; line-height: 1.8; }
.answer-card .generation-note { margin-top: 10px; color: #7b5b37; font-size: 11px; line-height: 1.5; }
.subsection-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.subsection-heading h3 { font-size: 14px; }
.subsection-heading > span { color: var(--muted); font-size: 11px; }
.result-main > .subsection-heading { padding: 25px 0 13px; }
.evidence-list { display: grid; gap: 11px; }
.evidence-card { padding: 17px 18px; background: #fff; border: 1px solid var(--line); }
.evidence-top { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.evidence-top h4 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.rank-chip { color: var(--green); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.evidence-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.tag { padding: 4px 7px; color: var(--blue); background: var(--blue-bg); font-size: 10px; }
.match-note { margin: -2px 0 11px; color: #7b8983; font-size: 10px; }
.match-note span { display: inline-block; margin-right: 5px; padding: 2px 5px; color: #4c6d60; background: #f0f6f1; }
.evidence-card blockquote { margin: 0 0 13px; padding-left: 12px; color: #40544d; border-left: 2px solid #b8cfc4; font-size: 12px; line-height: 1.7; }
.chunk-list { display: grid; gap: 8px; margin-bottom: 13px; }
.evidence-chunk { padding: 10px 11px; background: #f7faf8; border-left: 2px solid #8eafa0; }
.chunk-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 10px; flex-wrap: wrap; }
.chunk-head strong { color: var(--green); font-size: 11px; }
.chunk-head span { overflow-wrap: anywhere; }
.evidence-chunk p { margin: 0; color: #40544d; font-size: 12px; line-height: 1.7; white-space: pre-line; }
.evidence-foot { display: flex; flex-wrap: wrap; gap: 9px 16px; align-items: center; color: var(--muted); font-size: 10px; }
.evidence-foot a { color: var(--green); text-decoration: none; font-weight: 700; }
.evidence-foot a:hover { text-decoration: underline; }
.verify-tag { color: #936131; }
.result-side { display: grid; gap: 18px; }
.side-block { padding: 19px 20px; background: #fff; border: 1px solid var(--line); }
.gap-block { border-top: 3px solid var(--amber); }
.next-block { border-top: 3px solid var(--blue); }
.feedback-block { border-top: 3px solid #8a9f94; }
.count-chip { display: grid; place-items: center; min-width: 22px; height: 22px; color: #9a5b27 !important; background: var(--amber-bg); }
.check-list, .next-list { padding: 14px 0 0 17px; margin: 0; }
.check-list li, .next-list li { padding: 0 0 10px 3px; color: #596963; font-size: 11px; line-height: 1.55; }
.check-list li::marker { color: var(--amber); }
.next-list li::marker { color: var(--blue); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.feedback-block p { margin: 14px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.feedback-actions { display: flex; gap: 8px; }
.feedback-button { flex: 1; padding: 8px 7px; color: #4a5c55; background: #f8faf8; border: 1px solid var(--line); font-size: 10px; }
.feedback-button:hover { color: var(--green); border-color: var(--green); }
.feedback-status { display: block; min-height: 16px; margin-top: 9px; color: var(--green); font-size: 10px; line-height: 1.5; }
.empty-state { padding: 14px 0; color: var(--muted); font-size: 11px; }
.footer { display: flex; justify-content: space-between; gap: 20px; width: min(1240px, calc(100% - 40px)); margin: 28px auto 0; padding: 19px 0 25px; color: #88958f; border-top: 1px solid var(--line); font-size: 10px; }
@media (max-width: 900px) {
  .intro-band { align-items: start; flex-direction: column; }
  .experiment-note { width: 100%; }
  .workspace-grid, .result-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .topbar { align-items: start; flex-direction: column; padding: 15px 20px; }
  .topbar-meta { font-size: 11px; }
  .shell, .footer { width: min(100% - 28px, 1240px); }
  .intro-band { padding: 34px 0 28px; }
  .intro-band h2 { font-size: 27px; }
  .form-panel { padding: 21px 17px; }
  .form-grid, .side-column { grid-template-columns: 1fr; }
  .form-actions, .results-heading, .footer { align-items: start; flex-direction: column; }
  .primary-button { width: 100%; justify-content: center; }
  .filter-row { grid-template-columns: 1fr; }
  .workflow-panel, .library-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
