@view-transition { navigation: auto; }

:root {
  --bg: #ffffff;
  --surface: #f4f7f7;
  --ink: #0f1e20;
  --muted: #56666a;
  --line: rgba(15, 35, 40, 0.12);
  --line-strong: rgba(15, 35, 40, 0.28);
  --accent: #1a7560;
  --accent-soft: rgba(26, 117, 96, 0.09);
  --warm: #a64f26;
  --warm-soft: rgba(166, 79, 38, 0.09);
  --logo-a: #2f7d68;
  --logo-b: #c4683a;
  --accent-ink: #ffffff;
  --night: #0d1a1d;
  --night-ink: #e8efee;
  --night-muted: #9fb0b0;
  --night-line: rgba(232, 239, 238, 0.16);
  --night-accent: #62d2b1;
  --sans: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Noto Sans Mono CJK SC', monospace;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  color-scheme: light;
}
:root[lang='zh-Hant'] {
  --sans: 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0c1619;
    --surface: #132125;
    --ink: #e8efee;
    --muted: #9fb0b0;
    --line: rgba(232, 239, 238, 0.14);
    --line-strong: rgba(232, 239, 238, 0.32);
    --accent: #62d2b1;
    --accent-soft: rgba(98, 210, 177, 0.12);
    --warm: #f0a66e;
    --warm-soft: rgba(240, 166, 110, 0.12);
    --logo-a: #7fd6b4;
    --logo-b: #f0b45f;
    --accent-ink: #08201a;
    --night: #132125;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0c1619;
  --surface: #132125;
  --ink: #e8efee;
  --muted: #9fb0b0;
  --line: rgba(232, 239, 238, 0.14);
  --line-strong: rgba(232, 239, 238, 0.32);
  --accent: #62d2b1;
  --accent-soft: rgba(98, 210, 177, 0.12);
  --warm: #f0a66e;
  --warm-soft: rgba(240, 166, 110, 0.12);
  --logo-a: #7fd6b4;
  --logo-b: #f0b45f;
  --accent-ink: #08201a;
  --night: #132125;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.8 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.row-title, .card-title { word-break: keep-all; overflow-wrap: anywhere; }
.prose p, .prose li, .lead { text-wrap: pretty; }
.row-title, .card-title { font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }

/* 地区未确认前，邀请入口和说明都不显示 */
[data-invite]:not(.is-open), [data-invite-closed]:not(.is-open) { display: none !important; }
/* 注册入口和风险提示用暖色，其余强调色都是绿色 */
a[data-invite] { --accent: var(--warm); }

.shell { width: min(1360px, 100% - var(--gutter) * 2); margin-inline: auto; }
.narrow { width: min(760px, 100% - var(--gutter) * 2); margin-inline: auto; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 60; padding: 8px 16px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 8px; }
.eyebrow { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.lead { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.8; color: var(--muted); }

/* 下划线从左向右填满，呼应“填空” */
.fill-link { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; transition: background-size 0.35s var(--ease), color 0.2s; padding-bottom: 2px; }
.fill-link:hover, .fill-link[aria-current='page'] { background-size: 100% 1.5px; }

/* 页头 */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); view-transition-name: site-head; }
.head-row { display: flex; align-items: center; gap: 8px 40px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 32px; height: 32px; flex: none; transition: transform 0.7s var(--ease); }
.brand:hover .brand-icon { transform: rotate(90deg); }
.brand-word { display: block; width: auto; height: 20px; }
.nav { display: flex; gap: 4px 28px; font-size: 15px; white-space: nowrap; }
.head-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.head-invite { margin-right: 12px; font-size: 14px; color: var(--accent); white-space: nowrap; }
.head-invite-bar { display: none; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--accent); text-align: center; text-decoration: none; }
.head-tool { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 13px; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.head-tool:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; }
.nav-icon-close, .nav-toggle[aria-expanded='true'] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded='true'] .nav-icon-close { display: block; }

/* 图标 */
.icon { display: block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); transition: background 0.25s, color 0.25s; }
.icon-tile .icon { transition: transform 0.3s var(--ease); }
.card:hover .icon-tile, .row a:hover .icon-tile { background: var(--accent); color: var(--accent-ink); }
.card:hover .icon-tile .icon, .row a:hover .icon-tile .icon { transform: scale(1.1); }
.icon-label { display: inline-flex; align-items: center; gap: 10px; }
.icon-label .icon { color: var(--accent); }

