#themeComparePanel .ts-compare-controls { gap: 20px; }
#themeComparePanel .ts-compare-segment button { white-space: nowrap; min-width: 58px; }
#themeComparePanel .ts-compare-body { grid-template-columns: minmax(210px, 25%) minmax(0, 1fr); }
#themeComparePanel .tp-list-heading { color: var(--ts-text-3); font-size: 11px; padding: 5px 9px 12px; }
#themeComparePanel .ts-compare-entity { gap: 8px; padding: 11px 9px; }
#themeComparePanel .tp-entity-name { flex: 1; min-width: 0; line-height: 1.35; }
#themeComparePanel .ts-compare-entity strong { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#themeComparePanel .ts-compare-entity:disabled { opacity: .45; }
#themeComparePanel .tp-chart { grid-template-rows: auto auto minmax(140px, 1fr) auto auto; padding: 20px 20px 12px; gap: 12px; }
.tp-chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tp-chart-heading>div { display: grid; gap: 5px; }
.tp-chart-heading strong { font-size: 14px; }
.tp-chart-heading span, .tp-average-toggle { font-size: 11px; color: var(--ts-text-3); }
.tp-average-toggle { display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.tp-average-toggle input { accent-color: var(--ts-accent-strong); }
.tp-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-summary button { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 5px 7px; align-items: center; padding: 8px 10px; background: transparent; color: var(--ts-text-1); border: 1px solid var(--ts-border); border-radius: 5px; text-align: left; font-size: 11px; }
.tp-summary i { width: 6px; height: 6px; border-radius: 50%; background: var(--tp-color); }
.tp-summary strong { color: var(--tp-color); font-size: 14px; font-variant-numeric: tabular-nums; }
.tp-summary small { grid-column: 2 / 4; font-size: 10px; color: var(--ts-text-3); }
#themeComparePanel .tp-plot svg { width: 100%; height: 100%; min-height: 150px; }
#themeComparePanel .tp-plot text { font-size: 12px; }
#themeComparePanel .tp-plot .tp-end-label text { font-size: 11px; }
#themeComparePanel .tp-plot .tp-main-line { stroke-width: 2.2; }
#themeComparePanel .tp-plot .tp-average { stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .55; }
.tp-zero { stroke: var(--ts-text-3); stroke-width: 1.2; }
#themeComparePanel .tp-benchmark { stroke: var(--ts-text-3); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .7; }
.tp-cursor { stroke: var(--ts-text-3); stroke-dasharray: 3 3; }
.tp-inspect { display: flex; flex-wrap: wrap; gap: 5px 14px; min-height: 32px; font-size: 11px; color: var(--ts-text-3); align-items: center; border-top: 1px solid var(--ts-border); padding-top: 9px; }
.tp-inspect b { color: var(--tp-color); font-variant-numeric: tabular-nums; }
.tp-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; color: var(--ts-text-3); font-size: 10px; }
@media(max-width: 850px) { #themeComparePanel .ts-compare-body { grid-template-columns: minmax(150px, 26%) minmax(0, 1fr); } #themeComparePanel .tp-chart { padding: 12px 8px; gap: 8px; } .tp-summary small { display: none; } }
@media(max-width: 620px) { #themeComparePanel .ts-compare-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(100px, .32fr) minmax(300px, 1fr); } #themeComparePanel .ts-compare-controls { gap: 8px; } .tp-summary button { padding: 5px 7px; } .tp-summary strong { font-size: 12px; } .tp-chart-heading { align-items: flex-start; } }

[data-app-view="dashboard"] #themeComparePanel { height: min(760px, calc(100dvh - var(--ts-command-height) - 100px)); max-height: min(760px, calc(100dvh - var(--ts-command-height) - 100px)); }
#themeComparePanel .tp-summary button { width: auto; min-width: 160px; max-width: 240px; height: auto; min-height: 52px; white-space: nowrap; }
#themeComparePanel .tp-summary button span { overflow: hidden; text-overflow: ellipsis; }
@media(max-width:620px) { [data-app-view="dashboard"] #themeComparePanel { height: calc(100dvh - 145px); max-height: calc(100dvh - 145px); } #themeComparePanel .tp-summary button { min-width: 0; max-width: none; min-height: 30px; } }

#themeComparePanel .ts-compare-segment button { width: auto; height: auto; flex: 0 0 auto; padding: 8px 12px; }
.tp-footnote > span:first-child::before { content: ""; display: inline-block; width: 16px; margin-right: 6px; border-top: 1px dashed var(--ts-text-3); vertical-align: middle; }

@media(max-width:620px) { #themeComparePanel .ts-compare-controls { flex-wrap: wrap; overflow-x: visible; } #themeComparePanel .ts-compare-segment button { padding: 7px 9px; } }

/* Metric help follows the chart-info disclosure: click, outside dismissal, Escape. */
#themeComparePanel .tp-title-line { display: flex; align-items: center; gap: 8px; }
#themeComparePanel .tp-help-button { flex: 0 0 24px; width: 24px; height: 24px; min-width: 24px; min-height: 24px; padding: 0; border: 1px solid var(--ts-border); border-radius: 50%; background: var(--ts-surface-1); color: var(--ts-text-3); font: 700 13px/1 system-ui, sans-serif; }
#themeComparePanel .tp-help-button:is(:hover,:focus-visible) { color: var(--ts-accent-strong); outline: 2px solid var(--ts-accent-strong); outline-offset: 2px; }
#themePerformanceHelp { position: fixed; inset: auto; margin: 0; width: min(410px, calc(100vw - 24px)); box-sizing: border-box; max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; border: 1px solid var(--ts-border); border-radius: 8px; background: var(--ts-surface-1); color: var(--ts-text-1); box-shadow: 0 8px 28px rgb(0 0 0 / 24%); font: 13px/1.6 system-ui, sans-serif; white-space: normal; }
#themePerformanceHelp header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#themePerformanceHelp header strong { font-size: 15px; }
#themePerformanceHelp header button { width: 28px; height: 28px; min-width: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: 20px system-ui; cursor: pointer; }
#themePerformanceHelp section { margin-top: 14px; }
#themePerformanceHelp h4 { margin: 0 0 5px; font-size: 13px; color: var(--ts-text-1); }
#themePerformanceHelp p { margin: 7px 0; }
#themePerformanceHelp .tp-help-example { color: var(--ts-accent-strong); }
#themePerformanceHelp .tp-help-caution { padding-top: 12px; border-top: 1px solid var(--ts-border); }
#themePerformanceHelp footer { margin-top: 12px; color: var(--ts-text-3); font-size: 12px; }
#themeComparePanel .ts-compare-entity strong { font-size: 11px; }
@media(max-width:850px) { #themeComparePanel .ts-compare-entity { flex-wrap: wrap; } #themeComparePanel .ts-compare-entity strong { margin-left: 20px; } }
