:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef2f1;
  --ink: #17201d;
  --muted: #5e6865;
  --line: #d8dedb;
  --green: #286452;
  --green-dark: #183f34;
  --steel: #345d7d;
  --brick: #9a463d;
  --amber: #af7b28;
  --shadow: 0 18px 46px rgba(23, 32, 29, 0.08);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
textarea {
  font: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(216, 222, 219, 0.9);
  background: rgba(245, 247, 248, 0.9);
  backdrop-filter: blur(18px);
}

.app-nav,
.hero-inner,
.workspace,
.evidence-inner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  min-width: 0;
}

.app-nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 0.88rem;
}

.nav-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-actions a {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.nav-actions a:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.agent-hero {
  padding: 58px 0 40px;
}

.hero-inner {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--brick);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 5.4vw, 4.25rem);
}

.hero-inner p:last-child {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.workspace {
  padding: 18px 0 72px;
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.input-panel,
.output-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.output-panel {
  min-height: 610px;
  padding: 24px;
}

.panel-heading {
  display: grid;
  gap: 8px;
}

.panel-heading h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.field,
.field-group {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field span,
.field-group legend {
  color: var(--green-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-group {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-inline-size: 0;
}

.field-group label {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 124px;
  padding: 12px;
  resize: vertical;
}

select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(52, 93, 125, 0.28);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface-strong);
}

.summary-strip {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-strong);
}

.summary-strip span {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--green-dark);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tool-name {
  margin: 0;
  font-size: 1.2rem;
}

.score {
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--steel);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--surface-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.result-card p {
  margin: 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-box {
  padding: 12px;
  border-left: 4px solid var(--amber);
  background: #fbfbfa;
}

.detail-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.evidence-band {
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.evidence-inner {
  padding: 46px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.evidence-inner article {
  min-width: 0;
}

.evidence-inner h2 {
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.evidence-inner p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .workspace,
  .evidence-inner {
    grid-template-columns: 1fr;
  }

  .output-panel {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .app-nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    justify-content: flex-start;
  }

  .agent-hero {
    padding: 42px 0 24px;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  .workspace {
    width: min(100% - 28px, var(--max-width));
    padding-bottom: 48px;
  }

  .input-panel,
  .output-panel {
    padding: 18px;
  }

  .button-row,
  .button {
    width: 100%;
  }

  .result-topline,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .result-topline {
    display: grid;
  }
}
