/* ==========================================================================
 * Image Increase Size — “计量台”视觉系统
 * 纸感亮色 / 暖墨暗色双主题；Instrument Serif（展示）+ Public Sans（正文）
 * + IBM Plex Mono（读数）。发丝线分区，几乎不用阴影，圆角统一 2px。
 * ========================================================================== */

/* ---------- 字体（自托管，latin 子集，OFL 许可） ---------- */

@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计令牌 ---------- */

:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --tint: #f6f3ea;
  --ink: #211d14;
  --body-ink: #4a4437;
  --secondary: #6b6455;
  --faint: #9a937f;
  --hairline: #e5e1d5;
  --line-strong: #d6d2c8;
  --red: #c0392b;
  --green: #0e4d3c;
  --green-accent: #0e4d3c;
  --amber: #7d5a2f;
  --gold: #b8924a;
  --btn-bg: #0e4d3c;
  --btn-bg-hover: #0b5a45;
  --btn-ink: #fbfaf7;
  --accent-ink: #fbfaf7;
  --chip-active-bg: #0e4d3c;
  --grain-alpha: 0.035;
  --shadow-card: 0 1px 2px rgba(44, 24, 16, 0.08);
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme='dark'] {
  --paper: #14120e;
  --surface: #1d1913;
  --tint: #221e16;
  --ink: #ede7d9;
  --body-ink: #bfb7a2;
  --secondary: #a39b87;
  --faint: #7a7362;
  --hairline: #353026;
  --line-strong: #453e31;
  --red: #d0503f;
  --green: #4caf87;
  --green-accent: #4caf87;
  --amber: #c79a55;
  --gold: #c9a15c;
  --btn-bg: #4caf87;
  --btn-bg-hover: #5cbd93;
  --btn-ink: #14120e;
  --accent-ink: #14120e;
  --chip-active-bg: #4caf87;
  --grain-alpha: 0.05;
  --shadow-card: none;
}

/* ---------- 基础 ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  /* 纸张颗粒：feTurbulence 平铺，透明度直接烘进 SVG 的 alpha 通道 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--green);
  color: var(--accent-ink);
}

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

a {
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5.55vw, 80px);
}

/* 键盘跳转链接：仅聚焦时可见 */

.skip {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--green);
  color: var(--accent-ink);
  font-size: 14px;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.15s ease;
}

.skip:focus {
  top: 12px;
}

/* 品牌标颜色跟随主题（SVG 属性只作降级） */

.brand-mark svg rect {
  fill: var(--red);
}

.brand-mark svg path {
  stroke: var(--paper);
}

/* ---------- 报头（4px 印章红顶栏是站点的签名元素） ---------- */

.site-header {
  border-top: 4px solid var(--red);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
}

.nav a[aria-current='page'] {
  color: var(--ink);
}

/* By Size 下拉 */

.nav-item {
  position: relative;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary);
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-btn:hover {
  color: var(--ink);
}

.nav-btn[aria-current='page'] {
  color: var(--ink);
}

.nav-btn .caret {
  width: 10px;
  height: 10px;
  flex: none;
  opacity: 0.7;
}

.nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 216px;
  padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  z-index: 60;
}

.nav-drop::before {
  /* 触发桥：让 hover 从按钮过渡到面板时不断开 */
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-drop a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--secondary);
  white-space: nowrap;
}

.nav-drop a:hover {
  color: var(--ink);
  background: var(--tint);
}

.nav-drop .nav-drop-sep {
  margin-top: 6px;
  border-top: 1px solid var(--hairline);
  padding-top: 15px;
}

.badge-new {
  padding: 1px 5px;
  border: 1px solid var(--red);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1.4;
}

/* 桌面 hover / 键盘 / 点击均可展开 */
@media (min-width: 721px) {
  .nav-item:hover .nav-drop,
  .nav-item:focus-within .nav-drop,
  .nav-item[data-open] .nav-drop {
    display: block;
  }
}

/* 汉堡按钮（窄屏替代文字导航） */

.nav-burger {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-burger svg {
  width: 16px;
  height: 16px;
}

/* 移动抽屉 */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
}

