:root{
  --ink:#142336;
  --muted:#8c8470;     /* warm grey, primary captions */
  --muted-2:#9a8f78;   /* warm grey, secondary/labels */
  --gain:#1f7a4d;      /* muted forest */
  --loss:#a4453b;      /* muted clay */
  --gold:#b08d4f;      /* BRAND ONLY: wordmark / rule / footer / login link */
  --cream:#f4f1ea; --panel:#fbfaf6;
  --line:#cfc6b2;      /* dashed structural line */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s6:24px; --s8:32px;
}
/* ───────────────────────── Self-hosted fonts (woff2 subsets) ───────────────────────── */
@font-face{font-family:"Cinzel";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/web/Cinzel-Medium.woff2") format("woff2");}
@font-face{font-family:"Cinzel";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/web/Cinzel-SemiBold.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/web/Manrope-Regular.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/web/Manrope-Medium.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/web/Manrope-SemiBold.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/web/Manrope-Bold.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:800;font-display:swap;src:url("fonts/web/Manrope-ExtraBold.woff2") format("woff2");}

/* ───────────────────────── Reset / base ───────────────────────── */
*,*::before,*::after{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:"Manrope","PingFang SC","Hiragino Sans GB",system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#16191d;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  background:#f4f1ea;
}
button{font-family:inherit;cursor:pointer;}
input{font-family:inherit;}
.cinzel{font-family:"Cinzel",Georgia,"Times New Roman",serif;}
.hidden{display:none !important;}

/* ───────────────────────── LOGIN ───────────────────────── */
#loginScreen{min-height:100dvh;display:flex;flex-direction:column;background:#f4f1ea;}
.login-main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:52px 20px;}
.login-brand{text-align:center;margin-bottom:34px;}
.login-wordmark{font-family:"Cinzel",serif;font-weight:500;font-size:27px;letter-spacing:.22em;color:#142336;padding-left:.22em;}
.login-rule{width:54px;height:1.5px;background:#b08d4f;margin:13px auto 11px;}
.login-sub{font-size:9.5px;font-weight:700;color:#a99873;letter-spacing:.4em;padding-left:.4em;}
.login-card{width:392px;max-width:100%;background:#fff;border-radius:6px;overflow:hidden;box-shadow:0 16px 50px rgba(20,35,54,.14);border:1px solid #ece7db;}
.login-card-stripe{height:3px;background:linear-gradient(90deg,#b08d4f,#cdaf6d);}
.login-card-body{padding:36px 40px 32px;}
.login-title{font-size:21px;font-weight:700;color:#142336;margin-bottom:3px;letter-spacing:-.01em;}
.login-desc{font-size:13px;color:#94917f;margin-bottom:26px;font-weight:500;}
.login-label{font-size:10.5px;font-weight:700;color:#8a8675;letter-spacing:.1em;display:block;}
.login-field{display:flex;align-items:center;border:1.5px solid #b08d4f;border-radius:6px;margin-top:7px;padding:0 13px;background:#fff;box-shadow:0 0 0 3px rgba(176,141,79,.12);transition:box-shadow .15s;}
.login-field.is-error{border-color:var(--loss);box-shadow:0 0 0 3px rgba(164,69,59,.12);}
.login-field input{flex:1;border:none;outline:none;padding:13px 11px;font-size:15px;letter-spacing:.08em;color:#142336;background:transparent;}
.login-field input::placeholder{letter-spacing:0;color:#c4bfae;}
.login-eye{background:none;border:none;padding:0;display:flex;align-items:center;}
.login-error{display:none;margin-top:11px;font-size:12.5px;color:var(--loss);font-weight:600;}
.login-error.show{display:block;}
.login-help{text-align:right;margin-top:10px;}
.login-help a{text-decoration:none;color:#b08d4f;}
.login-help span{font-size:12.5px;color:#b08d4f;font-weight:600;}
.login-btn{width:100%;margin-top:20px;padding:14px;border-radius:6px;border:none;background:#142336;color:#fff;font-size:13px;font-weight:700;letter-spacing:.1em;transition:opacity .15s,background .15s;}
.login-btn:hover{background:#1c3047;}
.login-btn:disabled{opacity:.55;cursor:default;}
.login-note{width:392px;max-width:100%;margin-top:15px;background:#fbfaf6;border:1px solid #ece7db;border-radius:6px;padding:13px 18px;display:flex;align-items:center;gap:10px;}
.login-note span{font-size:12px;color:#7c7868;font-weight:500;}
.login-footer{background:#142336;padding:15px 28px;display:flex;justify-content:space-between;align-items:center;gap:12px;}
.login-footer .lf-mark{font-family:"Cinzel",serif;font-size:11px;color:#cdaf6d;letter-spacing:.18em;}
.login-footer .lf-when{font-size:10.5px;color:#8f97a6;font-weight:500;}

/* ───────────────────────── Shared portal shell ───────────────────────── */
.portal-wrap{min-height:100dvh;}

/* ───────────────────────── CLIENT view ───────────────────────── */
.client-shell{display:flex;justify-content:center;background:#f4f1ea;padding:28px 16px 48px;}
.client-card{width:720px;max-width:100%;background:#fff;border:1px solid #f0ede4;border-radius:6px;overflow:hidden;color:#16191d;}
.client-body{padding:30px 36px 34px;}
.pv-railhead{display:flex;justify-content:flex-end;align-items:center;padding:15px 18px;border-bottom:1px solid #f0ede4;}
.pv-railhead .ct-user{font-size:13px;color:#5b616b;font-weight:500;background:none;border:none;padding:8px 6px;margin:-8px -6px;}
.pv-railhead .ct-user:hover{color:var(--ink);}
.pv-railsum{display:none;}
.client-greet{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:var(--s2);}
.client-greet .cg-hi{font-size:15px;font-weight:600;}
.client-greet .cg-date{font-size:12px;color:var(--muted-2);}
.hero{margin-top:var(--s6);}
.hero-label{font-size:11px;color:var(--muted-2);font-weight:700;letter-spacing:.13em;}
.hero-value{font-size:44px;font-weight:800;letter-spacing:-.025em;line-height:1.05;margin-top:2px;font-variant-numeric:tabular-nums;}
.hero-line{font-size:14px;font-weight:600;margin-top:6px;font-variant-numeric:tabular-nums;}
.hero-line .up{color:var(--gain);}
.hero-line .up .gl{color:var(--muted-2);font-weight:600;}
.hero-line .net{color:var(--muted);font-weight:500;margin-left:6px;}
.hero-line .net small{color:var(--muted-2);font-weight:500;}
.section{margin-top:var(--s8);}
.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.section-title{font-size:13px;font-weight:700;}
.chart-legend{font-size:11.5px;color:var(--muted-2);}
.chart-legend .me{color:var(--gain);font-weight:700;}
.chart-legend .bm{color:#b9bcc4;font-weight:700;}
.chart svg{width:100%;height:auto;display:block;}
.chart-range{display:flex;gap:6px;margin-top:6px;}
.chart-range .on{font-size:11px;font-weight:700;border-bottom:2px solid #142336;padding:3px 2px;}
.chart-range .off{font-size:11px;color:var(--muted-2);padding:3px 8px;}
.bars{font-size:12.5px;}
.bar-row{display:flex;align-items:center;gap:12px;margin-bottom:8px;}
.bar-row:last-child{margin-bottom:0;}
.bar-row .bl{flex:0 0 72px;white-space:nowrap;}
.bar-row .bl.lead{font-weight:700;}
.bar-row .bl.bench{color:#6b7178;font-weight:600;}
.bar-track{flex:1;height:9px;background:#f1f2f4;border-radius:5px;overflow:hidden;}
.bar-fill{height:9px;border-radius:5px;}
.bar-fill.lead{background:var(--gain);}
.bar-fill.bench{background:#c4c8cf;}
.bar-row .bv{width:54px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums;}
.bar-row .bv.lead{font-weight:800;color:var(--gain);}
.bar-row .bv.bench{color:#6b7178;}
.bars-caption{font-size:12px;color:var(--gain);font-weight:600;margin-top:10px;}
.invest-block{margin-top:var(--s8);background:var(--panel);border:1px dashed var(--line);border-radius:0;padding:17px 20px;display:flex;justify-content:space-between;align-items:center;gap:16px;}
.invest-block .ib-title{font-size:14px;font-weight:700;}
.invest-block .ib-sub{font-size:12.5px;color:#6b7178;margin-top:3px;}
.invest-block .ib-sub b{color:#16191d;}
.invest-btn{flex-shrink:0;background:#142336;color:#fff;border:none;border-radius:7px;padding:11px 22px;font-size:13.5px;font-weight:700;text-decoration:none;display:inline-block;}
.invest-btn:hover{background:#1c3047;}
.divider{height:1px;background:#efece4;margin:var(--s8) 0 var(--s6);}
.divider.thin{background:#f1efe8;margin:var(--s6) 0;}
.alloc-row{display:flex;gap:28px;align-items:center;flex-wrap:wrap;}
.alloc-pie-wrap{flex-shrink:0;}
.alloc-pie-title{font-size:13px;font-weight:700;margin-bottom:12px;}
.donut{width:140px;height:140px;border-radius:50%;position:relative;}
.donut-hole{position:absolute;inset:28px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.donut-hole .dh-k{font-size:8.5px;color:var(--muted-2);}
.donut-hole .dh-v{font-size:15px;font-weight:800;color:#142336;font-variant-numeric:tabular-nums;}
.donut-hole2 .dh-k{font-size:9px;color:var(--muted-2);line-height:1.3;max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.donut-hole2 .dh-v{font-size:13px;font-weight:800;color:#142336;line-height:1.25;font-variant-numeric:tabular-nums;}
.donut-tip{position:absolute;left:50%;top:-2px;transform:translate(-50%,-100%);background:#142336;color:#fff;font-size:11px;font-weight:600;padding:5px 9px;border-radius:5px;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .12s;z-index:5;box-shadow:0 4px 12px rgba(20,35,54,.22);}
.legend-cat{flex:1;min-width:220px;font-size:12px;color:#3f444a;display:grid;grid-template-columns:1fr 1fr;gap:0 20px;}
.legend-cat .lg{display:flex;align-items:center;gap:7px;padding:3.5px 0;}
.legend-cat .sw{width:9px;height:9px;border-radius:2px;flex-shrink:0;}
.legend-cat .nm{flex:1;}
.legend-stock{flex:1;min-width:230px;font-size:11.5px;color:#3f444a;display:grid;grid-template-columns:1fr 1fr;gap:0 16px;}
.legend-stock .lg{display:flex;align-items:center;gap:6px;padding:2.5px 0;}
.legend-stock .sw{width:8px;height:8px;border-radius:2px;flex-shrink:0;}
.legend-stock .tk{color:#16191d;font-weight:700;}
.legend-stock .nm{flex:1;color:var(--muted-2);font-weight:400;}
.legend-stock .pc{font-weight:700;}
.client-footer{margin-top:24px;padding-top:15px;border-top:1px solid #eee;display:flex;gap:24px;flex-wrap:wrap;font-size:12px;color:var(--muted-2);}
.client-footer b{color:#5b616b;font-variant-numeric:tabular-nums;}

/* ───────────────────────── GP view ───────────────────────── */
.gp-shell{background:#eceadf;min-height:100dvh;}
.gp-inner{max-width:780px;margin:0 auto;background:#f4f1ea;min-height:100dvh;}
.gp-topbar{background:#142336;padding:14px 22px;display:flex;justify-content:space-between;align-items:center;}
.gp-topbar .gt-mark{font-family:"Cinzel",serif;font-size:14px;letter-spacing:.2em;color:#fff;padding-left:.2em;}
.gp-topbar .gt-user{font-size:12px;color:#aeb6c4;font-weight:500;background:none;border:none;}
.gp-topbar .gt-user:hover{color:#fff;}
.gp-railhead{background:var(--panel);padding:14px 22px;display:flex;justify-content:flex-end;align-items:center;border-bottom:1px dashed var(--line);}
.gp-railhead .gt-user{font-size:12px;color:#5b616b;font-weight:500;background:none;border:none;}
.gp-railhead .gt-user:hover{color:var(--ink);}
.gp-railsum{display:none;}
/* ── client tabbed view (概览/业绩/持仓/资金) ── */
.pv-tabs{display:flex;gap:6px;padding:0 12px;border-bottom:1px dashed #d6cdb9;background:#f6f4ee;overflow-x:auto;}
.pv-tab{font-size:15px;padding:15px 12px;margin-bottom:-1px;color:#9a8f78;font-weight:600;background:none;border:none;border-bottom:2px solid transparent;white-space:nowrap;cursor:pointer;}
.pv-tab.active{color:#142336;border-bottom-color:#142336;}
.pv-pane{display:none;}
.pv-pane.active{display:block;}
/* dashed-grid flat cards w/ faint grid texture + thin icons */
.fgrid{border:1px dashed var(--line);display:grid;grid-template-columns:1fr 1fr;background:var(--panel);margin:var(--s6) 0;}
.fcard{position:relative;overflow:hidden;padding:15px 14px;border-right:1px dashed #cfc6b2;border-bottom:1px dashed #cfc6b2;}
.fcard:nth-child(2n){border-right:none;}
.fcard:nth-last-child(-n+2){border-bottom:none;}
.fcard .tex{position:absolute;top:0;left:0;width:90px;height:80px;background-image:linear-gradient(#142336 1px,transparent 1px),linear-gradient(90deg,#142336 1px,transparent 1px);background-size:14px 14px;opacity:.05;-webkit-mask-image:radial-gradient(farthest-side at top left,#000,transparent);mask-image:radial-gradient(farthest-side at top left,#000,transparent);pointer-events:none;}
.fcard .ic{color:var(--ink);opacity:.65;}
.fcard .v{font-size:21px;font-weight:800;color:#142336;margin-top:18px;letter-spacing:-.01em;font-variant-numeric:tabular-nums;}
.fcard .k{font-size:12px;color:var(--muted-2);font-weight:700;letter-spacing:.04em;margin-top:1px;}
/* GP letter — flat, dashed, editorial */
.letter{border:1px dashed var(--line);background:var(--panel);padding:var(--s4) var(--s4);margin:var(--s6) 0;position:relative;overflow:hidden;}
.letter .tex{position:absolute;top:0;right:0;width:120px;height:90px;background-image:linear-gradient(#142336 1px,transparent 1px),linear-gradient(90deg,#142336 1px,transparent 1px);background-size:14px 14px;opacity:.04;-webkit-mask-image:radial-gradient(farthest-side at top right,#000,transparent);mask-image:radial-gradient(farthest-side at top right,#000,transparent);}
.letter .et{font-size:10px;letter-spacing:.14em;color:#a9925f;font-weight:700;text-transform:uppercase;}
.letter .lt{font-family:'Cinzel',serif;font-size:15px;color:#142336;margin:4px 0 8px;}
.letter p{font-size:12.5px;line-height:1.6;color:#4f4a3e;margin:0;white-space:pre-wrap;}
.letter .sig{font-size:12px;color:#8c8470;margin-top:9px;font-style:italic;}
/* data tables (quarterly / contribution / nav) */
.pv-table{width:100%;border-collapse:collapse;font-size:12.5px;border:1px dashed #cfc6b2;background:#fbfaf6;margin:8px 0 4px;}
.pv-table th{text-align:right;padding:9px 11px;font-size:10.5px;font-weight:700;color:var(--muted-2);border-bottom:1px dashed var(--line);white-space:nowrap;letter-spacing:.06em;text-transform:uppercase;}
.pv-table th:first-child{text-align:left;}
.pv-table td{text-align:right;padding:9px 11px;border-bottom:1px dashed #e7dfcc;color:#3f444a;white-space:nowrap;font-variant-numeric:tabular-nums;}
.pv-table td:first-child{text-align:left;font-weight:700;color:#142336;}
.pv-table tr:last-child td{border-bottom:none;}
.pv-table .pos{color:var(--gain);font-weight:700;}
.pv-table .neg{color:var(--loss);font-weight:700;}
/* nav history — collapsible by month */
.nh-wrap{border:1px dashed #cfc6b2;background:#fbfaf6;margin:8px 0 4px;}
.nh-month{border-bottom:1px dashed #e7dfcc;}
.nh-month:last-child{border-bottom:none;}
.nh-sum{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;list-style:none;user-select:none;font-size:12.5px;}
.nh-sum::-webkit-details-marker{display:none;}
.nh-sum::before{content:"▸";color:var(--muted-2);font-size:10px;display:inline-block;transition:transform .15s ease;}
.nh-month[open] > .nh-sum::before{transform:rotate(90deg);}
.nh-mo{font-weight:700;color:#142336;flex:1;}
.nh-meta{display:flex;align-items:center;gap:10px;font-variant-numeric:tabular-nums;}
.nh-nav{font-weight:700;color:#3f444a;}
.nh-delta{font-weight:700;font-size:11.5px;}
.nh-delta.pos{color:var(--gain);}
.nh-delta.neg{color:var(--loss);}
.nh-cnt{color:var(--muted-2);font-size:10.5px;white-space:nowrap;}
.nh-table{margin:0;border:none;border-top:1px dashed #e7dfcc;background:#fffdf8;}
/* attribution board */
.attr-row{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px dashed #e7dfcc;}
.attr-row:last-child{border-bottom:none;}
.attr-tk{font-weight:800;color:#142336;font-size:13px;}
.attr-nm{font-size:11px;color:#8c8470;margin-left:6px;font-weight:500;}
.attr-pp{font-weight:700;font-size:13px;font-variant-numeric:tabular-nums;}
.attr-pp.pos{color:var(--gain);}
.attr-pp.neg{color:var(--loss);}
/* recent activity list */
.act-row{display:flex;align-items:baseline;gap:10px;padding:8px 0;border-bottom:1px dashed #e7dfcc;font-size:12.5px;}
.act-row:last-child{border-bottom:none;}
.act-date{color:#9a8f78;font-weight:600;font-variant-numeric:tabular-nums;}
.act-tk{font-weight:800;color:#142336;}
.act-action{margin-left:auto;color:#4f4a3e;font-weight:600;}
/* pnl split chips */
.pnl-split{display:flex;gap:10px;margin:10px 0;}
.pnl-chip{flex:1;border:1px dashed #cfc6b2;background:#fbfaf6;padding:12px 14px;}
.pnl-chip .pc-k{font-size:11px;color:#8c8470;font-weight:600;}
.pnl-chip .pc-v{font-size:19px;font-weight:800;color:var(--gain);margin-top:3px;}
.pnl-chip .pc-v.neg{color:var(--loss);}
/* pane section heading */
.pv-h{font-size:13px;font-weight:700;color:var(--ink);margin:var(--s6) 0 var(--s2);}
.pv-h:first-child{margin-top:4px;}
.gp-tabs{background:#fff;border-bottom:1px solid #e6e0d3;padding:0 22px;display:flex;gap:26px;}
.gp-tab{padding:14px 2px;font-size:13.5px;font-weight:500;color:var(--muted-2);background:none;border:none;border-bottom:2px solid transparent;}
.gp-tab.active{font-weight:700;color:#142336;border-bottom-color:var(--ink);}
.pv-tab{transition:color .18s ease,border-color .18s ease;}
.gp-tab{transition:color .18s ease,border-color .18s ease;}
.invest-btn{transition:background .18s ease;}
.login-btn{transition:background .18s ease,opacity .15s;}
@media (hover:hover) and (min-width:960px){
  .act-row,.attr-row,.snap-row{transition:background .15s ease;border-radius:6px;}
  .act-row:hover,.attr-row:hover,.snap-row:hover{background:#faf8f2;}
}
.gp-content{padding:24px 22px 28px;}
.gp-pane{display:none;}
.gp-pane.active{display:block;}
.gp-pane-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:16px;}
.gp-pane-head .gph-title{font-size:18px;font-weight:700;color:#142336;}
.gp-pane-head .gph-when{font-size:11.5px;color:var(--muted-2);font-weight:500;}
.gp-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px;}
.gp-card{background:#fff;border:1px solid #ece7db;border-radius:10px;padding:15px 16px;}
.gp-card .gc-k{font-size:10.5px;color:var(--muted-2);font-weight:600;letter-spacing:.04em;}
.gp-card .gc-v{font-size:23px;font-weight:800;color:#142336;margin-top:5px;letter-spacing:-.01em;font-variant-numeric:tabular-nums;}
.gp-card .gc-v.pos{color:var(--gain);}
.gp-grid2{display:grid;grid-template-columns:1.1fr 1fr;gap:14px;}
.gp-box{background:#fff;border:1px solid #ece7db;border-radius:10px;padding:17px 18px;}
.gp-box-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.gp-box-head .gbh-t{font-size:12.5px;font-weight:700;color:#142336;}
.gp-box-head .gbh-link{font-size:11px;color:var(--muted-2);font-weight:600;background:none;border:none;}
.snap-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #f3f0e8;}
.snap-row:last-of-type{border-bottom:none;}
.snap-row .sr-n{font-size:13px;color:#142336;font-weight:600;}
.snap-row .sr-v{font-size:13px;color:#5b5749;font-weight:600;font-variant-numeric:tabular-nums;}
.snap-row .sr-v .ret{color:var(--gain);font-weight:700;}
.snap-row .sr-v .ret.neg{color:var(--loss);}
.snap-total{margin-top:11px;padding-top:11px;border-top:1px solid #ece7db;display:flex;justify-content:space-between;gap:12px;}
.snap-total .stl{font-size:12px;color:var(--muted-2);font-weight:600;}
.snap-total .str{font-size:12px;color:#142336;font-weight:700;}
.gp-alloc .ga-row{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:12px;color:#5b5749;}
.gp-alloc .ga-row:last-child{margin-bottom:0;}
.gp-alloc .ga-l{width:64px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gp-alloc .ga-track{flex:1;height:7px;background:#f0ece2;border-radius:4px;overflow:hidden;}
.gp-alloc .ga-fill{height:7px;border-radius:4px;}
.gp-alloc .ga-v{width:38px;text-align:right;font-weight:600;}
.gp-alloc .ga-more{margin-top:10px;font-size:11px;color:var(--muted-2);font-weight:500;text-align:center;}
.gp-table{width:100%;border-collapse:collapse;font-size:12.5px;background:#fff;border:1px solid #ece7db;border-radius:10px;overflow:hidden;}
.gp-table thead th{background:#faf8f2;text-align:right;padding:11px 12px;font-size:10.5px;font-weight:700;color:var(--muted-2);letter-spacing:.03em;border-bottom:1px solid #ece7db;white-space:nowrap;}
.gp-table thead th:first-child{text-align:left;}
.gp-table tbody td{text-align:right;padding:11px 12px;border-bottom:1px solid #f3f0e8;color:#3f444a;white-space:nowrap;}
.gp-table tbody td:first-child{text-align:left;font-weight:700;color:#142336;}
.gp-table tbody tr:last-child td{border-bottom:none;}
.gp-table tbody tr.total-row td{font-weight:800;color:#142336;background:#faf8f2;border-top:1px solid #ece7db;}
.gp-table .pos{color:var(--gain);font-weight:700;}
.gp-table .neg{color:var(--loss);font-weight:700;}
.gp-table .muted, .pv-table .muted{color:var(--muted-2);font-weight:400;}
.gp-stocktable td.swcell{text-align:left;}
.gp-stocktable .sw{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:8px;vertical-align:middle;}
.gp-card-title{font-size:13px;font-weight:700;color:#142336;margin:0 0 12px;}

/* ───────────────────────── Responsive ───────────────────────── */
/* Tablet / small-desktop tidy-ups. */
@media (max-width:760px){
  .gp-cards{grid-template-columns:repeat(2,1fr);}
  .gp-grid2{grid-template-columns:1fr;}
  .gp-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;}
}

/* ───── Phone (≤640px): mobile-first dashboard ─────
   Most LPs view on a ~390–430px iPhone. Bump every small size to ≥12px,
   stack to a single readable column, and grow tap targets. */
@media (max-width:640px){
  /* generous but not edge-to-edge */
  .client-shell{padding:16px 12px 40px;}
  .client-card{border-radius:10px;}
  .client-body{padding:22px 18px 26px;}

  .client-greet{flex-wrap:wrap;gap:2px 12px;}
  .client-greet .cg-hi{font-size:16px;}
  .client-greet .cg-date{font-size:12.5px;}

  /* hero: the headline number, big and proud */
  .hero{margin-top:18px;}
  .hero-label{font-size:13px;}
  .hero-value{font-size:clamp(44px,13.5vw,60px);line-height:1.02;}
  .hero-line{font-size:14.5px;line-height:1.5;}

  .section{margin-top:24px;}
  .section-title{font-size:14.5px;}
  .chart-legend{font-size:12.5px;}
  .chart-range .on,.chart-range .off{font-size:12.5px;}

  /* you vs market bars */
  .bars{font-size:13.5px;}
  .bar-row{gap:10px;margin-bottom:11px;}
  .bar-row .bl{flex:0 0 64px;white-space:nowrap;}
  .bar-track{height:11px;}
  .bar-fill{height:11px;}
  .bar-row .bv{width:60px;font-size:13.5px;}
  .bars-caption{font-size:12.5px;line-height:1.5;}

  /* 增投 block: stack the copy over a full-width tappable button */
  .invest-block{flex-direction:column;align-items:stretch;gap:14px;padding:18px;}
  .invest-block .ib-title{font-size:15px;}
  .invest-block .ib-sub{font-size:13px;line-height:1.5;}
  .invest-btn{width:100%;text-align:center;padding:14px 22px;font-size:15px;}

  .divider{margin:22px 0 20px;}
  .divider.thin{margin:22px 0;}

  /* allocation: donut centred, legend stacks full-width below it */
  .alloc-row{flex-direction:column;gap:18px;align-items:stretch;}
  .alloc-pie-wrap{align-self:center;text-align:center;}
  .alloc-pie-title{font-size:14.5px;margin-bottom:14px;text-align:center;}
  .donut2{margin:0 auto;}
  .donut-hole2 .dh-k{font-size:12px;max-width:96px;}
  .donut-hole2 .dh-v{font-size:17px;}
  .donut-tip{font-size:12.5px;padding:6px 11px;}

  .legend-cat{min-width:0;font-size:13.5px;grid-template-columns:1fr 1fr;gap:0 16px;}
  .legend-cat .lg{padding:6px 0;}
  .legend-cat .sw{width:11px;height:11px;}
  .legend-stock{min-width:0;font-size:13px;grid-template-columns:1fr;gap:0;}
  .legend-stock .lg{padding:6px 0;}
  .legend-stock .sw{width:10px;height:10px;}

  .client-footer{gap:8px 20px;font-size:12.5px;margin-top:22px;}

  /* ── GP view on a phone ── */
  .gp-topbar{padding:14px 16px;}
  .gp-topbar .gt-user{font-size:13px;padding:8px 6px;margin:-8px -6px;}
  .gp-railhead{padding:14px 16px;}
  .gp-railhead .gt-user{font-size:13px;padding:8px 6px;margin:-8px -6px;}
  .gp-tabs{padding:0 16px;gap:18px;overflow-x:auto;}
  .gp-tab{font-size:14px;padding:14px 2px;white-space:nowrap;}
  .gp-content{padding:20px 16px 26px;}
  .gp-pane-head .gph-title{font-size:18px;}
  .gp-pane-head .gph-when{font-size:12px;}
  .gp-card{padding:14px;}
  .gp-card .gc-k{font-size:12px;}
  .gp-card .gc-v{font-size:22px;}
  .gp-box{padding:16px;}
  .gp-box-head .gbh-t{font-size:13.5px;}
  .gp-box-head .gbh-link{font-size:12.5px;padding:6px;margin:-6px;}
  .snap-row .sr-n,.snap-row .sr-v{font-size:13.5px;}
  .snap-row{padding:9px 0;}
  .snap-total .stl,.snap-total .str{font-size:12.5px;}
  .gp-alloc .ga-row{font-size:13px;margin-bottom:10px;}
  .gp-alloc .ga-l{width:62px;}
  .gp-alloc .ga-track{height:9px;}
  .gp-alloc .ga-fill{height:9px;}
  .gp-alloc .ga-more{font-size:12px;}
  .gp-table{font-size:12.5px;}
  .gp-table thead th{font-size:12px;padding:10px 11px;}
  .gp-table tbody td{padding:10px 11px;}
}

/* ───── Very narrow phones (≤430px): final readability pass ───── */
@media (max-width:430px){
  .client-body{padding:20px 15px 24px;}
  .legend-cat{grid-template-columns:1fr;}     /* category legend → single column */
  .gp-cards{gap:10px;}
  .gp-card .gc-v{font-size:20px;}
}

/* ───── Login screen on a phone ───── */
@media (max-width:640px){
  .login-main{padding:34px 18px;justify-content:flex-start;padding-top:48px;}
  .login-wordmark{font-size:24px;}
  .login-sub{font-size:11px;letter-spacing:.32em;padding-left:.32em;}
  .login-card{width:100%;}
  .login-card-body{padding:30px 24px 28px;}
  .login-title{font-size:22px;}
  .login-desc{font-size:13.5px;}
  .login-label{font-size:12px;}
  .login-field input{font-size:16px;padding:14px 11px;}  /* ≥16px stops iOS zoom-on-focus */
  .login-error{font-size:13px;}
  .login-help span{font-size:13px;padding:6px;margin:-6px;display:inline-block;}
  .login-btn{padding:16px;font-size:14px;}
  .login-note{width:100%;}
  .login-note span{font-size:12.5px;}
  .login-footer{padding:14px 18px;}
  .login-footer .lf-mark{font-size:11px;}
  .login-footer .lf-when{font-size:11px;}
}

/* ───── Desktop (≥960px): left-rail dashboard ───── */
@media (min-width:960px){
  .client-shell{padding:0;display:block;min-height:100vh;background:var(--cream);}
  .client-card{width:100%;max-width:none;height:100vh;display:grid;grid-template-columns:240px 1fr;align-items:stretch;border:none;border-radius:0;}
  .pv-rail{border-right:1px dashed var(--line);background:var(--panel);display:flex;flex-direction:column;height:100vh;overflow-y:auto;}
  .pv-railhead{flex-direction:column;align-items:flex-start;gap:10px;border-bottom:1px dashed var(--line);padding:22px 22px 18px;}
  .pv-railhead .ct-user{font-size:12px;color:var(--muted);}
  .pv-tabs{flex-direction:column;gap:2px;padding:14px 12px;border-bottom:none;background:transparent;overflow:visible;}
  .pv-tab{font-size:14px;padding:10px 12px;margin-bottom:0;border-bottom:none;border-left:2px solid transparent;border-radius:0 6px 6px 0;text-align:left;width:100%;}
  .pv-tab.active{border-bottom:none;border-left-color:var(--ink);background:#fff;}
  .pv-railsum{display:block;margin-top:auto;padding:20px 22px;border-top:1px dashed var(--line);}
  .pv-railsum .rs-k{font-size:10.5px;color:var(--muted-2);font-weight:700;letter-spacing:.13em;}
  .pv-railsum .rs-v{font-size:24px;font-weight:800;color:var(--ink);letter-spacing:-.02em;font-variant-numeric:tabular-nums;margin-top:3px;}
  .pv-railsum .rs-meta{font-size:11px;color:var(--muted-2);font-weight:500;margin-top:6px;font-variant-numeric:tabular-nums;}
  .client-body{padding:34px 40px 44px;min-width:0;min-height:0;overflow-y:auto;}
  .alloc-row{flex-wrap:nowrap;}
  .gp-shell{min-height:100vh;}
  .gp-inner{max-width:none;width:100%;height:100vh;display:grid;grid-template-columns:240px 1fr;align-items:stretch;background:var(--cream);margin:0;}
  .gp-rail{background:var(--panel);border-right:1px dashed var(--line);display:flex;flex-direction:column;height:100vh;overflow-y:auto;}
  .gp-railhead{flex-direction:column;align-items:flex-start;gap:10px;padding:22px 22px 18px;}
  .gp-tabs{flex-direction:column;gap:2px;padding:14px 12px;border-bottom:none;background:transparent;}
  .gp-tab{color:#8f97a6;padding:10px 12px;border-bottom:none;border-left:2px solid transparent;text-align:left;width:100%;}
  .gp-tab.active{color:#142336;border-bottom:none;border-left-color:var(--ink);background:#fff;}
  .gp-railsum{display:block;margin-top:auto;padding:20px 22px;border-top:1px solid #2a3a4f;}
  .gp-railsum .rs-k{font-size:10.5px;color:var(--muted-2);font-weight:700;letter-spacing:.13em;}
  .gp-railsum .rs-v{font-size:22px;font-weight:800;color:#142336;font-variant-numeric:tabular-nums;margin-top:3px;}
  .gp-railsum .rs-meta{font-size:11px;color:var(--muted-2);margin-top:6px;font-variant-numeric:tabular-nums;}
  .gp-content{padding:30px 40px 40px;min-width:0;min-height:0;overflow-y:auto;}
}
/* interactive value chart (£/% toggle, range switch, hover/touch) */
.vchart{position:relative;margin-top:4px}
.vc-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.vc-seg{display:inline-flex;border:1px solid #e2dac9;border-radius:9px;overflow:hidden;background:#faf7f0;max-width:100%}
.vc-seg button{appearance:none;-webkit-appearance:none;border:0;background:transparent;padding:5px 10px;font:inherit;font-size:12px;line-height:1;color:#6b6457;cursor:pointer;white-space:nowrap}
.vc-seg button+button{border-left:1px solid #e2dac9}
.vc-seg button.active{background:#1f7a4d;color:#fff}
.vc-range{overflow-x:auto;-webkit-overflow-scrolling:touch}
.vc-range::-webkit-scrollbar{display:none}
.vc-plot{position:relative;width:100%}
.vc-svg{display:block;width:100%;height:auto;touch-action:pan-y}
.vc-head{margin-bottom:6px;min-height:44px}
.vc-hv{font-size:22px;font-weight:800;color:#142336;line-height:1.15;font-variant-numeric:tabular-nums}
.vc-hv.pos{color:#1f7a4d}
.vc-hv.neg{color:#b3402e}
.vc-hd{display:flex;align-items:baseline;gap:8px;margin-top:2px;font-size:12px;flex-wrap:wrap}
.vc-hd .vc-delta{font-weight:700;font-variant-numeric:tabular-nums}
.vc-hd .vc-delta.pos{color:#1f7a4d}
.vc-hd .vc-delta.neg{color:#b3402e}
.vc-hd .vc-ctx{color:#9a8f78}
.vc-empty{padding:26px 8px;color:#9a8f78;font-size:13px;text-align:center}
@media (max-width:640px){
  .vc-seg button{padding:8px 12px;font-size:13.5px}
  .vc-hv{font-size:25px}
}

/* ───────────────────────── Extended portal visual system ───────────────────────── */

/* Pensieve Capital private book — visual layer only.
   The encrypted payload, renderers and interaction hooks remain in trades.html. */

:root {
  --ink: #0b1814;
  --ink-soft: #17261f;
  --paper: #f2f4ef;
  --paper-bright: #fafbf7;
  --mist: #dce3dd;
  --sage: #72857a;
  --muted: #66766e;
  --muted-2: #84918a;
  --gain: #2f7453;
  --loss: #9f5148;
  --gold: #a88e58;
  --brass: #a88e58;
  --brass-light: #d7c493;
  --cream: #f2f4ef;
  --panel: #fafbf7;
  --line: rgba(11, 24, 20, 0.16);
  --line-strong: rgba(11, 24, 20, 0.34);
  --line-inverse: rgba(242, 244, 239, 0.2);
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "KaiTi_GB2312", "楷体", "DFKai-SB", "BiauKai", "TW-Kai", serif;
  --voice: "Manrope", "Kaiti SC", "STKaiti", "KaiTi", "KaiTi_GB2312", "楷体", "DFKai-SB", "BiauKai", "TW-Kai", "PingFang SC", "Hiragino Sans GB", serif;
  --data: "Manrope", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Baskerville", "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Manrope", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mark: "Cinzel", Georgia, serif;
}

html {
  min-width: 320px;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

button,
input {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
}

::selection {
  color: var(--paper-bright);
  background: var(--ink-soft);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ───────────────────────── Locked entry ───────────────────────── */

#loginScreen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

#loginScreen::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(11, 24, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 24, 20, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%);
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.login-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: clamp(64px, 9vw, 150px);
  align-items: center;
  width: min(1240px, calc(100vw - 96px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  min-height: calc(100dvh - 50px);
  margin: 0 auto;
  padding: 64px 0;
}

.login-intro {
  position: relative;
  display: flex;
  min-height: min(670px, calc(100dvh - 150px));
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 34px 44px 32px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.login-wordmark {
  padding: 0;
  color: var(--ink);
  font-family: var(--mark);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.115em;
  line-height: 1;
}

.login-rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: 18px 0 12px;
  background: var(--brass);
}

.login-sub {
  padding: 0;
  color: var(--sage);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.login-intro-copy {
  position: relative;
  z-index: 2;
  max-width: 730px;
  margin-top: auto;
  padding: 100px 0 58px;
}

.login-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-kicker::before {
  width: 30px;
  height: 1px;
  content: "";
  background: currentColor;
}

.login-intro-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 7.2vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.062em;
  line-height: 0.92;
}

.login-intro-copy h1 em {
  color: var(--brass);
  font-weight: 400;
}

.login-intro-copy > p:last-child {
  max-width: 560px;
  margin: 34px 0 0;
  color: rgba(11, 24, 20, 0.68);
  font-size: 0.96rem;
  line-height: 1.8;
}

.login-memory {
  position: absolute;
  top: 44%;
  right: -8%;
  z-index: 0;
  width: min(72%, 530px);
  color: var(--ink);
  opacity: 0.105;
  transform: translateY(-50%);
}

.login-memory line,
.login-memory ellipse,
.login-memory circle {
  stroke: currentColor;
  stroke-width: 0.8;
}

.login-memory circle {
  fill: var(--brass);
  stroke: none;
}

.login-public-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 44px;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: rgba(11, 24, 20, 0.68);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.login-public-link span {
  color: var(--brass);
  transition: transform 180ms ease;
}

.login-public-link:hover span {
  transform: translate(2px, -2px);
}

.login-access {
  width: min(100%, 430px);
  justify-self: end;
}

.login-card {
  width: 100%;
  max-width: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper-bright);
  box-shadow: 0 24px 70px rgba(5, 16, 12, 0.09);
}

.login-card-stripe {
  height: 2px;
  background: var(--brass);
}

.login-card-body {
  padding: 36px 38px 38px;
}

.login-card-number {
  margin-bottom: 38px;
  color: var(--sage);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.login-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.login-desc {
  margin: 10px 0 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.65;
}

.login-label {
  color: var(--sage);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.login-field {
  margin-top: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--sage);
  background: #fff;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field:focus-within {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(168, 142, 88, 0.12);
}

.login-field.is-error {
  border-color: var(--loss);
  box-shadow: 0 0 0 3px rgba(159, 81, 72, 0.11);
}

.login-field input {
  padding: 14px 11px;
  color: var(--ink);
  font-size: 1rem;
}

.login-field input::placeholder {
  color: rgba(114, 133, 122, 0.48);
}

.login-eye {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  margin-right: -13px;
  color: var(--sage);
}

.login-error {
  margin-top: 10px;
  color: var(--loss);
  font-size: 0.76rem;
}

.login-help {
  margin-top: 12px;
}

.login-help a,
.login-help span {
  color: var(--brass);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.login-help a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.login-btn {
  margin-top: 24px;
  padding: 15px 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--paper-bright);
  background: var(--ink);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.login-btn:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
  transform: translateY(-2px);
}

.login-note {
  width: 100%;
  max-width: none;
  margin-top: 18px;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--brass);
  background: transparent;
}

.login-note span {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 400;
  line-height: 1.55;
}

.login-footer {
  min-height: 50px;
  padding: 14px 32px;
  border-top: 1px solid rgba(242, 244, 239, 0.12);
  color: var(--paper);
  background: var(--ink);
}

.login-footer .lf-mark {
  color: var(--brass-light);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.login-footer .lf-when {
  color: rgba(242, 244, 239, 0.56);
  font-size: 0.64rem;
}

/* ───────────────────────── Shared book shell ───────────────────────── */

.portal-wrap,
.client-shell,
.gp-shell {
  min-height: 100dvh;
}

.client-shell,
.gp-shell {
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(11, 24, 20, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 24, 20, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  font-family: var(--voice);
  font-synthesis: none;
}

.client-card,
.gp-inner {
  color: var(--ink);
  background: var(--paper-bright);
}

.pv-rail,
.gp-rail {
  background: rgba(250, 251, 247, 0.96);
}

.pv-railhead,
.gp-railhead {
  justify-content: space-between;
  border-color: var(--line);
  background: transparent;
}

.pv-railhead::before,
.gp-railhead::before {
  color: var(--sage);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.pv-railhead::before {
  content: "The book / Client";
}

.gp-railhead::before {
  content: "The book / Manager";
}

.pv-railhead .ct-user,
.gp-railhead .gt-user {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.pv-railhead .ct-user:hover,
.gp-railhead .gt-user:hover {
  color: var(--ink);
}

.pv-tabs,
.gp-tabs {
  gap: 0;
  border-color: var(--line);
  background: var(--paper-bright);
}

.pv-tab,
.gp-tab {
  border-radius: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.025em;
}

.pv-tab.active,
.gp-tab.active {
  color: var(--ink);
  border-color: var(--brass);
  background: rgba(215, 196, 147, 0.13);
}

.client-body,
.gp-content {
  color: var(--ink);
  background: rgba(242, 244, 239, 0.58);
}

.client-greet {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.client-greet .cg-hi {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.client-greet .cg-date,
.gp-pane-head .gph-when {
  color: var(--sage);
  font-variant-numeric: tabular-nums;
}

/* Account value as a ledger plate, with the public site's memory-field motif. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 34px;
  padding: clamp(32px, 5vw, 58px) 0 clamp(30px, 4vw, 46px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  top: 50%;
  right: -5%;
  z-index: -1;
  width: min(53vw, 640px);
  aspect-ratio: 1.5;
  content: "";
  background: repeating-radial-gradient(
    ellipse at center,
    transparent 0 25px,
    rgba(11, 24, 20, 0.055) 26px 27px,
    transparent 28px 48px
  );
  transform: translateY(-50%) rotate(-6deg);
}

.hero-label {
  color: var(--sage);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-value {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--data);
  font-size: clamp(4.4rem, 8vw, 7.4rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.hero-line {
  margin-top: 16px;
  font-size: 0.78rem;
}

.hero-line .up,
.bars-caption {
  color: var(--gain);
}

.hero-line .net,
.hero-line .net small,
.hero-line .up .gl {
  color: var(--muted);
}

.section {
  margin-top: 40px;
}

.section-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-title,
.pv-h,
.alloc-pie-title,
.gp-box-head .gbh-t,
.gp-card-title {
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  text-transform: none;
}

.chart-legend,
.chart-range .off {
  color: var(--muted);
}

.chart-range .on {
  border-color: var(--brass);
}

.bar-track,
.gp-alloc .ga-track {
  border-radius: 0;
  background: var(--mist);
}

.bar-fill,
.gp-alloc .ga-fill {
  border-radius: 0;
}

.bar-fill.lead {
  background: var(--gain);
}

.bar-fill.bench {
  background: var(--sage);
  opacity: 0.45;
}

.invest-block {
  margin-top: 42px;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brass);
  border-radius: 0;
  background: var(--paper-bright);
}

.invest-block .ib-title {
  color: var(--ink);
  font-family: var(--voice);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.015em;
}

.invest-block .ib-sub,
.invest-block .ib-sub b {
  color: var(--muted);
}

.invest-btn {
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--paper-bright);
  background: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.invest-btn:hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-1px);
}

.divider,
.divider.thin {
  background: var(--line);
}

.fgrid {
  gap: 0;
  margin: 32px 0;
  border: 1px solid var(--line-strong);
  background: var(--paper-bright);
}

.fcard {
  min-height: 154px;
  padding: 20px;
  border-color: var(--line);
}

.fcard .tex,
.letter .tex {
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
}

.fcard .ic {
  color: var(--sage);
}

.fcard .v,
.gp-card .gc-v,
.vc-hv,
.pnl-chip .pc-v {
  color: var(--ink);
  font-family: var(--data);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.fcard .v {
  margin-top: 28px;
  font-size: 2rem;
}

.fcard .k,
.gp-card .gc-k {
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  text-transform: none;
}

.letter {
  margin: 30px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  background: var(--paper-bright);
}

.letter .et {
  color: var(--brass);
}

.letter .lt {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.letter p {
  color: rgba(11, 24, 20, 0.72);
}

.letter .sig {
  color: var(--sage);
}

.donut-hole {
  background: var(--paper-bright);
}

.donut-hole .dh-v,
.donut-hole2 .dh-v,
.legend-stock .tk,
.attr-tk,
.act-tk,
.nh-mo {
  color: var(--ink);
}

.donut-tip {
  border-radius: 0;
  color: var(--paper-bright);
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(5, 16, 12, 0.16);
}

.legend-cat,
.legend-stock,
.act-action {
  color: rgba(11, 24, 20, 0.72);
}

.legend-stock .nm,
.attr-nm,
.act-date {
  color: var(--muted);
}

.client-footer {
  margin-top: 38px;
  padding-top: 18px;
  border-color: var(--line);
  color: var(--muted);
}

.client-footer b {
  color: var(--ink);
}

.pv-table-scroll,
.gp-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--brass) rgba(220, 227, 221, 0.38);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.table-scroll-hint {
  display: none;
}

/* Flat, inspectable data surfaces. */
.pv-table,
.gp-table,
.nh-wrap,
.pnl-chip {
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-bright);
}

.pv-table th,
.gp-table thead th {
  border-color: var(--line);
  color: var(--sage);
  background: rgba(220, 227, 221, 0.24);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.025em;
}

.pv-table td,
.gp-table tbody td {
  border-color: rgba(11, 24, 20, 0.1);
  color: rgba(11, 24, 20, 0.75);
  font-family: var(--data);
  font-variant-numeric: tabular-nums;
}

.pv-table td:first-child,
.gp-table tbody td:first-child,
.gp-table tbody tr.total-row td {
  color: var(--ink);
}

.gp-table tbody tr.total-row td {
  border-color: var(--line);
  background: rgba(220, 227, 221, 0.24);
}

.nh-wrap {
  overflow: hidden;
}

.nh-month,
.nh-table,
.attr-row,
.act-row {
  border-color: rgba(11, 24, 20, 0.11);
}

.nh-table {
  background: #fff;
}

.nh-sum::before,
.nh-cnt,
.nh-nav,
.pnl-chip .pc-k {
  color: var(--muted);
}

.pnl-chip {
  padding: 16px;
}

/* ───────────────────────── Manager book ───────────────────────── */

.gp-inner {
  background: var(--paper-bright);
}

.gp-pane-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.gp-pane-head .gph-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
}

.gp-cards {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  background: var(--paper-bright);
}

.gp-card {
  min-height: 138px;
  padding: 20px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.gp-card:last-child {
  border-right: 0;
}

.gp-card:nth-child(odd):last-child {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.gp-card .gc-v {
  margin-top: 24px;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
}

.gp-grid2 {
  gap: 18px;
}

.gp-pane > .gp-box {
  margin-bottom: 18px;
}

.gp-box {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-bright);
}

.gp-box-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.gp-box-head .gbh-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--brass);
}

.snap-row,
.snap-total {
  border-color: rgba(11, 24, 20, 0.1);
}

.snap-row .sr-n,
.snap-total .str {
  color: var(--ink);
}

.snap-row .sr-v,
.gp-alloc .ga-row {
  color: rgba(11, 24, 20, 0.72);
}

/* ───────────────────────── Interactive charts ───────────────────────── */

.vc-seg {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-bright);
}

.vc-seg button {
  color: var(--muted);
}

.vc-seg button + button {
  border-color: var(--line);
}

.vc-seg button.active {
  color: var(--paper-bright);
  background: var(--ink);
}

.vc-hv {
  font-size: 2rem;
}

.vc-hv.pos,
.vc-hd .vc-delta.pos,
.pos {
  color: var(--gain);
}

.vc-hv.neg,
.vc-hd .vc-delta.neg,
.neg {
  color: var(--loss);
}

.vc-hd .vc-ctx,
.vc-empty {
  color: var(--muted);
}

@media (hover: hover) and (min-width: 960px) {
  .act-row,
  .attr-row,
  .snap-row {
    border-radius: 0;
  }

  .act-row:hover,
  .attr-row:hover,
  .snap-row:hover {
    background: rgba(220, 227, 221, 0.2);
  }
}

/* ───────────────────────── Desktop ledger layout ───────────────────────── */

@media (min-width: 960px) {
  .client-card,
  .gp-inner {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .pv-rail,
  .gp-rail {
    position: relative;
    border-right: 1px solid var(--line);
  }

  .pv-rail::after,
  .gp-rail::after {
    position: absolute;
    top: 84px;
    right: 22px;
    left: 22px;
    height: 140px;
    pointer-events: none;
    content: "";
    background: repeating-radial-gradient(
      ellipse at 55% 45%,
      transparent 0 17px,
      rgba(11, 24, 20, 0.045) 18px 19px,
      transparent 20px 34px
    );
  }

  .pv-railhead,
  .gp-railhead {
    position: relative;
    z-index: 1;
    min-height: 104px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--line);
  }

  .pv-railhead .ct-user,
  .gp-railhead .gt-user {
    align-self: stretch;
    margin: 0;
    padding: 9px 0 0;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .pv-tabs,
  .gp-tabs {
    position: relative;
    z-index: 1;
    padding: 24px 14px;
    background: transparent;
  }

  .pv-tab,
  .gp-tab {
    min-height: 46px;
    padding: 13px 14px;
    border: 0;
    border-left: 2px solid transparent;
    text-align: left;
  }

  .pv-tab.active,
  .gp-tab.active {
    border-left-color: var(--brass);
  }

  .pv-railsum,
  .gp-railsum {
    position: relative;
    z-index: 1;
    padding: 22px 24px 26px;
    border-top: 1px solid var(--line);
  }

  .pv-railsum .rs-k,
  .gp-railsum .rs-k {
    color: var(--sage);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.14em;
  }

  .pv-railsum .rs-v,
  .gp-railsum .rs-v {
    margin-top: 8px;
    color: var(--ink);
    font-family: var(--data);
    font-size: 1.8rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
  }

  .pv-railsum .rs-meta,
  .gp-railsum .rs-meta {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.62rem;
    line-height: 1.55;
  }

  .client-body,
  .gp-content {
    padding: 40px clamp(40px, 5vw, 80px) 56px;
  }

  .client-body > * {
    width: min(100%, 1160px);
    margin-inline: auto;
  }

  .gp-content > .gp-pane {
    width: min(100%, 1320px);
    margin-inline: auto;
  }
}

@media (min-width: 1200px) {
  .gp-card:nth-child(odd):last-child {
    grid-column: auto;
    border-top: 0;
  }
}

/* ───────────────────────── Tablet and phone ───────────────────────── */

@media (max-width: 959px) {
  .client-shell,
  .gp-shell {
    padding: 0;
  }

  .client-card,
  .gp-inner {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .pv-rail,
  .gp-rail {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(5, 16, 12, 0.04);
  }

  .pv-railhead,
  .gp-railhead {
    padding: 13px 20px;
  }

  .pv-tabs,
  .gp-tabs {
    padding: 0 10px;
    overflow-x: auto;
  }

  .pv-tab,
  .gp-tab {
    min-height: 48px;
    padding: 14px 12px;
    border-bottom: 2px solid transparent;
  }

  .pv-tab.active,
  .gp-tab.active {
    border-bottom-color: var(--brass);
  }

  .client-body,
  .gp-content {
    padding: 28px clamp(20px, 5vw, 42px) 44px;
  }
}

@media (max-width: 760px) {
  .login-main {
    grid-template-columns: 1fr;
    gap: 44px;
    width: min(100% - 40px, 620px);
    padding: 34px 0 48px;
  }

  .login-intro {
    min-height: 430px;
    padding: 26px 0 24px;
  }

  .login-intro-copy {
    padding: 70px 0 36px;
  }

  .login-intro-copy h1 {
    font-size: clamp(3.6rem, 13vw, 6rem);
  }

  .login-memory {
    right: -14%;
    width: min(88%, 500px);
  }

  .login-access {
    width: 100%;
    justify-self: stretch;
  }

  .gp-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-card:nth-child(2n) {
    border-right: 0;
  }

  .gp-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .gp-card:nth-child(odd):last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .login-main {
    display: grid;
    padding-top: 26px;
  }

  .login-wordmark {
    font-size: 0.78rem;
  }

  .login-sub {
    font-size: 0.55rem;
  }

  .login-intro-copy > p:last-child {
    margin-top: 24px;
    font-size: 0.87rem;
  }

  .login-card-body {
    padding: 28px 24px 30px;
  }

  .login-card-number {
    margin-bottom: 28px;
  }

  .login-title {
    font-size: 1.9rem;
  }

  .login-btn {
    min-height: 50px;
    font-size: 0.75rem;
  }

  .login-field input {
    font-size: 16px;
  }

  .login-footer {
    align-items: flex-start;
    padding: 14px 20px;
  }

  .client-body,
  .gp-content {
    padding: 24px 18px 38px;
  }

  .client-greet .cg-hi {
    font-size: 0.82rem;
  }

  .hero {
    margin-top: 26px;
    padding: 32px 0 30px;
  }

  .hero-label {
    font-size: 0.61rem;
  }

  .hero-value {
    font-size: clamp(3.6rem, 17vw, 5.6rem);
  }

  .hero-line {
    font-size: 0.78rem;
  }

  .section {
    margin-top: 34px;
  }

  .section-title,
  .pv-h,
  .alloc-pie-title {
    font-size: 0.78rem;
  }

  .fcard {
    min-height: 138px;
    padding: 16px;
  }

  .fcard .v {
    margin-top: 22px;
    font-size: 1.65rem;
  }

  .invest-block {
    padding: 20px;
  }

  .invest-btn {
    padding: 14px 20px;
  }

  .gp-pane-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .gp-pane-head .gph-title {
    font-size: 2.5rem;
  }

  .gp-card,
  .gp-box {
    border-radius: 0;
  }

  .vc-seg {
    border-radius: 0;
  }

  .vc-seg button {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
  }

  .table-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--sage);
    font-size: 0.72rem;
  }

  .table-scroll-hint span {
    color: var(--brass);
  }

  .pv-table-wide,
  .gp-stocktable {
    min-width: 520px;
  }

  .gp-table:not(.gp-stocktable) {
    min-width: 860px;
  }
}

@media (max-width: 430px) {
  .login-main {
    width: min(100% - 28px, 430px);
    gap: 20px;
    padding: 16px 0 28px;
  }

  .login-intro {
    min-height: 290px;
    padding-block: 18px;
  }

  .login-intro-copy {
    padding: 30px 0 20px;
  }

  .login-intro-copy h1 {
    font-size: clamp(2.85rem, 15vw, 3.8rem);
  }

  .login-intro-copy > p:last-child {
    margin-top: 18px;
  }

  .login-public-link {
    font-size: 0.61rem;
  }

  .pv-railhead::before,
  .gp-railhead::before {
    font-size: 0.58rem;
  }

  .pv-railhead .ct-user,
  .gp-railhead .gt-user {
    font-size: 0.72rem;
  }

  .pv-tab,
  .gp-tab {
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .client-body,
  .gp-content {
    padding-inline: 15px;
  }

  .fgrid {
    grid-template-columns: 1fr 1fr;
  }

  .fcard .v {
    font-size: 1.48rem;
  }

  .gp-card .gc-v {
    font-size: 1.6rem;
  }
}

/* Kaiti-style CJK glyphs read optically smaller than adjacent Manrope data.
   Compensate only the Chinese interface labels and prose on touch layouts;
   headline figures and chart data keep their tighter numeric scale. */
@media (max-width: 640px) {
  [lang="zh-Hans"] .pv-tab,
  [lang="zh-Hans"] .gp-tab {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  [lang="zh-Hans"] .pv-railhead .ct-user,
  [lang="zh-Hans"] .gp-railhead .gt-user {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  [lang="zh-Hans"] .client-greet .cg-hi {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  [lang="zh-Hans"] .hero-label {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    line-height: 1.4;
  }

  [lang="zh-Hans"] .section-title,
  [lang="zh-Hans"] .pv-h,
  [lang="zh-Hans"] .alloc-pie-title,
  [lang="zh-Hans"] .gp-box-head .gbh-t,
  [lang="zh-Hans"] .gp-card-title {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  [lang="zh-Hans"] .fcard .k,
  [lang="zh-Hans"] .gp-card .gc-k,
  [lang="zh-Hans"] .pnl-chip .pc-k {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  [lang="zh-Hans"] .pv-table th,
  [lang="zh-Hans"] .gp-table thead th {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  [lang="zh-Hans"] .table-scroll-hint,
  [lang="zh-Hans"] .gp-box-head .gbh-link,
  [lang="zh-Hans"] .gp-alloc .ga-more {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  [lang="zh-Hans"] .invest-btn {
    font-size: 0.875rem;
    line-height: 1.3;
  }

  [lang="zh-Hans"] .letter p {
    font-size: 0.875rem;
    line-height: 1.75;
  }

  [lang="zh-Hans"] .letter .sig,
  [lang="zh-Hans"] .gp-pane-head .gph-when,
  [lang="zh-Hans"] .act-action,
  [lang="zh-Hans"] .attr-nm,
  [lang="zh-Hans"] .nh-mo,
  [lang="zh-Hans"] .nh-cnt {
    font-size: 0.8rem;
    line-height: 1.45;
  }
}

/* Client book — a private ledger, not a billboard.
   Keep the account value clearly primary while letting the explanation,
   return context and Chinese labels carry real reading weight. */
.client-shell .pv-tab {
  font-size: 0.9rem;
  line-height: 1.35;
}

.client-shell .pv-railhead .ct-user {
  font-size: 0.82rem;
  line-height: 1.4;
}

.client-shell .pv-railsum .rs-k,
.client-shell .pv-railsum .rs-meta {
  font-size: 0.75rem;
  line-height: 1.55;
}

.client-shell .pv-railsum .rs-v {
  font-size: 1.65rem;
  line-height: 1.1;
}

.client-shell .client-greet .cg-hi {
  font-size: 1rem;
  line-height: 1.45;
}

.client-shell .client-greet .cg-date {
  font-size: 0.86rem;
  line-height: 1.45;
}

.client-shell .hero {
  margin-top: 28px;
  padding: 36px 0 34px;
}

.client-shell .hero-label {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.client-shell .hero-value {
  margin-top: 10px;
  font-size: clamp(3.25rem, 4.5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  white-space: nowrap;
}

.client-shell .hero-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.5;
}

.client-shell .hero-line .net {
  margin-left: 0;
}

.client-shell .hero-line small {
  font-size: 0.86em;
}

.client-shell .section-title,
.client-shell .pv-h,
.client-shell .alloc-pie-title {
  font-size: 0.94rem;
  line-height: 1.45;
}

.client-shell .chart-legend,
.client-shell .bars-caption {
  font-size: 0.84rem;
  line-height: 1.5;
}

.client-shell .fcard {
  min-height: 146px;
  padding: 18px;
}

.client-shell .fcard .v {
  margin-top: 22px;
  font-size: 1.75rem;
  line-height: 1.08;
}

.client-shell .fcard .k,
.client-shell .pnl-chip .pc-k {
  font-size: 0.86rem;
  letter-spacing: 0.015em;
  line-height: 1.5;
}

.client-shell .letter {
  padding: 24px;
}

.client-shell .letter .et {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.client-shell .letter .lt {
  font-size: 1.4rem;
  line-height: 1.3;
}

.client-shell .letter p {
  font-size: 1rem;
  line-height: 1.75;
}

.client-shell .letter .sig {
  font-size: 0.86rem;
  line-height: 1.45;
}

.client-shell .invest-block .ib-title {
  font-size: 1.2rem;
  line-height: 1.4;
}

.client-shell .invest-block .ib-sub,
.client-shell .invest-btn {
  font-size: 0.9rem;
  line-height: 1.55;
}

.client-shell .legend-cat,
.client-shell .legend-stock,
.client-shell .pv-table,
.client-shell .nh-sum,
.client-shell .attr-row,
.client-shell .act-row {
  font-size: 0.86rem;
  line-height: 1.45;
}

.client-shell .pv-table th {
  font-size: 0.8rem;
  letter-spacing: 0.015em;
  line-height: 1.4;
}

.client-shell .pv-table td {
  font-size: 0.86rem;
  line-height: 1.45;
}

.client-shell .table-scroll-hint,
.client-shell .attr-nm,
.client-shell .act-action,
.client-shell .nh-mo,
.client-shell .nh-cnt {
  font-size: 0.84rem;
  line-height: 1.45;
}

.client-shell .client-footer {
  gap: 8px 18px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.client-shell .client-footer b {
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .client-shell .hero {
    margin-top: 22px;
    padding: 28px 0 26px;
  }

  .client-shell .hero-value {
    font-size: clamp(2.75rem, 12.2vw, 3.125rem);
    line-height: 1;
  }

  .client-shell .fcard {
    min-height: 128px;
    padding: 16px;
  }

  .client-shell .fcard .v {
    margin-top: 18px;
    font-size: clamp(1.42rem, 5.7vw, 1.5rem);
  }

  .client-shell .letter {
    padding: 20px;
  }

  .client-shell .letter .lt {
    font-size: 1.2rem;
  }
}

/* iOS viewport and touch ergonomics. Keep this visual-only: the encrypted
   payload, authentication flow and generated portfolio data remain untouched. */
@media (max-width: 959px) {
  .pv-railhead,
  .gp-railhead {
    padding-top: calc(13px + env(safe-area-inset-top, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
  }

  .pv-tabs,
  .gp-tabs {
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .client-body,
  .gp-content {
    padding-right: max(clamp(20px, 5vw, 42px), env(safe-area-inset-right, 0px));
    padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
    padding-left: max(clamp(20px, 5vw, 42px), env(safe-area-inset-left, 0px));
  }
}

@media (max-width: 640px) {
  .login-main {
    padding-top: calc(26px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .login-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .client-body,
  .gp-content {
    padding-right: max(18px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px));
    padding-left: max(18px, env(safe-area-inset-left, 0px));
  }

  .gp-shell .gp-pane-head .gph-title {
    font-size: clamp(1.75rem, 7.5vw, 2rem);
    line-height: 1.08;
  }

  .gp-shell .gp-card .gc-v {
    font-size: clamp(1.45rem, 6vw, 1.7rem);
    line-height: 1.12;
  }

  .pv-table-scroll,
  .gp-table-scroll {
    margin-inline: -18px;
    padding-inline: 18px;
    scroll-padding-inline: 18px;
  }
}

@media (max-width: 430px) {
  .login-main {
    width: 100%;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
  }

  .login-intro,
  .login-access,
  .login-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .client-shell .pv-railhead .ct-user,
  .gp-shell .gp-railhead .gt-user {
    min-width: 0;
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .client-body,
  .gp-content {
    padding-right: max(15px, env(safe-area-inset-right, 0px));
    padding-left: max(15px, env(safe-area-inset-left, 0px));
  }

  .pv-table-scroll,
  .gp-table-scroll {
    margin-inline: -15px;
    padding-inline: 15px;
    scroll-padding-inline: 15px;
  }
}

@media (max-width: 360px) {
  .client-shell .hero-value {
    max-width: 100%;
    font-size: clamp(2.55rem, 12vw, 2.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* The encrypted snapshot precedes the login markup in the generated HTML.
   Reveal only after that static shell is complete so slow connections never
   paint a partially parsed card and then shift it into place. */
.portal-pending {
  visibility: hidden;
}
