.cs {
  color: var(--ink, #1d2421);
  font: 13px/1.5 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
  min-width: 0;
  container-type: inline-size;
  overflow-wrap: anywhere;
}
.cs *, .cs *::before, .cs *::after { box-sizing: border-box; }
.cs [hidden] { display: none !important; }
.cs h2, .cs h3, .cs p, .cs ol, .cs dl, .cs dd { margin: 0; }
.cs button, .cs input, .cs select { font: inherit; letter-spacing: 0; }
.cs button, .cs select, .cs summary { cursor: pointer; }
.cs :is(button, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--blue, #287bb5);
  outline-offset: 3px;
}
.cs-blue { color: var(--blue, #287bb5); }
.cs-green { color: var(--green, #16836d); }
.cs-amber { color: var(--amber, #c57714); }
.cs-red { color: var(--red, #c44949); }
.cs-muted, .cs-stage-note, .cs-stage-when, .cs-unit, .cs-phase { color: var(--muted, #68716c); }
.cs-heading, .cs-section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}
.cs-heading { align-items: center; padding: 16px 0 12px; }
.cs-phase { font-size: 12px; }
.cs-unit { margin-left: auto; font-size: 11px; }
.cs-help { position: relative; display: inline-flex; flex: 0 0 auto; }
.cs-help-button {
  width: 28px; height: 28px; padding: 0;
  border: 1px solid var(--line-strong, #bfc8c1);
  border-radius: 50%; background: transparent; color: var(--muted, #68716c);
}
.cs-tooltip {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  width: 250px; max-width: 85cqw; padding: 12px;
  background: var(--surface, #fff); color: var(--ink, #1d2421);
  border: 1px solid var(--line-strong, #bfc8c1); border-radius: 4px;
  box-shadow: var(--shadow, 0 4px 14px #0001); font-size: 12px;
}
.cs-help:hover .cs-tooltip, .cs-help:focus-within .cs-tooltip, .cs-help-open .cs-tooltip { display: block; }
.cs-help.cs-help-dismissed .cs-tooltip { display: none; }
.cs-flow {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line, #d9ded9); border-bottom: 1px solid var(--line, #d9ded9);
}
.cs-stage { position: relative; min-width: 0; padding: 16px 14px 16px 0; }
.cs-stage + .cs-stage { padding-left: 18px; border-left: 1px solid var(--line, #d9ded9); }
.cs-stage + .cs-stage::before {
  content: "›"; position: absolute; left: -7px; top: 20px; width: 13px;
  background: var(--surface, #fff); color: var(--muted, #68716c); text-align: center;
}
.cs-stage-heading { display: flex; align-items: center; gap: 8px; }
.cs-stage-heading h3 { font-size: 13px; font-weight: 600; color: var(--ink, #1d2421); }
.cs-stage-number { color: var(--muted, #68716c); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-stage-when { display: block; font-size: 11px; margin-top: 7px; }
.cs-stage-value { display: block; font-size: 26px; font-weight: 600; line-height: 1.6; font-variant-numeric: tabular-nums; }
.cs-stage-note { display: block; font-size: 11px; }
.cs-stage-unit { display: block; margin-bottom: 5px; color: var(--muted, #68716c); font-size: 11px; }
.cs .cs-work-note { margin: 10px 0; color: var(--muted, #68716c); font-size: 12px; }
.cs-action-guide { padding: 14px 0; border-top: 1px solid var(--line, #d9ded9); }
.cs-action-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-top: 10px; }
.cs-action-explanation { min-width: 0; }
.cs-action-explanation > dt { font-weight: 600; margin-bottom: 5px; }
.cs-action-explanation > dd { font-size: 12px; }
.cs .cs-action-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 8px; margin: 8px 0 12px; }
.cs-action-preview dt { color: var(--muted, #68716c); }
.cs-action-preview dd { text-align: right; font-variant-numeric: tabular-nums; }
.cs-action-preview dd:first-of-type { color: var(--blue, #287bb5); font-weight: 600; }
.cs .cs-action-order { margin-bottom: 5px; }
.cs-actual-power { font-size: 12px; color: var(--ink, #1d2421); }
.cs-supply-failed .cs-stage-value, .cs-supply-failed .cs-stage-note { color: var(--red, #c44949); }
.cs-actions { min-width: 0; margin: 14px 0 0; padding: 0 0 14px; border: 0; }
.cs-section-title { color: var(--ink, #1d2421); font-size: 13px; font-weight: 600; padding: 0; }
.cs-segmented { display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 420px); margin-top: 8px; }
.cs-action { position: relative; min-width: 0; cursor: pointer; }
.cs-action input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-action span {
  display: flex; justify-content: center; align-items: center; min-height: 38px; padding: 6px 8px;
  text-align: center; border: 1px solid var(--line-strong, #bfc8c1); color: var(--muted, #68716c);
  background: var(--surface, #fff);
}
.cs-action + .cs-action span { border-left: 0; }
.cs-action:first-child span { border-radius: 4px 0 0 4px; }
.cs-action:last-child span { border-radius: 0 4px 4px 0; }
.cs-action input:checked + span { background: var(--blue-soft, #e1eff8); color: var(--ink, #1d2421); box-shadow: inset 0 -2px var(--blue, #287bb5); font-weight: 600; }
.cs-action input:focus-visible + span { outline: 2px solid var(--blue, #287bb5); outline-offset: -3px; }
.cs-action input:disabled + span { opacity: .55; cursor: default; }
.cs-choice-status { color: var(--muted, #68716c); font-size: 12px; padding-top: 8px; }
.cs-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 16px 0; border-top: 1px solid var(--line, #d9ded9); }
.cs-summary > section { min-width: 0; }
.cs-section-heading { justify-content: space-between; margin-bottom: 10px; font-size: 11px; }
.cs-section-heading > strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.cs-capacity-bar { display: flex; height: 16px; overflow: hidden; background: var(--surface-muted, #f0f2ef); border-radius: 2px; margin: 12px 0 7px; }
.cs-capacity-bar span { display: block; height: 100%; }
.cs-fixed-fill { background: var(--line-strong, #bfc8c1); }
.cs-available-fill { background: var(--blue, #287bb5); }
.cs-unavailable span { visibility: hidden; }
.cs-capacity-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 11px; margin-bottom: 10px; }
.cs-capacity > p { font-size: 11px; margin-top: 4px; }
.cs-age-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cs-age { min-width: 0; display: flex; align-items: center; flex-direction: column; font-size: 11px; }
.cs-age-value { color: var(--ink, #1d2421); font-variant-numeric: tabular-nums; }
.cs-age-track { display: flex; align-items: end; width: 100%; height: 50px; background: var(--surface-muted, #f0f2ef); margin: 5px 0; }
.cs-age-track span { display: block; width: 100%; background: currentColor; }
.cs-age-label { color: var(--muted, #68716c); text-align: center; }
.cs-age-label span { display: block; }
.cs-age-range { white-space: nowrap; }
.cs-batches, .cs-history { border-top: 1px solid var(--line, #d9ded9); padding: 16px 0; }
.cs-batches > p { font-size: 11px; margin-bottom: 8px; }
.cs-retry { background: transparent; border: 1px solid var(--line-strong, #bfc8c1); border-radius: 4px; padding: 7px 12px; }
.cs-batch-list { max-height: 310px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.cs-batch { border-bottom: 1px solid var(--line, #d9ded9); }
.cs-batch-summary {
  display: grid; grid-template-columns: minmax(90px, 1fr) minmax(90px, .7fr) minmax(80px, 1fr) minmax(100px, .7fr);
  align-items: center; gap: 12px; padding: 10px 4px 10px 14px; position: relative; list-style: none;
}
.cs-batch-summary::-webkit-details-marker { display: none; }
.cs-batch-summary::before { content: "›"; position: absolute; left: 1px; top: 10px; color: var(--muted, #68716c); }
.cs-batch[open] > summary::before { transform: rotate(90deg); }
.cs-batch-summary:hover { background: var(--surface-muted, #f0f2ef); }
.cs-batch-name { min-width: 0; font-size: 12px; }
.cs-batch-work { font-size: 12px; font-variant-numeric: tabular-nums; }
.cs-batch-age { display: block; }
.cs-batch-due { color: var(--muted, #68716c); font-size: 11px; text-align: right; }
.cs-batch-track { display: block; height: 6px; border-bottom: 1px dashed var(--line-strong, #bfc8c1); }
.cs-batch-track > span { display: block; height: 6px; background: var(--amber, #c57714); }
.cs-batch-overdue .cs-batch-track > span { background: var(--red, #c44949); }
.cs-batch-overdue .cs-batch-due { color: var(--red, #c44949); }
.cs-batch-detail { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 8px; padding: 4px 14px 14px; font-size: 12px; }
.cs-batch-detail dt { color: var(--muted, #68716c); }
.cs-empty { padding: 16px 0; font-size: 12px; color: var(--muted, #68716c); }
.cs-chart { display: grid; gap: 8px; }
.cs-chart-lane { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: center; }
.cs-chart-caption { color: var(--ink, #1d2421); font-size: 12px; }
.cs-chart-caption > span { display: block; }
.cs-chart-caption > .cs-muted { font-size: 10px; }
.cs-chart-lane svg { display: block; width: 100%; height: 44px; min-width: 0; }
.cs-chart-baseline { stroke: var(--line, #d9ded9); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cs-history-value { fill: currentColor; }
.cs-history-action-0 { fill: var(--amber, #c57714); }
.cs-history-action-1 { fill: var(--blue, #287bb5); }
.cs-history-action-2 { fill: var(--green, #16836d); }
.cs-chart-cursor { stroke: var(--ink, #1d2421); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.cs-chart-axis { display: flex; justify-content: space-between; gap: 10px; padding-left: 148px; color: var(--muted, #68716c); font-size: 10px; margin-top: 5px; }
.cs-inspection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.cs-step-label { font-size: 12px; }
.cs-step-select { max-width: 100%; min-width: 0; min-height: 36px; padding: 4px 24px 4px 8px; border: 1px solid var(--line-strong, #bfc8c1); border-radius: 4px; background: var(--surface, #fff); color: var(--ink, #1d2421); }
.cs-step-detail { flex-basis: 100%; color: var(--muted, #68716c); font-size: 12px; }
@container (max-width: 620px) {
  .cs-action-comparison { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cs-summary { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cs-stage { padding-right: 8px; }
  .cs-stage + .cs-stage { padding-left: 10px; }
  .cs-stage-value { font-size: 23px; }
  .cs-stage-heading { gap: 5px; }
  .cs-batch-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; }
  .cs-batch-work { text-align: right; }
  .cs-chart-lane { grid-template-columns: 100px minmax(0, 1fr); gap: 8px; }
  .cs-chart-axis { padding-left: 108px; }
}
@container (max-width: 400px) {
  .cs-heading { gap: 6px 8px; }
  .cs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-stage { padding: 12px 10px 12px 0; }
  .cs-stage:nth-child(3) { border-left: 0; padding-left: 0; }
  .cs-stage:nth-child(3)::before { content: none; }
  .cs-stage:nth-child(n+3) { border-top: 1px solid var(--line, #d9ded9); }
  .cs-stage-value { font-size: 26px; }
  .cs-stage-heading { gap: 8px; }
  .cs-action span { padding: 7px 3px; font-size: 12px; min-height: 42px; }
  .cs-chart-lane { grid-template-columns: 84px minmax(0, 1fr); gap: 6px; }
  .cs-chart-axis { padding-left: 90px; }
  .cs-step-select { flex: 1 1 180px; }
}
