/* =========================================================
   折纸工坊 Origami Studio — 暖色手工感主题
   米白 / 浅米黄底 + 朱红主色 + 靛蓝辅色，衬线标题，数字等宽
   所有颜色走 CSS 变量，改一处即可换肤
   ========================================================= */

:root {
  /* 背景与 surface：纸感的暖白 */
  --bg: #faf6ee;
  --bg-alt: #f4ecdf;
  --surface: #fffdf7;
  --surface-2: #f7f1e5;
  --surface-3: #efe6d5;

  /* 边框：像纸的边缘 */
  --border: #e8ddc8;
  --border-strong: #d5c5a8;

  /* 文字：暖黑与暖灰，不用纯黑 */
  --text: #2e2822;
  --text-soft: #5c5347;
  --muted: #8b8073;

  /* 强调色：朱红为主，靛蓝为辅 */
  --primary: #b8472f;
  --primary-dark: #9b3a24;
  --primary-soft: rgba(184, 71, 47, .09);
  --accent: #2f4f7f;
  --accent-soft: rgba(47, 79, 127, .09);

  /* 状态色 */
  --ok: #4f7a3a;
  --ok-soft: #f0f5ea;
  --warn: #b4761c;
  --warn-soft: #fdf5e6;
  --err: #b3352c;
  --err-soft: #fbeeec;

  /* 圆角：卡片偏大，按钮适中 */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* 阴影：暖调柔和阴影，像纸叠在桌上 */
  --shadow-xs: 0 1px 2px rgba(90, 68, 40, .05);
  --shadow-sm: 0 1px 3px rgba(90, 68, 40, .07), 0 1px 2px rgba(90, 68, 40, .04);
  --shadow-md: 0 4px 14px rgba(90, 68, 40, .10), 0 2px 4px rgba(90, 68, 40, .05);
  --shadow-lg: 0 12px 28px rgba(90, 68, 40, .14), 0 4px 8px rgba(90, 68, 40, .06);
  --ring: 0 0 0 4px rgba(184, 71, 47, .15);

  /* 字体：标题衬线（纸上的字），正文无衬线，数字等宽 */
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia,
                "Times New Roman", "SimSun", serif;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas,
               "Liberation Mono", monospace;

  /* 纸质纹理：叠两层极淡的斜纹与斑点，纯 CSS，不加载图片 */
  --paper:
    repeating-linear-gradient(45deg, rgba(184, 71, 47, .022) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(47, 79, 127, .018) 0 2px, transparent 2px 7px);
  --paper-dots:
    radial-gradient(rgba(90, 68, 40, .05) 1px, transparent 1px);

  --maxw: 1180px;
}

/* ---------------- 基础 ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--paper-dots);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* 标题走衬线，像印在纸上的字 */
h1, h2, h3, h4 {
  font-family: var(--font-serif); line-height: 1.3; margin: 0 0 12px;
  font-weight: 700; letter-spacing: 0;
}
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
h4 { font-size: 15px; }
p { margin: 0 0 12px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
code, kbd, .num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0; z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; font-family: var(--font); font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  border-radius: var(--r-md); cursor: pointer; transition: all .16s;
  box-shadow: var(--shadow-xs);
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-ghost {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------------- 页头 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16.5px;
  color: var(--text); white-space: nowrap;
}
.brand:hover { color: var(--primary); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  background: var(--primary); color: #fff; border-radius: var(--r-sm);
  box-shadow: var(--shadow-xs);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-sub {
  display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .1em;
  color: var(--muted); font-family: var(--font-mono);
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--text-soft);
  border-radius: var(--r-sm); transition: all .15s;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px; padding: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; margin: 3px auto;
  background: var(--text); border-radius: 2px; transition: .2s;
}

/* ---------------- 面包屑 ---------------- */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 14px 0; font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-current] { color: var(--text); font-weight: 600; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 46px;
  background:
    radial-gradient(1000px 380px at 12% -10%, var(--primary-soft), transparent 62%),
    radial-gradient(760px 320px at 92% 4%, var(--accent-soft), transparent 60%),
    var(--surface);
  background-image:
    var(--paper),
    radial-gradient(1000px 380px at 12% -10%, var(--primary-soft), transparent 62%),
    radial-gradient(760px 320px at 92% 4%, var(--accent-soft), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--primary);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow-xs); margin-bottom: 18px;
}
.hero h1 { font-size: 46px; max-width: 16em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 17px; color: var(--text-soft); max-width: 40em; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px;
  font-size: 13px; color: var(--muted);
}
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary);
}

