:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --card: #fffdf8;
  --ink: #252525;
  --muted: #6f6a61;
  --accent: #2f7d68;
  --accent-soft: #dff0e9;
  --danger: #a13d3d;
  --danger-soft: #f7e2df;
  --warn: #a46a00;
  --warn-soft: #fff2cc;
  --line: #e6ddcf;
  --shadow: rgba(50, 38, 20, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.app-header {
  padding: 20px 4px 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.preview-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #efc2a0;
  border-radius: 16px;
  background: #fff3e9;
  color: #86420d;
  font-weight: 750;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 8vw, 46px);
}

h2 {
  margin: 0 0 12px;
}

p {
  line-height: 1.7;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.tab,
.button,
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.tab.active,
.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.secondary {
  background: var(--accent-soft);
  border-color: #b9dccf;
  color: #194b3d;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 30px var(--shadow);
}

.hidden {
  display: none;
}

.field {
  margin: 14px 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  font-size: 16px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff9ed;
  color: var(--muted);
}

.progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stage-pill,
.tag {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #194b3d;
  font-size: 13px;
  font-weight: 800;
}

.stage-pill.warn,
.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.question {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.question:first-of-type {
  border-top: 0;
}

.option {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-weight: 650;
}

.option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.actions button {
  flex: 1 1 180px;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: white;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.error-tag {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.report-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.list {
  margin: 8px 0 0;
  padding-left: 22px;
}

.empty {
  color: var(--muted);
}

@media (max-width: 520px) {
  .app-shell {
    padding: 14px;
  }

  .card {
    padding: 14px;
    border-radius: 18px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
