網站導覽

v2.1.0
資料顯示

追蹤記錄

逐步呈現代理程式或工作做過的事,每個步驟以低調的單列摘要呈現,有細節時可展開查看。

本頁內容

追蹤記錄逐步呈現代理程式或工作做過的事,包括思考、搜尋、讀取和執行的內容。每個步驟以低調的單列摘要呈現,標記沿同一欄排列,由一條細線串起。有細節的步驟使用原生 <details>,按下摘要列即可展開,無須腳本。其餘步驟以一般文字列顯示。

追蹤記錄

<div class="card max-w(440) mx-auto">  <div class="trace">    <details class="trace-step">      <summary class="trace-summary">        <span class="trace-marker"></span>Thought about the migration<span class="trace-meta">8s</span><svg class="icon trace-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />        </svg>      </summary>      <div class="trace-detail">        The table has two million rows, so the column is added as nullable first and filled in batches.      </div>    </details>    <details class="trace-step" open>      <summary class="trace-summary">        <span class="trace-marker"></span>Searched the codebase<span class="trace-meta">12 files</span><svg class="icon trace-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />        </svg>      </summary>      <div class="trace-detail">        <code class="code">orders.status</code> is read in 12 files, 3 of them in the billing service.      </div>    </details>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Read schema.prisma<span class="trace-meta">0.4s</span>      </p>    </div>    <div class="trace-step" aria-busy="true">      <p class="trace-summary"><span class="trace-marker"></span>Writing the migration</p>    </div>  </div></div>
import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'<div className="card max-w(440) mx-auto">  <div className="trace">    <details className="trace-step">      <summary className="trace-summary">        <span className="trace-marker"></span>Thought about the migration<span className="trace-meta">8s</span><ChevronDownIcon className="icon trace-chevron" />      </summary>      <div className="trace-detail">        The table has two million rows, so the column is added as nullable first and filled in batches.      </div>    </details>    <details className="trace-step" open>      <summary className="trace-summary">        <span className="trace-marker"></span>Searched the codebase<span className="trace-meta">12 files</span><ChevronDownIcon className="icon trace-chevron" />      </summary>      <div className="trace-detail">        <code className="code">orders.status</code> is read in 12 files, 3 of them in the billing service.      </div>    </details>    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"></span>Read schema.prisma<span className="trace-meta">0.4s</span>      </p>    </div>    <div className="trace-step" aria-busy="true">      <p className="trace-summary"><span className="trace-marker"></span>Writing the migration</p>    </div>  </div></div>
<script>  import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'</script><div class="card max-w(440) mx-auto">  <div class="trace">    <details class="trace-step">      <summary class="trace-summary">        <span class="trace-marker"></span>Thought about the migration<span class="trace-meta">8s</span><ChevronDownIcon class="icon trace-chevron" />      </summary>      <div class="trace-detail">        The table has two million rows, so the column is added as nullable first and filled in batches.      </div>    </details>    <details class="trace-step" open>      <summary class="trace-summary">        <span class="trace-marker"></span>Searched the codebase<span class="trace-meta">12 files</span><ChevronDownIcon class="icon trace-chevron" />      </summary>      <div class="trace-detail">        <code class="code">orders.status</code> is read in 12 files, 3 of them in the billing service.      </div>    </details>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Read schema.prisma<span class="trace-meta">0.4s</span>      </p>    </div>    <div class="trace-step" aria-busy="true">      <p class="trace-summary"><span class="trace-marker"></span>Writing the migration</p>    </div>  </div></div>
<script setup>import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'</script><template>  <div class="card max-w(440) mx-auto">    <div class="trace">      <details class="trace-step">        <summary class="trace-summary">          <span class="trace-marker"></span>Thought about the migration<span class="trace-meta">8s</span><ChevronDownIcon class="icon trace-chevron" />        </summary>        <div class="trace-detail">          The table has two million rows, so the column is added as nullable first and filled in batches.        </div>      </details>      <details class="trace-step" open>        <summary class="trace-summary">          <span class="trace-marker"></span>Searched the codebase<span class="trace-meta">12 files</span><ChevronDownIcon class="icon trace-chevron" />        </summary>        <div class="trace-detail">          <code class="code">orders.status</code> is read in 12 files, 3 of them in the billing service.        </div>      </details>      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"></span>Read schema.prisma<span class="trace-meta">0.4s</span>        </p>      </div>      <div class="trace-step" aria-busy="true">        <p class="trace-summary"><span class="trace-marker"></span>Writing the migration</p>      </div>    </div>  </div></template>