.drawer[hidden] {
  display: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: rgba(20, 18, 14, 0.42);
  cursor: pointer;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px 28px;
  background: var(--paper);
  border-left: 1px solid var(--line-strong);
  overflow-y: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.drawer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.drawer-link {
  display: block;
  padding: 13px 2px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.drawer-link[aria-current='page'] {
  color: var(--red);
}

.drawer-group {
  margin: 16px 0 0;
  padding: 13px 2px 6px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.drawer-sub {
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--secondary);
}

body.drawer-open {
  overflow: hidden;
}

/* 主题切换：亮色下显示月亮（切到暗色），暗色下显示太阳 */

.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--secondary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}

[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

/* ---------- 首屏 ---------- */

.hero {
  padding-block: clamp(40px, 6vw, 64px) clamp(48px, 6vw, 64px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 520px);
  gap: clamp(40px, 5vw, 72px);
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 16px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
}

.kicker::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--red);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h1 em {
  font-style: italic;
}

.lede {
  margin: 0;
  max-width: 560px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--body-ink);
}

.trust-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- 工具：秤票 ---------- */

.tool {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--tint);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-head-label {
  color: var(--secondary);
}

.tool-head-note {
  color: var(--green);
}

.tool-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 拖拽区 */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 198px;
  padding: 24px;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 5%, var(--paper));
}

.dropzone:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.dz-icon {
  color: var(--ink);
  opacity: 0.85;
}

.dropzone h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.15;
  color: var(--ink);
}

.dropzone p {
  margin: 0;
  font-size: 13.5px;
  color: var(--secondary);
}

.dz-formats {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* 文件条 */

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-chip[hidden] {
  display: none;
}

.file-thumb {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--hairline);
  background: var(--tint);
}

.file-meta {
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: none;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* 目标选择：大数字就是输入框 */

.picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

.control-hint {
  font-weight: 400;
  color: var(--faint);
}

.big-target {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: text;
}

.big-target input {
  width: 150px; /* 兜底；实际宽度由 app.js 按内容收窄 */
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 4.4vw, 68px);
  line-height: 1;
  color: var(--green-accent);
  -moz-appearance: textfield;
  appearance: textfield;
}

.big-target input::-webkit-outer-spin-button,
.big-target input::-webkit-inner-spin-button {
  display: none;
}

.big-target input:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--green-accent);
}

.big-target .unit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--green-accent);
  padding-bottom: 6px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.chip:hover {
  border-color: var(--green-accent);
  color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-bg);
  color: var(--accent-ink);
  font-weight: 500;
}

.lock-note {
  min-height: 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--secondary);
}

.lock-note.warn {
  color: var(--amber);
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 12px 24px;
  border: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn-primary.is-compress {
  background: var(--amber);
  color: var(--paper);
}

[data-theme='dark'] .btn-primary.is-compress {
  color: #14120e;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-secondary {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--secondary);
}

.btn + .btn {
  margin-top: 0;
}

/* 进度 */

.progress {
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--secondary);
}

.progress.show {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-top-color: var(--green-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 结果：读数台 */

.result {
  display: none;
}

.result.show {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-rule {
  height: 1px;
  background: var(--hairline);
}

.result-read {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.result-read .was {
  font-family: var(--font-mono);
  font-size: 19px;
  color: var(--secondary);
}

.result-read .arrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  color: var(--red);
}

.result-read .now {
  font-family: var(--font-display);
  font-size: clamp(44px, 4vw, 56px);
  line-height: 1;
  color: var(--green-accent);
}

.result-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--tint);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--secondary);
}

.notice.ok {
  border-color: var(--green);
  color: var(--green-accent);
}

.notice.warn {
  border-color: var(--amber);
  color: var(--amber);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-actions .btn-primary {
  flex: 1;
  min-width: 180px;
}

/* noscript 兜底 */

.nojs {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--amber);
  border-radius: 2px;
  color: var(--amber);
}

.nojs p {
  margin: 8px 0 0;
  font-size: 14px;
}

/* ---------- 内容区 ---------- */

.section {
  border-top: 1px solid var(--hairline);
}

.section .wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: clamp(56px, 7vw, 88px);
}

.kicker-red {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.prose p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-ink);
}

.prose em {
  font-style: italic;
}

.prose a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.prose a:hover {
  color: var(--ink);
}

/* 机制：编号行 */

.steps {
  display: flex;
  flex-direction: column;
}