/* ---------------- 区块 ---------------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 44em; margin-bottom: 30px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-soft); margin: 0; }
.eyebrow {
  display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--primary);
  font-family: var(--font-mono);
}

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface); background-image: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm);
}
.card-hover { display: block; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); color: inherit; }

.tool-card h3 { margin-bottom: 8px; font-size: 17.5px; }
.tool-card p { color: var(--text-soft); font-size: 14px; margin-bottom: 14px; }
.tool-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tool-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--primary-soft); color: var(--primary); border-radius: var(--r-md);
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-icon.alt { background: var(--accent-soft); color: var(--accent); }
.tool-index {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--muted);
}
.tool-example {
  display: block; padding: 8px 11px; font-size: 12px; color: var(--text-soft);
  background: var(--surface-3); border-radius: var(--r-sm);
  font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 工具卡片上的「支持文件类型」标签 */
.tool-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.fmt-tag {
  display: inline-block; padding: 3px 9px; font-size: 11.5px; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: .02em;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid rgba(79,70,229,.18); border-radius: 999px;
}
.tool-card { display: flex; flex-direction: column; }

.audience-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.audience-card p { margin: 0; font-size: 14px; color: var(--text-soft); }
.audience-card .tool-icon { margin-bottom: 14px; }

.post-card h3 { font-size: 17px; margin-bottom: 8px; }
.post-meta { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 8px; }
.post-excerpt { font-size: 14px; color: var(--text-soft); margin-bottom: 12px; }
.card-link { font-size: 13.5px; font-weight: 600; color: var(--primary); }
.card-hover:hover .card-link { color: var(--primary-dark); }
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------------- FAQ ---------------- */
.faq-group { margin-bottom: 26px; }
.faq-group h2 { font-size: 19px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.faq-item {
  display: block; padding: 16px 20px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); transition: all .16s;
}
a.faq-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); color: inherit; }
.faq-item h3 { font-size: 15.5px; margin-bottom: 4px; }
.faq-item p { margin: 0; font-size: 14px; color: var(--text-soft); }

/* ---------------- 内容页 ---------------- */
.page-head { padding: 34px 0 26px; }
.page-head h1 { margin-bottom: 10px; }
.page-lead { font-size: 16.5px; color: var(--text-soft); max-width: 44em; margin: 0; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; padding-bottom: 40px; align-items: start; }

/* ---------------- 文章正文 ---------------- */
.article { min-width: 0; font-size: 15.5px; color: var(--text-soft); }
.article h2 {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--border);
  font-size: 23px; color: var(--text);
}
.article h3 { margin-top: 26px; font-size: 18px; color: var(--text); }
.article p, .article li { color: var(--text-soft); }
.article strong { color: var(--text); }
.article ul, .article ol { padding-left: 22px; margin-bottom: 14px; }
.article li { margin-bottom: 6px; }
.article a { text-decoration: underline; text-underline-offset: 2px; }
.article blockquote {
  margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary);
  background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-soft);
}
.article code {
  padding: 2px 6px; font-size: 13px; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text);
}
.article pre {
  margin: 16px 0; padding: 16px 18px; overflow-x: auto;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-md); line-height: 1.6;
}
.article pre code { padding: 0; background: none; border: none; font-size: 13px; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article th {
  text-align: left; padding: 11px 14px; background: var(--surface-3);
  font-weight: 700; color: var(--text); border-bottom: 2px solid var(--border-strong);
}
.article td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.article tbody tr:nth-child(even) { background: var(--surface-2); }
.article th.num, .article td.num { text-align: right; font-family: var(--font-mono); }

/* ---------------- 侧边目录 ---------------- */
.toc { position: sticky; top: 84px; }
.toc-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.toc-box h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc-box ol { margin: 0; padding-left: 18px; font-size: 13.5px; }
.toc-box li { margin-bottom: 7px; }
.toc-box a { color: var(--text-soft); }
.toc-box a:hover { color: var(--primary); }
.toc-cta { margin-top: 16px; }

.related {
  margin-top: 40px; padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.related h3 { font-size: 16px; margin-bottom: 12px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin-bottom: 7px; font-size: 14px; }

/* ---------------- 工具页布局 ---------------- */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.panel-out { background: var(--surface-2); }
.panel-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--muted);
  text-transform: uppercase;
}
.panel-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.io-meta { font-size: 12px; color: var(--muted); margin-left: auto; font-family: var(--font-mono); }