/* 首页首屏 */
.hero { position: relative; padding-block: clamp(36px, 4.6vw, 72px) clamp(44px, 5.4vw, 80px); }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px; opacity: 0.45; -webkit-mask: radial-gradient(70% 80% at 72% 0, #000, transparent 75%); mask: radial-gradient(70% 80% at 72% 0, #000, transparent 75%); pointer-events: none; }
.hero .eyebrow { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500; }
.hero h1 { margin-top: 16px; font-size: clamp(32px, 4.6vw, 64px); line-height: 1.2; letter-spacing: -0.02em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: clamp(28px, 3vw, 44px); }
.hero-quick { display: grid; gap: 0; margin-top: clamp(28px, 3.4vw, 48px); border-top: 1px solid var(--line); max-width: 42em; }
.hero-quick > span { padding: 14px 0 6px; font-size: 13px; color: var(--muted); }
.hero-quick a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; text-decoration: none; transition: padding-left 0.35s var(--ease), color 0.2s; }
.hero-quick a::after { content: '→'; color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity 0.25s, transform 0.35s var(--ease); }
.hero-quick a:hover { padding-left: 10px; color: var(--accent); }
.hero-quick a:hover::after { opacity: 1; transform: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 28px; }
/* 首页计算面板 */
.bill { width: min(100%, 480px); margin-inline: auto 0; }
.bill-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bill-tab { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 14px; line-height: 1.4; cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.bill-tab:hover { border-color: var(--accent); color: var(--accent); }
.bill-tab[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.bill-sheet { padding: 22px 26px 24px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 44px -28px rgba(15, 35, 40, 0.38); }
.bill-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bill-coin { width: 26px; height: 26px; }
.bill-rows { margin: 0; }
.bill-rows div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); animation: rise 0.5s var(--ease) both; }
.bill-rows div:nth-child(2) { animation-delay: 0.08s; }
.bill-rows dt { font-size: 15px; color: var(--muted); }
.bill-rows dd { margin: 0; font: 500 clamp(17px, 1.5vw, 20px) var(--mono); font-variant-numeric: tabular-nums; }
.bill-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding-top: 20px; font-size: 15px; font-weight: 500; }
.bill-blank { position: relative; display: inline-block; min-width: 8.5em; padding: 8px 14px; border-bottom: 2px solid var(--accent); border-radius: 6px 6px 0 0; overflow: hidden; font: 700 clamp(22px, 2.3vw, 30px)/1.2 var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--accent-ink); }
.bill-blank::before { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: fill-blank 0.65s 0.3s var(--ease) both; }
.bill-blank span { position: relative; animation: rise 0.4s 0.55s var(--ease) both; }
.bill-more { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--accent); }
.bill-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--muted); }
@keyframes fill-blank { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.btn:active { transform: none; }
.text-link { font-size: 15px; color: var(--accent); }

/* 依据栏 */
.proof { background: var(--night); color: var(--night-ink); padding-block: clamp(44px, 5.4vw, 80px); }
.proof-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 12px clamp(32px, 6vw, 96px); align-items: end; }
.proof h2 { font-size: clamp(26px, 3.2vw, 44px); }
.proof-head p { margin: 0; font-size: 16px; line-height: 1.8; color: var(--night-muted); }
.proof-head a { color: var(--night-accent); }
.proof-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(28px, 3.6vw, 52px); border-top: 1px solid var(--night-line); }
.proof-list li { padding: 22px clamp(16px, 2vw, 28px) 0; border-left: 1px solid var(--night-line); }
.proof-list li:first-child { padding-left: 0; border-left: 0; }
.proof-list .icon { width: 20px; height: 20px; margin-bottom: 12px; color: var(--night-muted); }
.proof-list b { display: block; font: 600 clamp(24px, 2.7vw, 38px)/1.2 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--night-accent); }
.proof-list span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--night-muted); text-wrap: balance; }

