:root {
  color-scheme: light;
  --ink: #121417;
  --ink-2: #252a2f;
  --muted: #69717c;
  --line: #dde1e6;
  --soft-line: #eceff3;
  --paper: #ffffff;
  --paper-soft: #f7f8fa;
  --field: #fbfcfd;
  --gold: #b8893d;
  --gold-2: #e4bd75;
  --teal: #0f766e;
  --red: #bf3f3f;
  --shadow: 0 24px 70px rgba(20, 24, 30, 0.14);
  --radius: 8px;
  --header-h: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
a,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  height: var(--header-h);
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 20, 23, 0.88);
  color: #fff;
  backdrop-filter: blur(18px);
}

.top-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
}

.top-progress > span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.top-progress strong {
  color: #f0d59e;
  font-size: 22px;
  line-height: 1;
}

.top-progress em {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-style: normal;
}

.top-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.top-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 240ms ease;
}

.meta-line,
.section-index,
.panel-label {
  margin: 0 0 14px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-actions,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #e7c278, #b8893d);
  color: #16120b;
  box-shadow: 0 18px 34px rgba(184, 137, 61, 0.22);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.text-button {
  min-height: 42px;
  padding: 0 6px;
  background: transparent;
  color: var(--muted);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.56fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
  padding: clamp(44px, 7vw, 86px) clamp(20px, 6vw, 88px);
  border-bottom: 1px solid var(--soft-line);
  background: var(--paper);
}

.intro-band h2,
.section-heading h2,
.summary-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.intro-band p:last-child {
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.survey-layout {
  display: block;
  padding: clamp(18px, 4vw, 44px) clamp(20px, 6vw, 88px) 110px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.05), transparent 34%),
    var(--paper-soft);
}

.form-stack {
  display: grid;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
  min-width: 0;
}

.form-section,
.summary-panel {
  scroll-margin-top: calc(var(--header-h) + 28px);
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 48px rgba(24, 30, 38, 0.06);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading p:last-child,
.summary-panel > div > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.field-grid {
  display: grid;
  gap: 18px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.field,
fieldset {
  margin: 0;
}

.field {
  display: grid;
  gap: 9px;
}

.field + .field,
fieldset + .field,
.field-grid + fieldset,
.field-grid + .field {
  margin-top: 20px;
}

.field span,
legend {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 800;
}

b {
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  color: var(--ink);
  padding: 0 15px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 112px;
  padding-top: 14px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(191, 63, 63, 0.08);
}

fieldset.is-invalid {
  padding: 12px;
  border: 1px solid rgba(191, 63, 63, 0.56);
  border-radius: 6px;
  background: rgba(191, 63, 63, 0.04);
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

legend {
  margin: 0 0 14px;
}

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

.option-group legend,
.chip-group legend,
.module-grid legend {
  grid-column: 1 / -1;
}

.option-card {
  display: grid;
  gap: 8px;
  min-height: 114px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  font-size: 16px;
  font-weight: 800;
}

.option-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.option-card:has(input:checked),
.option-card:hover {
  border-color: rgba(184, 137, 61, 0.68);
  box-shadow: 0 14px 36px rgba(184, 137, 61, 0.12);
  transform: translateY(-1px);
}

.option-card:has(input:checked) {
  background: linear-gradient(180deg, #fff, #fffaf1);
}

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

.chip-group,
.module-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-group label,
.module-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.module-grid label {
  border-radius: 4px;
}

.chip-group input,
.module-grid input {
  width: 15px;
  min-height: auto;
  height: 15px;
  accent-color: var(--teal);
}

.advanced-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.advanced-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.advanced-panel summary::marker {
  color: var(--gold);
}

.advanced-panel[open] summary {
  margin-bottom: 18px;
}

.advanced-panel .field-grid + .field,
.advanced-panel .field + .field {
  margin-top: 18px;
}

.summary-panel {
  display: grid;
  gap: 20px;
  background: #161a1e;
  color: #fff;
}

.summary-panel p {
  color: rgba(255, 255, 255, 0.66);
}

.proposal-panel {
  padding: 22px;
  border: 1px solid rgba(228, 189, 117, 0.22);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(228, 189, 117, 0.12), rgba(255, 255, 255, 0.05));
}

.proposal-panel h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.proposal-panel p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.proposal-sections {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.proposal-sections article {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.proposal-sections strong {
  display: block;
  color: #f0d59e;
  font-size: 14px;
}

.proposal-sections p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

pre {
  overflow: auto;
  min-height: 220px;
  margin: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
  font-size: 13px;
}

.quote-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
}

.quote-total,
.quote-items,
.manual-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.quote-total {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
}

.quote-total span,
.wechat-box span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
}

.quote-total strong {
  color: #f0d59e;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.quote-total small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.quote-items {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.quote-items > p {
  margin: 0;
}

.quote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-item:last-child {
  border-bottom: 0;
}

.quote-item strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.quote-item span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  line-height: 1.55;
}

.quote-item b {
  flex: 0 0 auto;
  color: #f0d59e;
  font-size: 15px;
  white-space: nowrap;
}

.submit-status {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.submit-status.is-success {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.12);
  color: #b9f6cb;
}

.submit-status.is-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.manual-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.manual-card h3 {
  margin: 0;
  font-size: 22px;
}

.manual-card p {
  margin: 10px 0 0;
  line-height: 1.65;
}

.wechat-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.wechat-box strong {
  color: #fff;
  font-size: 20px;
  word-break: break-word;
}

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

.summary-panel .secondary-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.summary-panel .text-button {
  color: rgba(255, 255, 255, 0.6);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding: 0 16px;
  }

  .top-progress {
    height: 100%;
    grid-template-columns: auto minmax(88px, 1fr) auto;
    gap: 10px;
  }

  .top-progress > span {
    font-size: 13px;
  }

  .top-progress strong {
    font-size: 18px;
  }

  .top-progress em {
    display: none;
  }

  .top-progress-track {
    height: 7px;
  }

  .survey-layout {
    display: block;
    padding: 16px 16px 88px;
  }

  .form-section,
  .summary-panel {
    padding: 22px;
  }

  .form-stack {
    gap: 16px;
  }

  .field-grid.two,
  .field-grid.three,
  .option-group,
  .option-group.compact {
    grid-template-columns: 1fr;
  }

  .option-card {
    min-height: auto;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .form-actions,
  .summary-actions {
    align-items: stretch;
  }

  .quote-grid,
  .manual-card {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