/* ---------------- 拖拽上传区 ---------------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 34px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface-2); transition: all .18s;
}
.dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.dragover {
  border-color: var(--primary); background: var(--primary-soft);
  box-shadow: var(--ring); transform: scale(1.01);
}
.dropzone svg { width: 40px; height: 40px; color: var(--primary); opacity: .85; }
.dropzone strong { font-size: 15.5px; color: var(--text); }
.dropzone span { font-size: 13px; color: var(--muted); }
.dropzone .formats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.dropzone .fmt-tag {
  padding: 3px 9px; font-size: 11.5px; font-weight: 700; font-family: var(--font-mono);
  color: var(--primary); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------------- 文件列表 ---------------- */
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.file-list:empty { display: none; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); transition: border-color .15s;
}
.file-item:hover { border-color: var(--border-strong); }
.file-grip {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  color: var(--muted); cursor: grab; border-radius: 6px; background: var(--surface-2);
}
.file-grip:active { cursor: grabbing; }
.file-grip svg { width: 14px; height: 14px; }
.file-thumb {
  width: 38px; height: 38px; flex: none; object-fit: cover;
  border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border);
}
.file-main { min-width: 0; flex: 1; }
.file-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-meta { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.file-del {
  flex: none; width: 30px; height: 30px; padding: 0; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted);
}
.file-del:hover { color: var(--err); background: var(--err-soft); border-color: var(--border); }
.file-del svg { width: 15px; height: 15px; }

