/* 书转技能 · Apple 式简约大气 */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-muted: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --on-accent: #ffffff;
  --success: #1d7a3d;
  --warn: #b25e09;
  --danger: #d70015;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.sm { font-size: 14px; }
.lg { font-size: 21px; }
.center { text-align: center; }

/* 顶栏 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 253, .82);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 22px; height: 56px;
  display: flex; align-items: center; gap: 22px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--text); font-size: 14px; opacity: .85; }
.nav-links a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
.lang-btn, .ghost-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.lang-btn:hover, .ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
section { padding: 64px 0; }
.hero { padding: 88px 0 56px; text-align: center; }
.hero .eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.hero .sub { font-size: clamp(18px, 2.6vw, 24px); color: var(--muted); max-width: 720px; margin: 0 auto 32px; line-height: 1.5; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  border: none; border-radius: 999px; padding: 12px 28px; font-size: 16px; font-weight: 600;
  cursor: pointer; line-height: 1.3;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 8px 18px; font-size: 14px; }

/* 卡片与网格 */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid rgba(0, 0, 0, .05);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card .price { font-size: 40px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 4px; }
.card .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.card.featured { border: 2px solid var(--accent); }
.badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; margin-bottom: 10px;
}
.badge.grey { background: var(--surface-muted); color: var(--muted); }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-muted);
  color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}

/* 表单 */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.form-narrow { max-width: 560px; margin: 0 auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.tab {
  flex: 1; padding: 10px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px;
}
.tab.active { background: var(--text); color: #fff; border-color: var(--text); }

/* 上传 */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--accent); background: #f0f7ff; }
.dropzone .big { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.progress { height: 8px; background: var(--surface-muted); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.progress > div { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }
.status-line { font-size: 15px; color: var(--muted); }
.status-pill {
  display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600;
  background: var(--surface-muted); color: var(--muted);
}
.status-pill.done { background: #e3f3e8; color: var(--success); }
.status-pill.working { background: #e8f1fc; color: var(--accent); }
.status-pill.error { background: #fde8ea; color: var(--danger); }
.status-pill.pending { background: #fdf3e3; color: var(--warn); }

/* 样章渲染 */
.skill-md { background: var(--surface); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); text-align: left; }
.skill-md h1 { font-size: 28px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.skill-md h2 { font-size: 22px; margin-top: 28px; }
.skill-md h3 { font-size: 18px; margin-top: 22px; }
.skill-md pre {
  background: #1d1d1f; color: #f5f5f7; padding: 16px; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: 14px; line-height: 1.5;
}
.skill-md code { background: var(--surface-muted); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.skill-md pre code { background: none; padding: 0; }
.skill-md ul, .skill-md ol { padding-left: 24px; }
.skill-md li { margin-bottom: 6px; }
.skill-md blockquote { border-left: 3px solid var(--accent); margin: 16px 0; padding: 4px 16px; color: var(--muted); }
.paywall {
  margin-top: 24px; padding: 28px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(180deg, #f5f5f7, #fff); border: 1px solid var(--border);
}

/* 表格（后台） */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.proof-thumb { max-width: 120px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.kpi .num { font-size: 32px; font-weight: 700; }
.kpi .lbl { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }

.notice {
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; font-size: 15px;
  background: #e8f1fc; color: #0b4d8f; border: 1px solid #bcd8f5;
}
.notice.warn { background: #fdf3e3; color: #7a4a06; border-color: #f0d9ae; }
.notice.error { background: #fde8ea; color: #8f0f1d; border-color: #f5b8be; }
.notice.ok { background: #e3f3e8; color: #14532a; border-color: #b5dfc2; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #1d1d1f; color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 15px; z-index: 100; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-direction: column; gap: 6px; }
.qr { max-width: 220px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

@media (max-width: 760px) {
  section { padding: 44px 0; }
  .hero { padding: 56px 0 36px; }
  .grid.cols-3, .grid.cols-2, .kpi-row { grid-template-columns: 1fr; }
  .nav-links a:not(.keep) { display: none; }
  .skill-md { padding: 20px; }
  table { display: block; overflow-x: auto; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --surface: #1c1c1e; --surface-muted: #2c2c2e;
    --text: #f5f5f7; --muted: #a1a1a6; --border: #38383a;
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  }
  .nav { background: rgba(0, 0, 0, .8); }
  .dropzone.over { background: #0b1e33; }
  .skill-md pre { background: #000; }
  .paywall { background: linear-gradient(180deg, #2c2c2e, #1c1c1e); }
  .tab.active { background: #f5f5f7; color: #000; }
}