#步驟

每個步驟用 trace-step 包住 trace-summary。摘要列包含標記和文字,也可在末端加入 trace-meta,顯示耗時或找到的項目數等數字資訊。

步驟有細節時,請使用 <details>,將摘要列放在 <summary> 中,接著以 trace-detail 包住細節。樣式表偵測到細節後,會讓該列可以展開或收合。請在摘要文字後放入 trace-chevron 圖示,步驟展開時它會朝下。瀏覽器能對 ::details-content 套用轉場時,細節會以動畫展開至內容本身的高度,其他瀏覽器則會立即展開。使用頁面內搜尋時,只要收合的步驟含有相符文字,瀏覽器就會自動展開它,行為和其他 <details> 相同。

#標記

空的 trace-marker 會顯示為小圓點。也可以在標記中放入圖示來表示步驟類型,或在步驟執行期間顯示帶有 spinner-inline 的載入指示器。

標記

<div class="card max-w(440) mx-auto">  <div class="trace">    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <circle cx="7" cy="7" r="4.5" /><path d="M10.182 10.182L14 14" />          </svg>        </span>Searched for "rate limit"<span class="trace-meta">4 results</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <path d="M4.5 2L9.0858 2A1 1 0 0 1 9.7929 2.2929L12.2071 4.7071A1 1 0 0 1 12.5 5.4142L12.5 13A1 1 0 0 1 11.5 14L4.5 14A1 1 0 0 1 3.5 13L3.5 3A1 1 0 0 1 4.5 2Z" /><path d="M10 2.5V4.4A0.1 0.1 0 0 0 10.1 4.5H12L12.2409 4.7427A0.9993 0.9993 0 0 1 12.5 5.4142V5.5H10.1Q9.6444 5.5 9.3222 5.1778Q9 4.8556 9 4.4V2A1.1002 1.1002 0 0 1 9.3761 2.0431A1.0001 1.0001 0 0 1 9.7929 2.2929L10 2.5Z" fill="currentColor" stroke="none" fill-rule="evenodd" />          </svg>        </span>Read limits.ts<span class="trace-meta">214 lines</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker">          <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">            <rect x="2" y="3" width="12" height="10" rx="1" /><path d="M4.5 6L6.3586 7.8586A0.2 0.2 0 0 1 6.3586 8.1414L4.5 10" /><path d="M9 10L11.5 10" />          </svg>        </span>Ran the tests<span class="trace-meta">48 passed</span>      </p>    </div>    <div class="trace-step" aria-busy="true">      <p class="trace-summary">        <span class="trace-marker">          <span class="spinner spinner-inline" aria-hidden="true"></span>        </span>Writing the answer      </p>    </div>  </div></div>
import SearchIcon from '@master/icons-react/native/16/soft/search'import FileIcon from '@master/icons-react/native/16/soft/file'import TerminalIcon from '@master/icons-react/native/16/soft/terminal'<div className="card max-w(440) mx-auto">  <div className="trace">    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"><SearchIcon className="icon" /></span>Searched for "rate limit"<span className="trace-meta">4 results</span>      </p>    </div>    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"><FileIcon className="icon" /></span>Read limits.ts<span className="trace-meta">214 lines</span>      </p>    </div>    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"><TerminalIcon className="icon" /></span>Ran the tests<span className="trace-meta">48 passed</span>      </p>    </div>    <div className="trace-step" aria-busy="true">      <p className="trace-summary">        <span className="trace-marker">          <span className="spinner spinner-inline" aria-hidden="true"></span>        </span>Writing the answer      </p>    </div>  </div></div>
<script>  import SearchIcon from '@master/icons-svelte/native/16/soft/search'  import FileIcon from '@master/icons-svelte/native/16/soft/file'  import TerminalIcon from '@master/icons-svelte/native/16/soft/terminal'</script><div class="card max-w(440) mx-auto">  <div class="trace">    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"><SearchIcon class="icon" /></span>Searched for "rate limit"<span class="trace-meta">4 results</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"><FileIcon class="icon" /></span>Read limits.ts<span class="trace-meta">214 lines</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"><TerminalIcon class="icon" /></span>Ran the tests<span class="trace-meta">48 passed</span>      </p>    </div>    <div class="trace-step" aria-busy="true">      <p class="trace-summary">        <span class="trace-marker">          <span class="spinner spinner-inline" aria-hidden="true"></span>        </span>Writing the answer      </p>    </div>  </div></div>
<script setup>import SearchIcon from '@master/icons-vue/native/16/soft/search'import FileIcon from '@master/icons-vue/native/16/soft/file'import TerminalIcon from '@master/icons-vue/native/16/soft/terminal'</script><template>  <div class="card max-w(440) mx-auto">    <div class="trace">      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"><SearchIcon class="icon" /></span>Searched for "rate limit"<span class="trace-meta">4 results</span>        </p>      </div>      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"><FileIcon class="icon" /></span>Read limits.ts<span class="trace-meta">214 lines</span>        </p>      </div>      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"><TerminalIcon class="icon" /></span>Ran the tests<span class="trace-meta">48 passed</span>        </p>      </div>      <div class="trace-step" aria-busy="true">        <p class="trace-summary">          <span class="trace-marker">            <span class="spinner spinner-inline" aria-hidden="true"></span>          </span>Writing the answer        </p>      </div>    </div>  </div></template>

