:root {
  color-scheme: light;
  --ink: #263238;
  --muted: #607d8b;
  --line: #d9e4e8;
  --bg: #f6fbfb;
  --panel: #ffffff;
  --accent: #277c83;
  --accent-dark: #155d64;
  --warm: #f4a261;
  --soft: #e9f5f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(39, 124, 131, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(244, 162, 97, 0.16), transparent 38%),
    var(--bg);
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.intro,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(38, 50, 56, 0.08);
}

.intro {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 26px;
}

.brand {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 700;
}

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

h1 {
  max-width: 12em;
  margin: 20px 0 16px;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  font-size: 17px;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.panel {
  padding: 24px;
}

.hidden {
  display: none;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  background: #eef4f5;
  color: var(--accent-dark);
}

.progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7eff1;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--warm);
  transition: width 0.25s ease;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  width: 100%;
  min-height: 64px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

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

.option.is-selected {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(39, 124, 131, 0.2);
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--ink);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  font: inherit;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.6;
}

.consent {
  grid-template-columns: 22px 1fr;
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

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

.form-error {
  margin-bottom: 12px;
  color: #c62828;
  font-weight: 700;
}

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

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

.result-head {
  display: grid;
  gap: 12px;
}

.tag {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 6px;
  background: #fff3e5;
  color: #9a5b18;
  font-weight: 800;
}

.assessment-id {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.save-status {
  margin-bottom: 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}

.report-grid article,
.report-section,
.cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfefe;
}

.report-section {
  margin: 18px 0;
}

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

.section-head h3 {
  margin-bottom: 6px;
}

.section-head p {
  margin-bottom: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 160px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legend i {
  width: 26px;
  height: 12px;
  display: inline-block;
  border-radius: 4px;
}

.max-dot {
  background: #cfd8dc;
}

.score-dot {
  background: #ef5350;
}

.radar-section canvas {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 16px auto 0;
}

.chart-note {
  max-width: 620px;
  margin: 10px auto 0;
  color: #607d8b;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  color: var(--muted);
}

.cta {
  background: var(--soft);
}

.conversion-callout {
  margin: 18px 0;
  border-left: 4px solid var(--warm);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff8ef;
}

.conversion-callout p {
  margin: 0;
  color: #6d4c41;
  font-weight: 700;
  line-height: 1.75;
}

.cta button {
  margin-top: 10px;
  margin-right: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 47, 52, 0.46);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(35, 47, 52, 0.22);
  text-align: center;
}

.modal-panel h3 {
  margin: 0 36px 8px;
  font-size: 24px;
}

.modal-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.consult-qr {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.top-disclaimer {
  margin: 16px 0 22px;
  border: 1px solid #f1d8b6;
  border-left: 5px solid var(--warm);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff8ef;
  box-shadow: 0 10px 28px rgba(154, 91, 24, 0.08);
}

.top-disclaimer strong {
  display: block;
  margin-bottom: 6px;
  color: #9a5b18;
  font-size: 16px;
}

.top-disclaimer p {
  margin: 0;
  color: #6d4c41;
  font-size: 14px;
  line-height: 1.8;
}

.legal h1 {
  max-width: none;
  font-size: 42px;
}

.legal h2 {
  margin-top: 28px;
  font-size: 22px;
}

.button-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.site-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

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

  .intro,
  .panel {
    padding: 22px 18px;
  }

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

  .section-head {
    display: grid;
  }

  .legend {
    justify-content: flex-start;
  }

  .cta button {
    width: 100%;
    margin-right: 0;
  }
}
