:root {
  --mountain: #18302f;
  --teal: #2f766d;
  --paper: #f5f2ea;
  --sun: #d98a54;
  --muted: #76817e;
  --line: #e3e0d8;
  --white: #fffdf8;
  --danger: #a33b2d;
}

* { box-sizing: border-box; }

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

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  max-width: 980px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 46px;
}

.hero {
  margin: 0 -18px 18px;
  padding: 26px 22px 22px;
  background: var(--mountain);
  color: var(--white);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--mountain);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 24px;
}

.org {
  font-size: 20px;
  font-weight: 800;
}

.product {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 900;
}

.tagline {
  margin: 14px 0 20px;
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 253, 248, 0.9);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nav-btn,
.mode,
.primary,
.secondary,
.support-btn {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.nav-btn {
  background: rgba(255, 253, 248, 0.1);
  color: var(--white);
  font-size: 17px;
}

.nav-btn.active {
  background: var(--paper);
  color: var(--mountain);
}

.auth-card,
.main,
.support,
.wizard-card,
.question-card,
.result-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(24, 48, 47, 0.08);
}

.auth-card,
.main,
.support {
  padding: 20px;
  margin-bottom: 18px;
}

.auth-head,
.section-head,
.progress-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

h3 {
  margin: 20px 0 10px;
  font-size: 21px;
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

#authStatus,
.quota,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(47, 118, 109, 0.1);
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.mode {
  background: #f2eee4;
  color: var(--mountain);
  font-size: 18px;
}

.mode.active {
  background: var(--teal);
  color: #fff;
}

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

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--mountain);
  font-size: 19px;
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 118, 109, 0.12);
}

.code-row,
.search-box {
  display: flex;
  gap: 10px;
}

.code-row input,
.search-box input {
  flex: 1;
}

.primary {
  background: var(--teal);
  color: #fff;
  padding: 0 22px;
  font-size: 18px;
}

.secondary {
  background: #eef6f4;
  color: var(--teal);
  border-color: rgba(47, 118, 109, 0.25);
  padding: 0 18px;
  font-size: 17px;
}

.wide {
  width: 100%;
  margin-top: 16px;
}

.start-early {
  margin: 16px 0 4px;
  min-height: 64px;
  font-size: 22px;
}

.dev-code {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff6e8;
  color: #8a4b1d;
  font-size: 18px;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.search-box {
  margin: 16px 0;
}

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

.cards.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card-title {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 900;
}

.card-meta,
.card-text {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

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

.report-content {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #f8f5ec;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.8;
}

.wizard-card,
.question-card,
.result-summary {
  padding: 18px;
}

.intro-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #eef6f4;
  border: 1px solid rgba(47, 118, 109, 0.25);
  color: var(--mountain);
  font-size: 18px;
  line-height: 1.7;
}

.intro-status strong {
  font-weight: 900;
}

.intro-status span {
  display: block;
  color: var(--muted);
}

.sticky-start {
  position: sticky;
  bottom: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(245, 242, 234, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(24, 48, 47, 0.16);
}

.sticky-start strong,
.sticky-start span {
  display: block;
}

.sticky-start strong {
  font-size: 18px;
}

.sticky-start span {
  color: var(--muted);
  font-size: 15px;
}

.sticky-start .primary {
  min-width: 132px;
}

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

.tile,
.chip,
.option,
.matrix-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--mountain);
}

.tile {
  min-height: 108px;
  padding: 16px;
  text-align: left;
}

.tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 21px;
}

.tile span {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.tile.selected,
.chip.selected,
.option.selected,
.matrix-cell.selected {
  border-color: var(--teal);
  background: #edf7f4;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 46px;
  padding: 10px 16px;
  font-size: 18px;
}

.question-area {
  margin-top: 18px;
}

.progress-line {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e7e2d8;
  overflow: hidden;
  margin-bottom: 16px;
}

#barFill {
  height: 100%;
  width: 0;
  background: var(--teal);
}

.question-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
}

.module-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(217, 138, 84, 0.16);
  color: #9a5525;
  font-size: 16px;
  font-weight: 900;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option {
  min-height: 58px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 19px;
}

.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #b7c4c0;
  flex: 0 0 auto;
}

.option.selected .dot {
  border-color: var(--teal);
  background: var(--teal);
}

.matrix-row {
  margin-top: 16px;
}

.matrix-row-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

.matrix-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.matrix-cell {
  min-height: 48px;
  padding: 8px;
  font-size: 15px;
}

.question-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.score {
  font-size: 38px;
  font-weight: 900;
  color: var(--teal);
}

.reasons,
.risks {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--mountain);
  font-size: 17px;
  line-height: 1.65;
}

.risks {
  color: var(--danger);
}

.support {
  text-align: center;
}

.support-btn {
  width: min(320px, 100%);
  background: var(--mountain);
  color: #fff;
  font-size: 20px;
}

.support p {
  margin: 10px 0 0;
  font-size: 17px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(720px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(24, 48, 47, 0.94);
  color: #fff;
  font-size: 18px;
  z-index: 20;
}

@media (max-width: 760px) {
  .shell { padding: 0 12px 34px; }
  .hero { margin: 0 -12px 14px; }
  .product { font-size: 30px; }
  .tagline { font-size: 18px; }
  .hero-actions,
  .form-grid,
  .cards,
  .cards.compact,
  .tile-grid,
  .question-actions {
    grid-template-columns: 1fr;
  }
  .auth-head,
  .section-head {
    display: block;
  }
  #authStatus { margin-top: 10px; }
  .code-row,
  .search-box {
    flex-direction: column;
  }
  .matrix-options {
    grid-template-columns: 1fr;
  }
  .sticky-start {
    left: 12px;
    right: 12px;
  }
}
