/* ============================================================
   设计系统：墨蓝 + 暖纸白 + 温金
   —— 论文/学术文书生成服务，调性是"严谨可信、不浮夸"，
   避开常见AI风格默认值（暖米色衬线+赤陶色 / 纯黑+荧光色 / 报纸网格）。

   色板：
   --ink       #16223D  深墨蓝，标题/主按钮，学术严肃感
   --ink-soft  #3A4A6B  次要文字
   --paper     #FAF8F3  暖白纸感背景，不是纯白
   --paper-2   #F2EEE4  卡片/分区背景，比paper稍深
   --gold      #B8862E  强调色，"完成/毕业"意象，不用烂大街的赤陶
   --gold-soft #E8D9B8  金色的浅色版，用于底纹/边框
   --sage      #4C7A5E  成功状态
   --rust      #A8442E  错误状态，比赤陶更深更克制
   --line      #E2DDD1  分割线/边框

   字体：
   衬线（标题）：Noto Serif SC —— 手稿/学术感
   无衬线（正文/界面）：system-ui 系统字体栈 —— 干净、不抢戏
   ============================================================ */

:root {
  --ink: #16223D;
  --ink-soft: #3A4A6B;
  --paper: #FAF8F3;
  --paper-2: #F2EEE4;
  --gold: #B8862E;
  --gold-soft: #E8D9B8;
  --sage: #4C7A5E;
  --sage-bg: #EBF2ED;
  --rust: #A8442E;
  --rust-bg: #F7EBE8;
  --line: #E2DDD1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22,34,61,.06), 0 4px 16px rgba(22,34,61,.06);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: "Noto Serif SC", Georgia, "Songti SC", serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 32px 20px 60px; }

/* ---------- 顶部品牌区 ---------- */
.site-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.site-header .brand { font-family: "Noto Serif SC", serif; font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; }
.site-header .brand::before { content: "文"; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 8px; background: var(--ink); color: var(--gold-soft); border-radius: 6px; font-size: 14px; vertical-align: middle; }
.site-header nav a { color: var(--ink-soft); text-decoration: none; font-size: 13px; margin-left: 18px; }
.site-header nav a:hover { color: var(--ink); }

.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-soft); text-decoration: none; margin-bottom: 20px; }
.back-link:hover { color: var(--ink); }

.page-title { font-size: 24px; margin: 4px 0 6px; }
.page-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card + .card { margin-top: 0; }

/* ---------- 表单控件 ---------- */
label.field-label { display: block; font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  margin-bottom: 14px;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
textarea { resize: vertical; line-height: 1.6; }

.inline-label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.inline-label select { width: auto; margin-bottom: 0; min-width: 110px; }

/* ---------- 按钮 ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
button:hover, .btn:hover { background: #24325A; }
button:active, .btn:active { transform: scale(.98); }
button:disabled { background: var(--line); color: var(--ink-soft); cursor: not-allowed; }
button.full, .btn.full { width: 100%; }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #9C7226; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { background: var(--paper-2); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 6px; }

/* ---------- 价格 ---------- */
.price { color: var(--gold); font-weight: 700; font-size: 21px; font-family: "Noto Serif SC", serif; }
.price.free { color: var(--sage); }
.price .unit { color: var(--ink-soft); font-size: 12px; font-weight: 400; font-family: inherit; margin-left: 2px; }

/* ---------- 提示/状态条 ---------- */
.notice { border-radius: 8px; padding: 11px 15px; font-size: 13.5px; margin-bottom: 16px; }
.notice.info { background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line); }
.notice.ok { background: var(--sage-bg); color: var(--sage); }
.notice.err { background: var(--rust-bg); color: var(--rust); }
.hint { color: #9B9585; font-size: 12px; }

/* ---------- 商品网格（首页） ---------- */
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 8px; }
.goods-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.goods-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(22,34,61,.08), 0 8px 24px rgba(22,34,61,.1); }
.goods-card h3 { font-size: 16px; margin: 0 0 10px; }
.goods-card .price-row { margin-bottom: 14px; flex: 1; }
.goods-card .btn { margin-top: auto; }

/* ---------- 手稿进度条（订单状态track，签名元素） ---------- */
.manuscript-track { display: flex; align-items: flex-start; margin: 26px 0 30px; }
.manuscript-track .step { flex: 1; text-align: center; position: relative; }
.manuscript-track .step:not(:last-child)::after {
  content: ""; position: absolute; top: 11px; left: 50%; width: 100%; height: 1.5px;
  background: var(--line); z-index: 0;
}
.manuscript-track .step.done:not(:last-child)::after,
.manuscript-track .step.current:not(:last-child)::after { background: var(--gold-soft); }
.manuscript-track .dot {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; position: relative; z-index: 1;
  font-size: 11px; color: var(--ink-soft); font-weight: 600;
}
.manuscript-track .step.done .dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.manuscript-track .step.current .dot { border-color: var(--gold); color: var(--gold); background: #fff; box-shadow: 0 0 0 3px var(--gold-soft); }
.manuscript-track .label { font-size: 11.5px; color: var(--ink-soft); }
.manuscript-track .step.current .label { color: var(--ink); font-weight: 600; }
.manuscript-track .step.error .dot { background: var(--rust); border-color: var(--rust); color: #fff; }
.manuscript-track .step.error .label { color: var(--rust); font-weight: 600; }

/* ---------- 结果卡片：候选标题/大纲条目 ---------- */
.pick-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: 8px; margin-bottom: 9px; background: var(--paper);
}
.pick-item .idx { color: var(--gold); font-family: "Noto Serif SC", serif; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.pick-item .txt { flex: 1; font-size: 14.5px; }
.pick-item .go { flex-shrink: 0; }

/* ---------- 加载/轮询占位 ---------- */
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-width: 480px) {
  .wrap, .wrap-wide { padding: 22px 16px 48px; }
  .page-title { font-size: 20px; }
  .site-header nav a { margin-left: 12px; font-size: 12px; }
}