:root {
  --ink: #142521;
  --muted: #64716d;
  --paper: #f5f2e9;
  --white: #fff;
  --green: #0d6b50;
  --mint: #dbeade;
  --line: #dfe4dd;
  --orange: #dd7041;
  --shadow: 0 18px 55px rgba(24, 49, 41, 0.1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
header {
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 32px;
  background: rgba(245, 242, 233, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(20, 37, 33, 0.08);
  backdrop-filter: blur(16px);
}
.brand {
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand span {
  color: var(--green);
}
nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
nav button {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 20px;
  flex: 0 0 auto;
  white-space: nowrap;
}
nav button.active {
  background: var(--mint);
  color: var(--green);
  font-weight: 700;
}
.identity {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.identity select {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px;
  background: white;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 54px 24px 80px;
}
.hero {
  text-align: center;
  padding: 34px 0 46px;
}
.eyebrow {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
  margin: 16px 0;
}
.hero h1 em {
  font-weight: 400;
  color: var(--green);
}
.hero > p:not(.eyebrow) {
  color: var(--muted);
}
.ai-box {
  max-width: 780px;
  margin: 36px auto 0;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px 12px 8px;
  border-radius: 18px;
}
.ai-box label {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  padding-left: 10px;
}
.ai-box div {
  display: flex;
  gap: 8px;
}
.ai-box input {
  border: 0;
  padding: 14px 10px;
  outline: 0;
  flex: 1;
  min-width: 0;
}
.ai-box button,
.dialog button,
.card button,
.retry {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
.ai-box small {
  display: block;
  padding: 3px 10px;
  color: #87918e;
}
.entrances {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 64px;
}
.entrance {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
  border-radius: 16px;
  padding: 22px;
  min-height: 172px;
  color: var(--ink);
  transition: 0.2s;
}
.entrance:hover {
  transform: translateY(-4px);
  background: white;
  box-shadow: var(--shadow);
}
.entrance .num {
  font-family: Georgia;
  font-size: 13px;
  color: var(--orange);
}
.entrance h2 {
  margin: 28px 0 7px;
  font-size: 22px;
}
.entrance p {
  margin: 0;
  color: var(--muted);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 36px 0 22px;
}
.section-head h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 40px;
  margin: 0;
}
.section-head p {
  color: var(--muted);
  margin: 5px 0;
}
.search {
  display: flex;
  gap: 8px;
}
.search input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 11px 14px;
}
.search button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.card .meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.card h3 {
  font-size: 20px;
  margin: 24px 0 8px;
}
.card p {
  color: var(--muted);
  line-height: 1.65;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 18px;
}
.tag {
  background: #eef4ee;
  color: var(--green);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.card button {
  margin-top: auto;
  align-self: flex-start;
}
.card button.secondary,
.secondary {
  background: #eef2ef;
  color: var(--green);
}
.card button:disabled {
  background: #e3e7e4;
  color: #78817e;
  cursor: not-allowed;
}
.state {
  text-align: center;
  padding: 64px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--mint);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.result-head {
  background: var(--green);
  color: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 18px;
}
.result-head p {
  opacity: 0.75;
  margin: 6px 0 0;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.status {
  background: white;
  border-radius: 15px;
  padding: 20px;
  border: 1px solid var(--line);
}
.status h3 {
  margin-top: 0;
}
.status li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
}
.process-list{display:grid;gap:18px;min-width:0}.process-card{background:white;border:1px solid var(--line);border-radius:18px;padding:24px;min-width:0;overflow:hidden}.process-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.process-head h2{margin:4px 0 20px}.stage-pill{background:var(--mint);color:var(--green);padding:8px 12px;border-radius:99px;font-size:13px;font-weight:700;white-space:nowrap}.stepper{display:grid;grid-template-columns:repeat(5,1fr);margin:18px 0 24px;max-width:100%}.step{position:relative;text-align:center;color:var(--muted);font-size:12px}.step:before{content:"";position:absolute;height:2px;background:var(--line);top:7px;left:-50%;right:50%}.step:first-child:before{display:none}.step i{display:block;width:16px;height:16px;border:3px solid white;box-shadow:0 0 0 1px var(--line);border-radius:50%;background:var(--line);margin:0 auto 8px;position:relative;z-index:1}.step.done i,.step.done:before{background:var(--green)}.step.done{color:var(--green);font-weight:700}.process-stats{display:flex;flex-wrap:wrap;gap:10px}.process-stats span{background:#f5f7f4;padding:9px 12px;border-radius:8px;color:var(--muted);font-size:13px}.process-stats b{color:var(--ink)}.process-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.process-actions button{border:0;border-radius:9px;padding:10px 14px;background:var(--green);color:white;font-weight:700}.process-actions span{color:var(--muted);font-size:13px}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 15, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal[hidden] {
  display: none;
}
.dialog {
  position: relative;
  background: white;
  border-radius: 18px;
  padding: 30px;
  width: min(430px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}
.close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 28px;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--ink);
  color: white;
  padding: 13px 18px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s;
  z-index: 80;
}
#toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 800px) {
  header {
    padding: 0 14px;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand {
    flex: 1;
  }
  nav {
    order: 3;
    overflow: auto;
    width: 100%;
    padding-bottom: 8px;
  }
  .identity {
    font-size: 0;
  }
  .identity select {
    font-size: 12px;
  }
  main {
    padding: 26px 16px 80px;
  }
  .hero {
    padding-top: 16px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .ai-box div {
    display: block;
  }
  .ai-box button {
    width: 100%;
  }
  .entrances,
  .grid {
    grid-template-columns: 1fr;
  }
  .entrance {
    min-height: 130px;
  }
  .entrance h2 {
    margin-top: 14px;
  }
  .section-head {
    display: block;
  }
  .search input {
    width: 100%;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .stepper{overflow:auto;grid-template-columns:repeat(5,110px);padding-bottom:8px}.process-head{display:block}.process-stats{display:grid;grid-template-columns:1fr 1fr}
}
.match-reasons{list-style:none;padding:0;margin:14px 0}.match-reasons li{margin:6px 0;color:#35534a;font-size:.9rem}.match-reasons .missing{color:#8a6435}
