/* 网页版：和小程序一样的扁平风格（浅灰底、白色圆角卡片、黄色一个主题色） */
@font-face { font-family: "SpaceGrotesk"; src: url("/retire/fonts/SpaceGrotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "SpaceGrotesk"; src: url("/retire/fonts/SpaceGrotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #141111; --bg: #F5F4F1; --white: #fff; --yellow: #FFD440; --yellow-soft: #FFF6D6; --fill: #F2F1ED;
  --mute: #6E6763; --hair: #F0EDE7; --line: #DCD7CE;
  --sys: "PingFang SC", -apple-system, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --num: "SpaceGrotesk", "PingFang SC", sans-serif;
}
html, body { background: var(--bg); color: var(--ink); font-family: var(--sys); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
h1 { font-size: 22px; font-weight: 600; }
.num { font-family: var(--num); font-weight: 700; }
.muted { color: var(--mute); }
.box { background: var(--white); border-radius: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 22px; border-radius: 12px; background: var(--yellow); font-weight: 600; font-size: 15px; white-space: nowrap; }
.btn:hover { filter: brightness(0.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-white { background: var(--fill); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.link-btn { color: var(--mute); text-decoration: underline; font-size: 13px; padding: 0; }
.tag { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 4px; background: var(--fill); color: var(--mute); white-space: nowrap; vertical-align: 1px; }
.tag-yellow { background: #FFF0B8; color: #5C4A00; }
.tag-ink { background: var(--ink); color: #fff; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--fill); font-size: 13px; }
.chip-on { background: var(--yellow); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.label { display: block; font-size: 13px; font-weight: 600; }
.hint { display: block; font-size: 12px; color: var(--mute); margin-top: 3px; }
.wan { display: block; font-size: 12px; color: var(--mute); font-weight: 600; min-height: 0; margin-top: 3px; }
.wan:empty { display: none; }
.input { margin-top: 6px; height: 42px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; padding: 0 12px; }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 16px; }
.input input[inputmode=decimal] { font-family: var(--num); font-weight: 700; }
.input:focus-within { box-shadow: 0 0 0 2px var(--yellow); }
.input .u { margin-left: 8px; font-size: 13px; color: var(--mute); }
.error { margin-top: 12px; padding: 6px 10px; border-radius: 8px; background: #FFF0B8; font-size: 13px; }
.empty { padding: 20px 0; text-align: center; color: var(--mute); font-size: 13px; }

/* 登录页 */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 380px; max-width: 100%; padding: 32px 30px 26px; text-align: center; }
.login-card .sub { margin-top: 6px; color: var(--mute); font-size: 13px; }
.login-card .sub.blocked { margin: 14px 0 20px; color: var(--ink); line-height: 1.7; }
.qr { width: 200px; height: 200px; margin: 22px auto 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--fill); position: relative; overflow: hidden; }
.qr img { width: 100%; height: 100%; display: block; }
.qr.dim img { opacity: .15; }
.qr-msg { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 600; }
.steps { list-style: none; margin-top: 22px; display: flex; font-size: 12px; color: var(--mute); }
.steps li { flex: 1; }
.steps b { display: block; width: 22px; height: 22px; line-height: 22px; margin: 0 auto 4px; border-radius: 50%; background: var(--fill); color: var(--ink); font-family: var(--num); }
.steps .now b { background: var(--yellow); }
.status { margin-top: 18px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--bg); }
.status.y { background: var(--yellow-soft); }
.login-foot { margin-top: 16px; font-size: 12px; color: var(--mute); }
.login-foot a { margin-left: 6px; }

/* 外框：左侧导航 + 内容 */
.shell { display: flex; min-height: 100vh; }
.side { width: 210px; flex: none; background: #fff; border-right: 1px solid #ECEAE5; padding: 20px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; padding: 0 10px 20px; }
.logo b { width: 22px; height: 22px; border-radius: 6px; background: var(--yellow); display: block; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--mute); text-decoration: none; position: relative; }
.side-nav a:hover { background: var(--bg); }
.side-nav a.on { background: var(--fill); color: var(--ink); font-weight: 600; }
.side-nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 3px 3px 0; background: var(--yellow); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 12px; font-size: 13px; }
.side-foot a { color: var(--mute); }
.sync { display: flex; align-items: center; gap: 8px; color: var(--mute); margin-bottom: 4px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); display: block; }
.content { flex: 1; min-width: 0; padding: 24px 32px 40px; max-width: 1120px; }
.page-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; background: var(--yellow-soft); font-size: 13px; }
.banner .x { margin-left: auto; color: var(--mute); }
.disclaimer { margin-top: 28px; text-align: center; font-size: 12px; color: var(--mute); }
.foot-note { margin-top: 14px; font-size: 12px; color: var(--mute); }
.card { padding: 16px 18px; }
.card + .card, .hero + .card, .figs { margin-top: 16px; }
.card-t { font-size: 15px; font-weight: 600; }
.tip-y { background: var(--yellow-soft); margin-top: 16px; }
.muted-p { margin-top: 6px; color: var(--mute); }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 退休测算 */
.strip { font-size: 12px; color: var(--mute); margin: -6px 0 10px; }
.hero { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 24px; position: relative; min-height: 156px; }
.hero-lead { font-size: 12px; color: rgba(255,255,255,.62); }
.hero-big { color: var(--yellow); display: flex; align-items: baseline; margin-top: 6px; margin-right: 130px; }
.hero-big .num { font-size: 60px; line-height: 1; letter-spacing: -1px; }
.hero-big .u { font-size: 18px; font-weight: 600; margin: 0 6px 0 4px; }
.hero-short { color: var(--yellow); font-size: 34px; font-weight: 600; margin-top: 6px; }
.hero-sub { margin-top: 8px; font-size: 13px; margin-right: 130px; }
.hero-wish { display: inline-block; margin-top: 10px; padding: 2px 10px; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; }
.hero-pet { position: absolute; right: 22px; bottom: 20px; width: 108px; height: 108px; border-radius: 50%; background: #FFFAEF; display: flex; align-items: center; justify-content: center; }
.hero-pet img { width: 88px; image-rendering: pixelated; }
.big-n { font-size: 28px; }
.assume { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 12px; font-size: 12px; color: var(--mute); }
.assume-r { flex: none; color: var(--ink); background: #fff; border-radius: 4px; padding: 0 6px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--mute); margin-top: 4px; align-items: center; }
.lg { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.lg-work { background: var(--yellow); } .lg-ret { background: #FFEBA0; }
.lg-axis { margin-left: auto; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fig { padding: 14px 16px; }
.fig-l { font-size: 12px; color: var(--mute); }
.fig-v { font-size: 22px; margin-top: 2px; }

/* 资产走势图（和小程序 components/life-chart 一样的拼法） */
.lc { position: relative; margin-top: 8px; font-family: var(--num); }
.lc i { display: block; font-style: normal; }
.lc-plot { position: absolute; left: 48px; right: 14px; top: 34px; cursor: crosshair; }
.lc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #EFECE6; }
.lc-ylab { position: absolute; right: 100%; margin-right: 6px; top: -8px; font-size: 11px; line-height: 16px; color: var(--mute); white-space: nowrap; }
.lc-bar { position: absolute; bottom: 0; }
.lc-work { background: var(--yellow); }
.lc-ret { background: #FFEBA0; }
.lc-base { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #CFCAC0; }
.lc-vline { position: absolute; top: -6px; bottom: 0; width: 0; border-left: 1px dashed var(--ink); }
.lc-tag { position: absolute; top: -30px; transform: translateX(-50%); padding: 0 8px; font: 600 12px/20px var(--sys); color: #fff; background: var(--ink); border-radius: 10px; white-space: nowrap; }
.lc-dot { position: absolute; width: 12px; height: 12px; margin: 0 0 -6px -6px; background: var(--ink); border: 2px solid #fff; border-radius: 50%; }
.lc-note { position: absolute; padding: 0 6px; font: 600 11px/18px var(--sys); color: var(--ink); background: #fff; box-shadow: 0 0 0 1px #E6E2DA; border-radius: 4px; white-space: nowrap; }
.lc-note.lc-retire { color: var(--yellow); background: var(--ink); box-shadow: none; margin-left: 8px; }
.lc-note.lc-retire.lc-note-r { transform: translateX(-100%); margin-left: -8px; }
.lc-mark { position: absolute; width: 0; height: 0; }
.lc-sq { position: absolute; width: 10px; height: 10px; margin: 0 0 -5px -5px; bottom: 0; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.lc-mark .lc-note { bottom: 8px; }
.lc-mark .lc-note-l { left: 2px; }
.lc-mark .lc-note-r { right: 2px; }
.lc-hover { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.lc-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); }
.lc-tip { position: absolute; top: 4px; margin-left: 10px; padding: 4px 8px; font: 600 12px/16px var(--sys); white-space: nowrap; color: #fff; background: var(--ink); border-radius: 6px; }
.lc-tip-r { transform: translateX(-100%); margin-left: -10px; }
.lc-xs { position: absolute; left: 48px; right: 14px; bottom: 0; height: 18px; }
.lc-xlab { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; line-height: 16px; color: var(--mute); white-space: nowrap; }

/* 资产 */
.sum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.sum { padding: 14px 18px; }
.sum-v { font-size: 26px; }
.tbl-box { padding: 4px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 400; padding: 12px 16px; border-bottom: 1px solid #E6E2DA; white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

/* 弹窗 */
.mask { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(20,17,17,.38); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.dialog { width: 460px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 22px 24px 20px; }
.dialog.small { width: 400px; }
.dialog h3 { font-size: 18px; font-weight: 600; }
.dialog .meta { font-size: 12px; color: var(--mute); margin-top: 2px; }
.dlg-text { margin-top: 10px; color: var(--mute); line-height: 1.7; }
.est { margin-top: 14px; padding: 8px 12px; border-radius: 10px; background: var(--yellow-soft); font-size: 13px; }
.dlg-field { display: block; margin-top: 14px; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 记账 */
.rec-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill); }
.seg button { padding: 5px 16px; border-radius: 8px; font-size: 13px; }
.seg .on { background: var(--yellow); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.form-grid label { display: block; }
.span2 { grid-column: 1 / 3; }
.form-foot { margin-top: 16px; display: flex; justify-content: flex-end; }
.confirm { padding: 4px 16px; }
.cf { display: flex; align-items: center; width: 100%; text-align: left; padding: 12px 0; }
.cf + .cf { border-top: 1px solid var(--hair); }
.ck { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid #CFCAC0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.ck-on { background: var(--yellow); border-color: var(--yellow); }
.cf-main { flex: 1; margin-left: 10px; display: flex; flex-direction: column; }
.cf-t { font-weight: 600; font-size: 13px; }
.cf-s { font-size: 12px; color: var(--mute); }
.rec { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; }
.rec + .rec { border-top: 1px solid var(--hair); }
.rec-d { width: 52px; flex: none; color: var(--mute); font-size: 12px; }
.rec-n { flex: 1; min-width: 0; }
.rec-note { display: block; font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-a { font-size: 14px; }

/* 隐私政策 */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 24px 60px; line-height: 1.8; }
.doc h1 { margin-bottom: 4px; }
.doc h2 { font-size: 16px; margin: 24px 0 6px; }
.doc ul { padding-left: 20px; }

/* 窄屏（手机浏览器）：导航放到顶部 */
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid #ECEAE5; }
  .logo { padding: 0 8px 0 4px; }
  .side-nav { flex-direction: row; }
  .side-nav a.on::before { display: none; }
  .side-foot { margin: 0; flex-direction: row; flex-wrap: wrap; width: 100%; padding: 0 4px; gap: 12px; }
  .sync { margin: 0; }
  .content { padding: 16px; }
  .sum-row, .rec-grid { grid-template-columns: 1fr; }
  .hero-big .num { font-size: 44px; }
  .hero-big, .hero-sub { margin-right: 100px; }
  .hero-pet { width: 84px; height: 84px; }
  .hero-pet img { width: 68px; }
}
