.personal-nav{display:flex;gap:7px;padding:0 14px 16px}.personal-nav .button{flex:1;text-align:center}
.ledger-welcome{max-width:860px;margin:24px auto 20px;padding:28px 30px;background:linear-gradient(125deg,#30251688,#1e1a12);border:1px solid #685033;border-radius:6px}.ledger-welcome h3{font-size:30px!important;margin-top:12px!important}.ledger-welcome-intro{color:#d1c4aa;margin:12px 0 24px}.ledger-start-steps{list-style:none;margin:0;padding:0;display:grid;gap:20px}.ledger-start-steps li{display:flex;gap:15px;align-items:flex-start}.ledger-step-number{display:grid;place-items:center;flex:none;width:30px;height:30px;background:#4a3620;border:1px solid #987547;border-radius:50%;color:#efd19b;font:17px Georgia,serif}.ledger-start-steps strong{font:19px Georgia,serif;color:#f0dfbf}.ledger-start-steps p{margin:6px 0 0;color:#baaf9a;font-size:14px}.ledger-start-steps b{color:#e6d8bb}.ledger-folder-path{color:#e0c28c!important;padding:10px 12px;border:1px solid #5c482d;background:#13110d;border-radius:4px;overflow-wrap:anywhere;line-height:1.6}.ledger-import-bar{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:20px 0}.ledger-import-bar .ledger-file{min-height:42px;font-size:16px;padding:12px 20px}.ledger-import-bar .ledger-muted{margin:0}.ledger-first-run .ledger-import-bar{max-width:860px;margin:20px auto 28px}.ledger-first-run #asset-totals,.ledger-first-run #ledger-assets-view>.ledger-tools,.ledger-first-run #ledger-assets-view>.ledger-table-wrap,.ledger-first-run .ledger-valuation-note,.ledger-first-run #ledger-trades-view{display:none!important}.ledger-settings{margin-top:25px!important}.ledger-settings-content{padding-top:20px}.ledger-settings-content>h3{margin-top:15px}.ledger-first-run .ledger-settings{max-width:860px;margin-inline:auto}.ledger-first-run .ledger-tabs{margin-bottom:0}@media(max-width:700px){.ledger-welcome{padding:20px 16px;margin-top:18px}.ledger-welcome h3{font-size:25px!important}.ledger-start-steps{gap:20px}.ledger-start-steps li{gap:10px}.ledger-step-number{width:26px;height:26px}.ledger-start-steps p{font-size:13px}.ledger-import-bar .ledger-file{width:100%;text-align:center}}
.ledger-dialog{width:min(1400px,96vw);max-width:96vw;height:min(920px,94dvh);max-height:94dvh;margin:auto;padding:0;color:var(--text);background:#19160f;border:1px solid #796039;border-radius:7px;box-shadow:0 18px 80px #000b}
.ledger-dialog::backdrop{background:#080704c9}.ledger-dialog[open]{display:flex;flex-direction:column}.ledger-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 26px;border-bottom:1px solid #54432b;background:#252015;flex:none}.ledger-header h2{margin:4px 0 0;font:30px Georgia,serif}.ledger-body{padding:20px 26px;overflow:auto;min-height:0}.ledger-dialog [hidden]{display:none!important}
.ledger-dialog h3{margin:0 0 10px;font:21px Georgia,serif}.ledger-dialog p{line-height:1.6}.ledger-dialog a{color:#dfbd81}.ledger-muted{color:var(--muted);font-size:13px;margin:12px 0 18px}.ledger-dialog label{font-size:13px;color:var(--soft)}.ledger-dialog input:not([type=checkbox]):not([type=file]),.ledger-dialog select{min-height:36px;border:1px solid #625033;background:#13120e;color:var(--text);padding:7px 10px;border-radius:4px;font:14px system-ui,sans-serif;max-width:100%}.ledger-dialog input:focus-visible,.ledger-dialog button:focus-visible,.ledger-dialog select:focus-visible,.ledger-dialog summary:focus-visible{outline:2px solid #ddb873;outline-offset:2px}
.ledger-tabs{display:flex;gap:8px;margin-bottom:14px}.ledger-tabs .button{font-size:17px;padding:10px 18px}.ledger-tabs [aria-pressed=true]{background:#4b3820;color:#f8e2ba;border-color:#bc9356}.ledger-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:14px 0}.ledger-tools label{display:flex;align-items:center;gap:8px}.ledger-file{position:relative;cursor:pointer;overflow:hidden}.ledger-file input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.ledger-file:focus-within{outline:2px solid #ddb873;outline-offset:2px}
.ledger-help{margin:18px 0;padding:13px 16px;border:1px solid #493c28;border-radius:4px;color:#c5baa4;font-size:13px;line-height:1.7}.ledger-help summary{cursor:pointer;color:#dfc08c;font-size:14px}.ledger-help li{margin:9px 0}.ledger-help code{overflow-wrap:anywhere}.ledger-box{border:1px solid #695230;border-radius:5px;background:#211c13;padding:18px;margin:18px 0}.ledger-box>label{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.ledger-candidates{max-height:300px;overflow:auto;margin-top:15px}.ledger-choice{display:grid;grid-template-columns:20px 1fr;gap:3px 10px;padding:10px 6px;border-bottom:1px solid #423624;cursor:pointer}.ledger-choice small{grid-column:2;color:var(--muted)}.ledger-choice input{accent-color:#d5ad70;width:17px;height:17px}.ledger-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.ledger-form-grid label{display:flex;flex-direction:column;gap:7px}.ledger-wide{grid-column:span 2}
.ledger-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#51412b;border:1px solid #51412b;border-radius:5px;overflow:hidden;margin:20px 0}.ledger-totals>div{padding:17px 20px;background:#211c14}.ledger-totals span{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}.ledger-totals strong{font:25px Georgia,serif;color:#efdab0}.ledger-table-wrap{overflow:auto;border:1px solid #4e402b;border-radius:4px}.ledger-dialog table{width:100%;border-collapse:collapse;font-size:13px}.ledger-dialog th{font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;color:#b7a98e;background:#221d14;white-space:nowrap;padding:13px 12px}.ledger-dialog td{padding:14px 12px;vertical-align:top;border-top:1px solid #3d3324;white-space:nowrap}.ledger-dialog small{display:block;font-size:11px;color:var(--muted);margin-top:6px}.ledger-item{display:flex;align-items:center;gap:9px}.ledger-item img{border-radius:3px}.ledger-row-actions .button{margin:0 4px 5px 0;padding:6px 8px;min-height:28px}.ledger-empty{color:var(--muted);text-align:center;white-space:normal!important;padding:36px!important}.ledger-up{color:var(--up-text)}.ledger-down{color:var(--down-text)}.ledger-gold{margin:20px 0;padding:16px;border:1px solid #4f402b;border-radius:5px}.ledger-gold figcaption{font-family:Georgia,serif}.ledger-gold svg{display:block;width:100%;height:110px;margin-top:12px}.ledger-gold polyline{fill:none;stroke:#cfa76b;stroke-width:2}.ledger-gold p{margin-bottom:0}
@media(max-width:700px){.ledger-dialog{width:96vw;height:94dvh}.ledger-header{padding:14px 16px}.ledger-body{padding:14px}.ledger-header h2{font-size:25px}.ledger-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ledger-totals{grid-template-columns:1fr}.ledger-totals>div{padding:12px 16px}.ledger-totals strong{font-size:22px}.ledger-totals span{margin-bottom:5px}}
/* Portfolio workspace: the item browser remains available beside every view. */
.personal-nav{flex-direction:column;gap:4px;padding:0 14px 20px;flex:none}
.personal-nav .button{justify-content:flex-start;gap:13px;min-height:40px;font-size:16px;border-color:transparent;background:transparent;text-align:left}
.personal-nav .button>span{width:19px;text-align:center;color:var(--gold);font:20px system-ui}
.personal-nav .button[aria-pressed=true]{border-color:#9b7947;background:linear-gradient(100deg,#49371e88,#292217);color:#f6e3be}
.ledger-page{position:static;display:flex;flex-direction:column;width:100%;max-width:none;height:100%;max-height:none;min-height:0;min-width:0;margin:0;border:0;border-radius:0;box-shadow:none;background:radial-gradient(ellipse at 70% 0,#32251522,transparent 55%),#16140f;flex:1 1 0!important}
.ledger-page .ledger-header{padding:25px 30px 15px;background:transparent;border:0;align-items:center}
.ledger-page .ledger-header h2{font-size:36px;margin-top:5px}
.ledger-page .ledger-header .eyebrow{font-size:10px;letter-spacing:1.8px;color:#9e8d6d}
.ledger-page .ledger-body{padding:0 30px 28px;flex:1;scrollbar-color:#615138 transparent}
#ledger-header-actions .ledger-import-bar{margin:0}
#ledger-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.ledger-setup{max-width:860px;margin:18px auto 24px;padding:18px 22px;background:#211c13}
.ledger-setup>summary{font:20px Georgia,serif;color:#f0dfbf}
.ledger-setup-content{padding-top:22px}
.ledger-setup-content>.ledger-setup-subheading{margin-top:28px}
.ledger-setup-content>.ledger-start-steps{font-size:14px}
#ledger-header-actions .ledger-file{font-size:14px;min-height:37px;padding:10px 15px}
#ledger-character-tools{margin:10px 0 15px}
.portfolio-totals{grid-template-columns:1.3fr 1.15fr 1fr .9fr;margin:0 0 22px;border-color:#6d5530;background:#58472e}
.portfolio-totals>div{background:linear-gradient(130deg,#272116,#1c1912);padding:22px 23px;min-width:0}
.portfolio-totals span{font:15px Georgia,serif;color:#d2c5ac;margin-bottom:13px}
.portfolio-totals strong{font:32px/1.15 Georgia,serif;white-space:nowrap;color:var(--text)}
.portfolio-totals .portfolio-value strong{font-size:clamp(28px,2.7vw,44px)}
.ledger-page .profit-figure strong{display:block;font:600 26px/1.15 system-ui,sans-serif;font-variant-numeric:tabular-nums;color:inherit}
.ledger-page .profit-figure small{font-size:13px;color:inherit;margin-top:5px;font-variant-numeric:tabular-nums}
.ledger-page .profit-figure.ledger-up{color:#83ce8b}.ledger-page .profit-figure.ledger-down{color:#f18476}
.ledger-page .portfolio-totals .profit-figure strong{font-size:clamp(29px,2.9vw,44px)}
.ledger-page .portfolio-totals .profit-figure small{font-size:17px}
.ledger-page .portfolio-totals .coverage-note{color:var(--muted);font-size:11px;order:4}
.portfolio-totals>div{display:flex;flex-direction:column;align-items:flex-start}
.portfolio-chart{border:1px solid #55432b;border-radius:5px;padding:17px 20px 6px;margin-bottom:24px;background:#18160f}
.portfolio-chart-heading,.portfolio-chart-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.portfolio-chart-heading h3{font-size:17px;margin:0}.portfolio-chart-heading .ledger-muted{font-size:11px;margin:4px 0 0}
.portfolio-chart-controls .ranges{display:flex}
#portfolio-plot svg{display:block;width:100%;height:clamp(150px,19vw,255px)}
#portfolio-plot svg text{fill:#a99d85;font:12px system-ui,sans-serif}
.portfolio-grid{stroke:#383124;stroke-width:1}
.portfolio-line{fill:none;stroke:#83ce8b;stroke-width:2.5;stroke-linejoin:round}.portfolio-line.negative{stroke:#f18476}
.portfolio-chart-empty{display:grid;place-content:center;text-align:center;min-height:145px;color:var(--muted);font-size:13px;max-width:550px;margin:auto}
.holdings-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:18px 0 12px}
.ledger-page .holdings-heading h3{margin:0;font-size:22px}#holdings-count{font:12px system-ui;color:#bba582;border:1px solid #51412b;border-radius:4px;padding:2px 7px;margin-left:7px;vertical-align:middle}
.ledger-page th{font:12px Georgia,serif;text-transform:none;letter-spacing:0;color:#d1c3a8;background:#241e14;padding:14px}
.ledger-page td{padding:17px 14px;vertical-align:middle}.ledger-page td.numeric,.ledger-page th.numeric{text-align:right}
.holding-row{cursor:pointer}.holding-row:hover{background:#2b2418}.holding-row.selected{background:linear-gradient(90deg,#49371e88,#31291a55);box-shadow:inset 3px 0 #b18b50}
.holding-open{border:0;background:none;color:var(--text);cursor:pointer;text-align:left;padding:0;min-width:190px;width:100%}
.holding-open .ledger-item strong{font:16px Georgia,serif}.holding-open .ledger-item{gap:12px}.holding-open .ledger-item small{font:11px system-ui,sans-serif}
.ledger-page .holding-value{font-weight:600}.ledger-page td.profit-figure strong{font-size:21px}
.ledger-page td.today-figure strong{font-size:16px}.ledger-page td.today-figure small{font-size:11px}
.ledger-page .price-stale{color:#d0ad72}
.holding-detail{display:flex;align-items:center;gap:24px;flex-wrap:wrap;margin:20px 0 0;padding:20px;border:1px solid #876738;border-radius:5px;background:linear-gradient(120deg,#2a2216,#19160f)}
.holding-detail>.holding-detail-metric{padding-left:20px;border-left:1px solid #59472c}
.holding-detail-metric strong{display:block;font:22px Georgia,serif;margin-top:8px}.holding-detail-actions{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.holding-more{width:100%;font-size:12px;color:var(--muted)}.holding-more summary{cursor:pointer}.holding-more p{margin:10px 0}
.ledger-first-run #portfolio-chart,.ledger-first-run .holdings-heading{display:none}
.ledger-setup-actions{margin:0 0 24px}
.ledger-install-guide{padding:18px;margin:0 0 24px;border:1px solid #685033;border-radius:4px;background:#17140f;font-size:13px;color:#c9bea8}
.ledger-install-guide code{overflow-wrap:anywhere}
.ledger-experimental{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin:0 0 18px;padding:12px 15px;border:1px solid #51412b;border-radius:4px;background:#241e1488;color:#bfb39d;font-size:12px}
.ledger-experimental strong,.ledger-addon-status strong{color:#dfbd81;font-weight:600}
.ledger-experimental span{flex:1 1 420px}
.ledger-addon-status{margin:0 0 14px;color:#bfb39d;font-size:12px}
.ledger-coverage{margin:24px 0 0;padding-top:16px;border-top:1px solid #53422b;font-size:12px;color:#b9aa8d}
.ledger-coverage strong{color:#e0c28c;font-weight:500}
.ledger-sync-offer{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:15px 18px;margin:8px 0 20px;border:1px solid #685033;border-radius:4px;background:#262015}
.ledger-sync-offer>div{flex:1 1 300px}.ledger-sync-offer strong{font:17px Georgia,serif;color:#efd8ad}.ledger-sync-offer p{margin:5px 0 0;font-size:13px;color:#c4b79d}
.ledger-dialog a:focus-visible{outline:2px solid #ddb873;outline-offset:2px}
@media(max-width:1250px){.ledger-page .ledger-body{padding-inline:22px}.ledger-page .ledger-header{padding-inline:22px}.portfolio-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.portfolio-totals>div{padding:17px 20px}.ledger-page td{padding:14px 10px}.holding-detail{gap:18px}}
@media(max-width:700px){.ledger-page .ledger-header{padding:20px 16px 12px;flex-wrap:wrap}.ledger-page .ledger-header h2{font-size:29px}.ledger-page .ledger-body{padding:0 14px 22px}.portfolio-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.portfolio-totals>div{padding:15px 12px}.portfolio-totals span{font-size:13px}.portfolio-totals strong,.portfolio-totals .portfolio-value strong{font-size:21px}.ledger-page .portfolio-totals .profit-figure strong{font-size:25px}.ledger-page .portfolio-totals .profit-figure small{font-size:14px}.portfolio-chart{padding:13px 10px 0}.portfolio-chart-controls{gap:6px}.portfolio-chart-controls .ranges button{min-width:27px;font-size:12px}.ledger-page .ledger-table-wrap{border-radius:4px}.holding-detail{padding:16px;gap:16px}.holding-detail>.holding-detail-metric{padding-left:0;border:0}.holding-detail>.profit-figure{margin-left:auto}.holding-detail>.holding-detail-actions{margin-left:0}.ledger-page .ledger-item strong{font-size:15px}}
