/* Analysis keeps the chart fixed while the invoice breakdown scrolls below. */
.analysis-page-active main.scroll{padding:0;overflow:hidden;background:#fff}.report-header{padding-bottom:0}.report-title-row{display:flex;align-items:center;gap:12px;min-width:0}.report-title-row h1{flex:none}.report-title-row .scope-button{margin-left:auto;max-width:60%}.report-header-row{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:6px}.report-header-row>button{min-height:44px;min-width:44px;border-radius:12px}.report-header-row>button:not(.report-date){font-size:26px}.report-date{font-size:14px;overflow-wrap:anywhere;max-width:calc(100% - 100px);padding:8px 12px}.report-header button:hover:not(:disabled){background:#ffffff24}
.analysis-page{height:100%;display:flex;flex-direction:column;min-height:0}.analysis-tabs{display:flex;flex-shrink:0;background:var(--accent);color:var(--soft,#f0f8e8);padding:0 10px}.analysis-tabs button{flex:1;min-height:42px;font-size:13px;white-space:nowrap;border-bottom:3px solid transparent;padding:8px 2px}.analysis-tabs button.active{color:white;font-weight:700;border-color:white}.analysis-tabs button:last-child{flex:0 0 36px;font-size:23px}.analysis-tabs sup{font-size:10px}.report-chart-pane{flex-shrink:0;background:#fff;padding:0 12px}.analysis-dimensions{display:flex;gap:8px;margin:8px 0 0}.analysis-dimensions button{flex:1;min-height:36px;border-radius:18px;font-size:13px;color:var(--muted)}.analysis-dimensions button.active{background:var(--soft,#f0f8e8);color:var(--accent);font-weight:650}.donut-wrap{position:relative;width:clamp(170px,31dvh,300px);height:clamp(170px,31dvh,300px);margin:0 auto}.donut{display:block;width:100%;height:100%;touch-action:none;user-select:none}.chart-slice{cursor:grab;stroke:#fff;stroke-width:.6;transition:opacity .1s}.chart-slice:active{cursor:grabbing}.chart-slice.selected{stroke:var(--ink);stroke-width:1.5}.chart-slice:focus-visible{stroke:var(--ink);stroke-width:3;outline:none}.muted-slice{opacity:.3}.slice-percent{font-size:10px;fill:#152238;text-anchor:middle;dominant-baseline:middle;pointer-events:none;font-weight:600}.donut-center{position:absolute;inset:30%;padding:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:3px;overflow-wrap:anywhere;line-height:1.25;min-width:0}.donut-center small{font-size:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.donut-center strong{font-size:clamp(11px,1.9dvh,16px);color:var(--ink);max-width:100%}.report-insight{display:flex;align-items:center;justify-content:center;gap:8px;font-size:10px;color:var(--muted);min-height:26px}.report-insight button{min-height:28px;min-width:30px;font-size:17px}.analysis-selection{min-height:38px;height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:var(--muted);overflow:hidden}.analysis-selection>span{overflow:auto;max-height:100%;scrollbar-width:none}.analysis-selection .link{white-space:nowrap;font-size:12px;flex-shrink:0}.report-list{flex:1;min-height:0;border-top:1px solid var(--line);background:white;padding:0 12px 12px}.report-list-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:white;z-index:2;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted);min-height:36px}.report-list-head button{min-height:36px;padding:8px}.report-rank{display:flex;align-items:center;border-bottom:1px solid var(--soft,#f0f8e8);gap:6px;min-height:58px}.report-rank.selected,.report-data-row.selected{background:var(--soft,#f0f8e8)}.rank-fold{flex:0 0 30px;min-height:44px;color:var(--accent);font-size:21px;padding:0}.rank-fold{font-size:14px}.rank-main{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;min-width:0;text-align:left;min-height:56px;padding:8px 0;font-size:13px}.rank-main>span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}.rank-main>span:last-child{text-align:right;max-width:49%;overflow-wrap:anywhere}.rank-main strong{font-weight:600;font-size:12px}.rank-main small{display:block;font-size:10px;margin-top:4px}.source-ledger{font-weight:400;color:var(--muted)}.color-dot{width:8px;height:8px;border-radius:50%;margin:0 8px;flex-shrink:0}.report-rank.child{padding-left:22px;min-height:48px}.child .rank-main{min-height:48px;font-size:12px}.child .rank-main strong{font-weight:450}.timeline-pane{background:var(--accent);color:white;padding-top:8px}.timeline-pane select{display:block;width:auto;max-width:90%;margin:auto;padding:6px 10px;color:white;background:#ffffff19;border:1px solid #ffffff33;font-size:12px}.timeline-pane option{color:var(--ink);background:white}.report-legend{display:flex;gap:6px;overflow-x:auto}.report-legend button{flex:0 0 auto;min-height:42px;padding:3px 7px;font-size:11px;opacity:.5;text-align:left;border-radius:7px}.report-legend button.active{opacity:1;background:#ffffff13}.report-legend small{display:block;color:var(--soft,#f0f8e8);font-size:9px;padding-top:4px}.report-legend i{display:inline-block;width:12px;border-top-width:2px;margin-right:4px;vertical-align:middle}.line-chart{display:block;width:100%;height:clamp(148px,28dvh,260px);touch-action:pan-y}.axis-label{font-size:8px;fill:var(--soft,#f0f8e8)}.line-chart rect[role=button]{cursor:crosshair;outline:none}.line-chart rect[role=button]:focus-visible{stroke:white;fill:#ffffff22;stroke-width:1}.timeline-pane .report-insight,.timeline-pane .analysis-selection{color:var(--soft,#f0f8e8)}.timeline-pane .link{color:white}.point-value{display:inline-block;margin-left:7px;font-size:10px}.report-grid{display:grid;align-items:center;gap:5px;width:100%;font-size:11px;text-align:right}.report-grid.cash{grid-template-columns:54px repeat(3,minmax(0,1fr))}.report-grid.assets{grid-template-columns:65px repeat(2,minmax(0,1fr))}.report-grid>:first-child{text-align:left}.report-grid>span{overflow-wrap:anywhere}.report-grid button{padding:6px 0;min-height:44px;text-align:inherit}.report-table-head{position:sticky;top:0;background:white;z-index:2;color:var(--muted);border-bottom:1px solid var(--line)}.report-table-head button{font-size:11px}.report-total{background:var(--soft,#f0f8e8);font-size:11px;border-bottom:1px solid var(--line)}.report-data-row{border-bottom:1px solid var(--soft,#f0f8e8);min-height:48px}.analysis-child{padding:10px 0}.analysis-page .empty{padding:32px 12px}
@media(max-width:360px){.report-header{padding-inline:14px}.report-date{font-size:12px}.analysis-tabs{padding-inline:6px}.analysis-tabs button{font-size:12px}.report-chart-pane{padding-inline:8px}.report-list{padding-inline:8px}.report-grid{font-size:10px;gap:3px}.report-grid.cash{grid-template-columns:45px repeat(3,minmax(0,1fr))}.rank-main{gap:5px;font-size:12px}.rank-main strong{font-size:11px}.report-legend small{font-size:9px}}
@media(max-height:650px){.analysis-tabs button{min-height:36px}.analysis-dimensions{margin-top:4px}.analysis-dimensions button{min-height:30px}.donut-wrap{width:160px;height:160px}.line-chart{height:145px}.report-insight{min-height:22px}.report-insight button{min-height:22px}.analysis-selection{height:34px;min-height:34px}.report-list-head{min-height:32px}}

@media(max-height:650px){.line-chart .axis-label{font-size:11px}}
.donut-center>*{width:100%;min-width:0;overflow-wrap:anywhere}
@media(max-height:650px){.donut-center small{font-size:9px}.donut-center strong{font-size:10px}.slice-percent{font-size:16px}}

/* Pointer focus on SVG paths otherwise draws a rectangular browser outline.
   Keyboard focus remains visible along the actual wedge through its stroke. */
.donut:focus,.donut .chart-slice:focus{outline:none}
/* Trend values stay intact: averages are identified, amounts never split mid-number. */
.report-legend .series-sample{width:28px;height:10px;display:inline-block;vertical-align:middle;margin-right:5px;flex-shrink:0}
.report-legend button{border:1px solid #ffffff40;border-radius:18px;padding:6px 10px}
.trend-plot{position:relative;min-width:0}
.trend-tooltip{position:absolute;z-index:4;top:6px;width:max-content;max-width:calc(100% - 8px);min-width:170px;padding:10px 12px;border-radius:12px;background:#597942f2;box-shadow:0 5px 18px #32482345;color:#fff;pointer-events:none;font-size:11px;line-height:1.35}
.trend-tooltip[hidden]{display:none}.trend-tooltip>strong{display:block;margin-bottom:6px;font-size:12px}.trend-tooltip>small{display:block;color:var(--soft,#f0f8e8);font-size:9px;margin-top:6px}
.tooltip-value{display:grid;grid-template-columns:auto auto;gap:10px;color:var(--series-color);padding:3px 0;align-items:baseline}.tooltip-value b{text-align:right;font-weight:600;overflow-wrap:anywhere}.tooltip-value>span{white-space:nowrap}.tooltip-value .series-sample{width:18px;height:9px;margin-right:4px;vertical-align:middle}
.trend-table-note{font-size:10px;color:var(--muted);margin:0;padding:8px 0;white-space:normal}
.trend-table .report-grid{min-width:320px;font-variant-numeric:tabular-nums}
.trend-table .report-grid>span{white-space:nowrap;overflow-wrap:normal}.trend-table .report-grid.cash{grid-template-columns:54px repeat(3,minmax(0,1fr));gap:4px}
.trend-table .report-table-head button{font-size:10px}.trend-table .report-grid>strong{font-size:10px}.trend-table .report-data-row>button:first-child{white-space:nowrap;font-size:10px}
@media(max-width:360px){.trend-tooltip{font-size:10px;padding:8px;min-width:150px}.tooltip-value{gap:7px}.trend-tooltip>strong{font-size:11px}}
.trend-table .report-data-row.selected{background:var(--soft,#f0f8e8);font-weight:700}
.trend-table .report-data-row.selected button{font-weight:700}

.report-data-row,.report-total,.report-rank,.entity-pie-row{cursor:pointer}
