.cohort-workspace { min-width: 0; }
/* A changing report summary must never push the tab strip down. */
.topbar--cohorts .active-filter-summary__tags { flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar--cohorts .active-filter-summary__tags::-webkit-scrollbar { display: none; }
.topbar--cohorts .active-filter-summary__actions { flex-shrink: 0; flex-wrap: nowrap; }
.topbar--cohorts .active-filter-tag { flex-shrink: 0; }
.topbar--cohorts .chip:disabled { cursor: default; opacity: .7; }
.cohort-dashboard-card > span { padding-right: 28px; min-width: 0; overflow-wrap: anywhere; }
.cohort-card-value { appearance: none; border: 0; padding: 0; background: none; color: inherit; font: inherit; font-size: 19px; font-weight: 700; text-align: left; cursor: pointer; position: relative; z-index: 1; }
.cohort-card-value:hover { text-decoration: underline; }
.cohort-card-value:focus-visible { outline: 2px solid var(--accent, #2f7db5); outline-offset: 3px; border-radius: 4px; }
.cohort-card-value--static { cursor: default; }
.cohort-card-value--static:hover { text-decoration: none; }
.cohort-dashboard-card .shared-funnel-node__conversion { width: 100%; box-sizing: border-box; gap: 6px; }
.cohort-dashboard-card .shared-funnel-node__conversion b { white-space: nowrap; }
.cohort-dashboard-head { align-items: center; }
.cohort-dashboard-head > div:first-child { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cohort-workspace .cohort-toolbar { margin-left: auto; padding: 0; }
.cohort-workspace .compare-toolbar { display: flex; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.cohort-workspace .compare-toolbar strong { margin-right: 6px; }
@media (max-width: 600px) {
  .cohort-card-value { font-size: 19px; min-height: 44px; overflow-wrap: anywhere; }
  .cohort-dashboard-card .shared-funnel-node__conversion { flex-wrap: wrap; }
}
.cohort-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; }
.cohort-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.cohort-toolbar select { min-height: 28px; padding: 3px 26px 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: var(--font-small); }
.cohort-toggle { font-size: var(--font-small); white-space: nowrap; }
.cohort-comparison-table { max-width: 100%; overflow: auto; margin: 8px 0; scrollbar-width: auto; scrollbar-color: var(--line-strong) var(--panel-soft); }
.cohort-comparison-table table { width: max-content; table-layout: auto; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cohort-comparison-table th, .cohort-comparison-table td { padding: 8px 10px; white-space: nowrap; border: 1px solid var(--line); }
.cohort-comparison-table th { background: var(--panel-soft); position: sticky; top: 0; z-index: 1; }
.cohort-comparison-table tbody tr:hover { background: var(--panel-soft); }
.cohort-comparison-actions { display: inline-flex; width: max-content; align-items: center; gap: 10px; white-space: nowrap; }
.cohort-comparison-actions .metric-cell-button { flex: 0 0 auto; width: auto; min-width: 0; }
.cohort-comparison-table::-webkit-scrollbar { width: 12px; height: 12px; }
.cohort-comparison-table::-webkit-scrollbar-track { background: var(--panel-soft); }
.cohort-comparison-table::-webkit-scrollbar-thumb { border: 2px solid var(--panel-soft); border-radius: 999px; background: var(--line-strong); }
.cohort-section-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; }
.cohort-charts { display: grid; gap: 12px; margin: 10px 0 14px; }
.cohort-chart-card { min-width: 0; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 8px 22px rgba(62, 43, 36, .06); }
.cohort-overview-chart { width: 100%; height: 310px; min-height: 260px; }
.dynamic-table-sticky-scroll { z-index: 39; }
.cohort-help-anchor { display: inline-flex; align-items: center; gap: 5px; }
.cohort-help { width: 24px; min-width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); color: var(--text); background: var(--panel); cursor: pointer; }
.cohort-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cohort-detail-finances { display: flex; gap: 12px; flex-wrap: wrap; }
.cohort-detail-finances > div { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.cohort-detail-finances strong { font-size: 20px; }
.cohort-entry-summary { font-weight: 600; margin: 6px 0; }
.cohort-entry-totals { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0; }
.cohort-entry-table .metric-cell-button { min-width: 0; width: auto; }
.cohort-entry-payment-row[hidden] { display: none; }
.cohort-entry-payment-row > td { background: var(--panel-soft); }
.cohort-entry-payment-content { contain: inline-size; min-width: 100%; }
.cohort-entry-payment-content caption { text-align: left; padding: 4px 0 8px; font-weight: 600; }
#cohortDetailSummary:has(.cohort-detail-finances), #cohortDetailSummary:has(.cohort-signal-detail) { display: block; min-width: 0; }
.cohort-signal-section { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; background: var(--panel); }
.cohort-signal-section h3 { font-size: 15px; margin: 0 0 8px; }
.cohort-technical-warning { padding: 10px; border-left: 3px solid #d69022; background: var(--panel-soft); }
#anomalyReviewSaved { margin-left: 8px; }
@media (max-width: 640px) {
  .cohort-toolbar { gap: 8px; }
  .cohort-dashboard-head { align-items: flex-start; }
  .cohort-workspace .cohort-toolbar { width: 100%; margin-left: 0; justify-content: space-between; }
  .cohort-overview-chart { height: 280px; }
  .cohort-help { min-width: 44px; height: 44px; }
  .cohort-comparison-table { -webkit-overflow-scrolling: touch; }
}
/* Calendar payments keep the shared KPI grid and intrinsic table widths. */
#cohortPaymentsPane, #cohortPaybackPane { min-width: 0; max-width: 100%; }
#cohortsView.is-active { gap: 0; }
.cohort-payment-tabs { display: flex; justify-content: flex-start; align-items: flex-end; gap: 4px; margin: 0; padding: 4px 8px 0; min-width: 0; border-bottom: 1px solid var(--line-strong); }
.cohort-report-tab { appearance: none; flex: 0 1 auto; min-width: 0; position: relative; bottom: -1px; padding: 9px 16px; border: 1px solid var(--line); border-bottom-color: var(--line-strong); border-radius: 12px 12px 0 0; background: var(--panel-soft); color: var(--muted); font: inherit; line-height: 1.35; white-space: nowrap; cursor: pointer; box-shadow: none; }
.cohort-report-tab:hover { background: var(--panel); color: var(--text); }
.cohort-report-tab[aria-selected="true"] { z-index: 1; background: var(--panel); border-color: var(--line-strong); border-bottom-color: var(--panel); color: var(--text); font-weight: 600; padding-top: 11px; }
.cohort-report-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.cohort-report-pane { min-width: 0; padding: 12px; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 12px 12px; background: var(--panel); }
@media (max-width: 640px) {
  .cohort-payment-tabs { padding-left: 0; padding-right: 0; gap: 3px; }
  .cohort-report-tab { min-height: 44px; padding: 9px 10px; }
  .cohort-report-tab[aria-selected="true"] { padding-top: 9px; }
  .cohort-report-pane { padding: 8px; }
}
.cohort-payment-filters { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cohort-payment-filters label { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.cohort-payment-filters select { max-width: 300px; min-width: 0; }
.cohort-payment-filters input[type="date"] { color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px; font: inherit; }
.cp-value { display: flex; flex-direction: column; align-items: flex-end; width: 100%; }
.cp-value small { color: var(--muted); font-size: 11px; font-weight: 400; }
.cp-matrix tfoot { font-weight: 700; }
.cp-method { margin-top: 10px; }
.cp-method p { margin: 8px 0; }
