.court-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
}

.court-timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.court-timeline__summary {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.court-timeline__stepper {
  display: inline-flex;
  gap: var(--space-1);
}

.court-timeline__body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.court-timeline__lanes {
  margin: 0;
  padding: 28px 0 0;
  list-style: none;
  border-right: 1px solid var(--color-divider);
}

.court-timeline__lane {
  height: 44px;
  padding-right: var(--space-2);
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 44px;
  color: var(--color-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.court-timeline__chart {
  display: block;
  overflow: visible;
}

.tl-hour {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.tl-hour-label {
  fill: var(--color-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.tl-lane {
  stroke: var(--color-divider);
  stroke-width: 1;
}

.tl-now {
  stroke: var(--tone-danger-fg);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.tl-block__box {
  fill: var(--color-page);
  stroke: var(--color-chip-border);
  stroke-width: 1;
}

.tl-block__text {
  fill: var(--color-ink);
  font-size: 12px;
  font-weight: 500;
}

.tl-block--completed .tl-block__box {
  fill: var(--color-surface);
  stroke: var(--color-divider);
}

.tl-block--completed .tl-block__text {
  fill: var(--color-muted);
}

.tl-block--live .tl-block__box {
  fill: var(--tone-success-bg);
  stroke: var(--tone-success-dot);
}

.tl-block--live .tl-block__text {
  fill: var(--tone-success-fg);
}

.tl-block--overdue .tl-block__box {
  fill: var(--tone-warning-bg);
  stroke: var(--chart-second);
}

.tl-block--overdue .tl-block__text {
  fill: var(--tone-warning-fg);
}

.tl-block:hover .tl-block__box {
  stroke: var(--color-accent);
}

.tl-block:focus-visible {
  outline: none;
}

.tl-block:focus-visible .tl-block__box {
  stroke: var(--color-accent);
  stroke-width: 2;
}

.court-timeline__empty {
  padding: var(--space-4) 0;
}

.court-timeline__list {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.court-timeline__group-title {
  padding: var(--space-3) 0 var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
}

.court-timeline__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.court-timeline__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch-target);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  color: var(--color-ink);
}

.court-timeline__row-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.court-timeline__row-state {
  flex: none;
  font-size: var(--text-xs);
  font-weight: 600;
}

.court-timeline__row--live {
  color: var(--tone-success-fg);
}

.court-timeline__row--overdue {
  color: var(--tone-warning-fg);
}

.court-timeline__row--completed {
  color: var(--color-muted);
}

@media (max-width: 719.98px) {
  .court-timeline__body {
    display: none;
  }

  .court-timeline__list {
    display: block;
  }
}