#執行中與失敗

進行中的步驟帶有 aria-busy="true",文字會加深,純圓點標記則會向外擴散一圈。使用者啟用減少動態效果時,外圈會以靜止的光暈呈現。步驟結束後請移除這個屬性。

步驟失敗時,使用 trace-failed 將標記和摘要列末端的數字資訊改為危險狀態色。ARIA 沒有表示清單項目失敗的狀態,因此這裡使用類別。請在摘要列或展開後的內容中寫明哪個動作失敗,讓使用者也能透過文字辨識。

失敗

<div class="card max-w(440) mx-auto">  <div class="trace">    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Installed dependencies<span class="trace-meta">14s</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Compiled 38 routes<span class="trace-meta">48s</span>      </p>    </div>    <details class="trace-step trace-failed" open>      <summary class="trace-summary">        <span class="trace-marker"></span>Ran the test suite<span class="trace-meta">2 failed</span><svg class="icon trace-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />        </svg>      </summary>      <div class="trace-detail">        orders.spec.ts expected the status to be "paid" and received "pending", twice.      </div>    </details>  </div></div>
import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'<div className="card max-w(440) mx-auto">  <div className="trace">    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"></span>Installed dependencies<span className="trace-meta">14s</span>      </p>    </div>    <div className="trace-step">      <p className="trace-summary">        <span className="trace-marker"></span>Compiled 38 routes<span className="trace-meta">48s</span>      </p>    </div>    <details className="trace-step trace-failed" open>      <summary className="trace-summary">        <span className="trace-marker"></span>Ran the test suite<span className="trace-meta">2 failed</span><ChevronDownIcon className="icon trace-chevron" />      </summary>      <div className="trace-detail">        orders.spec.ts expected the status to be "paid" and received "pending", twice.      </div>    </details>  </div></div>
<script>  import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'</script><div class="card max-w(440) mx-auto">  <div class="trace">    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Installed dependencies<span class="trace-meta">14s</span>      </p>    </div>    <div class="trace-step">      <p class="trace-summary">        <span class="trace-marker"></span>Compiled 38 routes<span class="trace-meta">48s</span>      </p>    </div>    <details class="trace-step trace-failed" open>      <summary class="trace-summary">        <span class="trace-marker"></span>Ran the test suite<span class="trace-meta">2 failed</span><ChevronDownIcon class="icon trace-chevron" />      </summary>      <div class="trace-detail">        orders.spec.ts expected the status to be "paid" and received "pending", twice.      </div>    </details>  </div></div>
<script setup>import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'</script><template>  <div class="card max-w(440) mx-auto">    <div class="trace">      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"></span>Installed dependencies<span class="trace-meta">14s</span>        </p>      </div>      <div class="trace-step">        <p class="trace-summary">          <span class="trace-marker"></span>Compiled 38 routes<span class="trace-meta">48s</span>        </p>      </div>      <details class="trace-step trace-failed" open>        <summary class="trace-summary">          <span class="trace-marker"></span>Ran the test suite<span class="trace-meta">2 failed</span><ChevronDownIcon class="icon trace-chevron" />        </summary>        <div class="trace-detail">          orders.spec.ts expected the status to be "paid" and received "pending", twice.        </div>      </details>    </div>  </div></template>

