:root {
  --paper: #f6f4ee;
  --surface: #fffefb;
  --ink: #0d2230;
  --sub: #4b5d68;
  --line: #d9d5c9;
  --accent: #0a7f78;
  --accent-ink: #ffffff;
  --accent-soft: #dcefeb;
  --code-bg: #0d2230;
  --code-ink: #e6f2ef;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1a24;
    --surface: #11242f;
    --ink: #eef3f1;
    --sub: #a4b5ba;
    --line: #27404c;
    --accent: #5ee0d0;
    --accent-ink: #06201f;
    --accent-soft: #163b40;
    --code-bg: #071219;
    --code-ink: #dcece8;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2rem, 8.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 5vw, 2.05rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}
.narrow { max-width: 760px; }

/* 顶栏 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; min-height: 44px; }
.brand img { display: block; }
.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--ink); text-decoration: none; border-radius: 8px; font-size: .95rem; }
.main-nav a:hover { background: var(--accent-soft); }
.head-cta { margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--accent);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-small { min-height: 44px; padding: 6px 14px; font-size: .92rem; white-space: nowrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* 首屏 */
.hero { padding-block: clamp(36px, 8vw, 84px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.eyebrow { font-size: .9rem; font-weight: 700; color: var(--accent); }
.lead { font-size: clamp(1.05rem, 3.4vw, 1.25rem); color: var(--sub); }
.hero h1 em { font-style: normal; color: var(--accent); }

/* 成分表 */
.label {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 16px 18px;
  font-variant-numeric: tabular-nums;
}
.label-title { font-size: 1.5rem; font-weight: 800; border-bottom: 8px solid var(--ink); padding-bottom: 6px; }
.label-note { font-size: .82rem; color: var(--sub); margin-top: 10px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 9px; border-bottom: 1px solid var(--line); }
.label-row strong { font-size: 1.15rem; white-space: nowrap; }
.label-row:last-of-type { border-bottom: 4px solid var(--ink); }

/* 区块 */
.section { padding-block: clamp(36px, 7vw, 68px); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 680px; }
.section-head p { color: var(--sub); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card {
  display: grid;
  gap: 8px;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}
a.card:hover { border-color: var(--accent); }
.card p { color: var(--sub); font-size: .96rem; }
.card .more { color: var(--accent); font-weight: 700; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chips li { font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }

.steps { display: grid; gap: 14px; counter-reset: step; padding: 0; margin: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.steps li::before { content: counter(step); display: block; font-size: 1.7rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.steps p { color: var(--sub); font-size: .96rem; margin-top: 4px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 13px 16px; min-height: 48px; }
details > div { padding: 0 16px 14px; color: var(--sub); }

.cta-band { background: var(--ink); color: var(--paper); border-radius: 14px; padding: clamp(24px, 6vw, 44px); display: grid; gap: 16px; justify-items: start; }
.cta-band p { opacity: .85; }
.cta-band .btn-primary { background: #5ee0d0; border-color: #5ee0d0; color: #06201f; }

/* 文章 */
.crumbs { font-size: .88rem; color: var(--sub); padding-top: 20px; }
.article { padding-block: 16px 56px; }
.article > h1 { font-size: clamp(1.7rem, 6.5vw, 2.6rem); margin-bottom: 14px; }
.article .summary { color: var(--sub); font-size: 1.08rem; margin-bottom: 24px; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: clamp(1.25rem, 4.4vw, 1.55rem); margin-top: 34px; }
.prose h3 { margin-top: 24px; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: 6px; }
.prose code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; }
.prose pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 14px 16px;
  border-radius: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
  font-size: .86rem;
  line-height: 1.6;
  overflow-wrap: normal;
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: 1em; white-space: pre; }
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 11px 14px; border-radius: 0 8px 8px 0; }
.table-scroll { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.related { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.1rem; margin-bottom: 8px; }
.related ul { margin: 0; padding-left: 1.3em; }
.related li { padding-block: 5px; }
.article-cta { margin-top: 36px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 12px; justify-items: start; }

/* 页脚 */
.site-foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom)); font-size: .88rem; color: var(--sub); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 40px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .head-row { flex-wrap: wrap; min-height: 0; padding-block: 6px 0; gap: 0 8px; }
  .main-nav { order: 3; width: 100%; margin: 0 0 2px -12px; }
  .btn-row .btn { flex: 1 1 100%; }
}
@media (max-height: 500px) { .site-head { position: static; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
