/* ============ 设计令牌：Claude / Claude Code 官方风格（象牙白 · 石板黑 · 陶土橙） ============ */
:root {
  --bg: #faf9f5;          /* Ivory 象牙白 */
  --bg-2: #f0eee6;        /* Pampas 浅米 */
  --card: #ffffff;
  --ink: #141413;         /* Slate 石板黑 */
  --ink-2: #3d3d3a;
  --muted: #87867f;
  --line: #e8e6dc;
  --line-2: #dedcd1;
  --accent: #d97757;      /* Claude 陶土橙 */
  --accent-deep: #c6613f;
  --accent-soft: #fbf1ec;
  --kraft: #d4a27f;
  --danger: #bf4d43;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20,20,19,.04), 0 6px 20px rgba(20,20,19,.04);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; }

/* ============ 顶部进度条 ============ */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: rgba(255,255,255,.06); z-index: 50; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }
body.scrolled .progress { background: var(--line); }

/* ============ 头图：石板黑 + 终端提示符，致敬 Claude Code ============ */
.hero {
  position: relative; overflow: hidden; color: #faf9f5; text-align: center;
  background: #141413;
  padding: calc(52px + env(safe-area-inset-top)) 24px 76px;
}
.hero-glow {
  position: absolute; left: 50%; top: -160px; width: 560px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(217,119,87,.20) 0%, rgba(217,119,87,0) 62%); pointer-events: none;
}
.hero::after { /* 细网格纹理，营造终端质感 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(250,249,245,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(250,249,245,.035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.hero-logo {
  width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(250,249,245,.14), 0 0 0 6px rgba(217,119,87,.10), 0 14px 40px rgba(0,0,0,.55);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px;
  font-size: 12px; letter-spacing: .08em; color: #c2c0b6;
  border: 1px solid rgba(250,249,245,.12); border-radius: 8px; background: rgba(250,249,245,.04);
}
.spark { color: var(--accent); font-size: 14px; line-height: 1; }
.hero h1 {
  margin: 0; font-size: 34px; line-height: 1.3; font-weight: 700; letter-spacing: .01em; color: #faf9f5;
}
.br-m { display: none; }
.hero-desc { margin: 18px auto 0; max-width: 520px; color: #b0aea5; font-size: 15px; }
.hero-meta { list-style: none; padding: 0; margin: 26px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 10px; }
.hero-meta li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 13px; color: #dedcd1;
  border: 1px solid rgba(250,249,245,.12); border-radius: 999px; background: rgba(250,249,245,.03);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============ 主体 ============ */
.container { max-width: 720px; margin: -40px auto 0; padding: 0 16px 40px; position: relative; }

.section {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 24px 8px; margin-bottom: 16px;
}
.section-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.section-no {
  flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.section-title { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.section-desc { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.q { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.q:last-child { border-bottom: 0; }
.q[hidden] { display: none; }
.q-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.q-num { color: var(--accent); font-weight: 500; font-size: 14px; margin-right: 8px; }
.req { color: var(--accent); margin-left: 4px; }
.q-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.q-title + .opts, .q-title + .field { margin-top: 12px; }

/* 选项卡片 */
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg);
  font-size: 15px; color: var(--ink-2); transition: border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.opt span::before {
  content: ""; flex: none; width: 20px; height: 20px; border: 1.5px solid #c2c0b6; border-radius: 50%; background: #fff;
  transition: all .15s;
}
.opt input[type=checkbox] + span::before { border-radius: 6px; }
.opt:hover span { border-color: var(--kraft); background: #fff; }
.opt input:checked + span {
  border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.opt input:checked + span::before {
  border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt input:disabled + span { opacity: .45; cursor: not-allowed; }

/* 文本输入 */
.field, .other-input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 13px 16px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none;
}
textarea.field { min-height: 116px; resize: vertical; line-height: 1.6; }
.field::placeholder, .other-input::placeholder { color: #b0aea5; }
.field:focus, .other-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(217,119,87,.15); }
.other-input { margin-top: 10px; }
.other-input[hidden] { display: none; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 错误状态 */
.q.invalid .q-title { color: var(--danger); }
.q.invalid .opt span, .q.invalid .field { border-color: rgba(191,77,67,.55); }
.err { display: none; margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.q.invalid .err { display: block; }

/* 提交 */
.submit-wrap { text-align: center; padding: 12px 8px 8px; }
.submit-note { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.btn-primary {
  width: 100%; max-width: 360px; height: 54px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: #faf9f5; font: inherit; font-size: 17px; font-weight: 600; letter-spacing: .06em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 20px rgba(20,20,19,.16); transition: transform .12s, background .2s, opacity .2s;
}
.btn-primary::before { content: "✻"; color: var(--accent); font-size: 18px; }
.btn-primary:hover { background: #262624; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.form-error { min-height: 20px; margin: 12px 0 0; font-size: 14px; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 完成页 */
.done { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 48px 24px 52px; }
.done img { margin: 0 auto; border-radius: 50%; }
.done-check { width: 52px; height: 52px; margin: -18px auto 0; position: relative; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 4px solid #fff; }
.done h2 { margin: 20px 0 8px; font-size: 24px; font-weight: 600; }
.done p { margin: 0; color: var(--muted); font-size: 15px; }

.footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 12px; }
.footer img { border-radius: 50%; }

/* ============ 桌面端：选项两列 ============ */
@media (min-width: 640px) {
  .opts.cols-2 { grid-template-columns: 1fr 1fr; }
  .section { padding: 34px 36px 12px; }
}
/* ============ 手机端：标题按语义断行 ============ */
@media (max-width: 600px) {
  .br-m { display: inline; }
  .hero h1 { font-size: 32px; }
}
/* ============ 小屏手机 ============ */
@media (max-width: 420px) {
  .hero { padding-top: calc(44px + env(safe-area-inset-top)); padding-bottom: 68px; }
  .hero h1 { font-size: 28px; }
  .hero-logo { width: 80px; height: 80px; }
  .section { padding: 22px 18px 4px; border-radius: 14px; }
  .section-title { font-size: 19px; }
  .opt span { font-size: 15px; padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
