:root {
  --ink: #14251f;
  --muted: #68756f;
  --paper: #f5f2ea;
  --panel: #fffdf8;
  --line: #d8d5cb;
  --green: #0e6b4f;
  --green-dark: #084936;
  --lime: #d8ef8b;
  --amber: #c77616;
  --red: #a63d35;
  --shadow: 0 24px 60px rgba(27, 45, 38, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(216, 239, 139, 0.5), transparent 24rem),
    linear-gradient(180deg, #f9f7f1 0, var(--paper) 32rem);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

button, input, textarea { font: inherit; }

.site-header {
  max-width: 1180px;
  margin: auto;
  padding: 28px 28px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--green); color: white; border-radius: 12px 12px 12px 3px;
  font-family: Georgia, serif; font-size: 22px;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); letter-spacing: .12em; font-size: 10px; margin-top: 2px; }
.status-pill { padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; background: rgba(255,255,255,.5); }
.status-pill i { display: inline-block; width: 7px; height: 7px; background: #36a86f; border-radius: 50%; margin-right: 7px; }

main { max-width: 1180px; margin: auto; padding: 40px 28px 80px; }
.hero { max-width: 850px; padding: 54px 0 64px; }
.eyebrow { color: var(--green); font: 700 12px/1.4 ui-monospace, monospace; letter-spacing: .18em; }
.hero h1 { margin: 15px 0 22px; font-family: Georgia, "Songti SC", serif; font-size: clamp(48px, 8vw, 88px); line-height: 1.02; font-weight: 500; letter-spacing: -.045em; }
.hero-copy { max-width: 680px; color: #53615b; font-size: 18px; line-height: 1.85; }
.agent-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; font-size: 13px; }
.agent-strip span { padding: 9px 14px; background: rgba(14,107,79,.08); color: var(--green-dark); border-radius: 4px; }
.agent-strip b { color: #91a099; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 24px; align-items: start; }
.audit-form, .result-panel { background: var(--panel); border: 1px solid rgba(20,37,31,.12); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.section-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.section-heading > span { color: var(--green); font: 700 12px ui-monospace, monospace; padding-top: 6px; }
.section-heading h2 { margin: 0; font: 500 25px Georgia, "Songti SC", serif; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.field em { color: var(--green); font-style: normal; font-size: 11px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf6;
  padding: 13px 14px; color: var(--ink); outline: none; resize: vertical;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(14,107,79,.1); background: white; }
.field input::placeholder, .field textarea::placeholder { color: #9aa39e; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.primary-button, .secondary-button { border-radius: 9px; padding: 12px 17px; cursor: pointer; border: 0; transition: transform .15s, background .15s; }
.primary-button { flex: 1; display: flex; justify-content: space-between; background: var(--green); color: white; font-weight: 700; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { background: #eae8e0; color: var(--ink); }
.secondary-button:hover { background: #dedbd1; }
.privacy-note { color: #87918c; font-size: 11px; line-height: 1.6; margin: 14px 0 0; }

.result-panel { position: sticky; top: 18px; }
.decision-card { padding: 20px; background: #edf5e8; border-left: 4px solid var(--green); border-radius: 8px; }
.decision-card.needs-review { background: #fff4df; border-color: var(--amber); }
.decision-card.conflicting, .decision-card.no-evidence, .decision-card.incomplete { background: #fbe9e5; border-color: var(--red); }
.decision-label { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.decision-value { margin-top: 5px; font: 600 27px Georgia, "Songti SC", serif; }
.risk-list { margin: 14px 0 0; padding-left: 18px; color: #78501a; font-size: 13px; }
.agent-results { display: grid; gap: 10px; margin-top: 16px; }
.agent-card { border: 1px solid var(--line); border-radius: 9px; padding: 15px; }
.agent-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-card h3 { margin: 0; font-size: 14px; }
.agent-card code { color: var(--green); background: #eef3ef; padding: 4px 7px; border-radius: 4px; font-size: 11px; }
.agent-card p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 10px 0 0; }
.trace-panel { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 15px; }
.trace-panel summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.trace-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; margin-top: 10px; font-size: 11px; }
.trace-row code { overflow-wrap: anywhere; color: #57635e; }
.error-box { padding: 16px; border: 1px solid #e9b4aa; background: #fff0ed; border-radius: 8px; color: #7e3029; line-height: 1.6; }

footer { max-width: 1180px; margin: auto; padding: 26px 28px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .hero { padding-top: 30px; }
}

@media (max-width: 560px) {
  .site-header, main, footer { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: 46px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .audit-form, .result-panel { padding: 22px; border-radius: 13px; }
  .form-actions, footer { flex-direction: column; }
}
