/* Nunito 自托管：字体文件存在引擎素材里（/_a/），不走 Google Fonts CDN，避免 CDN 抖动导致字体加载失败 */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/_a/nunito-latin-ext.2c8d792869.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/_a/nunito-latin.ba344451ea.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 站点基础：沿用老站的绿色主题与 Nunito 字体，迁移前后观感一致 */
:root {
  --green: #059669;
  --green-dark: #047857;
  --green-light: #d1fae5;
  --green-pale: #ecfdf5;
  --ink: #1e293b;
  --ink-soft: #475569;
  --ink-muted: #64748b;
  --paper: #fafcf9;
  --white: #ffffff;
  --line: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 940px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); }
a:hover { color: var(--green); }
h1, h2, h3 { margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 2.2em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 20; background: var(--white); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* 页头：品牌图标 + 两个导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 24px);
  background: rgba(250, 252, 249, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand img, .brand svg { width: 30px; height: 30px; border-radius: 8px; }
.brand-name { font-size: 1rem; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 18px; font-size: 0.92rem; font-weight: 700; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--green); }

/* 页脚 */
.site-footer {
  max-width: var(--max);
  margin: clamp(40px, 7vw, 72px) auto 0;
  padding: 26px clamp(16px, 4vw, 24px) 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.footer-note { margin: 0 0 12px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-weight: 700; }
.footer-nav a { text-decoration: none; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--green); }

/* 首屏：标题 + 计算器卡片 */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(26px, 5vw, 50px) clamp(16px, 4vw, 24px) 0; text-align: center; }
.hero-title { max-width: 680px; margin: 0 auto 0.4em; }
.hero-lede { max-width: 580px; margin: 0 auto; color: var(--ink-soft); font-size: 1.02rem; }

.calc-card {
  max-width: 720px;
  margin: clamp(22px, 4vw, 32px) auto 0;
  padding: clamp(18px, 3.4vw, 28px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: left;
}

/* 形状选择：四等分，手机上也一行放下 */
.calc-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shape-btn {
  padding: 10px 6px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.shape-btn:hover { border-color: var(--green); color: var(--green-dark); }
.shape-btn.is-active { background: var(--green-pale); border-color: var(--green); color: var(--green-dark); }

/* 单位选择 */
.calc-units { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.calc-units-label { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.unit-btn {
  padding: 6px 12px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.unit-btn:hover { border-color: var(--green); color: var(--green-dark); }
.unit-btn.is-active { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }

/* 尺寸输入与数量 */
.calc-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.dim { display: flex; flex-direction: column; gap: 6px; }
.dim label { font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.dim input, .calc-qty input {
  padding: 11px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
}
.dim input:focus, .calc-qty input:focus, .calc-submit:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 1px;
  border-color: var(--green);
}
.calc-qty { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 0.86rem; color: var(--ink-soft); }
.calc-qty label { font-weight: 700; }
.calc-qty input { width: 92px; padding: 8px 10px; }
.calc-qty-hint { color: var(--ink-muted); font-size: 0.8rem; }
.calc-submit {
  width: 100%;
  margin-top: 16px;
  padding: 13px 18px;
  background: var(--green-dark);
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.calc-submit:hover { background: #035c42; }
.calc-hint { margin: 8px 0 0; text-align: center; font-size: 0.8rem; color: var(--ink-muted); }
.calc-hint kbd { padding: 1px 6px; background: #f1f5f9; border: 1px solid var(--line); border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; }
.calc-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 700;
}

/* 结果区 */
.calc-result { margin-top: 20px; padding: 18px; background: var(--green-pale); border: 1px solid var(--green-light); border-radius: var(--radius); }
.calc-result-label { margin: 0; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-dark); }
.calc-primary { margin: 4px 0 0; font-size: clamp(1.5rem, 4.4vw, 2.1rem); font-weight: 900; letter-spacing: -0.02em; color: var(--green-dark); line-height: 1.15; }
.calc-alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; margin-top: 14px; }
.alt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.alt-value { font-size: 1rem; font-weight: 800; color: var(--ink); }
.alt-label { font-size: 0.76rem; color: var(--ink-muted); }
.alt-copy { align-self: flex-start; margin-top: 4px; padding: 2px 8px; background: none; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.alt-copy:hover { border-color: var(--green); color: var(--green-dark); }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-copy, .btn-steps { padding: 10px 16px; border-radius: var(--radius-sm); font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; }
.btn-copy { background: var(--green-dark); border: 0; color: var(--white); }
.btn-copy:hover { background: #035c42; }
.btn-steps { background: var(--white); border: 1.5px solid var(--line); color: var(--ink-soft); }
.btn-steps:hover { border-color: var(--green); color: var(--green-dark); }
.calc-steps { margin: 14px 0 0; padding: 14px; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; }
.calc-toast { margin: 10px 0 0; min-height: 1.2em; font-size: 0.84rem; font-weight: 700; color: var(--green-dark); opacity: 0; transition: opacity 0.2s ease; }
.calc-toast.is-shown { opacity: 1; }

/* 首屏下面的四条保证 */
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; max-width: 720px; margin: 18px auto 0; padding: 0; list-style: none; font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* 正文 */
.prose { max-width: 720px; margin: clamp(34px, 6vw, 56px) auto 0; padding: 0 clamp(16px, 4vw, 24px); }
.prose h2 { color: var(--ink); }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 0.92rem; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--ink); font-weight: 800; }

/* 常见问题 */
.faq { max-width: 720px; margin: clamp(34px, 6vw, 56px) auto 0; padding: 0 clamp(16px, 4vw, 24px); }
.faq-item { margin-bottom: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq-item summary { padding: 14px 16px; font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--green); font-weight: 900; }
.faq-item[open] summary::after { content: "–"; }
.faq-body { padding: 0 16px 14px; color: var(--ink-soft); font-size: 0.94rem; white-space: pre-line; }
.faq-body p:last-child { margin-bottom: 0; }

/* 法律页 */
.legal { max-width: 720px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 24px) 0; }
.legal h2 { font-size: 1.15rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.3em; }
.back-link { margin-top: 2em; font-weight: 700; }
.back-link a { text-decoration: none; }

@media (max-width: 560px) {
  .calc-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 12px; font-size: 0.86rem; }
  .brand-name { font-size: 0.94rem; }
}