/* 略律 luelv.com — 纸感 · 墨色 · 朱印 */
:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --card: #ffffff;
  --ink: #1b1a18;
  --ink-2: #55514b;
  --ink-3: #8b857b;
  --line: #e3ded2;
  --line-strong: #d3ccbc;
  --seal: #a63a2f;
  --seal-dark: #8c2f26;
  --seal-soft: #f8eeeb;
  --jade: #2f6b57;
  --jade-soft: #ecf2ef;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 26, 24, .04), 0 8px 24px -12px rgba(27, 26, 24, .18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 245, 240, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--seal); color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px; display: grid; place-items: center;
  letter-spacing: 0;
}
.brand-name {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 18px; letter-spacing: .06em; display: flex; align-items: baseline; gap: 8px;
}
.brand-name em { font-style: normal; font-size: 11px; letter-spacing: .08em; color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 11px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(27, 26, 24, .05); color: var(--ink); }
.nav a.on { color: var(--seal); background: var(--seal-soft); }

/* ---------- 首页 ---------- */
.hero { padding: 62px 0 34px; }
.hero .kicker {
  font-size: 12px; letter-spacing: .22em; color: var(--seal); text-transform: uppercase;
  margin: 0 0 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hero h1 {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.22; margin: 0 0 18px; letter-spacing: .01em; font-weight: 700;
}
.hero h1 span { color: var(--seal); }
.hero .lead { font-size: 16.5px; color: var(--ink-2); max-width: 640px; margin: 0; }
.hero .lead strong { color: var(--ink); font-weight: 600; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 28px; }
.hero-meta div { font-size: 13px; color: var(--ink-3); }
.hero-meta b { display: block; font-family: "Songti SC", serif; font-size: 22px; color: var(--ink); font-weight: 600; }

/* ---------- 工具卡 ---------- */
.section-title {
  display: flex; align-items: baseline; gap: 12px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 20px; margin: 46px 0 18px; letter-spacing: .02em;
}
.section-title small { font-family: inherit; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }

.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tool {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block;
}
.tool:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(27,26,24,.05), 0 18px 36px -20px rgba(27,26,24,.35); }
.tool .idx {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .12em;
}
.tool h3 { font-family: "Songti SC", "Noto Serif SC", serif; font-size: 19px; margin: 8px 0 8px; font-weight: 600; }
.tool p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.tool .go { position: absolute; right: 22px; top: 22px; color: var(--seal); font-size: 15px; opacity: .55; transition: opacity .18s, transform .18s; }
.tool:hover .go { opacity: 1; transform: translateX(2px); }

/* ---------- 可信说明 ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.trust article { background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px; }
.trust h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.trust p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

/* ---------- FAQ ---------- */
.faq { margin-top: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 500; font-size: 14.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--seal); margin-right: 10px; font-size: 13px; }
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* ---------- 计算页 ---------- */
.page { padding: 34px 0 40px; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a:hover { color: var(--seal); }
.page h1 {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 10px; letter-spacing: .01em;
}
.page .lead { color: var(--ink-2); margin: 0 0 26px; max-width: 660px; font-size: 14.5px; }

.layout { display: grid; grid-template-columns: 1fr 372px; gap: 18px; align-items: start; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-card { padding: 24px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.field select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238b857b' stroke-width='1.6' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--seal); box-shadow: 0 0 0 3px rgba(166, 58, 47, .12); }
.field .row { display: flex; gap: 10px; }
.field .row > * { flex: 1; }
.field .unit { position: relative; }
.field .unit input { padding-right: 52px; }
.field .unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 12.5px; pointer-events: none; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--seal); flex: 0 0 auto; }

/* 结果卡 */
.result-card { position: sticky; top: 82px; overflow: hidden; }
.result-head {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: .16em; color: var(--ink-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.result-body { padding: 22px; }
.result-amount {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 40px; line-height: 1.15; font-variant-numeric: tabular-nums;
  color: var(--seal); letter-spacing: -.01em; word-break: break-all;
}
.result-amount .cur { font-size: 20px; margin-right: 3px; }
.result-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.result-sub b { color: var(--ink-2); font-weight: 500; }

.breakdown { margin: 18px 0 0; border-top: 1px dashed var(--line); padding-top: 14px; }
.breakdown .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.breakdown .row span:first-child { color: var(--ink-2); }
.breakdown .row span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; }
.breakdown .row.sum { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.breakdown .row.sum span { font-weight: 600; }

.result-note { margin: 14px 0 0; padding: 11px 13px; background: var(--jade-soft); color: var(--jade); font-size: 12.5px; border-radius: 8px; line-height: 1.55; }
.result-note.warn { background: var(--seal-soft); color: var(--seal-dark); }

/* 说明区 */
.notes { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.note-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.note-card h3 { font-family: "Songti SC", "Noto Serif SC", serif; font-size: 16px; margin: 0 0 12px; }
.note-card p, .note-card li { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.note-card ul { margin: 0; padding-left: 18px; }
.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; background: var(--paper-2); color: var(--ink);
  padding: 12px 14px; border-radius: 8px; line-height: 1.8; margin: 0 0 12px;
  white-space: pre-wrap; word-break: break-word;
}
blockquote.law {
  margin: 0; padding: 12px 16px; border-left: 3px solid var(--seal);
  background: var(--paper-2); border-radius: 0 8px 8px 0;
  font-size: 13px; color: var(--ink-2); line-height: 1.75;
}
blockquote.law cite { display: block; margin-top: 8px; font-style: normal; font-size: 12px; color: var(--ink-3); }

.related { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.related span { font-size: 12.5px; color: var(--ink-3); margin-right: 4px; }
.related a {
  font-size: 13px; padding: 6px 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; color: var(--ink-2); background: #fff;
  transition: border-color .15s, color .15s;
}
.related a:hover { border-color: var(--seal); color: var(--seal); }

/* ---------- 页脚 ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 30px 0 40px; }
.foot-brand { font-family: "Songti SC", serif; font-size: 15px; margin: 0 0 10px; }
.disclaimer { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin: 0 0 12px; max-width: 720px; }
.copy { font-size: 11.5px; color: var(--ink-3); margin: 0; font-family: ui-monospace, monospace; letter-spacing: .04em; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .tools { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .head-inner { height: 56px; }
  .nav a { padding: 6px 8px; font-size: 12.5px; }
  .brand-name em { display: none; }
  .hero { padding: 40px 0 24px; }
  .result-amount { font-size: 34px; }
  .form-card { padding: 18px; }
  .wrap { padding: 0 16px; }
}