/* 区块 */
.section { padding-block: clamp(56px, 7vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head h2 { font-size: clamp(26px, 3.2vw, 44px); }
.section-head .lead { font-size: 16px; }
.more { display: inline-block; margin-top: 28px; font-size: 15px; color: var(--accent); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
  }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 14px; line-height: 1.4; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* 问题列表 */
.rows { border-top: 1px solid var(--line-strong); }
.row { border-bottom: 1px solid var(--line); }
.row a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 2em; gap: 0 20px; align-items: baseline; padding: clamp(14px, 1.5vw, 20px) 0; text-decoration: none; transition: padding-left 0.4s var(--ease), color 0.2s; }
.row a::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.row a:hover { padding-left: 12px; color: var(--accent); }
.row a:hover::after { transform: scaleX(1); }
.row-title { display: block; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.45; }
.row-note { display: block; margin-top: 4px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.rows-brief .row-note > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; }
.row a.row-has-icon { grid-template-columns: 36px minmax(0, 1fr) auto 2em; gap: 0 16px; align-items: start; }
.row-has-icon .row-tag, .row-has-icon .row-arrow { align-self: center; }
.row-tag { font-size: 13px; color: var(--muted); white-space: nowrap; }
.row-arrow { justify-self: end; color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity 0.25s, transform 0.35s var(--ease); }
.row a:hover .row-arrow { opacity: 1; transform: none; }

/* 小算盘 */
.calc-band { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.calc-band h2 { font-size: clamp(26px, 3.2vw, 44px); }
.tool-links { margin-top: 28px; border-top: 1px solid var(--line); }
.tool-links a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left 0.35s var(--ease), color 0.2s; }
.tool-links a:hover { padding-left: 10px; color: var(--accent); }
.tool-links small { font-size: 13px; color: var(--muted); text-align: right; }
.panel { padding: clamp(20px, 2.6vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.fields label { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fields input, .fields select { display: block; width: 100%; margin-top: 6px; padding: 8px 0; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); font: 500 19px var(--mono); font-variant-numeric: tabular-nums; outline: none; transition: border-color 0.25s; appearance: none; }
.fields select { background: linear-gradient(45deg, transparent 50%, currentColor 50%) right 6px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, currentColor 50%) right 0 center / 6px 6px no-repeat; }
.fields input:hover, .fields select:hover { border-color: var(--ink); }
.fields input:focus, .fields select:focus { border-color: var(--accent); }
.result { margin: 28px 0 0; padding-top: 8px; border-top: 1px solid var(--line-strong); }
.result div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding-top: 14px; }
.result dt { font-size: 14px; color: var(--muted); }
.result dd { margin: 0; font: 600 clamp(20px, 2.4vw, 30px)/1.25 var(--mono); font-variant-numeric: tabular-nums; }
.result div:last-child dd { color: var(--accent); }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.card { display: flex; flex-direction: column; padding: clamp(18px, 1.9vw, 26px); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color 0.25s, transform 0.35s var(--ease); }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-tag { font-size: 13px; line-height: 1.6; color: var(--muted); }
.card-title { margin-top: 14px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; transition: color 0.2s; }
.card:hover .card-title { color: var(--accent); }
.card-note { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--muted); }