.step {
  display: grid;
  grid-template-columns: 72px minmax(0, 720px);
  gap: 28px;
  padding-block: 28px;
}

.step + .step {
  border-top: 1px solid var(--hairline);
}

.step .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 40px;
  line-height: 1;
  color: var(--red);
}

.step h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.step p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-ink);
}

.callout {
  max-width: 760px;
  padding: 20px 24px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--tint);
}

.callout strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.callout strong .pilcrow {
  color: var(--gold);
  margin-right: 6px;
}

.callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-ink);
}

/* 首页尺寸索引 */

.size-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.size-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.size-links a:hover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

/* 不变项账目 */

.ledger-heading {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ledger-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 24px;
  border-left: 1px solid var(--hairline);
}

.ledger-cell:first-child {
  padding-left: 0;
  border-left: none;
}

.ledger-cell .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.ledger-cell .value {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* FAQ */

.faq {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.faq details {
  border-top: 1px solid var(--hairline);
}

.faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  color: var(--red);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-ink);
}

/* ---------- 内页（About / Contact） ---------- */

.page-hero .wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: clamp(48px, 7vw, 72px) clamp(40px, 5vw, 56px);
}

.page-hero h1 {
  font-size: clamp(44px, 5.4vw, 80px);
}

.label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* 三原则列（About） */

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

.promise-cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.promise-cell .label {
  color: var(--ink);
  font-weight: 500;
}

.promise-cell p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--secondary);
}

/* 邮箱卡（Contact） */

.mail-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 860px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.mail-addr {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.3;
}

.mail-addr a {
  color: var(--ink);
  text-decoration: none;
}

.mail-addr a:hover {
  color: var(--green-accent);
}

.mail-note {
  margin: 0;
  max-width: 280px;
  flex: none;
  font-size: 14px;
  line-height: 1.55;
  color: var(--secondary);
  text-align: right;
}

/* 写信须知行（Contact） */

.write-rows {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.write-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding-block: 18px;
  border-top: 1px solid var(--hairline);
}

.write-row:last-child {
  border-bottom: 1px solid var(--hairline);
}

.write-row .label {
  color: var(--ink);
  font-weight: 500;
  padding-top: 3px;
}

.write-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--secondary);
}

.write-close {
  margin: 20px 0 0;
  max-width: 620px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--secondary);
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 2px solid var(--red);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 40px 32px;
}

.footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-tagline {
  max-width: 360px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--secondary);
}

.footer-cols {
  display: flex;
  gap: clamp(40px, 6vw, 96px);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.footer-col-head {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-col a {
  font-size: 15px;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-hairline {
  height: 1px;
  background: var(--hairline);
}

.footer-legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  box-shadow: var(--shadow-card);
  animation: toast-in 0.25s ease both;
}

.toast.out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 入场动效 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 0.5s ease both;
  }
  .hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.26s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
  .hero .tool {
    animation: rise 0.55s ease 0.18s both;
  }

  .section.reveal {
    opacity: 0.01;
    transform: translateY(10px);
  }
  .section.reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .section.reveal {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .hero-copy {
    padding-top: 0;
  }
  .tool {
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .site-header .wrap {
    min-height: 64px;
  }
  /* 窄屏换成汉堡抽屉 */
  .nav > a,
  .nav-item {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
  }
  .tool-body {
    padding: 16px;
    gap: 16px;
  }
  .tool-head {
    padding: 11px 16px;
    font-size: 10px;
  }
  .dropzone {
    min-height: 150px;
  }
  .dropzone h2 {
    font-size: 20px;
  }
  .ledger {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 20px;
  }
  .ledger-cell {
    padding-left: 20px;
  }
  .ledger-cell:nth-child(3) {
    padding-left: 0;
    border-left: none;
  }
  .step {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 22px;
  }
  .step .num {
    font-size: 30px;
  }
  .footer-row {
    flex-direction: column;
    gap: 24px;
  }
  .footer-cols {
    gap: 40px;
  }
  .promise {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .mail-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .mail-note {
    text-align: left;
  }
  .write-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .result-actions .btn-primary {
    min-width: 100%;
  }
}

/* 双列页脚在极窄屏改为纵向 */
@media (max-width: 420px) {
  .footer-cols {
    flex-direction: column;
    gap: 24px;
  }
  .brand-name {
    font-size: 14px;
  }
}
