:root {
  /* —— Claude Design System 风格令牌 —— */
  --ink: #192e2b;
  --muted: #5c6e67;
  --green: #255c48;
  --lime: #d9ed9b;
  --paper: #f5f6ef;
  --white: #fff;
  --line: #dce2d7;
  --soft: #eaf0e5;
  --orange: #9d4a27;
  --radius: 18px;

  /* —— 语义映射（兼容既有页面类名） —— */
  --primary: var(--ink);
  --primary-light: var(--soft);
  --good: #2f7d5b;
  --good-bg: #eaf0e5;
  --medium: #b57d1c;
  --medium-bg: #fdf3e0;
  --bad: #9d4a27;
  --bad-bg: #fdeee5;
  --text: var(--ink);
  --text-secondary: var(--muted);
  --border: var(--line);
  --bg: var(--paper);
  --card-bg: var(--white);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-y: scroll; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
}

a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, .btn { transition: background .15s, transform .15s; }
button:hover, .btn:hover { transform: translateY(-1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #45795b; outline-offset: 3px; }

/* 容器（原 .container 兼容） */
.wrap, .container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ===== 顶部导航（与作品集站点 3002 完全一致：header > .wrap > nav.nav，78px） ===== */
header, .topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(245, 246, 239, .96);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; font-size: 16px; font-weight: 700; color: var(--ink); }
.monogram, .logo {
  width: 37px; height: 37px; background: var(--ink); color: var(--lime);
  display: grid; place-items: center; border-radius: 50%;
  font: 17px Georgia, serif; flex-shrink: 0;
}
.brand small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
.navlinks { display: flex; gap: 5px; }
.navlinks a { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-size: 13px; text-decoration: none; border-radius: 8px; }
.navlinks a:hover { background: var(--soft); color: var(--ink); }
.navlinks a[aria-current="page"], .navlinks a.pf-current { background: var(--soft); color: var(--ink); }
.topnote { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

/* 页面大标题（导航下方） */
.pf-pagetitle { max-width: 1160px; margin: 22px auto 0; padding: 0 32px; font-size: 22px; font-weight: 700; color: var(--ink); text-align: center; }
.pf-pagetitle .badge { font-size: 11px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); padding: 4px 12px; border-radius: 30px; letter-spacing: .5px; vertical-align: 4px; margin-left: 8px; }

/* 兼容旧 .topbar 结构（工具箱页） */
.topbar .container, .topbar .wrap { min-height: 62px; display: flex; align-items: center; gap: 12px; padding-top: 0; padding-bottom: 0; }
.topbar h1 { font-size: 16px; font-weight: 700; margin: 0; }

/* ===== 按钮 ===== */
.btn, button.primary {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 17px;
  background: var(--white); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 600; font-size: 14px; min-height: 44px;
}
.btn.primary, button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover, button.primary:hover { background: #234338; }
.btn.secondary { background: var(--white); color: var(--ink); }
.btn.soft, button.soft { background: var(--soft); }
.btn.lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.textlink { padding: 0; border: 0; background: none; min-height: 32px; text-decoration: underline; text-underline-offset: 5px; color: var(--green); }

/* ===== 页面标题区 ===== */
.eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--green); margin-bottom: 14px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.2; letter-spacing: -1.5px; font-weight: 600; color: var(--ink); }
h2 { font-size: 26px; line-height: 1.35; letter-spacing: -.5px; color: var(--ink); }
h3 { font-size: 17px; line-height: 1.45; color: var(--ink); }
p { color: var(--muted); }
.intro { max-width: 560px; margin: 20px 0 26px; line-height: 1.95; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 22px; font-size: 12px; color: var(--muted); }

/* ===== 卡片 ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 20px;
  box-shadow: 0 20px 70px #253b2610;
}
.card h2 { font-size: 21px; margin-bottom: 10px; }
.card h3 { font-size: 15px; margin: 18px 0 8px; }
.card + .card { margin-top: 24px; }

/* ===== 表单 ===== */
.notice { background: var(--soft); border: 1px solid #d9e1ce; border-radius: 10px; padding: 13px 18px; font-size: 12px; margin-bottom: 20px; color: #3f5648; }
.notice.error { background: var(--bad-bg); border-color: #f0c7b6; color: var(--bad); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-item { display: flex; flex-direction: column; gap: 7px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; font-weight: 600; color: var(--ink); }
.form-item label .req { color: var(--bad); margin-left: 2px; }
.form-item label .opt { color: var(--muted); font-weight: 400; font-size: 11px; }
.form-item input[type="text"], .form-item input[type="url"], .form-item textarea {
  display: block; width: 100%; background: #fafbf7;
  border: 1px solid #cbd5c8; border-radius: 8px; padding: 10px 12px;
  color: var(--ink); font-size: 14px; font-weight: 400; min-height: 44px; outline: none;
  font-family: inherit;
}
.form-item textarea { min-height: 95px; resize: vertical; }
.form-item input:focus, .form-item textarea:focus { border-color: var(--green); }

/* 单选组 */
.radio-group { display: flex; gap: 12px; }
.radio-group label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); user-select: none; background: var(--white);
}
.radio-group input { accent-color: var(--green); }
.radio-group label.active { border-color: var(--green); background: var(--soft); color: var(--green); }