#單列記錄

只有一個步驟的追蹤記錄,可以用在助理回答上方,列出執行的動作和耗時,並可展開查看背後的推理。

單一步驟

<div class="trace max-w(440) mx-auto">  <details class="trace-step">    <summary class="trace-summary">      <span class="trace-marker"></span>Thought for 12 seconds<svg class="icon trace-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(90 8 8)" />      </svg>    </summary>    <div class="trace-detail">      The question is about the fallback, not the feature, so the answer starts from a browser without anchor positioning.    </div>  </details></div>
import ChevronDownIcon from '@master/icons-react/native/16/soft/chevron-down'<div className="trace max-w(440) mx-auto">  <details className="trace-step">    <summary className="trace-summary">      <span className="trace-marker"></span>Thought for 12 seconds<ChevronDownIcon className="icon trace-chevron" />    </summary>    <div className="trace-detail">      The question is about the fallback, not the feature, so the answer starts from a browser without anchor positioning.    </div>  </details></div>
<script>  import ChevronDownIcon from '@master/icons-svelte/native/16/soft/chevron-down'</script><div class="trace max-w(440) mx-auto">  <details class="trace-step">    <summary class="trace-summary">      <span class="trace-marker"></span>Thought for 12 seconds<ChevronDownIcon class="icon trace-chevron" />    </summary>    <div class="trace-detail">      The question is about the fallback, not the feature, so the answer starts from a browser without anchor positioning.    </div>  </details></div>
<script setup>import ChevronDownIcon from '@master/icons-vue/native/16/soft/chevron-down'</script><template>  <div class="trace max-w(440) mx-auto">    <details class="trace-step">      <summary class="trace-summary">        <span class="trace-marker"></span>Thought for 12 seconds<ChevronDownIcon class="icon trace-chevron" />      </summary>      <div class="trace-detail">        The question is about the fallback, not the feature, so the answer starts from a browser without anchor positioning.      </div>    </details>  </div></template>

#追蹤記錄、時間軸或步驟

追蹤記錄呈現工作執行情況,可以標示進行中或失敗的步驟,也能展開查看執行細節。時間軸記錄事件及其發生時間。步驟則呈現讀者依序完成的固定流程。

#無障礙

  • 可展開的步驟使用 <details>,由瀏覽器為摘要列提供展開與收合控制項的角色、狀態和鍵盤操作。
  • 標記由樣式表繪製,輔助技術不會朗讀。標記內的圖示是裝飾,請在摘要列寫明這個步驟的內容。
  • 如果追蹤記錄會在顯示期間增加步驟,請將它放在帶有 aria-live="polite" 的區域內,讓新增的步驟在加入時由輔助技術朗讀。進行中的步驟帶有 aria-busy,讓使用者可透過視覺樣式或輔助技術辨識其狀態。
  • 在觸控螢幕上,每列高 44px。

