:root {
  --background: #f7f8f4;
  --foreground: #18201c;
  --muted: #5f675f;
  --line: #d8ddd3;
  --panel: #ffffff;
  --panel-soft: #eef5ee;
  --green: #1f7a4d;
  --green-dark: #105335;
  --gold: #a96f19;
  --ink: #101513;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.site-shell { min-height: 100vh; }
.hero {
  background:
    linear-gradient(120deg, rgba(31, 122, 77, 0.14), transparent 38%),
    linear-gradient(210deg, rgba(40, 94, 158, 0.14), transparent 32%),
    var(--background);
  padding: 24px;
}
.topbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 0 auto 40px;
  max-width: 1180px;
}
.topbar a {
  border: 1px solid rgba(24, 32, 28, 0.14);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 14px;
}
.hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: 520px;
  padding: 42px 0 70px;
}
.hero-copy { align-self: center; }
.eyebrow {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 12px;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  color: var(--ink);
  font-size: clamp(46px, 8vw, 92px);
  letter-spacing: 0;
  line-height: 0.96;
  margin-bottom: 24px;
}
.lede {
  color: #334139;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.45;
  max-width: 740px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.primary-action, .secondary-action, .settings-form button {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
}
.primary-action, .settings-form button {
  background: var(--green);
  border: 0;
  color: white;
}
.secondary-action, .settings-form .ghost {
  background: white;
  border: 1px solid var(--line);
  color: var(--foreground);
}
.trust-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 32, 28, 0.12);
  border-radius: 8px;
  padding: 28px;
}
.trust-panel h2 { font-size: 22px; margin-bottom: 18px; }
.trust-panel ul, .check-list, .config-note ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-panel li, .check-list li, .config-note li {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 72px 24px;
}
.section.compact { padding-top: 52px; }
.section-heading { max-width: 820px; }
.section-heading h2, .matrix h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 16px;
}
.section-heading p, .matrix p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.switcher {
  background: #e8eee7;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  margin: 28px 0 18px;
  padding: 4px;
}
.switcher button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
  padding: 8px 14px;
}
.switcher button.active {
  background: white;
  color: var(--foreground);
  font-weight: 700;
}
.demo-board {
  display: grid;
  gap: 18px;
  grid-template-columns: 0.85fr 1fr 1.25fr;
}
.input-column, .process-column, .output-column, .config-preview, .settings-form, .config-note, .standard-list, .boundary-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.input-column, .process-column, .output-column, .config-preview, .config-note, .standard-list {
  padding: 22px;
}
.input-column h3, .process-column h3, .output-column h3, .config-preview h3, .config-note h3 {
  font-size: 18px;
  margin-bottom: 16px;
}
.file-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 14px 0;
}
.file-row.muted { color: var(--muted); }
.file-icon {
  background: var(--panel-soft);
  border-radius: 6px;
  color: var(--green-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}
.process-column ol {
  counter-reset: flow;
  list-style: none;
  margin: 0;
  padding: 0;
}
.process-column li {
  border-top: 1px solid var(--line);
  counter-increment: flow;
  display: grid;
  gap: 4px;
  padding: 14px 0;
}
.process-column li::before {
  color: var(--green);
  content: counter(flow, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}
.process-column span {
  color: var(--muted);
  line-height: 1.5;
}
.result-window {
  background: #111814;
  border-radius: 8px;
  color: #edf5ef;
  font-size: 14px;
  line-height: 1.65;
  max-height: 520px;
  overflow: auto;
  padding: 18px;
}
.result-title { color: #99d7b7; font-weight: 700; }
.policy-group {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 14px 0;
  padding-top: 14px;
}
.policy-group p { margin-bottom: 8px; }
.config-preview { max-width: 760px; }
.config-preview dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.config-preview dl div {
  display: grid;
  gap: 6px;
  grid-template-columns: 140px 1fr;
}
.config-preview dt { color: var(--muted); }
.config-preview dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.settings-grid, .matrix {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.2fr 0.8fr;
  margin-top: 26px;
}
.settings-form { padding: 24px; }
.settings-form fieldset {
  border: 0;
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
}
.settings-form legend {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
}
.settings-form label {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.settings-form input, .settings-form select {
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--foreground);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.form-actions span {
  color: var(--green-dark);
  font-weight: 700;
}
.config-note { align-self: start; }
.standard-list { display: grid; gap: 12px; }
.standard-list p {
  border-left: 4px solid var(--gold);
  color: var(--foreground);
  margin: 0;
  padding-left: 12px;
}
.boundaries { padding-bottom: 96px; }
.boundary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
}
.boundary-item {
  min-height: 108px;
  padding: 20px;
}
@media (max-width: 920px) {
  .hero-grid, .demo-board, .settings-grid, .matrix, .boundary-grid { grid-template-columns: 1fr; }
  .hero-grid { min-height: auto; }
  .topbar { justify-content: flex-start; overflow-x: auto; }
  .config-preview dl div { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero, .section { padding-left: 16px; padding-right: 16px; }
  .hero-actions, .form-actions { align-items: stretch; flex-direction: column; }
  .primary-action, .secondary-action, .settings-form button { width: 100%; }
}
