@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/badge/badge.css';
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/code-block/code-block.css';
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/collapsible/collapsible.css';
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/link/link.css';
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/progress/progress.css';
@import '/assets/f47cf25678047dc1d0c5372c25b330b4ffdf35604610caa62c68ff9ad26b877e/components/status-dot/status-dot.css';

@layer cinder.components {
  /* ========================================
   * RUN-STEP-TIMELINE
   * Ordered async execution rail with per-step status, metadata,
   * optional progress, and expandable detail panels.
   * ======================================== */

  .cinder-run-step-timeline {
    --_cinder-rst-rail-size: 1.5rem;
    --_cinder-rst-marker-size: 0.875rem;
    --_cinder-rst-rail-center: 0.6875rem;
    /* Every marker sits this far below the top of its row and is this tall, whatever it draws
       inside its box (a filled dot, a ring, a dashed ring), so the connector is measured from the
       box: it leaves the bottom of one marker and meets the top of the next. */
    --_cinder-rst-marker-offset: var(--cinder-space-1);
    --_cinder-rst-marker-block: 0.625rem;
    --_cinder-rst-depth: 0;
    --_cinder-rst-nested-indent: 1.75rem;

    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
  }

  /* ----------------------------------------
   * List item
   * ---------------------------------------- */

  .cinder-run-step-timeline__item {
    --_cinder-rst-depth-offset: calc(var(--_cinder-rst-depth) * var(--_cinder-rst-nested-indent));

    position: relative;
    /* The row owns the whole gap to the next row, so the connector, measured inside the row,
       meets the next marker. The foundation's 4px list-item margin would otherwise open a 4px
       gap under every line; it is folded into the padding, so the rhythm is unchanged. */
    margin: 0;
    padding-bottom: var(--cinder-space-5);
  }

  .cinder-run-step-timeline__item:last-child {
    padding-bottom: 0;
  }

  /* The connector: from the bottom of this row's marker to the top of the next row's marker,
     which sits the same offset below the next row's top. */
  .cinder-run-step-timeline__item::before {
    content: '';
    position: absolute;
    inset-block-start: calc(var(--_cinder-rst-marker-offset) + var(--_cinder-rst-marker-block));
    inset-block-end: calc(-1 * var(--_cinder-rst-marker-offset));
    inline-size: 1px;
    background: var(--cinder-border-muted);
  }
  .cinder-run-step-timeline__item:where(
      :not([dir='rtl'], [dir='rtl'] *),
      [dir='rtl'] [dir='ltr'],
      [dir='rtl'] [dir='ltr'] *
    )::before {
    left: calc(var(--_cinder-rst-depth-offset) + var(--_cinder-rst-rail-center));
  }
  .cinder-run-step-timeline__item:where(
      :is([dir='rtl'], [dir='rtl'] *):not([dir='rtl'] [dir='ltr'], [dir='rtl'] [dir='ltr'] *)
    )::before {
    right: calc(var(--_cinder-rst-depth-offset) + var(--_cinder-rst-rail-center));
  }

  /* An ancestor's line running past a nested row to the ancestor's next sibling. Each segment
     starts where the one above it ended (a marker offset into its row) and ends the same offset
     into the next row, so the segments meet end to end and the last meets the sibling's marker. */
  .cinder-run-step-timeline__rail-through {
    position: absolute;
    inset-block-start: var(--_cinder-rst-marker-offset);
    inset-block-end: calc(-1 * var(--_cinder-rst-marker-offset));
    inline-size: 1px;
    background: var(--cinder-border-muted);
    pointer-events: none;
  }
  .cinder-run-step-timeline__rail-through:where(
    :not([dir='rtl'], [dir='rtl'] *),
    [dir='rtl'] [dir='ltr'],
    [dir='rtl'] [dir='ltr'] *
  ) {
    left: calc(
      var(--_cinder-rst-rail-depth, 0) * var(--_cinder-rst-nested-indent) +
        var(--_cinder-rst-rail-center)
    );
  }
  .cinder-run-step-timeline__rail-through:where(
    :is([dir='rtl'], [dir='rtl'] *):not([dir='rtl'] [dir='ltr'], [dir='rtl'] [dir='ltr'] *)
  ) {
    right: calc(
      var(--_cinder-rst-rail-depth, 0) * var(--_cinder-rst-nested-indent) +
        var(--_cinder-rst-rail-center)
    );
  }

  /* A parent with no later sibling: its line runs along its nested rows and stops level with the
     last one's marker. */
  .cinder-run-step-timeline__rail-through[data-cinder-ends] {
    inset-block-end: auto;
    block-size: var(--_cinder-rst-marker-block);
  }

  .cinder-run-step-timeline__item[data-cinder-connector-after='hidden']::before {
    display: none;
  }

  .cinder-run-step-timeline__item[data-cinder-selectable] {
    cursor: pointer;
  }

  .cinder-run-step-timeline__selection-control {
    position: absolute;
    inset: 0;
    z-index: 0;
    padding: 0;
    background: transparent;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }

  .cinder-run-step-timeline__item[data-cinder-selectable]:has(
      .cinder-run-step-timeline__selection-control:focus-visible
    )
    .cinder-run-step-timeline__event {
    border-radius: var(--cinder-radius-md);
    outline: var(--cinder-ring-width) solid transparent;
    box-shadow: var(--_cinder-focus-ring-shadow);
  }

  .cinder-run-step-timeline__item[data-cinder-selected] .cinder-run-step-timeline__event {
    border-radius: var(--cinder-radius-md);
    background: color-mix(in oklch, var(--cinder-accent-solid), transparent 90%);
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--cinder-accent-solid), transparent 55%);
  }

  /* ----------------------------------------
   * Event layout: marker column + content column
   * ---------------------------------------- */

  .cinder-run-step-timeline__event {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--_cinder-rst-rail-size) 1fr;
    gap: var(--cinder-space-3);
    align-items: start;
    padding-inline-start: var(--_cinder-rst-depth-offset);
  }

  /* ----------------------------------------
   * Marker: StatusDot on the rail
   * ---------------------------------------- */

  .cinder-run-step-timeline__marker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--_cinder-rst-rail-size);
    padding-top: var(--_cinder-rst-marker-offset);
  }

  /* ----------------------------------------
   * Content column
   * ---------------------------------------- */

  .cinder-run-step-timeline__content {
    display: flex;
    flex-direction: column;
    gap: var(--cinder-space-2);
    min-width: 0;
  }

  /* ----------------------------------------
   * Header: step label + status badge
   * ---------------------------------------- */

  .cinder-run-step-timeline__header {
    display: flex;
    align-items: center;
    /* Badges and the link take a second line before the label is squeezed below its basis. */
    flex-wrap: wrap;
    gap: var(--cinder-space-2);
    min-inline-size: 0;
  }

  .cinder-run-step-timeline__icon {
    display: inline-flex;
    align-items: center;
    color: var(--cinder-text-muted);
    line-height: 1;
  }

  .cinder-run-step-timeline__icon svg {
    inline-size: 1rem;
    block-size: 1rem;
  }

  .cinder-run-step-timeline__icon [data-cinder-tool-activity-active] {
    animation: cinder-run-step-timeline-tool-pulse var(--cinder-duration-pulse) ease-in-out infinite;
  }

  @media (prefers-reduced-motion: reduce) {
    .cinder-run-step-timeline__icon [data-cinder-tool-activity-active] {
      animation: none;
    }
  }

  @keyframes cinder-run-step-timeline-tool-pulse {
    0%,
    100% {
      opacity: 0.6;
      transform: scale(0.96);
    }

    50% {
      opacity: 1;
      transform: scale(1);
    }
  }

  .cinder-run-step-timeline__label {
    font-size: var(--cinder-text-sm);
    font-weight: var(--cinder-font-medium);
    color: var(--cinder-text-default);
    flex: 1 1 auto;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .cinder-run-step-timeline__header > .cinder-run-step-timeline__label {
    flex-basis: 8rem;
  }

  /* Running step: label highlighted */
  .cinder-run-step-timeline__item[data-cinder-status='running'] .cinder-run-step-timeline__label,
  .cinder-run-step-timeline__item[data-cinder-status='retrying'] .cinder-run-step-timeline__label,
  .cinder-run-step-timeline__item[data-cinder-status='waiting_approval']
    .cinder-run-step-timeline__label {
    color: var(--cinder-text-default);
    font-weight: var(--cinder-font-semibold);
  }

  .cinder-run-step-timeline__link {
    font-size: var(--cinder-text-xs);
  }

  .cinder-run-step-timeline__link--unsafe {
    color: var(--cinder-text-muted);
  }

  /* Pending step: label muted */
  .cinder-run-step-timeline__item[data-cinder-status='pending'] .cinder-run-step-timeline__label,
  .cinder-run-step-timeline__item[data-cinder-status='skipped'] .cinder-run-step-timeline__label,
  .cinder-run-step-timeline__item[data-cinder-status='cancelled'] .cinder-run-step-timeline__label {
    color: var(--cinder-text-muted);
  }

  /* ----------------------------------------
   * Progress bar wrapper
   * ---------------------------------------- */

  .cinder-run-step-timeline__progress {
    width: 100%;
    max-width: 24rem;
  }

  /* ----------------------------------------
   * Metadata: start/end/duration/attempts
   * ---------------------------------------- */

  .cinder-run-step-timeline__meta {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--cinder-space-1) var(--cinder-space-4);
  }

  .cinder-run-step-timeline__meta-row {
    display: flex;
    gap: var(--cinder-space-1);
    align-items: baseline;
  }

  .cinder-run-step-timeline__meta-term {
    font-size: var(--cinder-text-xs);
    color: var(--cinder-text-muted);
    font-weight: var(--cinder-font-medium);
  }

  .cinder-run-step-timeline__meta-term::after {
    content: ':';
  }

  .cinder-run-step-timeline__meta-definition {
    font-size: var(--cinder-text-xs);
    color: var(--cinder-text-subtle);
    font-variant-numeric: tabular-nums;
  }

  /* ----------------------------------------
   * Expandable detail panels
   * ---------------------------------------- */

  .cinder-run-step-timeline__details {
    display: flex;
    flex-direction: column;
    gap: var(--cinder-space-1);
    padding-inline-start: var(--cinder-space-3);
    margin-top: var(--cinder-space-1);
  }

  .cinder-run-step-timeline__detail-content {
    font-family: var(--cinder-font-mono);
    font-size: var(--cinder-text-xs);
    color: var(--cinder-text-subtle);
    background: var(--cinder-surface-inset);
    border-radius: var(--cinder-radius-sm);
    padding: var(--cinder-space-2) var(--cinder-space-3);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    overflow-x: auto;
  }

  /* ----------------------------------------
   * Per-step body slot
   * ---------------------------------------- */

  .cinder-run-step-timeline__body {
    font-size: var(--cinder-text-sm);
    color: var(--cinder-text-muted);
  }

  /* ----------------------------------------
   * Rewound steps: speculatively executed, then unwound. Struck-through and
   * de-emphasized but still inspectable (details/collapsibles keep working).
   * The "Rewound" badge carries the state as text so it is never color-only.
   * ---------------------------------------- */

  .cinder-run-step-timeline__item[data-cinder-rewound] .cinder-run-step-timeline__label {
    text-decoration: line-through;
    color: var(--cinder-text-muted);
  }

  .cinder-run-step-timeline__item[data-cinder-rewound] .cinder-run-step-timeline__marker {
    opacity: 0.55;
  }

  .cinder-run-step-timeline__item[data-cinder-rewound] .cinder-run-step-timeline__meta {
    opacity: 0.7;
  }

  /* ----------------------------------------
   * Compensation steps: inset beneath their forward step with a dashed
   * reversal connector. The "Compensates <step>" badge names the relationship.
   * ---------------------------------------- */

  .cinder-run-step-timeline__item[data-cinder-compensation] {
    --_cinder-rst-compensation-inset: var(--cinder-space-5);

    padding-inline-start: var(--_cinder-rst-compensation-inset);
  }

  .cinder-run-step-timeline__item[data-cinder-compensation]::after {
    content: '';
    position: absolute;
    inset-block-start: -0.5rem;
    inline-size: var(--cinder-space-5);
    block-size: 1.5rem;
    border-inline-start: 1px dashed var(--cinder-border-strong);
    border-block-end: 1px dashed var(--cinder-border-strong);
    pointer-events: none;
  }

  .cinder-run-step-timeline__item[data-cinder-compensation]:where(
      :not([dir='rtl'], [dir='rtl'] *),
      [dir='rtl'] [dir='ltr'],
      [dir='rtl'] [dir='ltr'] *
    )::after {
    left: calc(var(--_cinder-rst-depth-offset) + var(--_cinder-rst-rail-center));
    border-bottom-left-radius: var(--cinder-radius-md);
  }

  .cinder-run-step-timeline__item[data-cinder-compensation]:where(
      :is([dir='rtl'], [dir='rtl'] *):not([dir='rtl'] [dir='ltr'], [dir='rtl'] [dir='ltr'] *)
    )::after {
    right: calc(var(--_cinder-rst-depth-offset) + var(--_cinder-rst-rail-center));
    border-bottom-right-radius: var(--cinder-radius-md);
  }

  /* ----------------------------------------
   * Branch / coordination groups: N parallel sub-lanes with won/lost/settled
   * outcomes. Winner emphasized, losers muted — driven by tokens.
   * ---------------------------------------- */

  .cinder-run-step-timeline__branch {
    min-width: 0;
  }

  .cinder-run-step-timeline__branch-heading {
    display: inline-flex;
    align-items: center;
    gap: var(--cinder-space-2);
  }

  .cinder-run-step-timeline__lanes {
    list-style: none;
    margin: var(--cinder-space-2) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--cinder-space-3);
  }

  .cinder-run-step-timeline__lane {
    border: 1px solid var(--cinder-border);
    border-radius: var(--cinder-radius-md);
    padding: var(--cinder-space-3);
    background: var(--cinder-surface-inset);
    min-width: 0;
  }

  .cinder-run-step-timeline__lane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cinder-space-2);
    margin-block-end: var(--cinder-space-2);
  }

  .cinder-run-step-timeline__lane-label {
    font-size: var(--cinder-text-xs);
    font-weight: var(--cinder-font-semibold);
    color: var(--cinder-text-default);
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .cinder-run-step-timeline__lane-steps {
    margin: 0;
  }

  /* Winner: emphasized border + full-strength text. */
  .cinder-run-step-timeline__lane[data-cinder-outcome='won'] {
    border-color: var(--cinder-status-success-border);
  }

  /* Loser: muted via a muted border and lane label — not a blanket opacity, so
   * step text, links, detail triggers, and focus rings keep full contrast. The
   * "Lost" outcome badge carries the outcome as text. */
  .cinder-run-step-timeline__lane[data-cinder-outcome='lost'] {
    border-color: var(--cinder-border);
  }

  .cinder-run-step-timeline__lane[data-cinder-outcome='lost']
    .cinder-run-step-timeline__lane-label {
    color: var(--cinder-text-muted);
  }

  /* Settled: neutral, no competitive emphasis. */
  .cinder-run-step-timeline__lane[data-cinder-outcome='settled'] {
    border-color: var(--cinder-border);
  }

  /* Still racing: accent edge to signal in-flight. */
  .cinder-run-step-timeline__lane[data-cinder-outcome='racing'] {
    border-color: var(--cinder-accent-border);
  }

  /* ----------------------------------------
   * Time, description and note: the line a step says about itself
   * ---------------------------------------- */

  .cinder-run-step-timeline__time {
    flex: none;
    margin-inline-start: auto;
    padding-inline-start: var(--cinder-space-3);
    font-size: var(--cinder-text-xs);
    color: var(--cinder-text-subtle);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .cinder-run-step-timeline__description {
    margin: 0;
    font-size: var(--cinder-text-sm);
    line-height: var(--cinder-leading-normal);
    color: var(--cinder-text-subtle);
    overflow-wrap: anywhere;
  }

  .cinder-run-step-timeline__code {
    font-family: var(--cinder-font-mono);
    font-size: var(--cinder-text-xs);
    color: var(--cinder-text-muted);
  }

  .cinder-run-step-timeline__note {
    display: flex;
    flex-direction: column;
    padding: var(--cinder-space-2) var(--cinder-space-3);
    border: 1px solid var(--cinder-border-muted);
    border-radius: var(--cinder-radius-md);
    background: var(--cinder-surface-inset);
    font-size: var(--cinder-text-sm);
    line-height: var(--cinder-leading-normal);
    color: var(--cinder-text-muted);
  }

  .cinder-run-step-timeline__note[data-cinder-tone='danger'] {
    border-color: var(--cinder-status-danger-border);
    background: var(--cinder-status-danger-background);
    color: var(--cinder-text-default);
  }

  .cinder-run-step-timeline__note-title,
  .cinder-run-step-timeline__note-line {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
  }

  .cinder-run-step-timeline__note-title {
    font-weight: var(--cinder-font-semibold);
    color: var(--cinder-text-default);
  }

  .cinder-run-step-timeline__note[data-cinder-tone='danger'] .cinder-run-step-timeline__note-title {
    color: var(--cinder-status-danger-text);
  }

  /* "Your note, " before the first line of a note that is somebody's words. */
  .cinder-run-step-timeline__note-label {
    color: var(--cinder-text-muted);
  }

  .cinder-run-step-timeline__note[data-cinder-tone='neutral'] .cinder-run-step-timeline__note-line {
    color: var(--cinder-text-default);
  }

  /* The text cursor of a note that is still arriving. */
  .cinder-run-step-timeline__cursor {
    display: inline-block;
    inline-size: 0.4375rem;
    block-size: 0.875rem;
    margin-inline-start: var(--cinder-space-0-5);
    vertical-align: -0.125rem;
    background: var(--cinder-accent-solid);
    animation: cinder-run-step-timeline-cursor 1.1s steps(1, end) infinite;
  }

  @media (prefers-reduced-motion: reduce) {
    :root:not([data-cinder-reduced-motion='false']):not([data-reduced-motion='off'])
      .cinder-run-step-timeline__cursor {
      animation: none;
    }
  }

  @keyframes cinder-run-step-timeline-cursor {
    50% {
      opacity: 0;
    }
  }

  /* ----------------------------------------
   * Narrative variant: the run as a story. Marker, label and time, one line of description.
   * ---------------------------------------- */

  .cinder-run-step-timeline[data-cinder-variant='narrative'] {
    --_cinder-rst-rail-size: 0.875rem;
    --_cinder-rst-rail-center: 0.4375rem;
    --_cinder-rst-marker-offset: 0.1875rem;
    --_cinder-rst-marker-block: var(--_cinder-rst-marker-size);
  }

  .cinder-run-step-timeline[data-cinder-variant='narrative'] .cinder-run-step-timeline__content {
    gap: var(--cinder-space-0-5);
  }

  .cinder-run-step-timeline[data-cinder-variant='narrative'] .cinder-run-step-timeline__label {
    font-size: var(--cinder-text-base);
    font-weight: var(--cinder-font-semibold);
  }

  /* A narrative row has no badges to move down, and its time stays at the end of the first line. */
  .cinder-run-step-timeline[data-cinder-variant='narrative'] .cinder-run-step-timeline__header {
    flex-wrap: nowrap;
  }

  .cinder-run-step-timeline[data-cinder-variant='narrative']
    .cinder-run-step-timeline__header
    > .cinder-run-step-timeline__label {
    flex-basis: auto;
  }

  .cinder-run-step-timeline[data-cinder-variant='narrative'] .cinder-run-step-timeline__note {
    margin-block-start: var(--cinder-space-1-5);
  }

  /* A fold row ("3 more calls") has a faint filled marker and one quiet action. */
  .cinder-run-step-timeline__item[data-cinder-fold] .cinder-run-step-marker {
    --_cinder-rst-marker-color: var(--cinder-border-faint);
  }

  .cinder-run-step-timeline__fold-action {
    padding: 0;
    border: 0;
    border-radius: var(--cinder-radius-sm);
    background: transparent;
    color: var(--cinder-accent-text);
    cursor: pointer;
    font: inherit;
  }

  .cinder-run-step-timeline__fold-action:focus-visible {
    outline: var(--cinder-ring-width) solid transparent;
    box-shadow: var(--_cinder-focus-ring-shadow);
  }

  @media (hover: hover) {
    .cinder-run-step-timeline__fold-action:hover {
      text-decoration: underline;
    }
  }

  /* What has not run, or has not started, reads quieter than what has. */
  .cinder-run-step-timeline[data-cinder-variant='narrative']
    .cinder-run-step-timeline__item[data-cinder-status='skipped']
    .cinder-run-step-timeline__label,
  .cinder-run-step-timeline[data-cinder-variant='narrative']
    .cinder-run-step-timeline__item[data-cinder-status='pending']
    .cinder-run-step-timeline__label {
    color: var(--cinder-text-subtle);
  }

  /* ----------------------------------------
   * Narrative marker (see _run-step-marker.svelte)
   * ---------------------------------------- */

  .cinder-run-step-marker {
    --_cinder-rst-marker-color: var(--cinder-border-contrast);

    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--_cinder-rst-marker-size, 0.875rem);
    block-size: var(--_cinder-rst-marker-size, 0.875rem);
    border-radius: var(--cinder-radius-full);
    background: var(--_cinder-rst-marker-color);
    color: var(--cinder-surface-raised);
  }

  .cinder-run-step-marker__glyph {
    inline-size: 0.625rem;
    block-size: 0.625rem;
    stroke-width: 3;
  }

  .cinder-run-step-marker[data-cinder-status='succeeded'] {
    --_cinder-rst-marker-color: var(--cinder-status-success-solid);

    color: var(--cinder-status-success-contrast);
  }

  .cinder-run-step-marker[data-cinder-status='failed'],
  .cinder-run-step-marker[data-cinder-status='timed-out'] {
    --_cinder-rst-marker-color: var(--cinder-status-danger-solid);

    color: var(--cinder-status-danger-contrast);
  }

  /* Rings: under way (blue, tinted, with a halo), waiting on a person (amber), waiting on a signal
     (neutral). The centre is open, so none of them reads as finished. */
  .cinder-run-step-marker[data-cinder-status='running'],
  .cinder-run-step-marker[data-cinder-status='retrying'],
  .cinder-run-step-marker[data-cinder-status='waiting_approval'],
  .cinder-run-step-marker[data-cinder-status='waiting'] {
    border: 2px solid var(--_cinder-rst-marker-ring, var(--cinder-border-contrast));
    background: var(--_cinder-rst-marker-fill, var(--cinder-surface-raised));
  }

  .cinder-run-step-marker[data-cinder-status='running'] {
    --_cinder-rst-marker-ring: var(--cinder-status-info-solid);
    --_cinder-rst-marker-fill: var(--cinder-status-info-background);

    box-shadow: 0 0 0 3px color-mix(in oklch, var(--cinder-status-info-solid), transparent 82%);
  }

  .cinder-run-step-marker[data-cinder-status='retrying'],
  .cinder-run-step-marker[data-cinder-status='waiting_approval'] {
    --_cinder-rst-marker-ring: var(--cinder-status-warning-indicator);
  }

  /* Not started, or not run: a dashed ring, so it reads as a place still to be filled. */
  .cinder-run-step-marker[data-cinder-status='pending'],
  .cinder-run-step-marker[data-cinder-status='skipped'] {
    border: 1.5px dashed var(--cinder-border-contrast);
    background: var(--cinder-surface-raised);
  }

  @media (forced-colors: active) {
    .cinder-run-step-marker {
      forced-color-adjust: none;
      background: CanvasText;
      color: Canvas;
    }

    .cinder-run-step-marker[data-cinder-status='running'],
    .cinder-run-step-marker[data-cinder-status='retrying'],
    .cinder-run-step-marker[data-cinder-status='waiting_approval'],
    .cinder-run-step-marker[data-cinder-status='waiting'],
    .cinder-run-step-marker[data-cinder-status='pending'],
    .cinder-run-step-marker[data-cinder-status='skipped'] {
      border-color: CanvasText;
      background: Canvas;
      box-shadow: none;
    }
  }

  /* ----------------------------------------
   * Focus ring (not applicable to the root list, but included for
   * completeness if the component is ever given an interactive element)
   * ---------------------------------------- */

  .cinder-run-step-timeline:focus-visible {
    outline: var(--cinder-ring-width) solid transparent;
    box-shadow: var(--_cinder-focus-ring-shadow);
  }

  @media (forced-colors: active) {
    .cinder-run-step-timeline:focus-visible {
      outline: var(--cinder-ring-width) solid ButtonText;
    }

    /* Ensure connector lines are visible in high-contrast mode */
    .cinder-run-step-timeline__item::before,
    .cinder-run-step-timeline__rail-through {
      background: ButtonText;
    }

    .cinder-run-step-timeline__item[data-cinder-selected] .cinder-run-step-timeline__event {
      outline: 1px solid Highlight;
      background: Canvas;
      box-shadow: none;
    }

    .cinder-run-step-timeline__item[data-cinder-selectable]:has(
        .cinder-run-step-timeline__selection-control:focus-visible
      )
      .cinder-run-step-timeline__event {
      outline: var(--cinder-ring-width) solid ButtonText;
      box-shadow: none;
    }
  }
}
