/* 小复利 — warm off-white (A 暖米白) with soft cards, system fonts; dark mode is a warm dark grey (G 暖深灰). */

:root {
  --bg: #F7F3EA;
  --surface: #FFFDF8;
  --surface-2: #F1ECE1;
  --ink: #1C1B19;
  --ink-2: #3B3833;
  --muted: #625C51;
  --faint: #ADA594;
  --line: #E6DFD2;
  --accent: #2F6FEB;
  --accent-soft: #E6EDFB;
  --accent-ink: #1F56C3;
  --on-accent: #FFFFFF;
  --bar-muted: #E2DBCC;
  --up: #097548;   --up-bg: #E3F6EE;  --on-up: #FFFFFF;
  --warn: #A15C00; --warn-bg: #FFF1DB;
  --down: #C22C33; --down-bg: #FDECEC; --on-down: #FFFFFF;
  --info: #2F6FDB; --info-bg: #E7EFFC;
  --c1: #2F6FEB; --c2: #F2A33A; --c3: #12A26B; --c4: #E5615A; --c5: #9B6FD6; --c6: #8E8E93;
  --shadow: 0 0 0 .5px rgba(60, 45, 20, .09), 0 1px 2px rgba(60, 45, 20, .05), 0 4px 14px rgba(60, 45, 20, .04);
  --radius: 18px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
          "Helvetica Neue", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB",
          "Helvetica Neue", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --title-font: var(--display);
  --num-font: var(--display);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23211E; --surface: #2E2B27; --surface-2: #38342F; --ink: #F4F0E8; --ink-2: #D6D0C5;
    --muted: #B2ABA0; --faint: #7A7369; --line: #433E37; --accent: #6E9BFF; --accent-soft: #2F3446;
    --accent-ink: #9DBBFF; --on-accent: #00112E; --bar-muted: #4A453E;
    --up: #3CC994; --up-bg: #22392F; --on-up: #00140C; --warn: #FFB340; --warn-bg: #332611;
    --down: #FF7A72; --down-bg: #43292A; --on-down: #1F0505; --info: #64A8FF; --info-bg: #14253D;
    --c1: #6E9BFF; --c2: #FFB340; --c3: #3CC994; --c4: #FF6B5E; --c5: #BF8CFF; --c6: #98989F;
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .06); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #23211E; --surface: #2E2B27; --surface-2: #38342F; --ink: #F4F0E8; --ink-2: #D6D0C5;
    --muted: #B2ABA0; --faint: #7A7369; --line: #433E37; --accent: #6E9BFF; --accent-soft: #2F3446;
    --accent-ink: #9DBBFF; --on-accent: #00112E; --bar-muted: #4A453E;
    --up: #3CC994; --up-bg: #22392F; --on-up: #00140C; --warn: #FFB340; --warn-bg: #332611;
    --down: #FF7A72; --down-bg: #43292A; --on-down: #1F0505; --info: #64A8FF; --info-bg: #14253D;
    --c1: #6E9BFF; --c2: #FFB340; --c3: #3CC994; --c4: #FF6B5E; --c5: #BF8CFF; --c6: #98989F;
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .06); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; letter-spacing: -.005em;
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }

