/* ============================================================
   Caspenda · styles.css — 设计系统 + 组件
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-brand: #f0fdfa;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #f0fdfa;
  --growth: #10b981;
  --contrib: #3b82f6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1100px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small { color: var(--muted); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 1rem; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; background: var(--bg-soft); }
.site-footer .container { padding-top: 36px; padding-bottom: 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-soft); font-size: .92rem; }
.footer-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 28px; text-align: center; }
.hero .sub { max-width: 620px; margin: 0 auto 8px; color: var(--ink-soft); font-size: 1.08rem; }
.hero .badge {
  display: inline-block; font-size: .8rem; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #cdf2ea;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}

/* ---------- Calculator ---------- */
.calc-shell {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; margin: 28px 0;
}
.calc-grid { display: grid; grid-template-columns: 1fr 1.15fr; }
.calc-panel { padding: 26px; }
.calc-panel.inputs { border-right: 1px solid var(--border); background: var(--bg-soft); }
.calc-panel h2 { font-size: 1.05rem; margin-bottom: 18px; letter-spacing: 0; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field-hint { margin-top: 6px; font-size: .76rem; line-height: 1.45; color: var(--muted); }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-affix {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 12px; height: 46px; transition: border-color .15s, box-shadow .15s;
}
.input-affix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.input-affix .prefix { color: var(--muted); font-weight: 600; }
.input-affix input {
  border: none; outline: none; background: transparent; width: 100%; height: 100%;
  font-size: 1.02rem; font-weight: 600; color: var(--ink); font-family: inherit;
}
.input-affix .suffix { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }

select.input {
  width: 100%; height: 46px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 12px; font-size: .98rem; font-weight: 500; color: var(--ink); background: var(--bg);
  font-family: inherit; cursor: pointer;
}

.presets { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.preset {
  flex: 1; min-width: 96px; padding: 9px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); cursor: pointer; font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--ink-soft); text-align: center; transition: all .12s;
}
.preset:hover { border-color: var(--brand); color: var(--brand); }
.preset.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.preset small { display: block; font-weight: 500; font-size: .72rem; }

/* Inflation toggle */
.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 8px; }
.toggle-label .toggle { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.infl-row { margin-top: 10px; }
.infl-row label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }

.range-wrap { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; accent-color: var(--brand); height: 30px; cursor: pointer; }
.range-val { min-width: 44px; text-align: right; font-weight: 700; font-size: 1rem; color: var(--brand-dark); }

/* Results */
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.result-head .label { font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.fv {
  font-size: clamp(2.2rem, 6vw, 3.1rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); line-height: 1.05; margin: 6px 0 18px;
}
.split { display: grid; gap: 8px; margin-bottom: 18px; }
.split-row { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-soft); }
.split-row .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dot.contrib { background: var(--contrib); }
.dot.growth { background: var(--growth); }
.split-row b { margin-left: auto; color: var(--ink); font-weight: 700; }