/* ---------------- 表单控件 ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; }
.field .hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.input, .select {
  width: 100%; padding: 10px 13px; font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); transition: all .15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
.select { cursor: pointer; }

.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented button {
  padding: 8px 15px; font-size: 13.5px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
  border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
}
.segmented button:hover { border-color: var(--primary); color: var(--primary); }
.segmented button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.checkline {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  font-size: 13px; color: var(--text-soft); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer;
}
.checkline:hover { border-color: var(--primary); }
.checkline input { accent-color: var(--primary); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

.slider-row { display: flex; align-items: center; gap: 14px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--primary); height: 5px; }
.slider-val {
  min-width: 62px; text-align: right; font-family: var(--font-mono); font-size: 14px;
  font-weight: 700; color: var(--primary);
}

/* ---------------- 结果区 ---------------- */
.status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  border-radius: var(--r-md); font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
}
.status.ok { background: var(--ok-soft); border-color: rgba(79, 122, 58, .25); color: #3f6330; }
.status.warn { background: var(--warn-soft); border-color: rgba(180, 118, 28, .25); color: #8d5c15; }
.status.err { background: var(--err-soft); border-color: rgba(179, 53, 44, .25); color: #8f2a22; }
.status.info { background: var(--primary-soft); border-color: rgba(184, 71, 47, .2); color: var(--primary-dark); }
.status b { font-weight: 700; }
.status span { font-weight: 500; opacity: .9; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-box {
  padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.stat-box.highlight { border-color: var(--primary); background: var(--primary-soft); }
.stat-box.alt { border-color: var(--border-strong); background: var(--surface-2); }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-num { font-family: var(--font-mono); font-size: 27px; font-weight: 700; color: var(--text); line-height: 1.15; letter-spacing: -.02em; }
.stat-unit { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* 体积对比条 */
.size-compare { margin-bottom: 16px; }
.size-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.size-row:last-child { border-bottom: none; }
.size-row .label { width: 78px; flex: none; font-size: 13px; color: var(--muted); }
.size-row .bar { flex: 1; height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.size-row .bar i { display: block; height: 100%; border-radius: 999px; background: var(--border-strong); }
.size-row.after .bar i { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.size-row .val { width: 96px; flex: none; text-align: right; font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; }

/* 下载列表 */
.dl-list { display: flex; flex-direction: column; gap: 8px; }
.dl-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.dl-item .file-main { flex: 1; min-width: 0; }
.dl-item .btn { flex: none; }

.out-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 44px 20px; text-align: center; color: var(--muted);
}
.out-empty svg { width: 42px; height: 42px; opacity: .5; }
.out-empty p { margin: 0; font-size: 14px; }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 14px 0; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width .2s; }
.progress-text { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; margin: 14px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  padding: 10px 13px; text-align: left; font-weight: 700; color: var(--text);
  background: var(--surface-3); border-bottom: 2px solid var(--border-strong); white-space: nowrap;
}
table.data td { padding: 10px 13px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
table.data tbody tr:nth-child(even) { background: var(--surface-2); }
table.data th.num, table.data td.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.sub-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 0 8px; letter-spacing: .04em; }

/* ---------------- 提示框 ---------------- */
.note-box {
  padding: 14px 17px; margin: 16px 0; font-size: 13.5px; color: var(--text-soft);
  background: var(--primary-soft); border: 1px solid rgba(184, 71, 47, .2);
  border-left: 3px solid var(--primary); border-radius: var(--r-sm);
}
.note-box.warn { background: var(--warn-soft); border-color: rgba(180, 118, 28, .25); border-left-color: var(--warn); }
.note-box strong { color: var(--text); }

/* =========================================================
   折纸专用组件
   ========================================================= */

/* 难度计：五格刻度 */
.meter { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.meter-track { display: flex; gap: 5px; flex: 1; }
.meter-track i {
  flex: 1; height: 10px; border-radius: 3px;
  background: var(--surface-3); border: 1px solid var(--border);
}
.meter-track i.on { background: var(--primary); border-color: var(--primary); }
/* 五档难度色：入门偏绿 → 大师深红，刻意与等级文案同色，
   避免出现「入门」和「高级」撞色 */
.meter-track i.on.lv1 { background: #6f8a3f; border-color: #6f8a3f; }
.meter-track i.on.lv2 { background: #d08a2c; border-color: #d08a2c; }
.meter-track i.on.lv3 { background: #c2691f; border-color: #c2691f; }
.meter-track i.on.lv4 { background: #b8472f; border-color: #b8472f; }
.meter-track i.on.lv5 { background: #8f2a22; border-color: #8f2a22; }
.meter-label { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--primary); }
.meter.lv1 .meter-label { color: #5c7433; }
.meter.lv2 .meter-label { color: #a06a18; }
.meter.lv3 .meter-label { color: #a25415; }
.meter.lv4 .meter-label { color: #b8472f; }
.meter.lv5 .meter-label { color: #8f2a22; }

/* 步骤列表：编号 + 折法符号 + 文字 */
.step-list { display: flex; flex-direction: column; gap: 10px; }
.step-item {
  display: flex; align-items: flex-start; gap: 13px; padding: 13px 15px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.step-no {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700;
  color: var(--surface); background: var(--primary); border-radius: 50%;
}
.step-item.sub { background: var(--surface-2); border-style: dashed; }
.step-item.sub .step-no { background: var(--accent); }
.step-main { min-width: 0; flex: 1; }
.step-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.step-desc { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.step-sym { flex: none; width: 34px; height: 34px; color: var(--primary); opacity: .9; }
.step-sym svg { width: 34px; height: 34px; }

/* 折痕画布 */
.crease-wrap {
  background: var(--surface); background-image: var(--paper);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px; display: grid; place-items: center;
}
.crease-wrap svg { width: 100%; height: auto; max-width: 420px; display: block; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 22px; height: 0; border-top-width: 2px; display: inline-block; }
.legend i.valley { border-top: 2px dashed var(--accent); }
.legend i.mountain { border-top: 2px dashed var(--primary); }
.legend i.cut { border-top: 2px dotted var(--muted); }

/* 纸张样本卡 */
.swatch {
  display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.swatch-chip {
  flex: none; width: 44px; height: 56px; border-radius: 3px;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-xs);
  background: linear-gradient(160deg, #fffdf7, #f0e7d6);
}
.swatch-chip.tone-1 { background: linear-gradient(160deg, #fffdf7, #f0e7d6); }
.swatch-chip.tone-2 { background: linear-gradient(160deg, #fdf6ea, #ecdfc8); }
.swatch-chip.tone-3 { background: linear-gradient(160deg, #f6ece0, #e3d2ba); }
.swatch-chip.tone-4 { background: linear-gradient(160deg, #f2e6e0, #dcc6bb); }
.swatch-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.swatch-meta { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); margin: 2px 0 5px; }
.swatch-desc { font-size: 13px; color: var(--text-soft); margin: 0; }

/* 裁剪示意 */
.cut-figure { display: grid; place-items: center; padding: 10px 0 4px; }
.cut-figure svg { max-width: 340px; width: 100%; height: auto; }

/* ---------------- 页脚（五列） ---------------- */
.site-footer {
  margin-top: 60px; padding: 52px 0 26px;
  background: var(--surface); border-top: 1px solid var(--border);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr; gap: 32px; }
.footer-col h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0 0 14px; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13.5px; color: var(--text-soft); }
.footer-col a:hover { color: var(--primary); }
.footer-brand {
  display: inline-flex; align-items: center; font-size: 17px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}
.footer-brand:hover { color: var(--primary); }
.footer-about { font-size: 13.5px; color: var(--text-soft); margin-bottom: 14px; }
.footer-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.footer-badges span {
  padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px;
}
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border);
  text-align: center; color: var(--muted); font-size: 12.5px;
}
.footer-bottom p { margin: 0 0 5px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .content-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .tool-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .post-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  h1 { font-size: 27px; }
  h2 { font-size: 22px; }
  .hero { padding: 42px 0 32px; }
  .hero h1 { font-size: 31px; }
  .hero-sub { font-size: 15.5px; }
  .section { padding: 40px 0; }
  .grid-3, .post-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 20px 18px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav a { padding: 11px 12px; font-size: 15px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: block; }
  .field-row { grid-template-columns: 1fr; }
  .size-row .label { width: 60px; }
  .size-row .val { width: 82px; }
  .dl-item { flex-wrap: wrap; }
  .step-sym { display: none; }
  .swatch { flex-direction: column; }
  .meter { flex-wrap: wrap; }
  .stat-num { font-size: 23px; }
}

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