:root {
  --bg: #f7f4ee;
  --panel: #fffdfa;
  --ink: #23201d;
  --muted: #6c645b;
  --line: #e4ddd2;
  --brand: #c84f3b;
  --brand-dark: #9d3627;
  --green: #2e7d65;
  --gold: #c79a35;
  --shadow: 0 18px 50px rgba(64, 48, 36, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  min-height: 100vh;
}

.hero {
  min-height: 48vh;
  display: grid;
  align-items: end;
  padding: 44px 20px 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(34, 28, 23, 0.78), rgba(34, 28, 23, 0.28)),
    url("https://images.unsplash.com/photo-1542596594-649edbc13630?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero__content {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.admin-header h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.8;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero__stats span {
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.tool-shell,
.admin-page {
  width: min(1040px, calc(100% - 32px));
  margin: -22px auto 48px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.progress {
  height: 8px;
  background: #efe8dc;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 33.33%;
  background: linear-gradient(90deg, var(--brand), var(--green));
  transition: width 0.2s ease;
}

.diagnosis-form,
.result-panel {
  padding: 28px;
}

.step {
  display: none;
}

.step.is-active {
  display: block;
}

h2,
h3 {
  margin: 0 0 18px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

.hidden-field {
  display: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 79, 59, 0.12);
}

.full-field {
  margin-top: 18px;
}

.consent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.consent input {
  width: 18px;
  min-height: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

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

.button--ghost {
  background: #fff;
  color: var(--brand);
}

.button--ghost:hover {
  background: #fff5f1;
}

#submitBtn {
  display: none;
}

.result-panel {
  border-top: 1px solid var(--line);
  background: #fffaf3;
}

.result-head {
  position: relative;
  padding-right: 110px;
}

.score {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--brand-dark);
  font-weight: 700;
}

.score span {
  font-size: 30px;
}

.result-summary,
.lead-summary {
  color: var(--muted);
  line-height: 1.8;
}

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

.report-grid > div,
.action-plan,
.cta,
.metric,
.lead-card,
.admin-login {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

li {
  margin: 8px 0;
  line-height: 1.7;
}

.action-plan,
.cta {
  margin-top: 18px;
}

.cta {
  border-color: rgba(46, 125, 101, 0.35);
}

.cta__note,
.muted {
  color: var(--muted);
  font-size: 14px;
}

.admin-body {
  padding: 28px 0;
}

.admin-page {
  margin-top: 0;
  padding: 24px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.admin-login {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
}

.admin-login .muted {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  min-width: 120px;
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  color: var(--muted);
}

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

.lead-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lead-card h2 {
  margin-bottom: 6px;
}

.lead-card h2 span {
  color: var(--green);
  font-size: 16px;
}

.lead-card p {
  margin: 0;
}

.lead-card__head strong {
  color: var(--brand);
  font-size: 28px;
  white-space: nowrap;
}

.lead-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
}

.status-row {
  grid-template-columns: 80px 180px 1fr;
  align-items: center;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .hero {
    min-height: 52vh;
  }

  .field-grid,
  .report-grid,
  .lead-info,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .diagnosis-form,
  .result-panel,
  .admin-page {
    padding: 20px;
  }

  .form-actions,
  .admin-header,
  .admin-toolbar,
  .lead-card__head {
    align-items: stretch;
    flex-direction: column;
  }

  .result-head {
    padding-right: 0;
  }

  .score {
    position: static;
    margin-top: 14px;
  }

  .status-row {
    grid-template-columns: 1fr;
  }
}