#類別

類別說明
trace步驟直向排列,標記之間以細線相連
trace-step單一步驟。有詳細內容時使用 details 元素,沒有詳細內容時可使用任意區塊元素。
trace-failed失敗步驟的圓點或圖示,以及該列末端的補充資訊,都使用危險狀態的前景色。搭配 trace-step 使用
trace-summary步驟列高 32px,依序包含標記、文字和末端的補充資訊。套用於 summary 時,整列可切換展開狀態,並在文字後顯示箭頭
trace-chevron有細節的步驟文字後方的箭頭圖示,步驟展開時朝下
trace-marker行首標記可留空以顯示圓點,也可放入圖示。步驟執行時可顯示 spinner-inline。
trace-meta在列尾端用等寬數字呈現資訊,例如耗時或找到的項目數
trace-detail步驟的詳細內容顯示在步驟列下方,起始位置與列內文字對齊。

#自訂屬性

屬性預設值說明
--trace-marker1.25rem標記欄寬度

#原始碼

@master/ui/components/trace.css
/* * Trace: what an agent or a job did, step by step. * Each step is one quiet line with a marker on a column, and a hairline joins the markers. A step that has * something behind it (the query it ran, the lines it read, why it failed) is a native <details>: its line * is the <summary>, with a small chevron after the words, and the detail opens under it to its own height. * A step with nothing behind it is a plain line. * A bare marker is a dot; it may hold an icon instead, or a spinner-inline while the step runs. The step that is running carries * aria-busy: its words take the strong ink and its dot sends out a ring. A step that failed is trace-failed, * a class because ARIA has no word for it here; the reason, in words, is in the line or behind it. * Geometry: a 32px row, a 20px marker column, and the detail on the edge of the words. */@layer components.ui {  .trace {    --trace-marker: 1.25rem;    --trace-padding: .375rem;    --trace-closed: -90deg;    display: grid;    min-width: 0;    margin: 0;    padding: 0;    color: var(--color-text-body);    font: 400 .84375rem/1.25rem var(--font-family-sans);    font-feature-settings: inherit;    list-style: none;    @media (pointer: coarse) {      --trace-padding: .75rem;    }  }  .trace-step {    position: relative;    min-width: 0;    /* Lets block-size travel from 0 to auto. */    interpolate-size: allow-keywords;    /* The line from under this marker to the next one. */    &:not(:last-child)::before {      content: '';      position: absolute;      inset-block: calc(var(--trace-padding) + var(--trace-marker) + .125rem) calc(-1 * var(--trace-padding) + .125rem);      inset-inline-start: calc(var(--trace-marker) / 2 - .5px);      width: 1px;      background: var(--color-line-divider);    }    &::details-content {      block-size: 0;      overflow-y: clip;      opacity: 0;      transition-property: block-size, opacity, content-visibility;      transition-duration: var(--duration-base);      transition-timing-function: var(--easing-glide);      transition-behavior: allow-discrete;    }    &[open]::details-content {      block-size: auto;      opacity: 1;    }    /* The chevron points down while its step is open. A closed step nested in an open one keeps its own. */    &[open] .trace-summary:has(~ .trace-detail) .trace-chevron {      rotate: none;    }    &[open] .trace-step:not([open]) .trace-summary:has(~ .trace-detail) .trace-chevron {      rotate: var(--trace-closed);    }    /* Running: the words come forward and a bare dot sends out a ring. */    &[aria-busy="true"] {      .trace-summary {        color: var(--color-text-strong);      }      .trace-marker:empty::before {        background: var(--color-text-strong);        animation: trace-live 1.8s var(--easing-glide) infinite;      }    }    /* Failed: the dot, an icon and the fact at the end of the line take the danger ink. */    &.trace-failed {      .trace-marker {        --icon-color: var(--color-danger);        color: var(--color-danger);      }      .trace-marker:empty::before {        background: var(--color-danger);      }      .trace-meta {        color: var(--color-danger);      }    }    @media (prefers-reduced-motion: reduce) {      &::details-content {        transition-property: opacity, content-visibility;      }      &[aria-busy="true"] .trace-marker:empty::before {        box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-text-strong) 12%, transparent);        animation: none;      }    }    /* Colors that are not system colors turn to Canvas here, so the line and the dots of a running or failed step name one. */    @media (forced-colors: active) {      &:not(:last-child)::before {        background: CanvasText;      }      &[aria-busy="true"] .trace-marker:empty::before {        background: Highlight;      }      &.trace-failed .trace-marker:empty::before {        background: CanvasText;      }    }  }  /* The step's line: the marker, the words, and a fact at the end. On a <summary> it is the toggle. */  .trace-summary {    display: flex;    align-items: flex-start;    gap: .5rem;    min-height: calc(var(--trace-marker) + var(--trace-padding) * 2);    margin: 0;    padding: var(--trace-padding) 0;    border-radius: calc((var(--radius-chip) - 2px) * var(--corner-scale));    corner-shape: var(--corner-shape);    list-style: none;    overflow-wrap: anywhere;    -webkit-tap-highlight-color: transparent;    &::-webkit-details-marker {      display: none;    }    /* With a detail after it, the line is a toggle: a chevron follows the words. */    &:has(~ .trace-detail) {      cursor: pointer;      touch-action: manipulation;      user-select: none;      -webkit-user-select: none;      .trace-chevron {        order: 1;        flex: none;        width: .875rem;        height: .875rem;        margin-block: .1875rem;        margin-inline-start: -.25rem;        color: var(--color-text-muted);        rotate: var(--trace-closed);        transition: rotate var(--duration-base) var(--easing-glide);      }      /* Closed, the chevron points the way the words run. */      &:dir(rtl) {        --trace-closed: 90deg;      }      @media (hover: hover) {        &:hover {          color: var(--color-text-strong);        }        &:hover .trace-chevron {          color: var(--color-text-strong);        }      }      /* Pressed: the strong ink, as under the pointer, so a tap is answered too. */      &:active {        color: var(--color-text-strong);      }      &:active .trace-chevron {        color: var(--color-text-strong);      }    }    &:focus-visible {      @apply --focus-ring;    }    @media (prefers-reduced-motion: reduce) {      .trace-chevron {        transition: none;      }    }    @media (forced-colors: active) {      &:has(~ .trace-detail) .trace-chevron, &:has(~ .trace-detail):is(:hover, :active) .trace-chevron {        color: CanvasText;      }    }  }  /* The marker's column, as tall as the first line of words. Empty, it is a dot. */  .trace-marker {    --icon-size: .875rem;    --icon-color: var(--color-text-muted);    display: grid;    flex: none;    place-items: center;    width: var(--trace-marker);    height: var(--trace-marker);    color: var(--color-text-muted);    &:empty::before {      content: '';      width: .375rem;      height: .375rem;      border-radius: 999px;      background: var(--color-line-mark);    }    @media (forced-colors: active) {      &:empty::before {        background: CanvasText;      }    }  }  /* A fact at the end of the line: how long it took, how many it found. */  .trace-meta {    order: 2;    flex: none;    margin-inline-start: auto;    padding-inline-start: .5rem;    color: var(--color-text-muted);    font-size: .78125rem;    font-variant-numeric: tabular-nums;  }  /* What stands behind the step, on the edge of its words. */  .trace-detail {    margin-inline-start: calc(var(--trace-marker) + .5rem);    padding: .125rem 0 .625rem;    color: var(--color-text-muted);    font-size: .8125rem;    line-height: 1.55;    text-wrap: pretty;    overflow-wrap: anywhere;  }}@keyframes trace-live {  from {    box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-text-strong) 40%, transparent);  }  70%, to {    box-shadow: 0 0 0 5px transparent;  }}