:root {
  --bg: #fff; --surface: #f4f5f7; --ink: #0e1116; --muted: #5b6472; --line: #e3e6eb;
  --accent: #f2470d; --accent-soft: #ffede5; --dark: #0e1116; --ok: #12805c; --bad: #c62828;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --num: "Space Grotesk", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1312px; margin: 0 auto; padding: 0 32px; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 600; background: var(--ink); color: #fff; white-space: nowrap; }
.btn:hover { opacity: .88; }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); opacity: 1; }
.btn.big { padding: 15px 26px; border-radius: 10px; font-size: 16px; font-weight: 700; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* 顶部导航 */
.nav { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.logo b { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 900; }
.nav-links { display: flex; gap: 36px; color: var(--muted); font-size: 15px; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; }
.pill svg { color: var(--accent); }

/* 首屏 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; align-items: center; padding: 88px 0 72px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); }
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); font-weight: 900; line-height: 1.12; letter-spacing: -1px; margin: 24px 0; }
.hero .lead { font-size: 18px; color: var(--muted); line-height: 1.7; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.panel { background: var(--dark); color: #fff; border-radius: 20px; padding: 28px; display: grid; gap: 22px; }
.panel .who { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel .who > div:first-child { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.panel small, .panel .cap { color: #8b93a1; font-size: 12px; display: block; }
.panel .bal { text-align: right; }
.panel .bal .num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.panel hr { border: 0; border-top: 1px solid #262b33; margin: 0; }
.feed { display: grid; gap: 10px; }
.feed li { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #171b22; }
.feed { margin: 0; padding: 0; }
.feed .ic { width: 34px; height: 34px; border-radius: 8px; background: #232933; display: grid; place-items: center; flex: none; }
.feed .tx { flex: 1; min-width: 0; font-size: 14px; }
.feed .cost { color: #ff8a5c; font-weight: 600; }

/* 分区 */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.section-head h2 { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); max-width: 460px; }

/* 产品 */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.product { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; background: #fff; min-height: 232px; }
a.product:hover { background: #fffaf7; }
.product .top { display: flex; justify-content: space-between; align-items: center; }
.product .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px; }
.product h3 { font-size: 21px; font-weight: 800; }
.product .tag { font-weight: 600; }
.product p { color: var(--muted); font-size: 14px; }
.product .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.product .go { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; }
.badge.ok { background: #e3f4ec; color: var(--ok); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* 三件互通 */
.three { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
.three h3 { font-size: 22px; font-weight: 800; margin: 14px 0 8px; }
.three p { color: var(--muted); }
.three .n { font-family: var(--num); font-size: 15px; color: var(--accent); font-weight: 700; }
.flow { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.flow span { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.flow i { color: var(--muted); font-style: normal; }

.dev { background: var(--dark); color: #fff; border-radius: 20px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.dev h2 { font-size: 28px; font-weight: 800; }
.dev p { color: #a9b0bc; margin-top: 10px; max-width: 620px; }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 登录 */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--dark); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 44px; font-weight: 900; line-height: 1.2; }
.auth-side p { color: #a9b0bc; margin-top: 16px; max-width: 420px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 28px; font-weight: 800; }
.auth-card .sub { color: var(--muted); margin: 6px 0 28px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 15px; }
.field input:focus, .input:focus { outline: none; border-color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; }
.msg.bad { background: #fdecec; color: var(--bad); }
.msg.ok { background: #e3f4ec; color: var(--ok); }
.switch { margin-top: 20px; font-size: 14px; color: var(--muted); }
.switch a { color: var(--accent); font-weight: 600; }

/* 工作台 */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { padding: 4px 10px 20px; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.side a.item:hover { background: var(--surface); color: var(--ink); }
.side a.item.on { background: var(--ink); color: #fff; }
.side .wallet { margin-top: auto; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.side .wallet .num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.side .wallet small { color: var(--muted); }
.side .me { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; font-size: 13px; min-width: 0; }
.side .me .avatar { width: 30px; height: 30px; font-size: 13px; }
.side .me #meName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side .me button { border: 0; background: none; color: var(--muted); padding: 4px; }
.main { padding: 32px 40px 64px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .num { opacity: .6; font-size: 12px; }
.filters .input { width: 220px; padding: 8px 12px; margin-left: auto; font-size: 14px; }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.asset { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.asset .thumb { aspect-ratio: 4 / 3; border-radius: 12px; background: var(--surface) center / cover no-repeat; position: relative; overflow: hidden; display: grid; place-items: center; color: #9aa2ae; font-size: 28px; }
.asset .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.asset .thumb.text { align-items: start; justify-items: start; padding: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.asset .thumb .kind { position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: rgba(14, 17, 22, .78); color: #fff; display: inline-flex; gap: 5px; align-items: center; }
.asset h3 { font-size: 15px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); align-items: center; }
.asset .meta button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px 0; }
.asset .meta button:hover { color: var(--bad); }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 56px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.stat-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 28px; overflow: hidden; }
.stat { padding: 24px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat.main { background: var(--dark); color: #fff; }
.stat small { color: var(--muted); font-size: 13px; }
.stat.main small { color: #a9b0bc; }
.stat .num { font-size: 40px; font-weight: 700; line-height: 1.2; display: block; }
.stat:not(.main) .num { font-size: 28px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
td.r, th.r { text-align: right; }
.plus { color: var(--ok); font-weight: 600; }
.minus { color: var(--ink); font-weight: 600; }
.note { background: var(--surface); border-radius: 12px; padding: 16px 18px; font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.note b { color: var(--ink); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
code { background: var(--surface); padding: 2px 6px; border-radius: 4px; }
pre { background: var(--dark); color: #e6e9ee; padding: 18px 20px; border-radius: 12px; overflow-x: auto; line-height: 1.6; }
pre code { background: none; padding: 0; }
.doc { max-width: 860px; padding: 56px 0 80px; }
.doc h1 { font-size: 38px; font-weight: 900; margin-bottom: 12px; }
.doc h2 { font-size: 24px; font-weight: 800; margin: 44px 0 12px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { color: #2b313b; }
.doc p { margin: 10px 0; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: 90vw; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0; gap: 40px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three { grid-template-columns: 1fr; gap: 32px; }
  .dev { grid-template-columns: 1fr; padding: 32px; }
  .nav-links { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .products { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .side .logo { padding: 0 8px 0 4px; }
  .side .wallet { margin: 0 0 0 auto; padding: 6px 12px; }
  .side .wallet small, .side .me #meName { display: none; }
  .side .wallet .num { font-size: 16px; }
  .side .me { padding: 0; }
  .main { padding: 20px 16px 48px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .filters .input { width: 100%; margin-left: 0; }
  .panel { padding: 20px; }
  .section { padding: 48px 0; }
  table.ledger th:nth-child(2), table.ledger td:nth-child(2) { display: none; }
}