/* Real-terms (inflation-adjusted) block */
.real-split {
  border: 1px solid #fde68a; background: #fffbeb; border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 18px;
}
.real-note { font-size: .82rem; color: #92400e; font-weight: 600; margin-bottom: 8px; }
.real-split .split-row { font-size: .88rem; }
.growth-share {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: .86rem; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #cdf2ea; padding: 4px 10px; border-radius: 999px;
}
.growth-share.negative { color: var(--danger); background: #fef2f2; border-color: #fecaca; }

.chart-box { margin: 18px 0 6px; }
.chart-box canvas { width: 100%; height: 220px; display: block; }
.chart-legend { display: flex; gap: 16px; font-size: .82rem; color: var(--ink-soft); margin-top: 8px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--ink); font-family: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .12s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { font-size: 1rem; line-height: 1; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Compare (DCA vs Lump) */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.compare-card h3 { font-size: .95rem; margin-bottom: 4px; }
.compare-card .tag { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.compare-card .big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.compare-card.dca { border-color: rgba(59,130,246,.35); }
.compare-card.lump { border-color: rgba(16,185,129,.35); }
.vs-banner {
  grid-column: 1 / -1; text-align: center;
  background: var(--brand-soft); border: 1px solid #cdf2ea; border-radius: var(--radius-sm);
  padding: 12px 16px; font-weight: 700; font-size: 1.02rem; color: var(--brand-dark);
}
.vs-banner.win-lump { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.vs-banner.win-dca { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- Sections ---------- */
.section { padding: 28px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.section-head p { color: var(--ink-soft); }

.tool-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  background: var(--bg); transition: all .15s; box-shadow: var(--shadow-sm);
}
.tool-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-2px); }
.tool-card .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 12px;
}
.tool-card h3 { margin-bottom: 4px; }
.tool-card p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 12px; }
.tool-card .go { font-size: .86rem; font-weight: 600; color: var(--brand); }

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust-item { background: var(--bg-soft); border-radius: var(--radius); padding: 18px; }
.trust-item .t-ic { font-size: 1.3rem; margin-bottom: 6px; }
.trust-item h4 { font-size: .95rem; margin-bottom: 2px; }
.trust-item p { font-size: .85rem; color: var(--ink-soft); margin: 0; }

.article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.article-link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px;
  color: var(--ink); transition: all .12s; background: var(--bg);
}
.article-link:hover { border-color: var(--brand); text-decoration: none; }
.article-link .t { font-weight: 600; font-size: .95rem; }
.article-link .s { color: var(--muted); font-size: .82rem; }

/* ---------- Methodology / FAQ / text ---------- */
.method-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; background: var(--bg); }
.method-card h3 { margin-bottom: 8px; }
.formula-box {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: .92rem; overflow-x: auto; margin: 10px 0;
}
.assumptions { list-style: none; padding: 0; margin: 8px 0 0; }
.assumptions li { padding: 6px 0; border-top: 1px dashed var(--border); font-size: .92rem; color: var(--ink-soft); }
.assumptions li::before { content: "· "; color: var(--brand); font-weight: 700; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--bg); }
.faq summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: .98rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details .faq-body { padding: 0 18px 14px; color: var(--ink-soft); font-size: .94rem; }

/* ---------- Table ---------- */
.table-wrap { margin: 8px 0 4px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table-wrap th, .table-wrap td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: left; }
.table-wrap th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap tbody tr:hover { background: var(--bg-soft); }
.table-scroll { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }

details.collapse { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
details.collapse > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: .9rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary::after { content: "↓"; color: var(--muted); transition: transform .15s; }
details.collapse[open] > summary::after { transform: rotate(180deg); }
details.collapse .table-wrap { padding: 0 8px 8px; }

/* ---------- Rule of 72 ---------- */
.r72-note { font-size: .92rem; color: var(--ink-soft); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; }
.r72-hero-sub { font-size: .95rem; color: var(--ink-soft); margin: -12px 0 14px; }
.r72-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.r72-table th, .r72-table td { text-align: center; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.r72-table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.r72-table tbody tr:hover { background: var(--bg-soft); }

/* ---------- Prose pages ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 32px; }
.prose ul, .prose ol { color: var(--ink-soft); }
.prose li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-panel.inputs { border-right: none; border-bottom: 1px solid var(--border); }
  .tool-cards { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff;
         border-bottom: 1px solid var(--border); padding: 10px 20px 16px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow-md); }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav-toggle { display: inline-flex; }
  .article-list { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .calc-panel { padding: 20px; }
  .actions .btn { flex: 1; }
}

/* ============================================================
   Blog / articles
   ============================================================ */
.crumb { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--brand); font-weight: 600; }
.post-meta { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.post-tags { margin: 10px 0 0; }
.post-tags span {
  display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px;
  font-size: .76rem; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #99f6e4; border-radius: 999px;
}

/* --- article body --- */
.article { font-size: 1.04rem; line-height: 1.75; color: var(--ink); }
.article h2 { margin-top: 2em; padding-top: .4em; border-top: 1px solid var(--border); }
.article h3 { margin-top: 1.6em; }
.article p { margin: 0 0 1.1em; }
.article strong { font-weight: 700; }
.article ul, .article ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article li { margin: .35em 0; }
.article a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article a:hover { color: var(--brand-dark); }
.article blockquote {
  margin: 1.4em 0; padding: 4px 18px; border-left: 3px solid var(--brand);
  background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}
.article blockquote p { margin: .4em 0; }
.article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px;
}
.article pre {
  background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 1.2em; line-height: 1.55;
}
.article pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: .86rem; }
.article table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: .94rem;
}
.article th, .article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.article th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.article tbody tr:hover { background: var(--bg-soft); }
.article img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin: 1.2em 0; }

