
.topic-filters {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.topic-segments {display:inline-flex;gap:2px;padding:3px;background:var(--subtle);border:1px solid var(--line);border-radius:10px}
.topic-segments button {padding:5px 9px;min-height:0;border:0;border-radius:7px;font-size:12.5px;font-weight:600;background:transparent;color:var(--muted);white-space:nowrap}
.topic-segments button[aria-pressed=true] {background:var(--panel);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / 13%)}
:root[data-theme=dark] .topic-segments button[aria-pressed=true] {background:#3d3d44;box-shadow:none}
.topic-filters .topic-native,.topic-filters label:has(#business-scope) {display:none}
.topic-panel {--trend-height:300px}
@media(max-height:999px){.topic-panel {--trend-height:280px}}
@media(max-height:819px){.topic-panel {--trend-height:250px}}
.topic-annual {width:100%;height:calc(var(--trend-height,300px) - 40px);display:block;overflow:visible;fill:var(--ink)}
.topic-annual-stack,.topic-annual-wide.topic-annual-line {height:calc(var(--trend-height,300px) - 30px)}
.topic-annual text {font:600 12px var(--num)}
.topic-annual .topic-axis,.topic-ring .topic-axis {fill:var(--muted)}
.topic-annual .topic-axis.on,.topic-annual .topic-value-label.on {fill:var(--ink);font-weight:750}
.topic-annual .topic-inside {fill:white}
.topic-annual .topic-inside.dark-ink,:root[data-theme=dark] .topic-annual .topic-inside {fill:#1c1c24}
.topic-annual g[role=button] {cursor:pointer}
.topic-annual g[role=button]:focus-visible {outline-offset:-4px}
.topic-legend {display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:8px;color:var(--muted);font-size:13px;line-height:normal}
.topic-legend span,.topic-ring dt {display:inline-flex;align-items:center;gap:7px}
.topic-panel header>small {color:var(--muted);font-size:12px}
.topic-waterfall {display:grid;gap:12px}
.topic-bar-row {display:grid;align-items:center;gap:10px;font-size:13.5px}
.topic-bar-row:has(small) {grid-template-columns:minmax(65px,min(31%,142px)) minmax(0,1fr) 65px 60px}
.topic-bars-extra .topic-bar-row:has(small) {grid-template-columns:minmax(65px,min(28%,105px)) minmax(0,1fr) 65px minmax(82px,auto)}
.topic-bar-row:not(:has(small)){grid-template-columns:minmax(65px,min(39%,170px)) minmax(0,1fr) 68px}
.topic-bars {display:grid;gap:11px}
.topic-bar-row svg {display:block;width:100%;height:14px}
.topic-bar-row b,.topic-bar-row small {font:600 13px var(--num);text-align:right}
.topic-bar-row small {white-space:nowrap;color:var(--muted)}
.result-overview-cell .overview-bars {display:grid;gap:13px}
.result-overview-cell .overview-bars .topic-bar-row {--label-width:min(34%,100px);grid-template-columns:var(--label-width) minmax(0,1fr) auto auto;gap:10px;align-items:center;font:13.5px var(--sans)}
@supports (width:attr(data-label-width px, 84px)) {
  .result-overview-cell .overview-bars .topic-bar-row {--label-width:min(34%,attr(data-label-width px, 84px))}
}
.result-overview-cell .overview-bars .topic-bar-row > span {overflow-wrap:anywhere}
.result-overview-cell .overview-bars .topic-bar-row b {min-width:50px;white-space:nowrap;font:600 14px var(--num)}
.result-overview-cell .overview-bars .topic-bar-row small {font:12.5px var(--sans)}
.topic-ring {display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.topic-ring>svg {width:min(150px,100%);height:150px;fill:var(--ink);font:600 23px var(--num)}
.topic-ring text.topic-axis {font:12px var(--sans)}
.topic-ring dl {flex:1 1 150px;display:grid;gap:6px}
.topic-ring dl div {display:grid;grid-template-columns:1fr auto auto;gap:8px}
.topic-ring dd {font:600 13px var(--num)}
.topic-matrix th,.topic-matrix td {font:500 13px var(--num);padding:7px 8px;text-align:center}
.topic-matrix button {padding:4px 7px;min-height:0;border:0;background:transparent}
.topic-matrix .on button {background:var(--char);color:var(--accent);font-weight:700}
:root[data-theme=dark] .topic-matrix .on button {background:var(--inverse);color:var(--on-inverse)}
.topic-heat-matrix {border-collapse:separate;border-spacing:3px;min-width:300px}
.topic-heat-matrix th:first-child {width:24%}
.topic-heat-matrix tbody th:first-child {text-align:left;padding-left:6px}
.topic-heat-matrix th,.topic-heat-matrix td {border:0;background:transparent;white-space:nowrap}
.topic-matrix .topic-heat {position:relative}
.topic-heat-label {color:transparent}
.topic-heat-cell svg {position:absolute;inset:0;display:block;width:100%;height:100%;font:600 13px var(--num);border-radius:5px}
.topic-heat-matrix .on .topic-heat-cell svg {outline:1px solid var(--line);outline-offset:-1px}
.topic-heat-cell .topic-heat-dark, :root[data-theme="dark"] .topic-heat-cell .topic-heat-light {display:none}
:root[data-theme="dark"] .topic-heat-cell .topic-heat-dark {display:block}
.topic-gap {font-size:12.5px;color:var(--muted);margin:6px 0}
.result-workspace .topic-panel>.aggregation-check {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin:0 22px 14px;padding:9px 14px;border:1px solid var(--line);border-radius:10px;background:var(--subtle);color:var(--ink);font-size:13px}
.result-workspace .topic-panel>.aggregation-check.warning {background:var(--warn-bg);color:var(--warning)}
.aggregation-check p {flex:1 1 240px;min-width:0;overflow-wrap:anywhere}
.aggregation-check p span {margin-inline-start:.6em}
.aggregation-check button {flex:none;margin-inline-start:auto;border:0;background:transparent;color:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.aggregation-check button:hover {background:color-mix(in srgb,currentColor 8%,transparent)}
.aggregation-dialog {display:grid;gap:12px;min-width:0}
.aggregation-dialog .table-wrap {position:relative;contain:paint;max-height:48vh;overflow:auto}
.aggregation-dialog .csv :is(th,td) {min-width:110px;text-align:right;font-family:var(--num)}
.aggregation-dialog .csv :is(th,td):first-child {min-width:60px;width:60px;text-align:left}
.aggregation-dialog .csv td {overflow-wrap:normal;white-space:normal}
.aggregation-dialog .csv thead th {position:sticky;top:0}
.aggregation-dialog .dialog-actions>button:first-child:not(:last-child) {margin-inline-end:auto}
#modal:has(>.aggregation-dialog) .dialog-x {min-width:32px}
.topic-panel .analysis-chart:has(.topic-annual) {overflow:visible}
.report-topic-content {display:grid;gap:var(--gap);min-width:0}
.result-workspace .report-topic-content .business-metrics {margin:0;grid-auto-rows:1fr;grid-template-columns:repeat(4,minmax(0,1fr));padding:0;border:1px solid var(--line)}
.report-topic-content .business-metrics:has(>:last-child:nth-child(2)) {grid-template-columns:repeat(2,minmax(0,1fr))}
.report-topic-content .business-metrics:has(>:last-child:nth-child(3)) {grid-template-columns:repeat(3,minmax(0,1fr))}
.result-workspace .report-topic-content .business-metrics.compact > .topic-metric {display:flex;flex-direction:column;gap:10px;align-items:stretch;min-width:0;min-height:188px;padding:16px 18px 14px;color:var(--ink);overflow:visible;line-height:normal}
.topic-metric-head {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px}
.topic-metric-head small {white-space:nowrap;font:500 12px var(--num);color:var(--muted)}
.topic-value {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 7px}
.result-workspace .topic-metric strong {font:600 clamp(30px,2.55vw,46px)/1 var(--num);letter-spacing:-.01em;color:var(--ink);overflow-wrap:anywhere}
.result-workspace .topic-metric strong.long {font-size:clamp(23px,1.85vw,34px)}
.topic-value small {font:13px var(--sans);color:var(--muted)}
.topic-metric .topic-mini {margin-top:auto;display:block;width:100%;height:38px}
.topic-mini rect {fill:var(--leo-mini)}
.topic-mini rect.current {fill:var(--leo-mini-on)}
.topic-refs {display:grid;gap:3px;border-top:1px solid var(--line-soft);padding-top:9px;color:var(--muted);font-size:12.5px}
.topic-refs>span {display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px}
.topic-refs b {color:var(--ink);font:600 13px var(--num)}
.topic-metric .metric-missing {margin:0;font-size:12.5px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.result-workspace .topic-metric .topic-missing-value {color:var(--faint);font:600 24px/1.1 var(--sans)}
.result-workspace .topic-panel {min-width:0;padding:0;margin:0;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.topic-heading {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px;padding:18px 22px 14px}
.topic-heading h2 {display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:19px;letter-spacing:.01em}
.topic-heading h2 span {display:inline-block;padding:3px 10px;background:var(--accent);color:#1c1c24;border-radius:6px;font-size:15px}
.topic-heading p {margin-top:6px;color:var(--muted);font:12.5px var(--sans)}
.result-workspace .topic-panel .topic-filters {display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;border:0;margin:0;padding:0}
.topic-filters label {display:inline-flex;align-items:center;gap:6px;color:var(--muted);white-space:nowrap}
.topic-filters select {margin:0}
.result-workspace .topic-panel .analysis-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
.result-workspace .topic-panel .analysis-chart {border:0;border-radius:0;border-top:1px solid var(--line-soft);padding:18px 22px 20px;box-shadow:none;background:var(--panel);margin:0}
.result-workspace .topic-panel .analysis-chart.topic-figure-right {border-left:1px solid var(--line-soft)}
.result-workspace .topic-panel .analysis-chart header,.topic-panel .analysis-chart>h3 {margin-bottom:14px}
.result-workspace .topic-panel .analysis-chart h3 {font-size:15px}
.topic-panel .analysis-chart header {display:flex;align-items:baseline;justify-content:space-between;gap:6px}
.result-workspace .topic-panel .analysis-chart.span-full {grid-column:1/-1}
.result-workspace .analysis-tabs {background:var(--subtle);border:1px solid var(--line);padding:3px;border-radius:11px;gap:2px;width:fit-content}
.result-workspace .analysis-tabs button {flex:none;min-width:0;width:auto;padding:7px 13px;font:600 14px var(--sans);min-height:0}
.result-workspace .analysis-tabs button:not(.active) {background:transparent}
.result-workspace .analysis-tabs button:hover:not(.active) {background:#e7e7ed;color:var(--ink)}
:root[data-theme=dark] .result-workspace .analysis-tabs button:hover:not(.active) {background:var(--raised)}
.topic-segments button:hover:not([aria-pressed=true]):not(:disabled) {color:var(--ink)}
.result-workspace .report-context:has(.analysis-tabs) {padding:12px 18px;border-radius:14px;border:1px solid var(--line);background:var(--panel);gap:12px 18px}
@media(max-width:980px) {
 .result-workspace .topic-panel .analysis-grid {grid-template-columns:minmax(0,1fr)}
 .result-workspace .topic-panel .analysis-chart.topic-figure-right {border-left:0}
}
@media(max-width:760px) {
 .result-workspace .report-topic-content .business-metrics:has(>:last-child) {grid-template-columns:repeat(2,minmax(0,1fr))}
 .result-workspace .report-topic-content .business-metrics.compact > .topic-metric {padding:13px 14px 12px;min-height:0}
 .topic-heading,.result-workspace .topic-panel .analysis-chart {padding:14px}
 .result-workspace .topic-panel>.aggregation-check {margin-inline:14px}
 .aggregation-dialog .csv :is(th,td) {min-width:0;padding:7px 5px;font-size:12.5px}
 .aggregation-dialog .csv th {white-space:normal}
 .aggregation-dialog .csv :is(th,td):first-child {min-width:44px;width:44px}
 .topic-metric-head {flex-wrap:wrap}
 .result-workspace .topic-metric strong {font-size:28px}
 .topic-bar-row:has(small),.topic-bars-extra .topic-bar-row:has(small) {grid-template-columns:minmax(65px,28%) minmax(0,1fr) minmax(42px,auto) minmax(48px,auto);gap:6px}
}
