:root {
  --navy: #082f49;
  --navy-deep: #05263a;
  --teal: #0f766e;
  --teal-light: #dff2ed;
  --gold: #d1a14b;
  --ink: #142633;
  --muted: #687b87;
  --line: #dce5e9;
  --paper: #ffffff;
  --canvas: #f2f6f7;
  --danger: #ca5142;
  --success: #17805e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-width: 320px; color: var(--ink); background: var(--canvas); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button,input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar { height: 68px; padding: 0 max(24px, calc((100% - 1240px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--navy); font-family: "Songti SC", serif; font-weight: 700; box-shadow: inset 0 -3px 0 var(--gold); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.22; }
.brand strong { font-size: 15px; }
.brand small { color: #8797a0; font-size: 8px; letter-spacing: .16em; }
.topbar-meta { color: #60737e; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #21a578; box-shadow: 0 0 0 4px rgba(33,165,120,.12); }

.intro { min-height: 390px; padding: 72px max(24px, calc((100% - 1240px) / 2)); display: grid; grid-template-columns: 1.35fr .65fr; gap: 100px; align-items: center; color: white; position: relative; overflow: hidden; background: radial-gradient(circle at 77% 18%, rgba(22,128,114,.38), transparent 29%), linear-gradient(125deg, var(--navy-deep), #0a3f5c 62%, #0a5360); }
.intro::after { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg, transparent 20%, #000); pointer-events: none; }
.intro > * { position: relative; z-index: 1; }
.eyebrow { color: #95cec5; font-size: 10px; letter-spacing: .18em; margin-bottom: 17px; }
.intro h1 { max-width: 760px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(38px, 5vw, 60px); line-height: 1.16; letter-spacing: -.035em; }
.intro-copy { max-width: 680px; color: #c7dce3; font-size: 15px; line-height: 1.8; margin-top: 21px; }
.intro-aside { height: 210px; display: flex; align-items: flex-end; gap: 12px; padding: 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.07); box-shadow: 0 30px 60px rgba(0,0,0,.18); }
.intro-aside div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; }
.intro-aside span { color: #b8d1d7; font-size: 9px; }
.intro-aside i { width: 100%; max-width: 36px; border-radius: 4px 4px 0 0; background: linear-gradient(#3ab499, #147c76); box-shadow: 0 0 20px rgba(58,180,153,.16); }
.intro-aside div:nth-child(2) i { background: linear-gradient(#dfba6b,#bd8332); }

main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 72px; }
.workspace { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 24px; align-items: start; }
.composer,.report-stage { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 9px 35px rgba(26,57,72,.06); }
.composer { position: sticky; top: 90px; padding: 23px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading small,.report-empty > small { color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.section-heading h2 { margin-top: 4px; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 23px; }
.ghost-button { padding: 7px; color: var(--teal); background: transparent; border: 0; font-size: 11px; }
.composer-help { color: var(--muted); font-size: 11px; margin: 10px 0 17px; }
.fund-rows { display: flex; flex-direction: column; gap: 8px; }
.fund-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; gap: 7px; align-items: center; }
.fund-row label { position: relative; }
.fund-row label span { position: absolute; top: 7px; left: 10px; color: #87969f; font-size: 9px; }
.fund-row input { width: 100%; height: 48px; padding: 17px 10px 4px; border: 1px solid #ccd8de; border-radius: 7px; color: #19313f; outline: none; background: #fbfcfd; }
.fund-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.08); }
.remove-row { width: 28px; height: 36px; border: 0; color: #9ba8af; background: transparent; font-size: 20px; }
.remove-row:hover { color: var(--danger); }
.add-button { width: 100%; margin-top: 10px; padding: 10px; border: 1px dashed #b9cbd2; border-radius: 7px; color: var(--teal); background: #f7fbfa; font-size: 11px; }
.add-button span { font-size: 15px; vertical-align: -1px; margin-right: 5px; }
.weight-summary { display: flex; justify-content: space-between; margin-top: 19px; color: #657984; font-size: 11px; }
.weight-summary strong { color: var(--teal); }
.weight-track { height: 5px; margin-top: 8px; border-radius: 8px; background: #e5ecef; overflow: hidden; }
.weight-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width .2s; }
.form-error { min-height: 18px; color: var(--danger); font-size: 10px; margin-top: 6px; }
.primary-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 7px; padding: 12px 14px; color: white; background: linear-gradient(105deg, var(--navy), #0a5066); font-size: 13px; font-weight: 700; box-shadow: 0 9px 19px rgba(8,47,73,.17); }
.primary-button b { margin-left: auto; font-size: 18px; }.primary-button[disabled] { opacity: .62; cursor: wait; }
.source-note { margin-top: 9px; color: #94a1a8; font-size: 8px; text-align: center; }

.report-stage { min-height: 690px; overflow: hidden; }
.report-empty { min-height: 690px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 55px; }
.empty-mark { width: 106px; height: 106px; display: flex; align-items: flex-end; justify-content: center; gap: 7px; padding: 25px; margin-bottom: 26px; border-radius: 50%; background: #e9f5f2; box-shadow: 0 0 0 13px #f6faf9; }
.empty-mark span { width: 12px; border-radius: 3px 3px 0 0; background: #9dccbf; }.empty-mark span:nth-child(1){height:30px}.empty-mark span:nth-child(2){height:49px;background:#4a9e8c}.empty-mark span:nth-child(3){height:66px;background:#0f766e}
.report-empty h2 { margin: 9px 0; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 25px; }
.report-empty > p { max-width: 430px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.report-promises { display: flex; gap: 9px; margin-top: 22px; }.report-promises span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #758791; font-size: 9px; }

.report-content { background: #f7f9fa; }
.report-header { min-height: 142px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 28px; color: white; background: linear-gradient(110deg, #073452, #0a5068); border-bottom: 4px solid var(--gold); }
.report-header small { color: #92c9c0; font-size: 8px; letter-spacing: .17em; }
.report-header h2 { margin: 5px 0; font-family: "Noto Serif SC","Songti SC",serif; font-size: 29px; }
.report-header p { color: #bfd2da; font-size: 9px; }
.health-score { width: 75px; height: 75px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid #45ad96; border-radius: 50%; background: rgba(255,255,255,.07); }
.health-score strong { font-size: 26px; line-height: 1; }.health-score span { color: #c2d9d8; font-size: 8px; margin-top: 4px; }
.report-body { padding: 20px; }
.fetch-warning { padding: 10px 12px; margin-bottom: 11px; color: #8a5a16; background: #fff4d8; border-radius: 6px; font-size: 9px; }
.summary-grid,.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.summary-grid > div,.metric-grid > div { min-width: 0; padding: 14px 12px; display: flex; flex-direction: column; background: white; border: 1px solid #dfe7eb; border-radius: 7px; }
.summary-grid span,.metric-grid span { color: #71828c; font-size: 9px; }
.summary-grid strong { color: #123a57; font-size: clamp(17px,2.1vw,24px); white-space: nowrap; line-height: 1.5; }
.summary-grid em { font-size: 9px; font-style: normal; margin: 0 2px; }
.summary-grid small,.metric-grid small { color: #9aa7ae; font-size: 7px; }
.rise { color: #c84f3d !important; }.fall { color: #17805e !important; }
.core-advice { display: grid; grid-template-columns: 72px 1fr; gap: 9px; padding: 14px; margin: 13px 0; background: #f4eddf; border-left: 4px solid var(--gold); border-radius: 5px; }
.core-advice b { color: #97671f; font-size: 10px; }.core-advice p { color: #4f5a5d; font-size: 10px; line-height: 1.65; }
.decision-block { margin-top: 11px; overflow: hidden; border-radius: 7px; }
.decision-heading { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.decision-heading > div { display: flex; align-items: center; gap: 7px; }
.decision-heading span,.decision-status { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 10px; font-weight: 800; }
.decision-heading strong { font-family: "Noto Serif SC","Songti SC",serif; font-size: 17px; }
.decision-heading small { font-size: 8px; opacity: .7; }.decision-heading > b { font-size: 14px; }
.remove-block { background: #fff1ed; }.remove-block .decision-heading { color: #aa4033; background: #fce3dd; }
.remove-block .decision-heading span,.remove-block .decision-status { background: var(--danger); }
.keep-block { background: #eaf6ee; }.keep-block .decision-heading { color: #146c50; background: #d9efdf; }
.keep-block .decision-heading span,.keep-block .decision-status { background: var(--success); }
.no-decision { padding: 18px; color: #60747f; font-size: 10px; }
.decision-row { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 10px; padding: 15px 12px; border-top: 1px solid rgba(116,137,146,.17); }
.decision-status { margin-top: 2px; }.decision-fund-head { display: flex; justify-content: space-between; gap: 12px; }
.decision-fund-head h3 { font-size: 13px; line-height: 1.35; }.decision-fund-head p { color: #70828c; font-size: 8px; margin-top: 2px; }
.decision-fund-head > span { align-self: flex-start; min-width: 44px; padding: 4px 7px; text-align: center; color: currentColor; background: rgba(255,255,255,.58); border-radius: 5px; font-size: 8px; font-weight: 800; }
.score-row { display: grid; grid-template-columns: 43px minmax(90px,1fr) 32px; gap: 7px; align-items: center; margin: 9px 0 7px; }
.score-row small { color: #627782; font-size: 8px; }.score-row > div { height: 6px; border-radius: 8px; background: rgba(113,132,141,.2); overflow: hidden; }
.score-row i { display: block; height: 100%; border-radius: inherit; background: currentColor; }.score-row b { font-size: 9px; }
.remove-block .score-row { color: var(--danger); }.keep-block .score-row { color: var(--success); }
.fund-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; color: #6f818b; font-size: 8px; }.fund-facts b { color: #2c4654; }
.decision-reason { color: #576a75; font-size: 8px; line-height: 1.6; margin-top: 7px; }
.metric-report { margin-top: 16px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.metric-report-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.metric-report-heading small { color: var(--teal); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.metric-report-heading h2 { margin-top: 3px; font-family: "Noto Serif SC","Songti SC",serif; font-size: 20px; }
.report-actions { display: flex; gap: 6px; }.report-actions button { padding: 7px 9px; border: 1px solid #bcd0cc; border-radius: 5px; color: var(--teal); background: #f1f8f6; font-size: 8px; }
.metric-grid strong { color: #123a57; font-size: 19px; line-height: 1.55; }
.allocation-panel { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2e9ec; }.allocation-panel h3 { font-size: 11px; margin-bottom: 10px; }
.allocation-row { display: grid; grid-template-columns: 65px minmax(90px,1fr) 42px; gap: 9px; align-items: center; margin: 8px 0; }
.allocation-row > span { color: #5d707b; font-size: 9px; }.allocation-row > div { height: 7px; background: #edf1f3; border-radius: 7px; overflow: hidden; }
.allocation-row i { display: block; height: 100%; border-radius: inherit; }.allocation-row b { text-align: right; font-size: 9px; }
.methodology { padding: 12px 14px; margin-top: 12px; background: #edf3f5; border-radius: 6px; }
.methodology strong { color: #385563; font-size: 9px; }.methodology p { color: #6a7e88; font-size: 8px; line-height: 1.65; margin-top: 3px; }
.disclaimer { color: #89969d; font-size: 7px; line-height: 1.5; text-align: center; padding: 14px 5px 0; }

footer { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 36px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #819099; font-size: 10px; }
footer span { color: #425a68; font-weight: 700; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; min-height: auto; padding-top: 56px; padding-bottom: 60px; }
  .intro-aside { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .composer { position: static; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }.topbar-meta { display: none; }
  .intro { padding: 48px 18px 52px; }.intro h1 { font-size: 37px; }
  main,footer { width: calc(100% - 24px); }
  .composer { padding: 17px; }
  .report-empty { min-height: 540px; padding: 32px 16px; }
  .report-promises { flex-direction: column; }
  .report-header { padding: 20px 15px; }.report-header h2 { font-size: 23px; }.health-score { width: 63px; height: 63px; }
  .report-body { padding: 11px; }.summary-grid,.metric-grid { grid-template-columns: repeat(2,1fr); }.core-advice { grid-template-columns: 1fr; }
  .decision-heading small { display: none; }.metric-report { padding: 12px; }.metric-report-heading { flex-direction: column; }
  footer { flex-direction: column; }
}

@media print {
  .topbar,.intro,.composer,footer,.report-actions { display: none !important; }
  main { width: 100%; padding: 0; }.workspace { display: block; }.report-stage { border: 0; box-shadow: none; }
}