/* --- article list (blog.html) --- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post-card {
  display: block; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; transition: all .15s ease;
  box-shadow: var(--shadow-sm);
}
.post-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.post-card-date { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.post-card h3 { margin-bottom: 8px; color: var(--ink); }
.post-card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 14px; }
.post-card .go { font-weight: 600; color: var(--brand); }

/* --- article footer CTA --- */
.post-cta {
  margin: 2.5em 0 1.5em; padding: 22px 24px; border-radius: var(--radius);
  background: var(--bg-brand); border: 1px solid #99f6e4;
}
.post-cta h3 { margin-bottom: 6px; }
.post-cta p { color: var(--ink-soft); margin-bottom: 14px; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-links a {
  padding: 8px 14px; background: var(--brand); color: #fff; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}
.cta-links a:hover { background: var(--brand-dark); text-decoration: none; }
.back-link { margin-top: 2em; font-weight: 600; }

/* ============================================================
   Home visual polish (克制增强，保持 teal 品牌调性)
   ============================================================ */
/* --- hero 柔和渐变光晕背景 --- */
.hero--home { position: relative; overflow: hidden; }
.hero--home::before,
.hero--home::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
}
.hero--home::before {
  width: 560px; height: 560px; top: -220px; left: 50%; transform: translateX(-78%);
  background: radial-gradient(circle, rgba(15,118,110,.12) 0%, rgba(15,118,110,0) 68%);
}
.hero--home::after {
  width: 480px; height: 480px; bottom: -260px; right: 50%; transform: translateX(62%);
  background: radial-gradient(circle, rgba(16,185,129,.10) 0%, rgba(16,185,129,0) 68%);
}
.hero--home .container { position: relative; z-index: 1; }

/* --- 标题局部渐变强调 --- */
.hero h1 .accent {
  background: linear-gradient(90deg, var(--brand) 0%, #0ea5a4 60%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- hero 入场轻微上浮动画 --- */
.hero--home .badge,
.hero--home h1,
.hero--home .sub {
  animation: heroRise .55s cubic-bezier(.22,.8,.36,1) both;
}
.hero--home h1 { animation-delay: .06s; }
.hero--home .sub { animation-delay: .12s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- 工具卡：统一成 4 列 + 图标容器细化 + 箭头 hover 滑动 --- */
.tool-cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tool-card { position: relative; }
.tool-card .icon {
  transition: transform .18s ease, background-color .18s ease;
}
.tool-card:hover .icon { transform: translateY(-2px); background: var(--bg-brand); }
.tool-card .go { display: inline-flex; align-items: center; gap: 4px; transition: gap .18s ease; }
.tool-card:hover .go { gap: 8px; }
.tool-card:hover .go::after { content: "→"; }

/* --- 信任区：升级为带边框阴影的卡片，SVG 图标方块 --- */
.trust-item {
  border: 1px solid var(--border); background: var(--bg);
  box-shadow: var(--shadow-sm); transition: all .15s;
}
.trust-item:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.trust-item .t-ic {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}

/* --- 文章卡：hover 上浮 + 箭头位移 --- */
.article-link { position: relative; transition: all .15s ease; box-shadow: var(--shadow-sm); }
.article-link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-link .go { transition: transform .15s ease; }
.article-link:hover .go { transform: translateX(4px); }

/* --- 计算器外壳顶部品牌色实线强调 --- */
.calc-shell { position: relative; }
.calc-shell::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), #0ea5a4 60%, #38bdf8);
  border-radius: var(--radius) var(--radius) 0 0;
}
@media (max-width: 900px) {
  .tool-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--home .badge, .hero--home h1, .hero--home .sub { animation: none; }
}

/* ============================================================
   Polish pass 2 (P1/P2: favicon-ready, hero texture, gradient figures,
   chart hover, micro-interactions, logo mark, article/reading polish)
   ============================================================ */

/* --- hero 极淡金融点阵底纹（叠加在光晕之下） --- */
.hero--home {
  background-image:
    radial-gradient(rgba(15,118,110,.055) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
}

/* --- 结果大数字：品牌渐变文字 + 等宽数字（输入时不跳动） --- */
.fv { font-variant-numeric: tabular-nums; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fv {
    background: linear-gradient(120deg, #115e59 0%, #0f766e 38%, #0d9488 74%, #0891b2 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* --- 图表 hover 提示 --- */
.chart-tip {
  position: fixed; z-index: 60; display: none;
  background: rgba(17,24,39,.92); color: #fff;
  font-size: .8rem; line-height: 1.4; padding: 6px 10px; border-radius: 8px;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none;
}

/* --- 交互微反馈：按压缩放 + 阴影加深 --- */
.btn:active, .preset:active, .nav-toggle:active { transform: scale(.97) translateY(0); }
.btn.primary:active { transform: scale(.97); }
.tool-card:active, .post-card:active, .trust-card:active { transform: translateY(0) scale(.99); }
.nav-toggle { transition: transform .12s ease; }

/* --- logo 升级：圆形渐变徽标 + 悬停微动 --- */
.logo-mark {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 2px 8px rgba(15,118,110,.30);
  transition: transform .18s ease, box-shadow .18s ease;
}
.logo:hover .logo-mark { transform: scale(1.07) rotate(-4deg); box-shadow: 0 3px 12px rgba(15,118,110,.38); }
.logo:hover { text-decoration: none; }

/* --- 博客卡片渐变封面条 --- */
.post-card { position: relative; overflow: hidden; }
.post-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #0f766e, #14b8a6 55%, #0891b2);
  opacity: .38; transition: opacity .15s ease;
}
.post-card:hover::before { opacity: 1; }

/* --- 文章阅读进度条 --- */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; pointer-events: none;
}
.reading-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width .08s linear;
}

/* --- 文章文末 CTA 强化：品牌深色渐变块 + 白按钮 --- */
.post-cta {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 55%, #0d9488 130%);
  border: none; color: #fff; position: relative; overflow: hidden;
}
.post-cta::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  right: -120px; top: -140px; background: radial-gradient(circle, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 70%); pointer-events: none;
}
.post-cta h3, .post-cta p { color: #fff; position: relative; }
.post-cta p { color: rgba(255,255,255,.85); }
.post-cta .cta-links a {
  background: #fff; color: #115e59; box-shadow: 0 2px 8px rgba(0,0,0,.16);
}
.post-cta .cta-links a:hover { background: #f0fdfa; color: #115e59; text-decoration: none; transform: translateY(-1px); }
.cta-links a { transition: transform .12s ease, box-shadow .12s ease; }

/* --- 全局页面淡入（尊重 reduced-motion） --- */
body { animation: pageFade .35s ease both; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .logo-mark { transition: none; }
  .reading-progress span { transition: none; }
}
