.app-workspace.collection-dashboard { background: #eaf0f7; }
.app-workspace.collection-dashboard main.shell { padding-block-start: 24px; }
.cm-page {
  --cm-ink: #162941;
  --cm-muted: #536580;
  --cm-line: #d5e0ed;
  --cm-paper: #fff;
  --cm-soft: #f2f6fb;
  --cm-accent: #2368e8;
  --cm-green: #176654;
  --cm-green-soft: #edf6f1;
  --cm-blue: #325e95;
  --cm-amber: #79561c;
  --cm-red: #9c463f;
  --cm-radius: 10px;
  color: var(--cm-ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.cm-page [hidden] { display: none !important; }
.cm-page :is(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cm-blue);
  outline-offset: 3px;
}
.cm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cm-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 5px;
}
.cm-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cm-page .cm-heading h1 {
  margin: 0;
  color: var(--cm-ink);
  font-size: 2rem;
  letter-spacing: -.035em;
  line-height: 1.3;
}
.cm-scope {
  color: var(--cm-muted);
  font-size: .8rem;
}
.cm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cm-actions form { margin: 0; }
.cm-page .cm-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--cm-line);
  border-radius: 5px;
  background: var(--cm-paper);
  color: var(--cm-ink);
  font-size: .8rem;
  font-weight: 550;
  text-decoration: none;
}
.cm-page .cm-button:hover { background: var(--cm-soft); }
.cm-page .cm-primary { background: #18365a; border-color: #18365a; color: white; }
.cm-page .cm-primary:not(:disabled):hover { background: #294b76; border-color: #294b76; }
.cm-page .cm-button:disabled { color: var(--cm-muted); background: var(--cm-soft); border-color: var(--cm-line); }

.cm-statusline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin-bottom: 10px;
  color: var(--cm-muted);
  font-size: .75rem;
}
.cm-update { margin-left: auto; }
.cm-global { display: inline-flex; align-items: center; gap: 6px; color: var(--cm-ink); font-weight: 600; }
.cm-global::before, .cm-state::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}
.cm-global::before { color: #77858d; }
.cm-global[data-state=enabled]::before { color: var(--cm-green); }
.cm-sample-label { border-inline-start: 1px solid #bfcbd9; padding-inline-start: 9px; color: var(--cm-blue); font-weight: 650; }
.cm-page .cm-status-help { position: relative; margin: 0; }
.cm-page .cm-status-help > summary { padding: 0; color: var(--cm-green); cursor: pointer; }
.cm-status-help p {
  position: absolute;
  z-index: 1;
  width: min(280px, 75vw);
  margin: 7px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  background: var(--cm-paper);
  box-shadow: 0 8px 20px #172c3919;
  line-height: 1.65;
}
.cm-page .cm-text-button {
  min-height: 30px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--cm-green);
  font-size: .75rem;
  font-weight: 550;
  white-space: nowrap;
}
.cm-page .cm-text-button:hover { background: var(--cm-green-soft); }
.cm-message {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #c9dfd8;
  border-radius: 6px;
  background: var(--cm-green-soft);
  font-size: .825rem;
}
.cm-message-warning { background: #faf5ea; border-color: #b28c49; color: var(--cm-amber); }
.cm-message-error { background: #faf0ee; border-color: #ba695d; color: var(--cm-red); }
.cm-login { display: inline-block; margin-bottom: 14px; font-size: .825rem; }

.cm-dashboard { display: grid; gap: 14px; margin-bottom: 14px; }
.cm-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 13px;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  background: var(--cm-paper);
}
.cm-kpi { position: relative; min-width: 0; padding: 0 22px; }
.cm-kpi + .cm-kpi { border-inline-start: 1px solid var(--cm-line); }
.cm-page .cm-kpi h2 { margin: 0 0 4px; font-size: .875rem; font-weight: 600; }
.cm-kpi > p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; margin: 0; line-height: 1.1; }
.cm-kpi strong { color: var(--cm-ink); font-size: 2.2rem; font-weight: 720; letter-spacing: -.035em; }
.cm-kpi p span { color: var(--cm-muted); font-size: .75rem; }
.cm-page .cm-kpi-action { position: absolute; inset: 1px 16px auto auto; min-height: 26px; color: var(--cm-blue); }
.cm-page .cm-kpi-action:hover, .cm-page .cm-kpi-action[aria-pressed=true] { background: var(--cm-soft); }

.cm-analytics, .cm-breakdown { display: grid; gap: 14px; }
.cm-analytics { grid-template-columns: minmax(0, 1.95fr) minmax(261px, 1fr); }
.cm-analytics:has(.cm-trend-compare[open], .cm-share-all[open]) { align-items: start; }
.cm-breakdown { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.cm-chart {
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  background: var(--cm-paper);
}
.cm-chart-header { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; min-height: 32px; }
.cm-page .cm-chart-header h2 { margin: 0; color: var(--cm-ink); font-size: 1.035rem; font-weight: 700; }
.cm-chart-context, .cm-chart-note { color: var(--cm-muted); font-size: .75rem; }
.cm-chart-note { margin: 6px 0 0; }
.cm-segmented { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--cm-line); border-radius: 6px; background: var(--cm-soft); }
.cm-page .cm-segmented button {
  min-height: 28px;
  min-width: 53px;
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cm-muted);
  font: inherit;
  font-size: .75rem;
  line-height: 1.3;
}
.cm-page .cm-segmented button:not(:disabled):hover { background: #e3edf9; color: var(--cm-ink); }
.cm-page .cm-segmented button[aria-pressed=true]:not(:disabled) { color: white; background: #203d63; font-weight: 650; }
.cm-page .cm-segmented button:disabled { cursor: not-allowed; opacity: .66; }
.cm-trend { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 283px; }
.cm-trend > :is(.cm-chart-header, .cm-trend-caption, .cm-trend-plot, .cm-trend-empty) { grid-column: 1 / -1; }
.cm-trend-caption { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-top: 5px; color: var(--cm-muted); font-size: .75rem; }
[data-trend-readout] { color: var(--cm-blue); font-weight: 600; }
.cm-trend-plot { width: 100%; min-width: 0; height: 184px; border-radius: 3px; touch-action: pan-y; }
.cm-trend-plot svg { display: block; height: 184px; width: 100%; overflow: visible; }
.cm-trend-grid { stroke: #dee7f1; stroke-width: 1; }
.cm-trend-axis { font-size: 12px; fill: var(--cm-muted); font-family: inherit; font-variant-numeric: tabular-nums; }
.cm-trend-line { fill: none; stroke: var(--cm-accent); stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; }
.cm-trend-source-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cm-trend-source-line[data-highlight=true] { stroke-width: 3; }
.cm-trend-bar { fill: #87aef0; }
.cm-trend-hourly-total { fill: none; stroke: var(--cm-accent); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.cm-trend-future { fill: #edf3fa; }
.cm-trend-halo { fill: var(--cm-accent); opacity: .12; }
.cm-trend-end { fill: var(--cm-accent); stroke: white; stroke-width: 1.5; }
.cm-trend-guide { stroke: #839dbe; stroke-width: 1; stroke-dasharray: 3 4; }
.cm-trend-marker { fill: white; stroke: var(--cm-accent); stroke-width: 2; }
.cm-chart-empty { display: grid; place-items: center; min-height: 132px; padding: 14px; margin: 0; color: var(--cm-muted); font-size: .82rem; text-align: center; }
.cm-trend .cm-chart-empty { min-height: 184px; }
.cm-trend-footer { grid-area: 4 / 1; display: flex; align-items: center; gap: 3px 14px; flex-wrap: wrap; color: var(--cm-muted); font-size: .75rem; }
.cm-trend-key::before { content: ""; display: inline-block; width: 17px; height: 3px; margin-inline-end: 6px; vertical-align: middle; background: var(--cm-accent); border-radius: 2px; }
.cm-page .cm-trend-compare { grid-area: 4 / 2; margin: 0 0 0 6px; }
.cm-page .cm-trend-compare[open] { grid-area: 5 / 1 / auto / -1; margin: 7px 0 0; }
.cm-trend-compare > summary { width: fit-content; margin-inline-start: auto; padding: 4px 7px; border: 1px solid var(--cm-line); border-radius: 5px; color: var(--cm-blue); font-size: .78rem; }

.cm-rank-list { margin: 6px 0 0; padding: 0; list-style: none; }
.cm-rank-list > li + li { margin-top: 2px; }
.cm-page .cm-rank-row {
  display: grid;
  grid-template-columns: minmax(83px, 30%) minmax(35px, 1fr) minmax(32px, max-content);
  gap: 10px;
  width: 100%;
  min-height: 28px;
  padding: 4px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cm-ink);
  font: inherit;
  font-size: .8rem;
  text-align: left;
}
.cm-page .cm-rank-row:hover { background: #f3f7fd; }
.cm-rank-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-rank-value { justify-self: end; font-weight: 650; }
.cm-rank-track { display: block; height: 7px; border-radius: 2px; background: #e7eef7; }
.cm-rank-bar { display: block; width: var(--fraction); height: 100%; border-radius: 2px; background: #367ce9; }

.cm-week-body { --week-height: 113px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px; align-items: start; margin-top: 17px; }
.cm-week-axis, .cm-week-grid { display: flex; flex-direction: column; justify-content: space-between; height: var(--week-height); }
.cm-week-axis { color: var(--cm-muted); font-size: .75rem; line-height: 0; text-align: right; }
.cm-week-plot { position: relative; min-width: 0; }
.cm-week-grid { position: absolute; inset: 0 0 auto; pointer-events: none; }
.cm-week-grid span { border-top: 1px solid #dee7f1; }
.cm-week-columns { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding-inline: 3px; }
.cm-page .cm-week-day {
  display: grid;
  grid-template-rows: var(--week-height) auto;
  justify-items: stretch;
  justify-content: stretch;
  align-items: end;
  gap: 5px;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--cm-muted);
  font: inherit;
  font-size: .75rem;
}
.cm-page .cm-week-day:hover { background: #f2f6fc; }
.cm-week-track { position: relative; display: block; height: 100%; }
.cm-week-bar { position: absolute; bottom: 0; left: 12%; width: 76%; height: var(--fraction); border-radius: 3px 3px 0 0; background: #a0c4f0; }
.cm-week-value { position: absolute; bottom: calc(var(--fraction) + 3px); inset-inline: 0; white-space: nowrap; color: var(--cm-ink); font-weight: 600; }
.cm-week-day[data-current=true] .cm-week-bar { background: var(--cm-accent); }
.cm-week-day[aria-pressed=true] .cm-week-label { color: var(--cm-ink); font-weight: 700; }
.cm-week-day:is(:hover, :focus-visible) .cm-week-bar { background: #436fae; }

.cm-trend-table { margin-top: 7px; font-size: .72rem; }
.cm-trend-table summary { color: var(--cm-green); cursor: pointer; }
.cm-hourly-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; margin:16px 0 6px; font-size:.72rem; color:var(--cm-muted); }
.cm-hourly-heading strong { font-weight:550; color:var(--cm-green); }
.cm-hourly-chart { width:100%; min-width:0; padding:10px 0 0; border-radius:6px; background:#f5faf8; }
.cm-hourly-chart svg { display:block; width:100%; height:auto; }
.cm-hourly-grid { stroke:#dfeae5; stroke-dasharray:3 5; }
.cm-hourly-axis { fill:#71847b; font-size:10px; font-variant-numeric:tabular-nums; }
.cm-hourly-bar { opacity:.72; }
.cm-hourly-bar.is-selected { opacity:1; stroke:#174f43; stroke-width:1; }
.cm-hourly-zero { stroke:#a4c1b7; stroke-width:2; }
.cm-hourly-zero.is-selected { stroke:#174f43; stroke-width:3; }
.cm-trend-sources { margin: 12px 0 10px; border-top: 1px solid var(--cm-line); padding-top: 10px; min-width: 0; }
.cm-trend-source-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .77rem; font-weight: 650; }
.cm-trend-source-heading small { margin-left: 7px; font-size: .66rem; font-weight: 400; color: var(--cm-muted); }
.cm-trend-series { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; margin-top: 8px; }
.cm-page .cm-trend-series-item { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid transparent; border-radius: 5px; background: #f6f8f8; color: var(--cm-ink); text-align: left; font: inherit; font-size: .72rem; line-height: 1.5; }
.cm-page button.cm-trend-series-item:hover { border-color: #bbcdc6; background: #edf4f1; }
.cm-page button.cm-trend-series-item:focus-visible { outline: 2px solid #458f7c; outline-offset: 2px; }
.cm-page .cm-trend-series-item[aria-pressed=false] { background: transparent; color: #66756e; }
.cm-trend-series-item[aria-pressed=false] .cm-trend-swatch { opacity: .35; }
.cm-trend-series-item[aria-pressed=false] .cm-trend-series-name { text-decoration: line-through; }
.cm-page .cm-trend-series-item[data-total] { background: #eaf3ef; font-weight: 700; border-color: #d3e4dc; }
.cm-trend-swatch { width: 18px; height: 0; flex: 0 0 18px; border-top: 3px solid var(--series-color); }
.cm-trend-series-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-trend-series-value { margin-left: auto; flex-shrink: 0; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cm-trend-series-item:disabled { opacity: .6; cursor: default; }
.cm-trend-more { margin-top: 7px; font-size: .7rem; }
.cm-trend-more summary { cursor: pointer; color: var(--cm-green); }
.cm-trend-source-note { margin: 7px 0 0; color: var(--cm-muted); font-size: .65rem; line-height: 1.6; }
.cm-trend-table-filter { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cm-trend-table-filter select { max-width: 78%; min-width: 0; padding: 5px 8px; font: inherit; border: 1px solid var(--cm-line); border-radius: 4px; background: white; }
.cm-upcoming { margin-bottom: 24px; }
.cm-next-strip {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 12px;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  background: var(--cm-paper);
}
.cm-page .cm-next-strip h2 { flex: none; margin: 0; color: var(--cm-muted); font-size: .78rem; font-weight: 600; }
.cm-upcoming ol { list-style: none; margin: 0; padding: 0; }
.cm-next-strip ol {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.cm-upcoming li { min-width: 0; }
.cm-page .cm-task-button, .cm-next-strip li > span {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.cm-page .cm-task-button {
  width: 100%;
  min-height: 46px;
  justify-content: flex-start;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--cm-ink);
  font-size: .75rem;
  font-weight: 500;
}
.cm-page .cm-task-button:hover { background: var(--cm-soft); }
.cm-task-time { flex: none; font-size: .7rem; }
.cm-task-name { min-width: 0; overflow-wrap: anywhere; }
.cm-upcoming li :is(strong, small) { display: block; }
.cm-upcoming li small { color: var(--cm-muted); font-size: .68rem; }
.cm-task-arrow { margin-left: auto; color: var(--cm-muted); font-size: 1rem; }
.cm-next-strip .cm-empty { grid-column: 1 / -1; padding: 7px 0; text-align: left; }
.cm-page [data-manager-upcoming-more] {
  margin: 8px 0 0;
  padding: 4px 10px;
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  background: var(--cm-paper);
  font-size: .78rem;
}
.cm-page [data-manager-upcoming-more] > summary { padding: 4px 0; color: var(--cm-muted); cursor: pointer; }
.cm-enhanced [data-manager-upcoming-more]:not([open]) { display: none; }
.cm-page [data-manager-upcoming-rest] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 4px; }

.cm-section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; }
.cm-page .cm-section-heading h2 { margin: 0; font-size: 1.05rem; }
.cm-page .cm-section-heading .cm-status-help { font-size: .78rem; }
.cm-section-heading .cm-status-help p { inset-inline-end: 0; }
.cm-page #cm-sources-title { scroll-margin-top: 88px; }
.cm-section-heading :is(p, h2 span) { margin: 0; color: var(--cm-muted); font-size: .75rem; font-weight: 400; }
.cm-section-heading h2 span { margin-left: 4px; }
.cm-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 14px; margin: 9px 0 6px; }
.cm-filters { display: flex; flex-wrap: wrap; gap: 0 12px; }
.cm-page .cm-filters button {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--cm-muted);
  font-size: .76rem;
  font-weight: 500;
}
.cm-page .cm-filters button:is(:hover, [aria-pressed=true]) { color: var(--cm-green); }
.cm-page .cm-filters button[aria-pressed=true] { border-color: var(--cm-green); font-weight: 650; }
.cm-filters b { padding: 0 4px; border-radius: 3px; background: var(--cm-soft); font-size: .68rem; font-weight: 550; }
.cm-filters [aria-pressed=true] b { background: var(--cm-green-soft); }
.cm-source-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; }
.cm-page .cm-status-filter { position: relative; margin: 0; }
.cm-status-filter > summary {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--cm-line);
  border-radius: 5px;
  color: var(--cm-blue);
  background: var(--cm-paper);
  font-size: .78rem;
}
.cm-status-overview {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 5px) 0 auto auto;
  display: grid;
  min-inline-size: 144px;
  padding: 5px;
  border: 1px solid var(--cm-line);
  border-radius: 6px;
  background: var(--cm-paper);
}
.cm-page .cm-status-overview button {
  display: grid;
  grid-template-columns: 7px 1fr max-content;
  gap: 7px;
  justify-items: start;
  min-height: 32px;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  color: var(--cm-ink);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  text-align: left;
}
.cm-status-overview button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--status-tone, #8597af); }
.cm-page .cm-status-overview button:is(:hover, [aria-pressed=true]) { background: #eef4fc; }
.cm-page [data-manager-overview-filter=active] { --status-tone: #2368e8; }
.cm-page [data-manager-overview-filter=scheduled] { --status-tone: #278c89; }
.cm-page [data-manager-overview-filter=waiting] { --status-tone: #8bb9f6; }
.cm-page [data-manager-overview-filter=retry_wait] { --status-tone: #d49b26; }
.cm-page [data-manager-overview-filter=attention] { --status-tone: #c76758; }
.cm-page [data-manager-overview-filter=idle] { --status-tone: #b9c9dc; }
.cm-page [data-manager-overview-filter=paused] { --status-tone: #8192ab; }
@media (max-width: 700px) { .cm-status-overview { inset-inline: 0 auto; } }


.cm-page .cm-search { position: relative; margin: 0; }
.cm-page .cm-search input {
  width: min(192px, 70vw);
  min-height: 34px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid var(--cm-line);
  border-radius: 5px;
  background: var(--cm-paper);
  font: inherit;
  font-size: .78rem;
}

.cm-table-wrap { position: relative; overflow: auto; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); background: var(--cm-paper); }
.cm-table { width: 100%; min-width: 770px; margin: 0; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
.cm-table :is(th, td) {
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--cm-line);
  vertical-align: middle;
  text-align: left;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.cm-table thead th { color: var(--cm-muted); background: var(--cm-soft); font-size: .73rem; font-weight: 550; }
.cm-table thead th:nth-child(1) { width: 20%; }
.cm-table thead th:nth-child(2) { width: 20%; }
.cm-table thead th:nth-child(3) { width: 22%; }
.cm-table thead th:nth-child(4) { width: 20%; }
.cm-table thead th:nth-child(5) { width: 15%; }
.cm-table thead th:nth-child(6) { width: 3%; }
.cm-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.cm-table tbody tr:has(.cm-source-toggle:not([hidden])) { cursor: pointer; }
.cm-table tbody tr:is(:hover, :focus-within) { background: #f6faf8; }
.cm-page .cm-source-toggle {
  display: block;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--cm-ink);
  font-size: .84rem;
  font-weight: 650;
  text-align: left;
}
.cm-page .cm-source-toggle:hover { color: var(--cm-green); text-decoration: underline; }
.cm-source-category, .cm-activity small, .cm-batch small, .cm-counts small, .cm-result small {
  display: block;
  margin-top: 2px;
  color: var(--cm-muted);
  font-size: .72rem;
  font-weight: 400;
}
.cm-state { display: inline-flex; align-items: baseline; gap: 5px; color: var(--cm-muted); font-size: .75rem; font-weight: 550; }
.cm-state[data-state=collecting] { color: var(--cm-green); }
.cm-state[data-state=ingesting] { color: var(--cm-blue); }
.cm-state:is([data-state=retry_wait], [data-state=claimed]), .cm-page .cm-activity-stale { color: var(--cm-amber); }
.cm-state[data-state=attention] { color: var(--cm-red); }
.cm-state[data-state=unknown] { color: var(--cm-amber); }
.cm-result-label { display: inline-block; font-weight: 650; color: var(--cm-muted); }
.cm-result-label[data-tone=success] { color: var(--cm-green); }
.cm-result-label[data-tone=warning] { color: var(--cm-amber); }
.cm-result-label[data-tone=danger] { color: var(--cm-red); }
.cm-result-label::before { content: "·"; display: inline-block; width: 1em; }
.cm-result-label[data-tone=success]::before { content: "✓"; }
.cm-result-label:is([data-tone=warning],[data-tone=danger])::before { content: "!"; }
.cm-next-title { font-weight: 550; }
.cm-next-time { display: block; margin-top: 3px; color: var(--cm-ink); font-variant-numeric: tabular-nums; font-size: .85rem; }
.cm-page .cm-steps { display: flex; list-style: none; padding: 0; margin: 7px 0 3px; gap: 12px; font-size: .69rem; color: var(--cm-muted); }
.cm-steps li { display: flex; align-items: center; gap: 5px; }
.cm-steps li::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.cm-steps li + li::after { content: ""; order: -1; width: 18px; border-top: 1px solid var(--cm-line); margin-right: 3px; }
.cm-steps li[data-step=done] { color: var(--cm-green); }
.cm-steps li[data-step=done]::before { background: currentColor; }
.cm-steps li[data-step=active] { color: var(--cm-blue); font-weight: 600; }
.cm-steps li[data-step=active]::before { background: currentColor; box-shadow: 0 0 0 3px #e5edf7; }
.cm-activity-summary { font-weight: 550; }
.cm-next b { color: var(--cm-green); font-weight: 550; }
.cm-idle { color: var(--cm-muted); }
.cm-batch progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 6px 0 2px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #e6eeea;
  accent-color: #508a75;
}
.cm-batch progress::-webkit-progress-bar { background: #e6eeea; }
.cm-batch progress::-webkit-progress-value { background: #508a75; }
.cm-batch progress::-moz-progress-bar { background: #508a75; }
.cm-batch progress:not([value])::-webkit-progress-bar { background: repeating-linear-gradient(120deg, #e6eeea 0 7px, #96b4a8 7px 13px); }
.cm-batch progress:not([value]) { background: repeating-linear-gradient(120deg, #e6eeea 0 7px, #96b4a8 7px 13px); }
.cm-counts > span { display: flex; align-items: baseline; gap: 7px; }
.cm-counts b { color: var(--cm-ink); font-weight: 600; }
.cm-open-mark { padding-inline: 0 !important; text-align: center !important; color: var(--cm-muted); }
.cm-table tr:has(.cm-source-toggle:not([hidden])) .cm-open-mark::before { content: "›"; font-size: 1.15rem; }
.cm-empty { margin: 0; padding: 18px 12px; color: var(--cm-muted); font-size: .78rem; text-align: center; }
.cm-table-footer { display: flex; justify-content: space-between; gap: 9px; margin-top: 9px; color: var(--cm-muted); font-size: .73rem; }
.cm-footnote { margin: 16px 0 0; color: var(--cm-muted); font-size: .75rem; line-height: 1.6; }

/* The native modal keeps keyboard interaction within the right-hand panel. */
html:has(.cm-drawer[open]) { overflow: hidden; }
.cm-page .cm-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(700px, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--cm-paper);
  color: var(--cm-ink);
  box-shadow: -12px 0 35px #14293629;
  overflow: hidden;
}
.cm-drawer[open] { display: flex; flex-direction: column; }
.cm-drawer::backdrop { background: #172e3a4f; }
.cm-drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.cm-drawer-header > div { min-width: 0; }
.cm-eyebrow { margin: 0 0 5px; color: var(--cm-muted); font-size: .73rem; }
.cm-page .cm-drawer-header h2 { margin: 0; font-size: 1.42rem; overflow-wrap: anywhere; }
.cm-drawer-site { margin: 4px 0 0; color: var(--cm-muted); font-size: .8rem; overflow-wrap: anywhere; }
.cm-drawer-site:empty { display: none; }
.cm-page .cm-drawer-close {
  flex: 0 0 36px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--cm-muted);
  font-size: 1.45rem;
  line-height: 1;
}
.cm-page .cm-drawer-close:hover { background: var(--cm-soft); }
.cm-detail-tabs {
  display: flex;
  gap: 23px;
  padding: 0 24px;
  border-bottom: 1px solid var(--cm-line);
}
.cm-page .cm-detail-tabs button {
  min-height: 42px;
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--cm-muted);
  font-size: .82rem;
  font-weight: 550;
}
.cm-page .cm-detail-tabs button[aria-selected=true] { border-color: var(--cm-green); color: var(--cm-green); font-weight: 650; }
.cm-detail-tabs button span { font-size: .7rem; }
.cm-drawer-stale { margin: 9px 24px 0; }
.cm-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 24px 24px;
}
.cm-detail-content { min-width: 0; font-size: .9rem; line-height: 1.7; overflow-wrap: anywhere; }
.cm-drawer-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 24px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--cm-line);
  background: var(--cm-soft);
  color: var(--cm-muted);
  font-size: .72rem;
}
.cm-action-panel { padding: 18px; border: 0; border-left: 3px solid var(--cm-green); border-radius: 3px; background: #f0f5f5; }
.cm-page .cm-action-panel h3 { margin: 7px 0 8px; font-size: 1rem; line-height: 1.55; }
.cm-page .cm-action-panel > p { margin: 0 0 8px; }
.cm-detail-section + .cm-detail-section, .cm-action-panel + .cm-detail-section { margin-top: 26px; }
.cm-page .cm-detail-section h3 { margin: 0 0 10px; font-size: 1rem; }
.cm-page .cm-detail-section h4 { margin: 9px 0 6px; font-size: .94rem; }
.cm-muted { margin: 5px 0; color: var(--cm-muted); }
.cm-facts { margin: 0; }
.cm-facts > div { display: grid; grid-template-columns: minmax(6.5em, auto) minmax(0, 1fr); gap: 8px 11px; padding: 5px 0; }
.cm-facts dt { color: var(--cm-muted); font-size: .77rem; }
.cm-facts dd, .cm-detail-stats dd { margin: 0; }
.cm-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--cm-line);
}
.cm-detail-stats > div + div { padding-left: 9px; border-left: 1px solid var(--cm-line); }
.cm-detail-stats dt { color: var(--cm-muted); font-size: .72rem; }
.cm-detail-stats dd { font-weight: 650; }
.cm-copy-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 5px 0;
  padding: 5px 7px 5px 10px;
  border: 1px solid var(--cm-line);
  border-radius: 5px;
  background: var(--cm-soft);
}
.cm-page .cm-copy-box :is(code, pre) {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--cm-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: .77rem/1.6 Consolas, monospace;
}
.cm-event-list, .cm-units, .cm-unit-events { list-style: none; margin: 0; padding: 0; }
.cm-event, .cm-units > li {
  padding: 10px 0;
  border-bottom: 1px solid var(--cm-line);
}
.cm-event p, .cm-unit-events p { margin: 4px 0; }
.cm-event-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--cm-muted); font-size: .75rem; }
.cm-unit-lifecycle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; margin: 8px 0 4px; }
.cm-unit-lifecycle > div { display: grid; grid-template-columns: minmax(8em, auto) minmax(0, 1fr); gap: 5px; padding: 4px 0; border-bottom: 1px solid var(--cm-line); }
.cm-unit-lifecycle dt { color: var(--cm-muted); font-size: .73rem; }
.cm-unit-lifecycle dd { margin: 0; font-size: .76rem; }
.cm-unit-events > li { padding: 6px 0 3px; }
.cm-population-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cm-unit-search { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 12px 0 6px; }
.cm-unit-search label { display: flex; flex: 1 1 240px; flex-direction: column; gap: 4px; color: var(--cm-muted); font-size: .77rem; }
.cm-unit-search input { min-width: 0; width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid var(--cm-line); border-radius: 5px; background: var(--cm-paper); color: var(--cm-ink); }
.cm-search-outcome { padding: 8px 0; }
.cm-unit-source { display: inline-block; padding: 4px 0; }
.cm-detail-content code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.cm-page .cm-technical { margin: 14px 0 0; }
.cm-page .cm-technical > summary { padding: 4px 0; color: var(--cm-green); cursor: pointer; }
.cm-page .cm-technical[open] > summary { margin-bottom: 9px; }
.cm-empty-state { padding: 15px 17px; background: var(--cm-soft); color: var(--cm-muted); border-radius: 4px; }
.cm-plan-time { margin: 5px 0 12px; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--cm-green); }
.cm-plan-heading { font-size: 1.12rem; }
.cm-batch-choices { display: grid; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.cm-batch-choices li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; background: var(--cm-soft); border-left: 3px solid transparent; }
.cm-batch-choices li.is-selected { border-color: var(--cm-green); background: #edf5f2; }
.cm-batch-choices small { display: block; margin: 3px 0 0; }
.cm-unit-status { display: inline-block; padding: 2px 8px; border-radius: 3px; background: var(--cm-soft); color: var(--cm-muted); font-size: .76rem; }
.cm-unit-status[data-tone=success] { background: #e9f4ef; color: var(--cm-green); }
.cm-unit-status[data-tone=warning] { background: #fff5df; color: var(--cm-amber); }
.cm-document-list > li { padding: 19px 0 22px; }
.cm-inline-result { padding: 12px 14px; border-left: 2px solid var(--cm-line); background: #f8fafb; }
.cm-document-list .cm-technical { font-size: .83rem; }
.cm-detail-content .cm-text-button { min-height: 36px; }

@media (max-width: 940px) {
  .cm-update { margin-left: 0; }
  .cm-next-strip { align-items: flex-start; flex-wrap: wrap; }
  .cm-page .cm-next-strip h2 { padding-top: 7px; }
  .cm-next-strip ol { flex-basis: 80%; }
}
@media (max-width: 820px) {
  .cm-analytics, .cm-breakdown { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .cm-heading { align-items: flex-start; }
  .cm-page .cm-heading h1 { font-size: 1.75rem; }
  .cm-page .cm-button { min-height: 42px; }
  .cm-status-help p { position: fixed; inset: auto 16px; width: auto; }
  .cm-section-heading .cm-status-help p { inset-inline-end: 16px; }
  .cm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 0; }
  .cm-kpi { padding: 12px 14px; }
  .cm-kpi:nth-child(n+3) { border-block-start: 1px solid var(--cm-line); }
  .cm-kpi:nth-child(odd) { border-inline-start: 0; }
  .cm-kpi strong { font-size: 1.94rem; }
  .cm-page .cm-kpi-action { inset: 9px 9px auto auto; }
  .cm-chart { padding: 13px 14px; }
  .cm-page .cm-segmented button { min-height: 36px; }
  .cm-trend { grid-template-columns: minmax(0, 1fr); }
  .cm-page .cm-trend-compare, .cm-page .cm-trend-compare[open] { grid-area: 5 / 1; margin: 7px 0 0; }
  .cm-trend-compare > summary { margin-inline-start: 0; }
  .cm-trend-series { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .cm-page .cm-trend-series-item { padding-inline: 5px; font-size: .68rem; }
  .cm-trend-caption { font-size: .75rem; }
  .cm-week-day:not([aria-pressed=true]) .cm-week-value { display: none; }
  .cm-next-strip ol { order: 2; flex-basis: 100%; grid-template-columns: 1fr; }
  .cm-next-strip .cm-text-button { margin-left: auto; }
  .cm-task-time { width: 6.5em; }
  .cm-upcoming { margin-bottom: 17px; }
  .cm-drawer-header { padding: 16px 16px 8px; }
  .cm-detail-tabs { gap: 18px; padding: 0 16px; }
  .cm-drawer-scroll { padding: 13px 16px 20px; }
  .cm-drawer-stale { margin-inline: 16px; }
  .cm-drawer-footer { padding-inline: 16px; }
  .cm-unit-lifecycle { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .cm-week-columns { gap: 2px; padding-inline: 0; }
  .cm-page .cm-week-day { padding-inline: 0; }
  .cm-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .cm-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-detail-stats > div:nth-child(3) { border: 0; padding-left: 0; }
}

/* Make the reading hierarchy legible at standard desktop zoom. */
.cm-result small, .cm-current small, .cm-activity small, .cm-counts small { font-size: .78rem; }
.cm-state { font-size: .82rem; }
.cm-page .cm-source-toggle { font-size: .9rem; }
.cm-table :is(th, td) { padding-block: 15px; }
.cm-status-note { max-width: 26ch; }
.cm-result-warning { color: var(--cm-red) !important; }
.cm-raw-explanation { margin-top: 12px; font-size: .8rem; }
