:root {
  --ink: #18352e;
  --forest: #173f35;
  --forest-deep: #102e27;
  --mint: #c9dfce;
  --lime: #dbe9a7;
  --paper: #f4f2e9;
  --white: #fffef9;
  --line: #d7d9cc;
  --muted: #6b756f;
  --orange: #e47d4d;
  --error: #a63f35;
  --shadow: 0 24px 70px rgba(24, 53, 46, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-header { width: min(1240px, calc(100% - 64px)); height: 86px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(24, 53, 46, .14); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 700; letter-spacing: .03em; }
.brand svg { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--forest); stroke: var(--lime); stroke-width: 2.2; fill: none; }
.site-header nav { display: flex; gap: 34px; font-size: 13px; color: #4d5f57; }
.site-header nav a { transition: color .2s; }
.site-header nav a:hover { color: var(--orange); }

main { overflow: clip; }
.hero { width: min(1160px, calc(100% - 64px)); min-height: 590px; margin: auto; display: grid; grid-template-columns: 1.35fr .8fr; gap: 100px; align-items: center; padding: 70px 0 86px; }
.eyebrow { margin: 0 0 22px; color: #63766c; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: clamp(54px, 6vw, 88px); line-height: 1.16; font-weight: 500; letter-spacing: -.055em; }
.hero h1 em { color: var(--forest); font-style: normal; position: relative; z-index: 0; }
.hero h1 em::after { content: ""; position: absolute; height: 17px; left: -5px; right: -8px; bottom: 4px; background: var(--lime); z-index: -1; transform: rotate(-1.5deg); }
.hero-description { max-width: 560px; margin: 30px 0; color: #5c6c64; font-size: 16px; line-height: 1.9; }
.primary-link { display: inline-flex; gap: 36px; align-items: center; padding: 16px 22px; color: var(--white); background: var(--forest); border-radius: 4px; font-size: 14px; font-weight: 700; transition: transform .2s, background .2s; }
.primary-link:hover { background: #225447; transform: translateY(-2px); }
.primary-link span { color: var(--lime); font-size: 20px; }
.hero-note { min-height: 370px; padding: 38px; color: #eaf0df; background: var(--forest); border-radius: 3px 80px 3px 3px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.hero-note::before { content: ""; position: absolute; width: 78px; height: 78px; border: 1px solid var(--mint); border-radius: 50%; top: -24px; right: -24px; opacity: .35; }
.note-index { color: #a8beb1; font-size: 11px; letter-spacing: .15em; }
.hero-note > p { margin: 54px 0 28px; font-family: "Songti SC", "STSong", serif; font-size: 27px; line-height: 1.55; }
.note-formula { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.17); border-bottom: 1px solid rgba(255,255,255,.17); font-size: 12px; color: #c4d4c8; }
.note-formula strong { margin: 0 8px; color: var(--lime); font-size: 18px; }
.note-foot { margin-top: auto; color: #91aa9c; font-size: 12px; }

.calculator-section { padding: 86px max(32px, calc((100vw - 1240px)/2)); background: var(--white); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 42px; }
.section-heading .eyebrow { margin-bottom: 12px; }
.section-heading h2, .privacy-section h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.03em; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .85fr); gap: 34px; align-items: start; }
#finance-form { min-width: 0; }
fieldset { margin: 0 0 24px; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
legend { padding: 0 12px 0 0; font-size: 16px; font-weight: 700; }
legend span { display: inline-block; margin-right: 10px; color: var(--orange); font-family: Georgia, serif; font-size: 13px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span:first-child { font-size: 13px; font-weight: 650; }
.field small, .switch-label small { color: #879089; font-size: 11px; line-height: 1.5; }
.input-shell { height: 49px; margin-top: 2px; display: flex; align-items: center; background: #f8f8f3; border: 1px solid #dfe2d8; border-radius: 5px; transition: border .2s, box-shadow .2s; }
.input-shell:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23,63,53,.08); }
.input-shell input { min-width: 0; width: 100%; height: 100%; padding: 0 12px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.input-shell b { padding: 0 13px; color: #869188; font-size: 12px; font-weight: 500; }
.input-shell:has(input:disabled) { opacity: .45; background: #eeeee9; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center; padding: 16px 0; }
.plan-row + .plan-row { border-top: 1px solid #eceee7; }
.switch-label { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch-label > span { display: flex; flex-direction: column; gap: 6px; }
.switch-label strong { font-size: 13px; }
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch-label i { flex: 0 0 auto; width: 42px; height: 24px; padding: 3px; border-radius: 20px; background: #d6d9d2; transition: background .2s; }
.switch-label i::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: transform .2s; }
.switch-label input:checked + i { background: var(--forest); }
.switch-label input:checked + i::after { transform: translateX(18px); }
.switch-label input:focus-visible + i { outline: 3px solid rgba(23,63,53,.2); outline-offset: 3px; }
.form-error { margin: 0 0 18px; padding: 13px 16px; color: var(--error); background: #fff2ed; border-left: 3px solid var(--error); font-size: 13px; line-height: 1.6; }
.form-actions { display: flex; align-items: center; gap: 22px; }
.calculate-button { min-height: 58px; flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 23px; color: var(--white); background: var(--forest); border: 0; border-radius: 5px; font-size: 14px; font-weight: 700; transition: background .2s, transform .2s; }
.calculate-button:hover { background: #225447; transform: translateY(-1px); }
.calculate-button:disabled { opacity: .65; cursor: wait; transform: none; }
.calculate-button b { color: var(--lime); font-size: 23px; }
.secondary-actions { display: flex; gap: 12px; }
.secondary-actions button { padding: 8px 0; color: #778179; background: none; border: 0; border-bottom: 1px solid #cfd4cb; font-size: 12px; }
.secondary-actions button:hover { color: var(--forest); }

.result-panel { min-height: 540px; padding: 32px; color: #eff5e9; background: var(--forest); border-radius: 8px; position: sticky; top: 24px; overflow: hidden; }
.result-panel::after { content: ""; position: absolute; width: 270px; height: 270px; border: 1px solid rgba(219,233,167,.12); border-radius: 50%; right: -150px; top: -120px; pointer-events: none; }
.result-label { color: #a7beb0; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.result-empty { min-height: 475px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.result-empty .result-label { align-self: flex-start; }
.empty-orbit { width: 168px; height: 168px; margin: 65px auto 35px; display: grid; place-items: center; border: 1px solid rgba(219,233,167,.24); border-radius: 50%; position: relative; }
.empty-orbit::before { content: ""; position: absolute; inset: 20px; border: 1px dashed rgba(219,233,167,.25); border-radius: 50%; }
.empty-orbit i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.empty-orbit i:first-child { top: 19px; right: 30px; }
.empty-orbit i:nth-child(2) { bottom: 15px; left: 42px; background: var(--orange); }
.empty-orbit b { font-family: "Songti SC", serif; font-size: 30px; font-weight: 400; }
.result-empty h3 { margin: 0 0 12px; font-family: "Songti SC", serif; font-size: 23px; font-weight: 500; }
.result-empty p { max-width: 290px; margin: 0; color: #a8bcb0; font-size: 12px; line-height: 1.8; }
.local-note { margin-top: auto; color: #79998a; font-size: 11px; }
.result-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.status-pill { padding: 5px 8px; color: var(--lime); background: rgba(219,233,167,.09); border: 1px solid rgba(219,233,167,.25); border-radius: 20px; font-size: 10px; }
#result-title { margin: 25px 0 10px; font-family: "Songti SC", serif; font-size: 27px; font-weight: 500; line-height: 1.45; }
.result-message { margin: 0 0 25px; color: #a9bdb1; font-size: 12px; line-height: 1.75; }
.primary-result { padding: 21px 0; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); display: flex; flex-direction: column; gap: 8px; }
.primary-result > span, .time-result span { color: #a8bcb0; font-size: 11px; }
.primary-result strong { color: var(--lime); font-family: Georgia, "Times New Roman", serif; font-size: clamp(33px, 3.2vw, 45px); font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.primary-result small { color: #7f9b8c; font-size: 10px; }
.time-result { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 22px 0; }
.time-result > div { display: flex; flex-direction: column; gap: 8px; }
.time-result strong { font-size: 18px; font-weight: 600; line-height: 1.5; }
.result-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 19px; background: rgba(255,255,255,.055); border-radius: 5px; }
.result-metrics > div { display: flex; flex-direction: column; gap: 6px; }
.result-metrics span { color: #91aa9b; font-size: 10px; }
.result-metrics b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-disclaimer { margin: 24px 0 0; color: #779486; font-size: 10px; line-height: 1.7; }

.method-section { width: min(1240px, calc(100% - 64px)); margin: auto; padding: 100px 0; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method-grid article { padding: 32px 24px 35px; }
.method-grid article + article { border-left: 1px solid var(--line); }
.method-grid article > span { color: var(--orange); font-family: Georgia, serif; font-size: 12px; }
.method-grid h3 { margin: 25px 0 13px; font-size: 16px; }
.method-grid p { min-height: 85px; margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.method-grid code { display: block; color: #53685c; font-family: inherit; font-size: 11px; line-height: 1.7; }
.model-boundary { margin-top: 30px; padding: 24px 28px; display: grid; grid-template-columns: 120px 1fr; gap: 25px; background: #eaece0; border-radius: 5px; }
.model-boundary strong { font-size: 13px; }
.model-boundary p { margin: 0; color: #637168; font-size: 12px; line-height: 1.8; }
.privacy-section { padding: 70px max(32px, calc((100vw - 1160px)/2)); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 100px; color: #ecf1e6; background: var(--forest-deep); }
.privacy-section .eyebrow { color: #92aa9c; }
.privacy-section > p { color: #a7baad; font-size: 13px; line-height: 2; }
footer { min-height: 110px; width: min(1240px, calc(100% - 64px)); margin: auto; display: flex; align-items: center; gap: 25px; font-size: 12px; }
footer > span { font-weight: 700; }
footer p { color: #7d877f; }
footer a { margin-left: auto; color: #65766c; }

@media (max-width: 1000px) {
  .hero { gap: 45px; }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-panel { position: relative; top: 0; min-height: 0; }
  .result-empty { min-height: 420px; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .method-grid article:nth-child(4) { border-top: 1px solid var(--line); }
  .method-grid p { min-height: 60px; }
}

@media (max-width: 700px) {
  .site-header { width: calc(100% - 36px); height: 72px; }
  .brand { font-size: 13px; }
  .site-header nav { gap: 16px; }
  .site-header nav a:not(:first-child) { display: none; }
  .hero { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 50px; padding: 60px 0; }
  .hero h1 { font-size: clamp(46px, 13vw, 66px); }
  .hero-description { font-size: 14px; }
  .hero-note { min-height: 320px; padding: 30px; border-radius: 3px 55px 3px 3px; }
  .hero-note > p { margin-top: 40px; font-size: 24px; }
  .calculator-section { padding: 60px 18px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  fieldset { padding: 23px 18px; }
  .field-grid, .plan-row { grid-template-columns: 1fr; gap: 20px; }
  .plan-row { padding: 20px 0; }
  .conditional { padding-top: 4px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .secondary-actions { justify-content: center; gap: 28px; }
  .result-panel { padding: 26px 22px; }
  .primary-result strong { font-size: 38px; }
  .method-section { width: calc(100% - 36px); padding: 70px 0; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .method-grid p { min-height: 0; }
  .model-boundary { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
  .privacy-section { padding: 55px 24px; grid-template-columns: 1fr; gap: 25px; }
  footer { width: calc(100% - 36px); flex-wrap: wrap; gap: 10px 18px; padding: 25px 0; }
  footer p { width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}


.ledger-section { padding: 95px max(32px, calc((100vw - 1240px)/2)); background: #eef0e5; }
.ledger-data-actions { display: flex; gap: 12px; }
.ledger-data-actions button, .ledger-form-actions > button:not(.calculate-button) { padding: 10px 15px; color: #5f7066; background: transparent; border: 1px solid #cbd1c5; border-radius: 4px; font-size: 12px; }
.ledger-data-actions button:hover, .ledger-form-actions > button:not(.calculate-button):hover { color: var(--forest); border-color: var(--forest); }
.month-reminder { margin-bottom: 24px; padding: 18px 22px; display: flex; align-items: center; gap: 20px; background: #fffdf6; border: 1px solid #d9dece; border-left: 3px solid var(--orange); border-radius: 5px; }
.month-reminder > div { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
#reminder-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.month-reminder.is-complete { border-left-color: #60836c; }
.month-reminder.is-complete #reminder-dot { background: #60836c; }
.month-reminder strong { font-size: 13px; }
.month-reminder p { flex: 1; margin: 0; color: #748077; font-size: 12px; line-height: 1.6; }
.month-reminder a { color: var(--forest); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ledger-dashboard { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.45fr); gap: 22px; margin-bottom: 32px; }
.ledger-summary { padding: 31px; color: #eff5e9; background: var(--forest); border-radius: 8px; }
.ledger-summary h3 { margin: 24px 0; color: #b6c8bb; font-size: 13px; font-weight: 500; }
.snapshot-primary { display: flex; flex-direction: column; gap: 10px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,.15); }
.snapshot-primary > span { color: #a8bcb0; font-size: 11px; }
.snapshot-primary strong { color: var(--lime); font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; line-height: 1.2; }
.snapshot-primary small { color: #a1b7a9; font-size: 11px; }
.snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; padding: 26px 0; }
.snapshot-grid > div { display: flex; flex-direction: column; gap: 7px; }
.snapshot-grid span { color: #91aa9b; font-size: 10px; }
.snapshot-grid b { font-size: 14px; font-weight: 600; }
.track-message { margin: 0; padding: 13px 15px; color: #c0d0c4; background: rgba(255,255,255,.06); border-radius: 4px; font-size: 11px; line-height: 1.7; }
.chart-card { min-width: 0; padding: 26px 28px 18px; background: var(--white); border: 1px solid #dfe3d6; border-radius: 8px; position: relative; }
.chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.chart-heading > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.chart-heading span { color: #829087; font-size: 10px; }
.chart-heading strong { font-size: 15px; }
.chart-legend { display: flex; gap: 16px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ""; width: 18px; height: 2px; background: var(--forest); }
.chart-legend .ideal::before { height: 0; background: none; border-top: 2px dashed #a5ad9e; }
#ledger-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.chart-empty { position: absolute; inset: 85px 30px 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: var(--white); }
.chart-empty strong { font-family: "Songti SC", serif; font-size: 22px; font-weight: 500; }
.chart-empty span { max-width: 310px; color: #829087; font-size: 11px; line-height: 1.7; }
.chart-note { margin: 0; color: #8a948b; font-size: 10px; line-height: 1.6; }
.ledger-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .72fr); gap: 24px; align-items: start; }
.ledger-form { padding: 30px; background: var(--white); border: 1px solid #dfe3d6; border-radius: 8px; }
.ledger-form-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.ledger-form-heading .eyebrow { margin-bottom: 8px; }
.ledger-form-heading h3, .history-heading h3 { margin: 0; font-family: "Songti SC", serif; font-size: 26px; font-weight: 500; }
.ledger-form-heading > label { display: flex; flex-direction: column; gap: 7px; color: #7b877e; font-size: 10px; }
.ledger-form-heading input { height: 40px; padding: 0 10px; color: var(--ink); background: #f5f6ef; border: 1px solid #d7ddd0; border-radius: 4px; font-size: 13px; }
.ledger-form fieldset { margin-bottom: 20px; padding: 23px 0 4px; border: 0; border-top: 1px solid #e3e6dc; border-radius: 0; background: transparent; }
.ledger-form legend { padding-right: 12px; font-size: 13px; }
.ledger-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
.ledger-field-grid .field > span:first-child { font-size: 12px; }
.ledger-field-grid .input-shell input { font-size: 14px; }
.ledger-assumptions { margin: 25px 0; padding: 0 16px; background: #f2f4eb; border-radius: 5px; }
.ledger-assumptions summary { padding: 16px 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.ledger-assumptions summary span { margin-left: 10px; color: #879188; font-size: 10px; font-weight: 400; }
.ledger-assumptions .ledger-field-grid { padding: 8px 0 20px; }
.ledger-form-actions { display: flex; align-items: center; gap: 12px; }
.ledger-form-actions .calculate-button { min-height: 52px; }
.ledger-form-actions .delete-button { color: var(--error) !important; border-color: #e4c5bd !important; }
.ledger-history { padding: 28px 24px; background: #f9faf4; border: 1px solid #dfe3d6; border-radius: 8px; }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid #dfe3d6; }
.history-heading .eyebrow { margin-bottom: 8px; }
.history-heading > span { color: #849087; font-size: 11px; }
.history-empty { padding: 60px 12px; text-align: center; }
.history-empty span { font-family: "Songti SC", serif; font-size: 20px; }
.history-empty p { margin: 12px auto 0; color: #849087; font-size: 11px; line-height: 1.8; }
.record-item { padding: 19px 0; border-bottom: 1px solid #e0e4d8; }
.record-item:last-child { border-bottom: 0; }
.record-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.record-top strong { font-size: 13px; }
.record-top button { padding: 3px 0; color: #718078; background: none; border: 0; border-bottom: 1px solid #bfc8bd; font-size: 10px; }
.record-remaining { margin: 12px 0; color: var(--forest); font-family: Georgia, serif; font-size: 21px; }
.record-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: #7c8880; font-size: 10px; }
.record-values b { display: block; margin-top: 3px; color: #455c50; font-size: 11px; font-weight: 600; }
.record-status { display: inline-block; margin-top: 12px; color: #7b887f; font-size: 9px; }

@media (max-width: 1100px) {
  .ledger-dashboard, .ledger-workspace { grid-template-columns: 1fr; }
  .ledger-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; }
  .ledger-summary > .result-label, .ledger-summary > h3 { grid-column: 1 / -1; margin: 0; }
  .snapshot-primary { border-bottom: 0; }
  .track-message { grid-column: 1 / -1; }
  .ledger-history { max-height: none; }
}

@media (max-width: 700px) {
  .ledger-section { padding: 65px 18px; }
  .ledger-data-actions { margin-top: 20px; }
  .month-reminder { align-items: flex-start; flex-wrap: wrap; gap: 8px 15px; }
  .month-reminder p { flex-basis: 100%; order: 3; }
  .month-reminder a { margin-left: auto; }
  .ledger-dashboard { gap: 16px; }
  .ledger-summary { display: block; padding: 26px 23px; }
  .ledger-summary h3 { margin: 20px 0; }
  .snapshot-primary { border-bottom: 1px solid rgba(255,255,255,.15); }
  .snapshot-primary strong { font-size: 34px; }
  .track-message { margin-top: 4px; }
  .chart-card { padding: 22px 15px 16px; }
  .chart-heading strong { font-size: 13px; }
  .chart-empty { inset: 75px 20px 50px; }
  .chart-empty strong { font-size: 18px; }
  .ledger-form { padding: 24px 18px; }
  .ledger-form-heading { align-items: flex-start; flex-direction: column; }
  .ledger-form-heading > label, .ledger-form-heading input { width: 100%; }
  .ledger-field-grid { grid-template-columns: 1fr; }
  .ledger-assumptions .ledger-field-grid { grid-template-columns: 1fr; }
  .ledger-form-actions { flex-wrap: wrap; }
  .ledger-form-actions .calculate-button { flex-basis: 100%; }
  .ledger-history { padding: 24px 20px; }
}

.form-error.success { color: #315f46; background: #edf5e8; border-left-color: #60836c; }


.ledger-cta { width: 100%; margin-top: 22px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; color: var(--forest-deep); background: var(--lime); border: 0; border-radius: 4px; font-size: 12px; font-weight: 700; text-align: left; }
.ledger-cta:hover { background: #e7f1bd; }
.ledger-cta span { font-size: 20px; }
.opening-snapshot { margin-bottom: 25px; padding: 18px; background: #edf1e6; border-radius: 5px; }
.opening-snapshot > span { color: #6d7d72; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.opening-snapshot > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 14px; }
.opening-snapshot p { margin: 0; color: #79867d; font-size: 10px; }
.opening-snapshot strong { display: block; margin-top: 6px; color: var(--ink); font-size: 13px; }
.assumption-values { margin: 20px 0; color: #7c887f; font-size: 10px; }
.assumption-values > span { font-weight: 700; }
.assumption-values p { margin: 7px 0 0; line-height: 1.7; }
.assumption-values b { color: #465d50; font-weight: 600; }
.month-preview { margin: 22px 0; padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; color: #edf4e7; background: var(--forest); border-radius: 6px; }
.month-preview > div { display: flex; flex-direction: column; gap: 7px; }
.month-preview span { color: #a3b8aa; font-size: 10px; }
.month-preview strong { color: var(--lime); font-size: 18px; }
.month-preview p { grid-column: 1 / -1; margin: 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); color: #b6c7ba; font-size: 10px; line-height: 1.7; }
.preview-button { border-color: #809687 !important; color: var(--forest) !important; font-weight: 700 !important; }
.reminder-settings { margin-top: 25px; padding-top: 22px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #e2e6dc; }
.reminder-settings > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.reminder-settings strong { font-size: 12px; }
.reminder-settings > div span { color: #879188; font-size: 9px; }
.reminder-settings label { display: flex; align-items: center; gap: 6px; color: #718078; font-size: 11px; }
.reminder-settings input { width: 60px; height: 36px; padding: 0 7px; background: #f7f8f2; border: 1px solid #d7ddd0; border-radius: 4px; }
.reminder-settings input[type="time"] { width: 94px; }
.reminder-settings button { padding: 9px 12px; color: #fff; background: var(--forest); border: 0; border-radius: 4px; font-size: 11px; }

@media (max-width: 700px) {
  .opening-snapshot > div { grid-template-columns: 1fr 1fr; gap: 16px; }
  .reminder-settings { flex-wrap: wrap; }
  .reminder-settings > div { flex-basis: 100%; }
}


.chart-point-group { cursor: pointer; outline: none; }
.chart-point-group:hover circle, .chart-point-group:focus circle { fill: #dbe9a7; }
.chart-point-label { pointer-events: none; }
.chart-point-detail { margin: 0 0 15px; padding: 14px 16px; background: #eef2e7; border: 1px solid #dbe2d2; border-radius: 5px; }
.point-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.point-detail-heading > div { display: flex; flex-direction: column; gap: 5px; }
.point-detail-heading span { color: #758279; font-size: 10px; }
.point-detail-heading strong { color: var(--forest); font-size: 15px; }
.point-detail-heading button { padding: 8px 10px; color: var(--forest); background: #fff; border: 1px solid #bdcaB7; border-radius: 4px; font-size: 10px; }
.point-detail-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 13px; color: #7b877e; font-size: 10px; }
.point-detail-values b { display: block; margin-top: 4px; color: #3d5548; font-size: 12px; }
@media (max-width: 700px) {
  .point-detail-values { grid-template-columns: 1fr; }
}

.home-calculator .calculator-section {padding-top: 24px;}
.home-calculator .home-title {width:min(1240px,calc(100% - 64px));margin:0 auto;padding:38px 0 28px;font:500 clamp(30px,4vw,48px)/1.2 "Songti SC","STSong","SimSun",serif;letter-spacing:-.035em;}
.home-calculator .home-privacy {font-size:12px;color:var(--muted);margin:24px 0 0;}
.home-calculator .result-panel #home-steps summary {font-size:12px;color:#d1dfd3;}
.home-calculator .share-trigger {width:100%;margin-top:18px;padding:12px 16px;color:var(--forest);background:var(--lime);border:0;border-radius:5px;font-weight:700;}
.share-dialog {width:min(560px,calc(100% - 28px));max-height:calc(100% - 28px);border:1px solid var(--line);border-radius:12px;padding:20px;color:var(--ink);background:var(--white);box-shadow:var(--shadow);}
.share-dialog::backdrop {background:#102e2780;}
.share-heading {display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.share-heading h2 {margin:0;font-size:20px;}
.share-heading button {border:0;background:none;font-size:24px;color:var(--forest);}
.share-dialog canvas {width:100%;height:auto;display:block;border-radius:6px;}
.share-dialog p {color:var(--muted);font-size:13px;}
.share-actions {display:flex;gap:10px;justify-content:flex-end;}
.share-actions button {border:0;background:var(--forest);color:white;border-radius:5px;padding:11px 16px;font-weight:700;}
@media(max-width:540px){.home-calculator .home-title{width:calc(100% - 32px);padding:25px 0 20px;}.home-calculator .calculator-section{padding-top:15px;}}

/* Keep paired field labels at the top and inputs on the same baseline. */
.home-calculator .field-grid > .field > .input-shell {
  margin-top: auto;
  flex-shrink: 0;
}.income-calculate{align-self:stretch;flex:0 0 auto;padding:0 12px;margin:5px 5px 5px 0;border:0;border-radius:4px;background:var(--forest);color:var(--white);font-size:12px;cursor:pointer}.income-calculate:focus-visible{outline:2px solid var(--forest);outline-offset:2px}

.home-calculator .home-heading {width:min(1240px,calc(100% - 64px));margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.home-calculator .home-heading .home-title {width:auto;margin:0;}
.home-login {flex-shrink:0;display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border:1px solid var(--forest);border-radius:5px;color:var(--forest);font-size:13px;font-weight:650;}
.home-login:hover {background:var(--forest);color:var(--white);}
.home-login:focus-visible {outline:2px solid var(--forest);outline-offset:3px;}
@media(max-width:700px){.home-calculator .home-heading{width:calc(100% - 32px);flex-wrap:wrap;gap:0;padding-bottom:16px;}.home-calculator .home-heading .home-title{width:100%;}.home-login{padding:8px 12px;}}