/* ===== 进度 ===== */
.progress-wrap { text-align: center; padding: 34px 0 20px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--soft); border-top-color: var(--green); border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-list { text-align: left; max-width: 460px; margin: 22px auto 0; }
.step-list .step { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--muted); font-size: 14px; }
.step-list .step.done { color: var(--green); }
.step-list .step.active { color: var(--ink); font-weight: 600; }
.step-icon { width: 18px; text-align: center; }

/* ===== 报告 ===== */
.report-header { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.score-big { font-size: 52px; font-weight: 600; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.level-tag { display: inline-block; padding: 4px 14px; border-radius: 30px; color: var(--lime); background: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.gauge-box { flex: 1; min-width: 220px; height: 220px; }
.report-summary { margin-top: 12px; color: var(--muted); font-size: 14px; }
.highlights { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.highlights .tag { background: var(--soft); color: var(--green); border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: 600; }

/* 维度区块 */
.dim-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-top: 20px; background: var(--card-bg); box-shadow: 0 20px 70px #253b2610; }
.dim-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dim-score { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--lime); background: var(--ink); font-weight: 700; font-size: 15px; flex-shrink: 0; }
.dim-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.dim-summary { color: var(--muted); font-size: 13px; }
.dim-body { margin-top: 14px; }
.chart-box { width: 100%; height: 260px; margin-top: 12px; }
.chart-box.small { height: 200px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: top; }
th { background: #eef2e9; font-size: 11px; font-weight: 600; color: #4d6254; letter-spacing: .3px; }
tbody tr:last-child td { border-bottom: 0; }

/* 状态标签 */
.status { display: inline-block; padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 600; }
.status.consistent, .status.positive, .status.done { background: var(--good-bg); color: var(--good); }
.status.inconsistent, .status.negative { background: var(--bad-bg); color: var(--bad); }
.status.neutral, .status.pending { background: var(--medium-bg); color: var(--medium); }
.status.skipped, .status.none { background: #f2f3f5; color: var(--muted); }
.status.missing { background: var(--medium-bg); color: var(--medium); }

/* 建议 */
.advice-list { margin-top: 10px; }
.advice-item { border-left: 3px solid var(--green); background: var(--paper); padding: 14px 18px; border-radius: 0 10px 10px 0; margin-top: 12px; }
.advice-item .item { font-weight: 700; color: var(--ink); }
.advice-item .problem { color: var(--bad); font-size: 13px; margin-top: 3px; }
.advice-item .suggestion { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* 导出 */
.export-bar { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ===== 历史分析案例区 ===== */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.case-card { position: relative; display: block; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; transition: box-shadow .15s, transform .15s; cursor: pointer; }
.case-card:hover { box-shadow: 0 20px 50px #253b2618; transform: translateY(-3px); }
.case-main { display: block; text-decoration: none; color: inherit; }
.case-del { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; line-height: 22px; border: none; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; cursor: pointer; opacity: .7; }
.case-del:hover { background: var(--bad-bg); color: var(--bad); opacity: 1; }
.row-del { position: static; display: inline-block; width: 24px; height: 24px; line-height: 22px; margin-left: 8px; border: none; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; cursor: pointer; opacity: .7; vertical-align: middle; }
.row-del:hover { background: var(--bad-bg); color: var(--bad); opacity: 1; }
.case-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 22px; }
.case-brand { font-size: 17px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-badge { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--lime); background: var(--ink); border-radius: 30px; padding: 3px 10px; }
.case-company { margin-top: 4px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.case-tag { font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 3px 9px; font-weight: 500; }
.case-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.case-score { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ===== Claude 风格组件 ===== */
.pill { display: inline-block; border-radius: 30px; padding: 4px 12px; background: var(--soft); color: var(--green); font-size: 11px; white-space: nowrap; font-weight: 600; }
.pill.warn { background: #fff0dd; color: #855116; }
.pill.dark { background: var(--ink); color: var(--lime); }
.mini-report { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 20px 70px #253b2610; transform: rotate(1deg); }
.mini-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; border-bottom: 1px solid var(--line); padding-bottom: 15px; letter-spacing: 1px; color: var(--muted); }
.mini-report h3 { font-size: 21px; margin: 20px 0 5px; color: var(--ink); }
.ministats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.ministats strong { display: block; font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.4; color: var(--ink); }
.ministats span { font-size: 11px; color: var(--muted); }
.barrow { display: grid; grid-template-columns: 72px 1fr 36px; gap: 10px; align-items: center; margin: 13px 0; font-size: 11px; color: var(--muted); }
.track { height: 8px; background: var(--soft); border-radius: 8px; overflow: hidden; }
.fill { height: 100%; background: var(--green); border-radius: 8px; }
.mini-foot { background: var(--paper); padding: 12px 16px; border-radius: 10px; margin-top: 22px; font-size: 12px; color: var(--muted); }
.section { padding: 58px 0; }
.sectionhead { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 26px; }
.sectionhead p { max-width: 470px; font-size: 13px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.method { border-top: 1px solid var(--line); padding-top: 20px; }
.method .num { font: italic 28px Georgia, serif; color: var(--green); margin-bottom: 15px; }
.method h3 { margin-bottom: 10px; font-size: 17px; }
.method p { font-size: 13px; }
.band { background: #e8eedf; border-radius: var(--radius); padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.band h3 { margin-bottom: 8px; }
.band p { font-size: 13px; }
.band .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.project { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 28px; }
.project.feature { background: var(--ink); color: #fff; }
.project.feature p, .project.feature .small { color: #c1cfc5; }
.project.feature .eyebrow { color: var(--lime); }
.project h3 { font-size: 24px; margin: 10px 0 16px; }
.project .flow { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0; }
.flow span { font-size: 12px; padding: 6px 10px; background: #ffffff10; border: 1px solid #ffffff27; border-radius: 6px; }
.project:not(.feature) .flow span { background: var(--paper); border-color: var(--line); }
.project .btn { margin-top: 20px; }
.project.feature .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.foot { border-top: 1px solid var(--line); padding: 26px 0 34px; margin-top: 40px; }
.foot .wrap, .foot .container { display: flex; gap: 30px; justify-content: space-between; font-size: 11px; color: var(--muted); }
.foot p { max-width: 750px; }

/* 工具/首页专用 */
.home-hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 56px; padding: 72px 0 48px; align-items: center; }
.tools-hero { padding: 96px 0 44px; text-align: center; }
.tools-hero h1 { font-size: clamp(30px, 4vw, 52px); }
.tools-entry { text-align: center; margin: 30px 0 70px; }
.tools-entry .btn { padding: 13px 44px; font-size: 15px; min-height: 50px; }
.home-entry { margin-top: 34px; }
.home-entry .sub { margin-top: 14px; color: var(--muted); font-size: 12px; }
.home-foot, .tools-foot { text-align: center; padding: 26px 0 44px; color: var(--muted); font-size: 12px; }
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 20px 0 10px; }
.dim-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--white); }
.dim-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.dim-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.75; }
.dim-card .dim-no { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; background: var(--ink); color: var(--lime); font: italic 13px Georgia, serif; font-weight: 700; margin-right: 8px; }

/* 报告内嵌渲染器兼容（存档报告） */
.report-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: rgba(245,246,239,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; font-size: 13px; font-weight: 600; color: var(--ink); }
.report-topbar a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 16px; background: var(--white); font-weight: 600; font-size: 13px; }
.report-wrap { max-width: 1160px; margin: 0 auto; padding: 24px 32px 60px; }
.src-list ul { list-style: none; margin: 6px 0 0; padding: 0; }
.src-list li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }

.hidden { display: none; }
.error-box { background: var(--bad-bg); color: var(--bad); border: 1px solid #f0c7b6; border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: 13px; }
.info-text { color: var(--muted); font-size: 13px; }
.code { background: var(--soft); padding: 2px 6px; border-radius: 5px; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .topnote { display: none; }
  .home-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 52px; }
  .method-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .wrap, .container { padding: 0 20px; }
  .nav { height: auto; min-height: 76px; flex-wrap: wrap; padding: 15px 0 9px; gap: 9px; }
  .brand small { display: none; }
  .navlinks { width: 100%; justify-content: space-between; }
  .navlinks a { padding: 8px 10px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .home-hero { grid-template-columns: 1fr; padding: 40px 0; gap: 30px; }
  .mini-report { transform: none; }
  .method-grid { grid-template-columns: 1fr; }
  .sectionhead { display: block; }
  .sectionhead p { margin-top: 12px; }
  .card, .dim-card, .project { padding: 22px; }
  .band { padding: 22px; display: block; }
  .band .btn { margin-top: 16px; }
  .report-header { flex-direction: column; align-items: flex-start; }
  .gauge-box { width: 100%; }
  .foot .wrap, .foot .container { display: block; }
  .foot p { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