/* --- app shell: sidebar on wide screens, top bar + bottom tabs on phones ------------------------ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  flex: none; width: 232px; border-right: 1px solid var(--line); padding: 26px 14px; background: var(--surface);
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 0 10px 18px; }
.brand svg { width: 24px; height: 24px; }
.brand svg circle { fill: var(--accent); }
.brand svg circle:nth-child(1) { opacity: .55; } .brand svg circle:nth-child(2) { opacity: .8; }
.brand span { font-family: var(--title-font); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
  color: var(--ink-2); text-decoration: none; font-size: 15px;
}
.side-link svg, .tab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-upload { margin-top: 14px; }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.side-foot a { font-size: 12.5px; color: var(--muted); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
                stroke-linecap: round; stroke-linejoin: round; }
.tabbar { display: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; width: 100%; }
.narrow { max-width: 720px; }
main.wrap { padding-top: 28px; padding-bottom: 64px; flex: 1; }
.footer { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: 12.5px; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; }
.footer a { color: var(--muted); }
/* signed-out pages: simple centred header */
.plain-head { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.plain-head .brand { padding: 0; }

/* --- panels ------------------------------------------------------------------------------------ */
.panel {
  background: var(--surface); border: 0; border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.panel h1, .panel h2, .page-title { font-family: var(--title-font); font-weight: 700; letter-spacing: -.015em; }
.page-title { font-size: 30px; margin: 4px 0 6px; }
.panel h1 { font-size: 22px; margin: 0 0 8px; }
.panel h2 { font-size: 18px; margin: 0 0 10px; }
.panel h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; }
.panel p { margin: 0 0 10px; }
.panel > :last-child { margin-bottom: 0; }
.lead { color: var(--ink-2); margin: 0 0 18px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.steps span.on { color: var(--accent-ink); font-weight: 600; }
.steps span + span::before { content: "›"; margin-right: 6px; color: var(--faint); font-weight: 400; }

.terms { margin: 0; padding-left: 1.2em; }
.terms li { margin-bottom: 8px; color: var(--ink-2); }
.terms li strong { color: var(--ink); font-weight: 600; }

.notice { background: var(--accent-soft); color: var(--accent-ink); padding: 11px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.error { background: var(--down-bg); color: var(--down); }
.disclaimer { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px; }

/* --- forms ------------------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.field input:not([type=radio]):not([type=checkbox]), .field select, input.cell, select.cell {
  width: 100%; padding: 11px 13px; border: 1px solid transparent; border-radius: 12px;
  background: var(--surface-2); font-size: 16px; color: var(--ink);
}
.field input:not([type=radio]):focus, .field select:focus, .cell:focus { outline: none; border-color: var(--accent); }
.code-input { font-size: 22px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink); font-size: 14px; cursor: pointer;
}
.choice input { accent-color: var(--accent); margin: 0; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.check input { accent-color: var(--accent); margin-top: 5px; width: 16px; height: 16px; flex: none; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.primary, .quiet, .danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 600; text-decoration: none; line-height: 1.3;
}
.primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.primary:hover { opacity: .9; }
.quiet { background: var(--surface-2); color: var(--ink); border: 1px solid transparent; }
.quiet:hover { background: var(--line); }
.danger { background: var(--down-bg); color: var(--down); border: 1px solid transparent; }
.danger:hover { opacity: .85; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font-size: inherit; }
button[disabled], .primary[aria-disabled="true"] { opacity: .45; cursor: default; }
form.inline { display: inline; margin: 0; }

/* --- upload ------------------------------------------------------------------------------------ */
.file-rows { display: flex; flex-direction: column; gap: 10px; }
.file-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 34px; gap: 8px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-size { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px;
  border: 1.5px dashed var(--faint); border-radius: 16px; text-align: center; cursor: pointer; color: var(--ink-2); background: var(--surface-2);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.howto { border-top: 1px solid var(--line); }
.howto summary { cursor: pointer; list-style: none; padding: 10px 0; font-size: 14px; color: var(--ink-2); }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "▸"; display: inline-block; width: 1.1em; transition: transform .15s; color: var(--muted); }
.howto[open] summary::before { transform: rotate(90deg); }
.howto ol { margin: 0 0 12px; padding-left: 2.3em; font-size: 14px; color: var(--ink-2); }

.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.status-list li:first-child { border-top: 0; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge.pending { color: var(--info); background: var(--info-bg); animation: pulse 1.6s ease-in-out infinite; }
.badge.done { color: var(--up); background: var(--up-bg); }
.badge.failed { color: var(--down); background: var(--down-bg); }
.badge.pending-static { color: var(--warn); background: var(--warn-bg); }
table.platforms td { padding: 9px 8px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.platforms td:first-child { white-space: nowrap; }
.holding-row { grid-template-columns: 8em minmax(0, 1fr) 9em; }
@keyframes pulse { 50% { opacity: .45; } }

/* --- review ------------------------------------------------------------------------------------ */
.acct { padding-top: 4px; }
.acct-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.acct-head input.cell { flex: 1; min-width: 160px; font-weight: 600; }
.acct-head select.cell { width: 90px; }
.chip { font-size: 12px; color: var(--ink-2); background: var(--surface-2); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 8px; }
table.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rows th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 4px 6px 6px 0; }
table.rows td { padding: 3px 6px 3px 0; vertical-align: middle; }
table.rows td.del { width: 34px; padding-right: 0; }
table.rows input.cell, table.rows select.cell { padding: 6px 8px; font-size: 14px; }
table.rows .amt { width: 34%; }
.del-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.del-btn:hover { color: var(--down); background: var(--down-bg); }
tr.removed td { opacity: .35; } tr.removed .del-btn { opacity: 1; }
.acct.removed > *:not(.acct-head) { opacity: .35; pointer-events: none; }
.add-row { margin-top: 6px; font-size: 13.5px; }
.txn-list { margin-top: 10px; border-top: 1px solid var(--line); }
.txn-list summary { cursor: pointer; padding: 10px 0 6px; font-size: 13.5px; color: var(--accent); list-style: none; }
.txn-list summary::-webkit-details-marker { display: none; }
.txn-list summary::before { content: "▸ "; color: var(--muted); }
.txn-list[open] summary::before { content: "▾ "; }
table.txn-table td { padding: 5px 8px 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
table.txn-table select.cell { padding: 4px 6px; font-size: 13px; width: auto; }
.txn-desc { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remember { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.ask { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow); }
.ask-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ask-row:first-of-type { border-top: 0; }
.ask-what { display: flex; flex-direction: column; min-width: 0; }
.ask-row select.cell { width: auto; }
@media (max-width: 600px) { .txn-desc { max-width: 8em; } table.txn-table td:first-child { display: none; } }
.date-issue { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.date-issue .check { font-size: 14px; color: var(--ink); }
.sticky-actions {
  position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 12px 0 16px; border-top: 1px solid var(--line); margin-top: 8px;
}

/* --- report ------------------------------------------------------------------------------------ */
.report-head { margin-bottom: 18px; }
.headline {
  font-family: var(--title-font); font-weight: 700; font-size: 24px; line-height: 1.45; letter-spacing: -.02em; margin: 6px 0 4px; text-wrap: pretty;
}
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.stat dt { font-size: 12px; color: var(--muted); }
.stat dd { margin: 2px 0 0; font-family: var(--num-font); font-weight: 700; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .delta { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 9px; margin: 8px 0 4px; }
.bar-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 7.5em; gap: 10px; align-items: center; font-size: 14px; }
.bar-row:has(.ico) { grid-template-columns: 8.6em minmax(0, 1fr) 7.5em; }
.bar-row > span:first-child { display: flex; align-items: center; white-space: nowrap; }
.bar-track { height: 9px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--accent); min-width: 2px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin: 6px 0 8px; }
.stack span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin: 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }
.bullets { margin: 4px 0 0; padding-left: 1.2em; }
.bullets li { margin-bottom: 6px; color: var(--ink-2); }
.tip { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font-size: 14.5px; color: var(--ink-2); }
.placeholder { border: 1.5px dashed var(--faint); box-shadow: none; background: transparent; }
.persona-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.persona-line .chip { text-decoration: none; }
.persona-card { display: flex; gap: 18px; align-items: flex-start; }
.persona-emoji { font-size: 46px; line-height: 1; padding-top: 6px; }
.choice-col { flex-direction: column; align-items: stretch; }
.choice-col label { border-radius: 14px; padding: 12px 14px; }
.delay-note { margin: -4px 0 2px 7.2em; }
@media (max-width: 600px) { .delay-note { margin-left: 6.2em; } }
.delay-rows { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.delay-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 7em; gap: 10px; align-items: center; font-size: 14px; }
@media (max-width: 600px) { .delay-row { grid-template-columns: 7em minmax(0, 1fr) 6em; font-size: 13px; } }
.hero { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow); }
.key-points { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: kp; }
.key-points li { counter-increment: kp; position: relative; padding: 9px 0 9px 34px; border-top: 1px solid var(--line); color: var(--ink); }
.key-points li:first-child { border-top: 0; }
.key-points li::before {
  content: counter(kp); position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; display: grid; place-items: center;
}
.decomp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px; }
.decomp > div { background: var(--surface-2); border-radius: 14px; padding: 10px 13px; display: flex; flex-direction: column; gap: 2px; }
.decomp strong { font-family: var(--num-font); font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.minibars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin: 8px 0 4px; }
.minibar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.minibar span { width: 100%; max-width: 46px; background: var(--accent); opacity: .75; border-radius: 6px 6px 2px 2px; }
.minibar:last-child span { opacity: 1; }
.minibar small { font-size: 11.5px; color: var(--muted); }
.checks { display: flex; flex-direction: column; }
.check-row { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-row > span:first-child { grid-row: span 2; color: var(--muted); font-size: 13.5px; }
.check-row strong { font-weight: 600; }
table.detail-table { margin: 6px 0; font-size: 13px; }
table.detail-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.feedback-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feedback-row input[type=text] { flex: 1; min-width: 180px; padding: 10px 13px; border: 0; border-radius: 12px; background: var(--surface-2); }
.thumb { font-size: 18px; padding: 6px 12px; }
.thumb.on { background: var(--accent-soft); color: var(--accent-ink); }
.months { list-style: none; margin: 0; padding: 0; }
.months li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.months li:first-child { border-top: 0; }
.months .actions { display: flex; gap: 8px; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- tabs: overview / net worth / cash flow / invest ----------------------------------------------- */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.dash-head .page-title { margin: 0; }
.dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pick { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }
.dash-title { font-weight: 500; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: var(--ink-2); margin: -4px 0 18px; text-wrap: pretty; }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.dash > * { margin: 0; min-width: 0; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack-col { display: flex; flex-direction: column; gap: 14px; }
.stack-col > * { margin: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.card-link:hover { box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.07); }
.card-label { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.card-label .go { color: var(--faint); font-size: 18px; line-height: 1; }
.big-num { font-family: var(--num-font); font-weight: 700; font-size: clamp(40px, 5vw, 58px); letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mid-num { font-family: var(--num-font); font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; color: var(--on-up); background: var(--up); padding: 2px 10px; border-radius: 999px; }
.pill.neg { background: var(--down); color: var(--on-down); }
.hero-nw { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hero-nw .meta { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.vbars.tall { height: 170px; }
.vbars.wide { gap: 4%; } .vbars.wide .vbar { max-width: 90px; }
.vbar { flex: 1; min-width: 18px; max-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.vbar i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--bar-muted); min-height: 3px; }
.vbar.now i { background: var(--accent); }
.vbar small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.vbar b { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.vbar.now small, .vbar.now b { color: var(--ink); font-weight: 600; }
.hero-chart { flex: 1 1 300px; max-width: 480px; }
.trend { width: 100%; }
.trend-plot { position: relative; height: 150px; margin: 18px 0 8px; }
.trend.tall .trend-plot { height: 200px; }
.trend-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trend .pt { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.trend .pt.now { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.trend .pt-label { position: absolute; transform: translate(-4px, -190%); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend .pt-label.end { transform: translate(-100%, -150%); color: var(--ink); }
.trend-months { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.trend-months .now { color: var(--ink); font-weight: 600; }
.ico { --tint: var(--c6); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 10px; background: color-mix(in srgb, var(--tint) 14%, var(--surface)); font-size: 15px; line-height: 1; vertical-align: middle; flex: none; }
.tile { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 16px 18px; }
.tile .mid-num { margin-top: 2px; white-space: nowrap; }
.tile.span-3 { flex-direction: column; align-items: flex-start; gap: 4px; }
.tile.span-3 .sub { text-align: left; }
.tile .sub { font-size: 12.5px; color: var(--muted); text-align: right; }
.flow-pair { display: flex; align-items: flex-end; gap: 3px; width: 100%; flex: 1; min-height: 0; }
.flow-pair i { width: 50%; }
.flow-pair i.inc { background: var(--accent); opacity: .55; }
.flow-pair i.out { background: var(--c2); }
.persona-mini { display: flex; gap: 14px; align-items: center; }
.persona-mini .persona-emoji { font-size: 40px; padding: 0; }
.persona-mini strong { font-family: var(--title-font); font-size: 19px; font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 0 8px 8px 0; }
.tbl td { padding: 9px 8px 9px 0; border-top: 1px solid var(--line); }
.tbl td:not(:first-child), .tbl th:not(:first-child) { text-align: right; }
.acct-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.acct-line > span:first-child { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; }
.acct-line:first-child { border-top: 0; }
.acct-line .orig { font-size: 12px; color: var(--muted); margin-left: 6px; }
.acct-line strong { font-family: var(--num-font); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-card { display: flex; flex-direction: column; }
.hero-card .hero-nw { flex: 1; }
.hero-card .vbars { height: 190px; }
.nw-parts { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.nw-parts .acct-line { padding: 8px 0; }
.points-card h2 { font-size: 20px; }
.points-card .key-points li { font-size: 16px; line-height: 1.6; padding: 12px 0 12px 36px; }
.dash .mid-num { font-size: 30px; }
.dash .card-label { font-size: 13.5px; }
.first-steps { list-style: none; counter-reset: fs; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.first-steps li { counter-increment: fs; position: relative; padding-left: 44px; display: flex; flex-direction: column; gap: 3px; }
.first-steps li::before { content: counter(fs); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; display: grid; place-items: center; }
.first-steps strong { font-size: 16px; }
.first-steps span { color: var(--ink-2); font-size: 14px; }
.hint { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 3px; border-radius: 50%;
  border: 1px solid var(--faint); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer;
  vertical-align: 1px; font-family: var(--sans, system-ui, sans-serif); }
.hint::before { content: ""; position: absolute; inset: -10px; }   /* bigger tap target */
.hint:hover, .hint.open { border-color: var(--accent); color: var(--accent-ink); }
.hint.open::after { content: attr(data-tip); position: absolute; z-index: 30; top: calc(100% + 8px); left: -10px; width: min(260px, 70vw);
  padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 400;
  line-height: 1.55; text-align: left; white-space: normal; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
h2 .hint { font-size: 11px; }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.demo-banner .primary { white-space: nowrap; }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .big-num { font-size: 30px; margin-bottom: 8px; }

/* --- phone & narrow screens ------------------------------------------------------------------------ */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px;
    position: sticky; top: 0; z-index: 10; border-bottom: .5px solid var(--line);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  }
  .topbar .brand { padding: 0; }
  .topbar-actions { display: flex; align-items: center; gap: 4px; }
  .add-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
  .add-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: color-mix(in srgb, var(--surface) 88%, transparent); border-top: .5px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tab.active { color: var(--accent-ink); font-weight: 600; }
  .has-tabs { padding-bottom: 70px; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 18px; }
  .dash { gap: 12px; }
  .dash > * { grid-column: span 12; }
  .dash > .tile.span-3 { grid-column: span 6; flex-direction: column; align-items: flex-start; gap: 4px; }
  .tile.span-3 .sub { text-align: left; }
  .tile .mid-num { white-space: nowrap; }
  .hero-card .vbars { height: 130px; }
  .dash .mid-num { font-size: 26px; }
  .points-card .key-points li { font-size: 15px; }
  .sticky-actions { bottom: 64px; }
}
@media (max-width: 600px) {
  .panel { padding: 16px; border-radius: 16px; }
  .page-title { font-size: 23px; }
  .headline { font-size: 19px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2, .kv { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .file-row select { grid-column: 1 / 2; }
  .bar-row { grid-template-columns: 5.5em minmax(0, 1fr) 6.5em; font-size: 13px; }
  .vbars { gap: 6px; height: 110px; }
  .vbar b { visibility: hidden; }            /* keep the space, so every bar has the same scale */
  .vbar.now b { visibility: visible; }
}

@media print {
  .sidebar, .topbar, .tabbar, .footer, .no-print, .sticky-actions { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; break-inside: avoid; }
}

/* --- smooth: soft page changes (browsers that support it), steady navigation, busy buttons ------------ */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
.tabbar { view-transition-name: tabbar; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
.busy { opacity: .6; cursor: progress; pointer-events: none; }
.card-link:active, .tab:active, .side-link:active { transform: scale(.99); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; } * { transition: none !important; animation: none !important; } }

/* --- detail pass ------------------------------------------------------------------------------------ */
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt .sym { font-size: .62em; font-weight: 500; margin-right: .03em; vertical-align: .08em; }
.big-num .amt .sym { font-size: .5em; vertical-align: .62em; margin-right: .02em; letter-spacing: 0; color: var(--muted); }
.unit { font-size: .55em; font-weight: 600; margin-left: .2em; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; font-variant-numeric: tabular-nums; }
.pill.neg { background: var(--down); color: var(--on-down); }
.bar-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 75%, var(--surface)), var(--accent)); }
.stack { gap: 2px; background: transparent; }
.stack span:first-child { border-radius: 6px 0 0 6px; } .stack span:last-child { border-radius: 0 6px 6px 0; }
.acct-line strong, .bar-val { font-weight: 600; }
.key-points li { line-height: 1.65; }
.panel h2 { font-size: 17px; }

/* sidebar profile */
.side-me { display: flex; align-items: center; gap: 10px; margin: auto 0 10px; padding: 10px; border-radius: 14px; text-decoration: none; }
.side-me:hover { background: var(--surface-2); }
.side-me + .side-foot { margin-top: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px;
  color: var(--on-accent); background: var(--accent); }
.side-me strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.side-me small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* trend read-out on hover / touch */
.trend-plot { cursor: crosshair; touch-action: pan-y; }
.trend-guide { position: absolute; top: -6px; bottom: 0; width: 1px; background: var(--line); opacity: 0; pointer-events: none; }
.trend-tip { position: absolute; top: -34px; transform: translateX(-50%); padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--bg);
  font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; font-variant-numeric: tabular-nums; }
.trend.reading .trend-guide, .trend.reading .trend-tip { opacity: 1; }
.trend.reading .pt-label { opacity: 0; }
.trend .pt { transition: transform .12s; }
.trend .pt.active { transform: scale(1.5); }

/* gentle entrance */
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }   /* no fade: content is never hidden, even if the animation stalls */
.dash > * { animation: rise .38s cubic-bezier(.2, .7, .2, 1) both; }
.dash > :nth-child(2) { animation-delay: .03s; } .dash > :nth-child(3) { animation-delay: .06s; }
.dash > :nth-child(4) { animation-delay: .09s; } .dash > :nth-child(5) { animation-delay: .12s; }
.dash > :nth-child(n+6) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .dash > * { animation: none; } }
@media print { .dash > * { animation: none; } }

.brand-en { font-style: normal; font-size: .62em; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-left: 6px; }

/* --- small type, editorial details ----------------------------------------------------------------- */
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; line-height: 1.3; }
.eyebrow.inline { display: inline; margin: 0 10px 0 0; color: var(--muted); }
.page-title { letter-spacing: -.03em; }
.big-num { letter-spacing: -.045em; }
.mid-num { letter-spacing: -.03em; }
.dash-head { align-items: flex-end; }
.footer { font-size: 12px; letter-spacing: .01em; }
.disclaimer { font-size: 12px; letter-spacing: .01em; color: var(--muted); }
.hero-card { position: relative; }
.hero-card::before { content: ""; position: absolute; top: 0; left: 22px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }   /* one short accent mark on the key card */

/* --- editorial pass (after studying twentypercentstrategy.com) ----------------------------------------- */
@font-face { font-family: "Figures"; src: local("Helvetica Neue"), local("Arial"), local("Roboto"); unicode-range: U+30-39, U+25, U+2B, U+2C, U+2E, U+2212; }
:root { --serif-display: "Figures", Georgia, "Songti SC", "STSong", "Noto Serif SC", serif; }
.page-title, .dash-title, .first-run .page-title { font-family: var(--serif-display); font-weight: 400; letter-spacing: -.02em; }
.page-title { font-size: 34px; }
.dash-title { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); font-weight: 400; }
.key-points { counter-reset: kp; }
.key-points li { padding: 14px 0 14px 46px; border-top: 1px solid var(--line); }
.key-points li:first-child { border-top: 2px solid var(--accent); }
.key-points li::before { content: counter(kp, decimal-leading-zero); background: none; color: var(--accent-ink); width: auto; height: auto;
  left: 0; top: 16px; font-size: 12px; font-weight: 600; letter-spacing: .08em; display: block; border-radius: 0; }
.card-label .go { font-size: 0; color: var(--faint); transition: color .15s, transform .15s; }
.card-label .go::after { content: "↗"; font-size: 15px; }
.card-link:hover .go { color: var(--accent); transform: translate(1px, -1px); }
@media (max-width: 899px) { .page-title { font-size: 28px; } }

/* first / last value on the trend: on the side the line doesn't pass through */
.trend .pt-label.start { transform: translate(0, -170%); }
.trend .pt-label.start.below { transform: translate(0, 70%); }
.trend .pt-label.end { transform: translate(-100%, -170%); }
.trend .pt-label.end.below { transform: translate(-100%, 70%); }

/* line icons (same stroke as the nav) on a soft tint */
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }
.ico { color: color-mix(in srgb, var(--tint) 85%, var(--ink)); }
.ico .i { width: 17px; height: 17px; }
.ico.lg { width: 44px; height: 44px; border-radius: 14px; margin-right: 0; flex: none; }
.ico.lg .i { width: 24px; height: 24px; }
.ico.xl { width: 64px; height: 64px; border-radius: 20px; margin: 4px 0 0; flex: none; }
.ico.xl .i { width: 34px; height: 34px; }

/* the key figures: three cards on wide screens, one compact three-column card on phones */
.tile-group.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile-group.row > .tile { margin: 0; }
.dash-controls .quiet { background: var(--surface); box-shadow: var(--shadow); }
.dash-controls .quiet:hover { background: var(--surface-2); }
@media (max-width: 600px) {
  .dash > .tile-group, .dash > .tile-group.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
  .tile-group > .tile { flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px 10px 13px 12px; margin: 0;
    background: transparent; box-shadow: none; border-radius: 0; border-left: 1px solid var(--line); min-width: 0; }
  .tile-group > .tile:first-child { border-left: 0; }
  .tile-group .card-label { font-size: 12.5px; white-space: nowrap; }
  .tile-group .mid-num, .dash .tile-group .mid-num { font-size: 19px; margin-top: 3px; }
  .tile-group .sub { text-align: left; font-size: 11.5px; line-height: 1.35; }
  /* the ? explanation: a steady bar above the tab bar, so it can't run off the screen wherever the ? is */
  .hint.open::after { position: fixed; left: 16px; right: 16px; bottom: 84px; top: auto; width: auto; }
  .demo-banner { font-size: 13px; padding: 10px 12px; gap: 8px; margin-bottom: 14px; }
  .demo-banner .primary { padding: 7px 14px; font-size: 13.5px; }
}

/* 须知: three plain promises first, the full text one tap away */
.promises { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: pr; }
.promises li { counter-increment: pr; position: relative; padding: 12px 0 12px 36px; border-top: 1px solid var(--line); color: var(--ink-2); }
.promises li:first-child { border-top: 2px solid var(--accent); }
.promises li::before { content: counter(pr, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent-ink); }
.promises strong { color: var(--ink); font-weight: 600; }
.full-terms .terms { margin-bottom: 8px; }
.resend-form { margin-top: 12px; }
.link-btn[disabled] { color: var(--muted); opacity: 1; }

/* upload: what this month already has */
.have-list { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.have-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.have-head a { font-weight: 500; color: var(--accent-ink); }
.have-list ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.have-list li { display: inline-flex; gap: 6px; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); }
.have-list li b { font-weight: 600; font-size: 12px; color: var(--muted); }
.have-list li.done b { color: var(--up); }
.have-list li.pending b { color: var(--info); }
.have-list p { margin: 0; }
.file-auto { display: block; font-size: 12px; color: var(--muted); }
.field textarea { width: 100%; padding: 11px 13px; border: 1px solid transparent; border-radius: 12px; background: var(--surface-2); font-size: 16px; color: var(--ink); resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--accent); }
.side-foot-links { display: flex; flex-direction: column; gap: 2px; }

.have-list[hidden] { display: none; }
.have-list li.part b { color: var(--warn); }
.span-help { border-top: 0; margin-top: 2px; }
.span-help summary { padding: 6px 0 2px; font-size: 13px; color: var(--muted); }
.span-help p { margin: 4px 0 0; }

.review-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
@media (max-width: 600px) { .sticky-actions { padding: 8px 0 10px; } .sticky-actions .primary { flex: 1; } }

/* 复利计算器 */
.quote-card blockquote { margin: 0; font-family: var(--serif-display); font-size: 21px; line-height: 1.5; color: var(--ink); }
.quote-card p { margin: 6px 0 0; }
.calc { margin-top: 4px; }
.calc-inputs { display: flex; flex-direction: column; gap: 14px; }
.calc-label { display: flex; justify-content: space-between; }
.calc output, .calc-label output { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-inputs input[type=range] { width: 100%; accent-color: var(--accent); margin-top: 6px; }
.calc-money { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 0 12px; }
.calc-money input { border: 0 !important; background: transparent !important; padding-left: 0 !important; font-variant-numeric: tabular-nums; }
.calc-sym { color: var(--muted); font-weight: 600; }
.calc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.calc-split > div { background: var(--surface-2); border-radius: 14px; padding: 10px 13px; display: flex; flex-direction: column; gap: 2px; }
.calc-split strong { font-family: var(--num-font); font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-chart { position: relative; height: 170px; margin: 8px 0 6px; }
.calc-chart svg { width: 100%; height: 150px; display: block; }
.calc-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* --- B: refined cards, a wider desk on computers, an app-like first screen on phones -------------------- */
.month-switch { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 2px; }
.month-switch .pick { box-shadow: none; background: transparent; padding: 7px 8px; }
.ms-arrow { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink-2); text-decoration: none; font-size: 18px; line-height: 1; }
.ms-arrow:hover { background: var(--surface-2); }
.ms-arrow.off { color: var(--faint); }
.trend-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.trend-grid b { position: absolute; right: 0; top: -15px; font-size: 10.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); padding-left: 4px; }
.hero-card { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%, var(--surface) 55%); }
.trend-plot svg path[fill="none"] { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent)); }
@media (min-width: 1100px) {
  main.wrap { max-width: 1200px; padding-left: 40px; padding-right: 40px; }
  .dash { gap: 20px; }
  .panel { padding: 22px 24px; }
  .hero-card .trend-plot { height: 210px; }
  .hero-card .hero-chart { max-width: none; flex: 1 1 420px; }
  .hero-card .big-num { font-size: 60px; }
  .dash-title { font-size: 19px; max-width: 46em; }
}
@media (max-width: 600px) {
  /* first screen: the net worth sits on the page itself, edge to edge, like a banking app */
  .hero-card { background: transparent; box-shadow: none; border-radius: 0; padding: 2px 0 4px; }
  .hero-card::before { display: none; }
  .hero-card .big-num { font-size: 50px; }
  .hero-card .trend-plot { height: 170px; margin-top: 14px; }
  .trend-grid b { background: var(--bg); }
  .hero-card:hover { box-shadow: none; }
  .month-switch .pick { padding: 6px 4px; font-size: 13.5px; }
}

/* the gridline values get their own gutter on the right, clear of the line and its end label */
.trend-plot, .trend-months { margin-right: 46px; }
.trend-grid { right: -46px; }
.trend-grid b { right: 0; top: -8px; background: none; padding-left: 0; }
.trend .pt-label.end, .trend .pt-label.end.below { transform: translate(-100%, -170%); }
.trend .pt-label.end.below { transform: translate(-100%, 70%); }

/* Landing page (signed-out "/"): what 小复利 is, the calculator, the way in */
.landing { max-width: 980px; }
.plain-actions { display: flex; align-items: center; gap: 8px; }
.land-hero { padding: 28px 0 8px; }
.land-title { font-family: var(--serif-display); font-weight: 400; font-size: 46px; line-height: 1.18; letter-spacing: -.02em; margin: 6px 0 14px; color: var(--ink); }
.land-hero .lead { font-size: 17px; max-width: 40em; }
.land-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 34px 0 22px; }
.land-steps > div { border-top: 2px solid var(--line); padding-top: 14px; }
.land-steps > div:first-child { border-top-color: var(--accent); }
.land-steps strong { display: block; font-size: 16px; margin: 4px 0 4px; }
.land-steps p { margin: 0; color: var(--muted); font-size: 14px; }
.land-num { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent-ink); }
.land-demo { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.land-demo .quiet { flex: none; }
.land-section { margin: 46px 0 8px; }
.land-h2 { font-family: var(--serif-display); font-weight: 400; font-size: 30px; letter-spacing: -.02em; margin: 4px 0 6px; }
.land-trust { margin-top: 28px; }
.land-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 700px) {
  .land-hero { padding-top: 12px; }
  .land-title { font-size: 31px; }
  .land-title br { display: none; }
  .land-hero .lead { font-size: 15.5px; }
  .land-steps { grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
  .land-demo { flex-direction: column; align-items: flex-start; }
  .land-section { margin-top: 34px; }
  .land-h2 { font-size: 25px; }
}

/* 邀请好友 */
.invite-list { list-style: none; margin: 0; padding: 0; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.invite-row:first-child { border-top: 0; padding-top: 4px; }
.invite-code { font-family: var(--num-font, ui-monospace, monospace); font-size: 20px; font-weight: 700; letter-spacing: .12em; color: var(--ink); background: var(--surface-2); border-radius: 10px; padding: 3px 10px; display: inline-block; margin-bottom: 4px; user-select: all; }
.invite-row.rewarded .invite-code, .invite-row.joined .invite-code { color: var(--muted); }
.invite-bonus .mid-num { margin-top: 4px; }
.admin-code-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.admin-code-form .field, .admin-code-form .form-actions { margin: 0; }
@media (max-width: 800px) { .admin-code-form { grid-template-columns: 1fr 1fr; } }
