:root {
  --bg: #edf3ef;
  --ink: #17231f;
  --muted: #5a6862;
  --paper: #fffdfa;
  --line: #cdd9d2;
  --green: #0e5d4d;
  --green-dark: #173f36;
  --red: #b64a34;
  --gold: #d7a53a;
  --blue: #315f88;
  --shadow: 0 18px 60px rgba(23, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(14, 93, 77, 0.12), transparent 30%),
    linear-gradient(315deg, rgba(49, 95, 136, 0.12), transparent 34%),
    var(--bg);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: stretch;
  padding: 38px;
  background:
    linear-gradient(120deg, rgba(255, 253, 250, 0.96), rgba(255, 253, 250, 0.76)),
    repeating-linear-gradient(90deg, rgba(23, 35, 31, 0.05) 0 1px, transparent 1px 34px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 12px;
  max-width: 760px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(40px, 6.8vw, 78px);
  line-height: 1.02;
}

.lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.privacy-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background: var(--green-dark);
  color: #fff9ea;
}

.privacy-box p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.progress-panel,
.section-card,
.actions,
.report {
  margin-top: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.progress-panel {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 16px 18px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.progress-track {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  background: #e2e7df;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.2s ease;
}

.section-card {
  padding: 30px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading h2,
.report h2 {
  font-size: 31px;
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.section-heading p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 750;
}

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

.skill-fieldset,
.question-fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--green-dark);
  font-weight: 800;
}

.fieldset-note {
  margin: -4px 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-tile {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f5efe2;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
}

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

.question-list {
  display: grid;
  gap: 16px;
}

.question {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fbf7ed;
  border: 1px solid var(--line);
}

.question-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.65;
  font-weight: 760;
}

.question-number {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--red);
}

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

.binary-scale {
  grid-template-columns: repeat(2, minmax(0, 160px));
}

.scale label {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.scale input {
  position: absolute;
  width: 1px;
  min-width: 1px;
  min-height: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.scale label:has(input:checked) {
  color: #fff9ea;
  background: var(--green);
  border-color: var(--green);
}

.scale label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--gold) 78%, white);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 22px;
}

.step-navigation {
  display: flex;
  flex: 1 1 100%;
  justify-content: space-between;
  gap: 12px;
}

.step-navigation button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-action,
.secondary-action,
.report-header button {
  min-height: 48px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid var(--green);
  font-weight: 800;
}

.primary-action,
.report-header button {
  color: #fff9ea;
  background: var(--green);
}

.secondary-action {
  color: var(--green);
  background: transparent;
}

#formMessage {
  margin: 0;
  color: var(--red);
  font-weight: 750;
}

.report {
  padding: 30px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

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

.report-block {
  padding: 20px;
  background: #fbf7ed;
  border: 1px solid var(--line);
}

.report-block.full {
  grid-column: 1 / -1;
}

.report-block h3 {
  margin-bottom: 12px;
  color: var(--green-dark);
}

.meter-list,
.path-list,
.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meter-row {
  display: grid;
  grid-template-columns: 90px 1fr 46px;
  gap: 10px;
  align-items: center;
}

.meter {
  height: 9px;
  background: #e3e4dc;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.path-item {
  padding: 14px;
  background: var(--paper);
  border-left: 5px solid var(--green);
}

.path-item strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--green-dark);
}

.path-item p,
.plain-list li {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 24px, 680px);
    padding: 24px 0 44px;
  }

  .hero,
  .profile-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }

  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .binary-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .section-card,
  .report {
    padding: 20px;
  }

  .progress-copy,
  .meter-row,
  .path-item strong {
    grid-template-columns: 1fr;
    display: grid;
  }

  .step-navigation {
    flex-direction: column-reverse;
  }

  .step-navigation button,
  .actions > button {
    width: 100%;
  }
}
