:root {
    --live-color: #22C55E;
  }

  @keyframes fade-in-and-slide-up {
    from {
      opacity: 0;
      transform: translateY(15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #status-page.is-visible {
    animation: fade-in-and-slide-up 0.8s var(--animation-curve-smooth) forwards;
  }

  .status-live-view { 
    grid-row: 2 / 3;
    overflow-y: auto; 
    padding: 1.5rem 3rem;
    min-height: 0;
  }

  .sticky-progress-card {
    position: sticky;
    top: 0; 
    z-index: 10;
    padding: 1.1rem 1.5rem;
    overflow: hidden;
    
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    
    border-radius: 16px;
    border: 1px solid var(--glass-border-color);
  }

  body[data-theme="dark"] .sticky-progress-card {
    background: rgba(31, 41, 55, 0.75);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }

  .sticky-progress-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3e%3cfilter id='noise'%3e%3cfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3e%3c/filter%3e%3crect width='100%25' height='100%25' filter='url(%23noise)'/%3e%3c/svg%3e");
    opacity: var(--glass-noise-opacity);
    pointer-events: none;
    z-index: -1;
  }
  
  .sticky-progress-card + .status-card {
    margin-top: 1.5rem;
  }

  .progress-main {
    flex-grow: 1;
    width: 100%;
  }

  .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
  }

  .progress-main h4 {
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }

  .etr-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
  }

  #overall-progress-percent {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
  }

  .status-card { 
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
    border-radius: 12px;
  }
  .status-card:last-child { margin-bottom: 0; }

  .status-card h4 { margin-top: 0; color: var(--primary-color); display: flex; align-items: center; gap: 0.5rem; }
  #live-summary-container p { margin: 0.5rem 0; display: flex; align-items: center; gap: 0.75rem; }
  #live-summary-container .material-symbols-outlined { font-size: 20px; color: var(--primary-color); }
  .chart-container { position: relative; height: 250px; }

  .status-card-header { display: flex; justify-content: space-between; align-items: center; }
  
  #tech-filter-trigger {
    width: auto;
    flex-grow: 0;
  }

  .progress-container {
    width: 100%;
    height: 0.5rem;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    margin-top: 0;
    overflow: hidden;
  }
  body[data-theme="dark"] .progress-container { background-color: rgba(0, 0, 0, 0.2); }
  .progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 99px;
    transition: width 0.4s var(--animation-curve-bouncy);
  }

  .shimmer::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shimmer-animation 1.5s infinite;
  }
  @keyframes shimmer-animation { 100% { transform: translateX(100%); } }

  #live-indicator.pulsing {
    width: 10px; height: 10px; background-color: var(--live-color); border-radius: 50%;
    animation: pulse-animation 1.5s infinite;
  }
  @keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
  }

  #summary-status-icon { font-size: 2rem; line-height: 1; }
  #summary-status-icon.processing { animation: spin 1s linear infinite; }
  
  .summary-skeleton .skeleton-line { height: 1.2rem; background-color: #e9ecef; border-radius: 4px; margin-bottom: 0.8rem; }
  body[data-theme="dark"] .summary-skeleton .skeleton-line { background-color: #4B5563; }
  .summary-skeleton .skeleton-line:last-child { width: 80%; }

  #task-timeline {
    position: relative;
    padding-left: 2rem;
  }
  .timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
    opacity: 0;
    animation: fade-slide-up 0.5s var(--animation-curve-bouncy) forwards;
  }
  .timeline-item:last-child {
    padding-bottom: 0;
  }

  /* MODIFICATION START: Added ::after pseudo-element for the fill effect */
  .timeline-item:not(:last-child)::before,
  .timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 24px;
    bottom: -0.5rem;
    width: 2px;
    transform-origin: top;
  }

  .timeline-item:not(:last-child)::before {
    background-color: var(--element-border-color);
    transform: scaleY(0);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 0;
  }

  .timeline-item:not(:last-child)::after {
    background-color: var(--live-color);
    transform: scaleY(0);
    transition: transform 0.4s ease-out 0.2s; /* Animate after a short delay */
    z-index: 1;
  }
  /* MODIFICATION END */

  .timeline-item.running:not(:last-child)::before,
  .timeline-item.completed:not(:last-child)::before {
    transform: scaleY(1);
  }

  /* MODIFICATION START: New rule to trigger the fill animation */
  .timeline-item.completed:not(:last-child)::after {
    transform: scaleY(1);
  }
  /* MODIFICATION END */

  .timeline-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2; /* Ensure marker is above the lines */
    background-color: var(--glass-bg-color); /* Use a solid color to hide the line behind it */
    border: 2px solid var(--element-border-color);
    transition: all 0.3s var(--animation-curve-bouncy);
  }
  body[data-theme="dark"] .timeline-marker {
    background-color: #1F2937; /* Dark theme solid color */
  }

  .timeline-marker .material-symbols-outlined {
    font-size: 16px;
    transition: all 0.3s var(--animation-curve-bouncy);
  }
  .timeline-content {
    flex-grow: 1;
  }
  .timeline-title {
    font-weight: 600;
    transition: color 0.3s ease;
  }
  .timeline-status {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    height: 1.2em;
  }
  .step-progress-container {
    width: 100%;
    height: 6px;
    background-color: rgba(233, 236, 239, 0.7);
    border-radius: 99px;
    margin-top: 0.5rem;
    overflow: hidden;
    display: none;
  }
  body[data-theme="dark"] .step-progress-container { background-color: rgba(75, 85, 99, 0.5); }
  .step-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 99px;
    transition: width 0.4s var(--animation-curve-bouncy);
  }

  .timeline-item.pending .timeline-marker {
    border-color: var(--element-border-color);
    color: var(--text-light);
  }
  .timeline-item.running .timeline-marker {
    border-color: var(--primary-color);
    color: var(--primary-color);
  }
  .timeline-item.running .timeline-marker .material-symbols-outlined {
    animation: spin 1.5s linear infinite;
  }
  .timeline-item.running .step-progress-container {
    display: block;
  }

  .timeline-item.completed .timeline-marker {
    background-color: var(--live-color);
    border-color: var(--live-color);
    color: white;
  }
  
  /* MODIFICATION: Removed the old rule that changed the ::before color */

  .timeline-item.completed .timeline-marker .material-symbols-outlined {
    animation: pop-in-check 0.6s var(--animation-curve-bouncy);
  }
  .timeline-item.completed .timeline-title {
    text-decoration: line-through;
    color: var(--text-light);
  }

  @keyframes pop-in-check {
    0% { transform: scale(0); }
    50% { transform: scale(1.25); }
    80% { transform: scale(0.9); }
    100% { transform: scale(1); }
  }