/* 条款更新 */
.dated { border-top: 1px solid var(--line-strong); }
.dated li { display: grid; grid-template-columns: 9em minmax(0, 4fr) minmax(0, 5fr); gap: 4px 28px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dated time { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; color: var(--accent); }
.dated a { font-weight: 500; text-decoration: none; }
.dated a:hover { color: var(--accent); }
.dated span { font-size: 15px; color: var(--muted); }

/* 栏目页和普通页 */
.page-head { padding-block: clamp(40px, 5.4vw, 80px) clamp(24px, 3.4vw, 48px); }
.page-head h1 { font-size: clamp(30px, 4vw, 56px); line-height: 1.2; letter-spacing: -0.02em; }
.page-head .lead { margin-top: 20px; max-width: 42em; }
.page-head a { color: var(--accent); text-underline-offset: 3px; }
.group { padding-block: clamp(36px, 5vw, 72px); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px clamp(32px, 5vw, 80px); }
.group-side { position: sticky; top: 92px; align-self: start; }
.group-side .icon-tile { margin-bottom: 12px; }
.group-side h2 { font-size: clamp(20px, 2vw, 26px); }
.group-side p { margin: 12px 0 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
.plain-page { padding-bottom: clamp(48px, 7vw, 96px); }

/* 文章 */
.progress { position: fixed; top: 0; left: 0; z-index: 40; width: 100%; height: 3px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}
@supports not (animation-timeline: scroll()) { .progress { display: none; } }
.article-head { padding-block: clamp(32px, 5vw, 72px) 0; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article-head h1 { margin-top: 14px; max-width: 22em; font-size: clamp(27px, 3.4vw, 46px); line-height: 1.25; letter-spacing: -0.015em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.meta-check { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.meta-check svg { width: 14px; height: 14px; flex: none; }
.meta-sources { color: var(--accent); text-decoration: none; }
.meta-sources:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 260px); justify-content: space-between; gap: clamp(32px, 6vw, 96px); margin-top: clamp(28px, 4vw, 56px); }
.answer { margin: 0 0 clamp(28px, 4vw, 48px); padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.4vw, 30px); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; }
.answer strong { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--accent); }
.answer p { margin: 0; font-size: clamp(17px, 1.5vw, 19px); font-weight: 500; line-height: 1.75; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 14px; }
.toc b { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.toc ol { border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.5; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--accent); border-left-color: var(--accent); }

.prose { font-size: 17px; line-height: 1.95; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 0.7em; font-size: clamp(21px, 2vw, 26px); line-height: 1.4; }
.prose h3 { margin: 1.8em 0 0.6em; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; }
.prose p, .prose ul, .prose ol { margin-block: 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-thickness 0.15s; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface); font: 0.88em var(--mono); }
.prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.6em; font-size: 15px; line-height: 1.65; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 6.5em; }
.prose th { background: var(--surface); border-bottom: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; color: var(--muted); }
.prose th:first-child { border-top-left-radius: 8px; }
.prose th:last-child { border-top-right-radius: 8px; }
.prose td.num { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.prose .num { text-align: right; }
.prose .num:first-child { text-align: left; }
.prose tr:hover td { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.prose figure { margin: 2em 0; }
.prose figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; transition: border-color 0.2s; }
.prose figure img:hover { border-color: var(--accent); }
:root[data-theme='dark'] .prose figure img { filter: brightness(0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .prose figure img { filter: brightness(0.9); } }
/* 文章小图解 */
.dg { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.6; --s1: #0f8a6d; --s2: #c0602f; --s3: #3b78c2; --s4: #b8902a; }
.dg-title { margin-bottom: 16px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.dg-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dg-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.dg-phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dg-phase { padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.dg-phase.is-warn { background: var(--warm-soft); }
.dg-phase-label { margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--accent); }
.dg-phase.is-warn .dg-phase-label { color: var(--warm); }
.dg-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dg-step { padding: 10px; border-radius: 8px; background: var(--bg); }
.dg-step b { display: block; margin-top: 6px; font-weight: 600; }
.dg-step > span:last-child { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }
.dg-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); font: 500 12px var(--mono); color: var(--muted); }
.dg-bar-row { display: grid; grid-template-columns: 4.4em minmax(0, 1fr) 4.2em 6em; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dg-bar-row:last-child { border-bottom: 0; }
.dg-bar-row > :nth-child(3), .dg-bar-row > :nth-child(4) { text-align: right; }
.dg-bar-head { font-size: 12px; line-height: 1.4; color: var(--muted); }
.dg-bar-row .dg-num { white-space: nowrap; }
.dg-bar-head > :nth-child(2) { grid-column: span 2; text-align: left; }
.dg-bar-head > :nth-child(3) { display: none; }
.dg-track { display: block; height: 10px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.dg-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.dg-bar-row.is-warn .dg-track i { background: var(--s2); }
.dg-bar-row small { display: block; font: 400 12px/1.4 var(--sans); color: var(--muted); }
.dg-lanes { display: grid; gap: 10px; }
.dg-lane { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.dg-node { position: relative; padding: 10px 12px; border-radius: 8px; background: var(--surface); }
.dg-node:not(:last-child)::after { content: '→'; position: absolute; top: 50%; right: -18px; transform: translateY(-50%); color: var(--muted); }
.dg-node > span { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); }
.dg-node b { display: block; font-weight: 600; line-height: 1.45; }
.dg-node.is-ok, .dg-node.is-result { background: var(--accent-soft); }
.dg-node.is-warn { background: var(--warm-soft); }
.dg-stack { display: flex; gap: 2px; height: 22px; }
.dg-stack i { display: block; flex-basis: 0; min-width: 2px; }
.dg-stack i:first-child { border-radius: 4px 0 0 4px; }
.dg-stack i:last-child { border-radius: 0 4px 4px 0; }
.dg-subtitle { margin: 16px 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.dg-order { margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 500; }
.dg-compare { display: grid; gap: 14px; }
.dg-compare-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-bottom: 6px; }
.dg-compare-head b { font-weight: 600; }
.dg-compare-head span { color: var(--muted); }
.dg-stack .dg-rest, .dg-keys .dg-rest { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.dg-stack i:only-child { border-radius: 4px; }
.dg-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--muted); }
.dg-keys span { display: inline-flex; align-items: center; gap: 8px; }
.dg-keys i { display: block; width: 10px; height: 10px; border-radius: 3px; }
.dg-node.dg-span2 { grid-column: span 2; }
.dg-lane.is-math .dg-node:first-child::after { content: '×'; }
.dg-lane.is-math .dg-node:nth-child(2)::after { content: '='; }
.dg-map { display: grid; gap: 6px; }
.dg-map-end { padding: 10px 12px; border-radius: 8px; background: var(--surface); font-weight: 600; text-align: center; }
.dg-map-link { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 8px; align-items: center; padding: 2px 12px; color: var(--muted); }
.dg-map-link b, .dg-map-note b { font-weight: 600; color: var(--ink); }
.dg-map-arrows { font-size: 18px; line-height: 1; text-align: center; color: var(--accent); }
.dg-map-box { padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.dg-map-name { margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--accent); }
.dg-map-inner { display: grid; grid-template-columns: minmax(0, 1fr) 2.4em minmax(0, 1fr); align-items: center; }
.dg-map-acc { padding: 10px 8px; border-radius: 8px; background: var(--bg); font-weight: 600; text-align: center; }
.dg-map-mid { font-size: 18px; line-height: 1; text-align: center; color: var(--accent); }
.dg-map-note { margin-top: 8px; color: var(--muted); }
.dg .s1 { background: var(--s1); }
.dg .s2 { background: var(--s2); }
.dg .s3 { background: var(--s3); }
.dg .s4 { background: var(--s4); }
.dg-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 14px; }
.dg-legend > div { display: grid; grid-template-columns: 10px minmax(2.2em, auto) minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dg-legend i { width: 10px; height: 10px; border-radius: 3px; }
.dg-legend b { font-weight: 600; text-align: right; }
.dg-legend span { color: var(--muted); }
.dg figcaption { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.prose figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.zoom { width: min(1300px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: zoom-out; }
.zoom::backdrop { background: rgba(10, 18, 15, 0.86); backdrop-filter: blur(4px); }
.zoom img { display: block; width: 100%; height: auto; border-radius: 8px; }

.sources { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-strong); font-size: 15px; }
.sources h2 { font-size: 20px; }
.sources ul { margin-top: 12px; }
.sources li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.source-origin { flex: none; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.source-origin.is-official { padding: 1px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-family: inherit; font-weight: 500; }
.sources a { text-decoration: none; }
.sources a:hover { color: var(--accent); }
.notice { margin: 20px 0 0; font-size: 14px; line-height: 1.75; color: var(--muted); }
.related { margin-top: clamp(40px, 6vw, 80px); padding-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.related > h2 { margin-bottom: 24px; font-size: clamp(22px, 2.4vw, 30px); }

.invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: clamp(40px, 5vw, 64px); padding: clamp(22px, 2.8vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.invite > div { flex: 1 1 340px; }
.invite h2 { font-size: clamp(19px, 1.8vw, 23px); }
.invite p { margin: 10px 0 0; max-width: 40em; font-size: 14px; line-height: 1.75; color: var(--muted); }
.invite p a { color: inherit; }
.invite code { font: 500 14px var(--mono); color: var(--warm); }
.invite .btn { background: var(--warm); border-color: var(--warm); color: var(--accent-ink); white-space: nowrap; }
.invite .btn:hover { filter: brightness(0.92); }
.invite-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 clamp(28px, 4vw, 48px); padding: 12px clamp(14px, 1.6vw, 20px); border: 1px solid var(--line); border-radius: 8px; }
.answer + .invite-line { margin-top: calc(12px - clamp(28px, 4vw, 48px)); }
.invite-line p { flex: 1 1 280px; margin: 0; font-size: 15px; line-height: 1.6; }
.invite-line strong { display: block; font-weight: 500; }
.invite-line small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.invite-line small a { color: inherit; }
.invite-line code { font: 500 13px var(--mono); color: var(--ink); }
.invite-line .invite-line-btn { flex: none; padding: 7px 14px; border: 1px solid var(--warm); border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--warm); text-decoration: none; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.invite-line .invite-line-btn:hover { background: var(--warm); color: var(--accent-ink); }
.page-head .invite-line { margin: 18px 0 0; }
.invite-closed { margin-top: clamp(40px, 5vw, 64px); padding: 18px 22px; background: var(--surface); border-radius: 8px; font-size: 14px; color: var(--muted); }
.invite-closed a { color: var(--accent); }

/* 工具页 */
.tool-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: clamp(28px, 4vw, 56px); }
.tool-side { position: sticky; top: 92px; }
.tool-grid .prose > h2:first-child { margin-top: 0; }
.tool-grid .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tool-note { margin: 14px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }

/* 页脚 */
.site-foot { margin-top: clamp(64px, 9vw, 136px); padding-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); overflow: hidden; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 5vw, 80px); font-size: 15px; }
.foot-title { margin-bottom: 14px; font: 500 13px/1.5 var(--sans); color: var(--muted); }
.foot-cols li { margin-bottom: 8px; line-height: 1.6; }
.foot-note { margin: clamp(32px, 4vw, 56px) 0 0; max-width: 62em; font-size: 13px; line-height: 1.8; color: var(--muted); }
.foot-mark { display: block; width: min(1360px, 100% - var(--gutter) * 2); margin: clamp(24px, 3vw, 40px) auto clamp(28px, 3.4vw, 48px); color: var(--ink); transition: color 0.4s; }
.foot-mark:hover { color: var(--accent); }
.foot-mark .brand-word { width: auto; height: 22px; }

@media (max-width: 1000px) {
  .head-row { flex-wrap: wrap; padding-block: 12px; }
  .nav { order: 3; width: 100%; }
  .hero-grid, .calc-band, .tool-grid, .proof-head { grid-template-columns: minmax(0, 1fr); }
  .proof-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof-list li:nth-child(n + 3) { margin-top: 22px; border-top: 1px solid var(--night-line); }
  .tool-side { position: static; }
  .bill { margin-inline: 0; width: min(100%, 560px); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .group { grid-template-columns: minmax(0, 1fr); }
  .group-side { position: static; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dated li { grid-template-columns: 9em minmax(0, 1fr); }
  .dated span { grid-column: 2; }
}
@media (max-width: 720px) {
  .site-head { position: static; }
  .head-invite-bar.is-open { display: block; }
  .head-row { gap: 0 6px; min-height: 58px; padding-block: 10px; }
  .brand { gap: 8px; }
  .brand-icon { width: 28px; height: 28px; }
  .head-end { gap: 6px; }
  .head-tool { min-width: 34px; height: 34px; }
  .lang-seg { height: 34px; }
  .lang-seg > * { padding: 0 8px; }
  .has-nav-toggle .nav-toggle { display: inline-grid; }
  .has-nav-toggle .nav:not(.is-open) { display: none; }
  .nav { flex-direction: column; gap: 0; margin-top: 10px; font-size: 16px; }
  .nav a { padding: 12px 0; border-top: 1px solid var(--line); background: none; }
  .nav a[aria-current='page'] { color: var(--accent); font-weight: 500; }
  .head-invite { display: none; }
  .head-row .brand-word { height: 18px; }
  .proof-list { grid-template-columns: minmax(0, 1fr); }
  .proof-list .icon { display: none; }
  .proof-list li, .proof-list li:nth-child(n + 3) { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; margin-top: 0; padding: 14px 0; border-left: 0; border-top: 0; border-bottom: 1px solid var(--night-line); }
  .proof-list span { margin-top: 0; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .row a { grid-template-columns: minmax(0, 1fr); }
  .row a.row-has-icon { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .rows-brief .row-note > span { -webkit-line-clamp: 2; line-clamp: 2; }
  .row-tag, .row-arrow { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 16px; }
  .invite-line .invite-line-btn { flex: 1 1 100%; text-align: center; }
  .dg-phases, .dg-legend { grid-template-columns: minmax(0, 1fr); }
  .dg-lane { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
  .dg-node:nth-child(2)::after { display: none; }
  .dg-node:last-child { grid-column: 1 / -1; }
  .dg-lane .dg-node.dg-span2 { grid-column: auto; }
  .dg-lane.is-math .dg-node:nth-child(2)::after { display: none; }
  .dg-bar-row { grid-template-columns: 4.2em minmax(0, 1fr) 4em 5.6em; gap: 8px; font-size: 13px; }
  .prose table { display: block; overflow-x: auto; }
  .dated li { grid-template-columns: minmax(0, 1fr); }
  .dated span { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .progress { display: none; }
}

/* 简体、繁體开关 */
.lang-seg { display: inline-flex; align-items: center; height: 36px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1; white-space: nowrap; }
.lang-seg > * { display: inline-grid; place-items: center; height: 100%; padding: 0 11px; border-radius: 5px; text-decoration: none; transition: background 0.25s, color 0.25s; }
.lang-seg .is-current { background: var(--ink); color: var(--bg); font-weight: 500; }
.lang-seg a { color: var(--muted); }
.lang-seg a:hover { color: var(--accent); }

.foot-setting { padding: 0 0 2px; border: 0; background-color: transparent; font: inherit; cursor: pointer; }

.result dd { max-width: 100%; }
#liq-price { overflow-wrap: anywhere; color: var(--warm); }
.result dd.is-note { font-family: inherit; font-size: 0.9375rem; font-weight: 500; line-height: 1.6; }

.ledger-block { padding-block: clamp(40px, 6vw, 88px); border-top: 1px solid var(--line); }
.ledger-block > h2, .ledger-split h2 { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.25; }
.ledger-block .lead { margin-top: 16px; font-size: 16px; }
.ledger-block .lead a { color: var(--accent); }
.ledger-block > .lead { max-width: 42em; }
.ledger-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; }
.ledger-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(24px, 3.4vw, 48px); border-top: 1px solid var(--line-strong); }
.ledger-products li { display: flex; flex-direction: column; gap: 12px; padding: 24px clamp(16px, 2vw, 28px) 24px 0; }
.ledger-products li + li { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.ledger-products h3 { font-size: 20px; }
.ledger-products p { margin: 0; flex: 1; font-size: 15px; line-height: 1.8; color: var(--muted); }
.ledger-products a { font-size: 14px; color: var(--accent); }
.ledger-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--line-strong); }
.ledger-steps li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); padding-block: 14px; border-bottom: 1px solid var(--line); counter-increment: step; }
.ledger-steps li::before { content: counter(step); font: 500 14px var(--mono); line-height: 1.9; color: var(--accent); }
.ledger-search { display: block; margin-top: 24px; font-size: 14px; color: var(--muted); }
.ledger-search input { display: block; width: 100%; max-width: 320px; margin-top: 8px; padding: 10px 0; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.ledger-search input:focus { outline: none; border-bottom-color: var(--accent); }
.ledger-terms { margin: 0; border-top: 1px solid var(--line-strong); }
.ledger-terms > div { padding-block: 14px; border-bottom: 1px solid var(--line); }
.ledger-terms > div[hidden] { display: none; }
.ledger-terms dt { font-weight: 600; }
.ledger-terms dd { margin: 4px 0 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
.ledger-terms #term-empty { padding-block: 14px; color: var(--muted); }
.ledger-faq { border-top: 1px solid var(--line-strong); }
.ledger-faq > div { padding-block: 18px; border-bottom: 1px solid var(--line); }
.ledger-faq h3 { font-size: 17px; }
.ledger-faq p { margin: 6px 0 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
.hero .invite-line { margin: 24px 0 0; }
@media (max-width: 1000px) {
  .ledger-split { grid-template-columns: minmax(0, 1fr); }
  .ledger-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-products li:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger-products li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .ledger-products { grid-template-columns: minmax(0, 1fr); }
  .ledger-products li, .ledger-products li + li { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .ledger-products li:first-child { border-top: 0; }
}

:root[data-theme='dark'] .dg { --s1: #2aa583; --s2: #cc7336; --s3: #5a90d0; --s4: #ae8b2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .dg { --s1: #2aa583; --s2: #cc7336; --s3: #5a90d0; --s4: #ae8b2a; } }
